diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 00000000..7f8900b7 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,51 @@ +// .eslintrc.mjs +module.exports = { + root: true, + extends: [ + 'plugin:@wordpress/eslint-plugin/recommended-with-formatting', + 'plugin:storybook/recommended', + 'plugin:@typescript-eslint/recommended', + ], + settings: { + 'import/resolver': { + node: { + extensions: ['.js', '.jsx', '.ts', '.tsx'], + }, + alias: { + map: [ + ['@/icons', './src/ui/icons.js'], + ['@/components', './src/components'], + ['@/utilities', './src/utilities'], + ['@', './src'], + ], + extensions: ['.js', '.jsx', '.ts', '.tsx'], + }, + }, + }, + parserOptions: { + requireConfigFile: false, + babelOptions: { + presets: ['@wordpress/babel-preset-default'], + }, + }, + overrides: [ + { + files: ['./src/utilities/withTW.js'], + rules: { + '@typescript-eslint/no-var-requires': 'off', + }, + }, + ], + rules: { + 'jsx-a11y/click-events-have-key-events': 'off', + 'react-hooks/exhaustive-deps': 'off', + 'jsx-a11y/label-has-associated-control': 'off', + 'jsx-a11y/no-noninteractive-element-interactions': 'off', + 'jsx-a11y/anchor-is-valid': 'off', + + 'no-mixed-spaces-and-tabs': 'off', + }, + globals: { + localStorage: 'readonly', + }, +}; diff --git a/.prettierrc.mjs b/.prettierrc.mjs new file mode 100644 index 00000000..b1be3553 --- /dev/null +++ b/.prettierrc.mjs @@ -0,0 +1,16 @@ +// Import the default config file and expose it in the project root. +// Useful for editor integrations. + +import config from '@wordpress/prettier-config'; + +config.overrides = [ + { + files: ['*.scss', '*.css'], + options: { + printWidth: 500, + singleQuote: false, + }, + }, +]; + +export default config; diff --git a/.stylelintrc.mjs b/.stylelintrc.mjs new file mode 100644 index 00000000..2d2b181f --- /dev/null +++ b/.stylelintrc.mjs @@ -0,0 +1,51 @@ +export default { + extends: ['@wordpress/stylelint-config'], + rules: { + 'font-family-name-quotes': 'always-where-recommended', + 'function-url-quotes': 'always', + 'declaration-property-unit-allowed-list': { + '/^line-height/': ['em', 'rem', 'px'], + }, + 'comment-empty-line-before': null, + 'selector-class-pattern': null, + 'selector-id-pattern': null, + 'no-descending-specificity': null, + 'no-duplicate-selectors': null, + 'at-rule-no-unknown': null, + 'at-rule-empty-line-before': null, + 'at-rule-empty-line-before': [ + 'always', + { + except: ['blockless-after-same-name-blockless', 'first-nested'], + ignore: ['after-comment'], + }, + ], + 'block-no-empty': true, + 'no-empty-source': true, + 'declaration-empty-line-before': [ + 'always', + { + except: ['after-declaration', 'first-nested'], + ignore: ['after-comment', 'inside-single-line-block'], + }, + ], + 'rule-empty-line-before': [ + 'always-multi-line', + { + except: ['first-nested'], + ignore: ['after-comment'], + }, + ], + }, + overrides: [ + { + files: ['*.scss', '**/*.scss'], + extends: '@wordpress/stylelint-config/scss-stylistic', + }, + { + files: ['*.css', '**/*.css'], + extends: '@wordpress/stylelint-config/stylistic', + }, + ], + customSyntax: 'postcss-scss', +}; diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 00000000..a19d72c3 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,58 @@ +Version 1.2.1 - 25th November, 2024 +- Improvement - Added new props to the Bar Chart component for customizability. +- Improvement - Dropzone UAT improvements. +- Improvement - Sidebar Compatibility fixes with NextJS. +- Improvement - Improved the storybook deployment workflow to use latest library. + +Version 1.2.0 - 20th November, 2024 +- New - Dropzone +- New - Added Unit Tests setup and a11y CI setup +- Improvement - All components are a11y compatible. +- Fixes - Issues reported by internal dev team. + +Version 1.1.0 - 11th November, 2024 +- New - Area Chart +- New - Bar Chart +- New - Line Chart +- New - Pie Chart +- New - Accordion +- New - Search +- New - Pagination +- New - Breadcrumb +- Improvement - Used vite instead of webpack for better build performance +- Improvement - Used typescript for better storybook development and easy documentation +- Fixes - Button component used in dropdown component +- Fixed - Fixed multiple issues suggested in developer UAT. + +Version 1.0.0 - 17th October, 2024 +- New - Alert +- New - Avatar +- New - Badge +- New - Button +- New - Buttom Group +- New - Cards +- New - Container +- New - Checkbox +- New - Datepicker +- New - Dialog +- New - Drawer +- New - Dropdown Menu +- New - Editor Input +- New - Input +- New - Label +- New - Loader +- New - Menu Item +- New - Progress Bar +- New - Progress Steps +- New - Radio Button Group +- New - Search +- New - Select +- New - Sidebar +- New - Skeleton +- New - Switch +- New - Tabs +- New - Text Area +- New - Title +- New - Toaster +- New - Tooltip +- New - Topbar diff --git a/dist/_commonjsHelpers-DKOUU3wS.cjs b/dist/_commonjsHelpers-DKOUU3wS.cjs new file mode 100644 index 00000000..13791b1e --- /dev/null +++ b/dist/_commonjsHelpers-DKOUU3wS.cjs @@ -0,0 +1 @@ +"use strict";var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}exports.commonjsGlobal=o;exports.getDefaultExportFromCjs=l; diff --git a/dist/_commonjsHelpers-DaMA6jEr.js b/dist/_commonjsHelpers-DaMA6jEr.js new file mode 100644 index 00000000..19cdb549 --- /dev/null +++ b/dist/_commonjsHelpers-DaMA6jEr.js @@ -0,0 +1,8 @@ +var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; +function l(e) { + return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; +} +export { + o as c, + l as g +}; diff --git a/dist/force-ui.cjs b/dist/force-ui.cjs new file mode 100644 index 00000000..ee93ac8e --- /dev/null +++ b/dist/force-ui.cjs @@ -0,0 +1,297 @@ +"use client";"use strict";var p8=Object.defineProperty;var BC=e=>{throw TypeError(e)};var m8=(e,t,n)=>t in e?p8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var qo=(e,t,n)=>m8(e,typeof t!="symbol"?t+"":t,n),FC=(e,t,n)=>t.has(e)||BC("Cannot "+n);var xr=(e,t,n)=>(FC(e,t,"read from private field"),n?n.call(e):t.get(e)),xv=(e,t,n)=>t.has(e)?BC("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Va=(e,t,n,r)=>(FC(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react/jsx-runtime"),O=require("react"),kl=require("react-dom"),Qe=require("./_commonjsHelpers-DKOUU3wS.cjs");function fN(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ee=fN(O),dN=fN(kl),Sw="-",g8=e=>{const t=v8(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(Sw);return s[0]===""&&s.length!==1&&s.shift(),hN(s,t)||y8(a)},getConflictingClassGroupIds:(a,s)=>{const l=n[a]||[];return s&&r[a]?[...l,...r[a]]:l}}},hN=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?hN(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(Sw);return(a=t.validators.find(({validator:s})=>s(o)))==null?void 0:a.classGroupId},WC=/^\[(.+)\]$/,y8=e=>{if(WC.test(e)){const t=WC.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},v8=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return x8(Object.entries(e.classGroups),n).forEach(([o,a])=>{Wb(a,r,o,t)}),r},Wb=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:zC(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(b8(i)){Wb(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{Wb(a,zC(t,o),n,r)})})},zC=(e,t)=>{let n=e;return t.split(Sw).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},b8=e=>e.isThemeGetter,x8=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[n,i]}):e,w8=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},pN="!",_8=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=s=>{const l=[];let u=0,f=0,d;for(let y=0;yf?d-f:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}};return n?s=>n({className:s,parseClassName:a}):a},S8=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},O8=e=>({cache:w8(e.cacheSize),parseClassName:_8(e),...g8(e)}),C8=/\s+/,P8=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(C8);let s="";for(let l=a.length-1;l>=0;l-=1){const u=a[l],{modifiers:f,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:m}=n(u);let g=!!m,v=r(g?p.substring(0,m):p);if(!v){if(!g){s=u+(s.length>0?" "+s:s);continue}if(v=r(p),!v){s=u+(s.length>0?" "+s:s);continue}g=!1}const y=S8(f).join(":"),x=d?y+pN:y,w=x+v;if(o.includes(w))continue;o.push(w);const S=i(v,g);for(let P=0;P0?" "+s:s)}return s};function A8(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rd(f),e());return n=O8(u),r=n.cache.get,i=n.cache.set,o=s,s(l)}function s(l){const u=r(l);if(u)return u;const f=P8(l,n);return i(l,f),f}return function(){return o(A8.apply(null,arguments))}}const kt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},gN=/^\[(?:([a-z-]+):)?(.+)\]$/i,E8=/^\d+\/\d+$/,k8=new Set(["px","full","screen"]),M8=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,j8=/\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$/,N8=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,$8=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,D8=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,no=e=>_l(e)||k8.has(e)||E8.test(e),Xo=e=>du(e,"length",V8),_l=e=>!!e&&!Number.isNaN(Number(e)),wv=e=>du(e,"number",_l),Qu=e=>!!e&&Number.isInteger(Number(e)),I8=e=>e.endsWith("%")&&_l(e.slice(0,-1)),He=e=>gN.test(e),Zo=e=>M8.test(e),R8=new Set(["length","size","percentage"]),L8=e=>du(e,R8,yN),B8=e=>du(e,"position",yN),F8=new Set(["image","url"]),W8=e=>du(e,F8,K8),z8=e=>du(e,"",U8),ec=()=>!0,du=(e,t,n)=>{const r=gN.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},V8=e=>j8.test(e)&&!N8.test(e),yN=()=>!1,U8=e=>$8.test(e),K8=e=>D8.test(e),H8=()=>{const e=kt("colors"),t=kt("spacing"),n=kt("blur"),r=kt("brightness"),i=kt("borderColor"),o=kt("borderRadius"),a=kt("borderSpacing"),s=kt("borderWidth"),l=kt("contrast"),u=kt("grayscale"),f=kt("hueRotate"),d=kt("invert"),p=kt("gap"),m=kt("gradientColorStops"),g=kt("gradientColorStopPositions"),v=kt("inset"),y=kt("margin"),x=kt("opacity"),w=kt("padding"),S=kt("saturate"),P=kt("scale"),_=kt("sepia"),C=kt("skew"),E=kt("space"),k=kt("translate"),M=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",He,t],N=()=>[He,t],B=()=>["",no,Xo],L=()=>["auto",_l,He],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],W=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],U=()=>["","0",He],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[_l,He];return{cacheSize:500,separator:":",theme:{colors:[ec],spacing:[no,Xo],blur:["none","",Zo,He],brightness:Y(),borderColor:[e],borderRadius:["none","","full",Zo,He],borderSpacing:N(),borderWidth:B(),contrast:Y(),grayscale:U(),hueRotate:Y(),invert:U(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[I8,Xo],inset:$(),margin:$(),opacity:Y(),padding:N(),saturate:Y(),scale:Y(),sepia:U(),skew:Y(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",He]}],container:["container"],columns:[{columns:[Zo]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"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:[...F(),He]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Qu,He]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",He]}],grow:[{grow:U()}],shrink:[{shrink:U()}],order:[{order:["first","last","none",Qu,He]}],"grid-cols":[{"grid-cols":[ec]}],"col-start-end":[{col:["auto",{span:["full",Qu,He]},He]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[ec]}],"row-start-end":[{row:["auto",{span:[Qu,He]},He]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",He]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",He]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"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",He,t]}],"min-w":[{"min-w":[He,t,"min","max","fit"]}],"max-w":[{"max-w":[He,t,"none","full","min","max","fit","prose",{screen:[Zo]},Zo]}],h:[{h:[He,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[He,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[He,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[He,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Zo,Xo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",wv]}],"font-family":[{font:[ec]}],"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",He]}],"line-clamp":[{"line-clamp":["none",_l,wv]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",no,He]}],"list-image":[{"list-image":["none",He]}],"list-style-type":[{list:["none","disc","decimal",He]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",no,Xo]}],"underline-offset":[{"underline-offset":["auto",no,He]}],"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",He]}],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",He]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F(),B8]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",L8]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},W8]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"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":[x]}],"border-style":[{border:[...W(),"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":[x]}],"divide-style":[{divide:W()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...W()]}],"outline-offset":[{"outline-offset":[no,He]}],"outline-w":[{outline:[no,Xo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[no,Xo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Zo,z8]}],"shadow-color":[{shadow:[ec]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Zo,He]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[S]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"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",He]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",He]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",He]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[Qu,He]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",He]}],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",He]}],"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",He]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[no,Xo,wv]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},G8=T8(H8);function vN(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;tG8(Ue(...e)),zc=(...e)=>(...t)=>e.forEach(n=>n==null?void 0:n(...t)),jm=e=>{const 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},Y8={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"},q8=()=>{var i,o;const e=((o=(i=window.navigator)==null?void 0:i.userAgentData)==null?void 0:o.platform)||window.navigator.platform,t=["macOS","Macintosh","MacIntel","MacPPC","Mac68K"],n=["Win32","Win64","Windows","WinCE"];let r="null";return t.includes(e)?r="Mac OS":n.includes(e)&&(r="Windows"),r},X8=e=>e<1024?`${e} bytes`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:`${(e/(1024*1024*1024)).toFixed(2)} GB`,yc={set:(e,t)=>{if(!(typeof window>"u"))try{localStorage.setItem(e,JSON.stringify(t))}catch(n){console.error(n)}},get:e=>{if(typeof window>"u")return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(t){return console.error(t),null}},remove:e=>{if(!(typeof window>"u"))try{localStorage.removeItem(e)}catch(t){console.error(t)}}},Wn=O.forwardRef((e,t)=>{const{variant:n="primary",size:r="md",type:i="button",tag:o="button",className:a,children:s,disabled:l=!1,destructive:u=!1,icon:f=null,iconPosition:d="left",loading:p=!1,...m}=e,g="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",v=p?"opacity-50 disabled:cursor-not-allowed":"",y={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"}[n],x=u&&!l?{primary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",secondary:"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"}[n]:"",w={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"}[r];let S,P=null,_="";f&&(_="flex items-center justify-center",d==="left"?S=f:P=f);const C=o;return T.jsxs(C,{ref:t,type:i,className:G(_,g,w,y,x,v,{"cursor-default":l},a),disabled:l,...m,children:[S,s?T.jsx("span",{className:"px-1",children:s}):null,P]})}),Z8="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let jo=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=Z8[n[e]&63];return t};const J8=({label:e,switchId:t,disabled:n=!1,children:r,size:i})=>{const o={sm:"text-sm leading-4 font-medium",md:"text-base leading-5 font-medium",lg:"text-lg leading-6 font-medium"};if(O.isValidElement(e))return T.jsxs("div",{className:G("inline-flex items-center gap-3","items-start"),children:[r,e]});const s=()=>{const{heading:f="",description:d=""}=e||{};return T.jsxs("div",{className:"space-y-1.5",children:[f&&T.jsx("p",{className:G("text-text-primary m-0",o[i],n&&"text-text-disabled"),children:f}),d&&T.jsx("p",{className:G("text-text-secondary text-sm font-normal leading-5 m-0",n&&"text-text-disabled"),children:d})]})},l=!(e!=null&&e.heading)&&!(e!=null&&e.description),u=!(e!=null&&e.heading)||!(e!=null&&e.description)?"items-center":"items-start";return l?r:T.jsxs("div",{className:G("inline-flex",u,"gap-3"),children:[r,T.jsx("label",{htmlFor:t,className:G(!n&&"cursor-pointer"),children:s()})]})},Q8=({id:e,onChange:t,value:n,defaultValue:r=!1,size:i="lg",disabled:o=!1,label:a={heading:"",description:""},name:s,className:l,...u},f)=>{const d=O.useMemo(()=>typeof n<"u",[n]),p=O.useMemo(()=>e||`switch-${jo()}`,[]),[m,g]=O.useState(r),v="primary",y=O.useCallback(()=>d?n:m,[d,n,m]),x=_=>{if(o)return;const C=_.target.checked;d||g(C),typeof t=="function"&&t(C)},w={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"}},S={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"}},P={input:"bg-toggle-off-disabled disabled:border-transparent shadow-none disabled:cursor-not-allowed checked:disabled:bg-toggle-on-disabled",toggleDial:"peer-disabled:cursor-not-allowed"};return T.jsx(J8,{label:a,switchId:p,disabled:o,size:i,children:T.jsxs("div",{className:G("relative inline-block cursor-pointer rounded-full shrink-0",S[i].container,l),children:[T.jsx("input",{ref:f,id:p,type:"checkbox",className:G("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]",w[v].input,o&&P.input),checked:y(),onChange:x,disabled:o,name:s,...u}),T.jsx("label",{htmlFor:p,className:G("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",S[i].toggleDial,w[v].toggleDial,o&&P.toggleDial)})]})})},Ow=O.forwardRef(Q8);Ow.displayName="Switch";/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eK=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bN=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var tK={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"};/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nK=O.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},l)=>O.createElement("svg",{ref:l,...tK,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:bN("lucide",i),...s},[...a.map(([u,f])=>O.createElement(u,f)),...Array.isArray(o)?o:[o]]));/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Kt=(e,t)=>{const n=O.forwardRef(({className:r,...i},o)=>O.createElement(nK,{ref:o,iconNode:t,className:bN(`lucide-${eK(e)}`,r),...i}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ff=Kt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cw=Kt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xN=Kt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pw=Kt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const rK=Kt("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const iK=Kt("CloudUpload",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const oK=Kt("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"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const aK=Kt("File",[["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"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const sK=Kt("ImageOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zb=Kt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const lK=Kt("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wN=Kt("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const uK=Kt("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"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cK=Kt("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"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _N=Kt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const SN=Kt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const fK=Kt("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"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const dK=Kt("Trash",[["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"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const hK=Kt("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"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const VC=Kt("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"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const pK=Kt("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"}]]);/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ma=Kt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),mK=({id:e,label:t,defaultChecked:n=!1,checked:r,onChange:i,indeterminate:o,disabled:a,size:s="md",className:l,...u},f)=>{var C,E;const d=O.useMemo(()=>e||`checkbox-${jo()}`,[e]),p=O.useMemo(()=>typeof r<"u",[r]),[m,g]=O.useState(n||!1),v="primary",y={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"}},x={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"}},w={checkbox:"cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled",icon:"cursor-not-allowed peer-disabled:text-border-disabled"},S=O.useCallback(()=>p?r:m,[p,r,m]),P=k=>{if(a)return;const M=k.target.checked;p||g(M),typeof i=="function"&&i(M)},_=O.useCallback(()=>O.isValidElement(t)?t:!(t!=null&&t.heading)&&!(t!=null&&t.description)?null:T.jsxs("div",{className:y[s].gap,children:[(t==null?void 0:t.heading)&&T.jsx("p",{className:G("text-text-primary font-medium leading-4 m-0",y[s].text,y[s].gap,a&&"text-text-disabled"),children:t==null?void 0:t.heading}),(t==null?void 0:t.description)&&T.jsx("p",{className:G("text-text-secondary font-normal leading-5 m-0",y[s].description,a&&"text-text-disabled"),children:t==null?void 0:t.description})]}),[t,s,a]);return T.jsxs("div",{className:G("inline-flex items-center gap-2",!!t&&"items-start",a&&"cursor-not-allowed"),children:[T.jsxs("label",{className:G("relative flex items-center rounded-full p-0.5",!a&&"cursor-pointer"),htmlFor:d,children:[T.jsx("input",{ref:f,id:d,type:"checkbox",className:G("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",x[v].checkbox,y[s].checkbox,a&&w.checkbox,l),checked:S(),onChange:P,disabled:a,...u}),T.jsx("span",{className:G("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",x[v].icon,a&&w.icon),children:o?T.jsx(wN,{className:G((C=y[s])==null?void 0:C.icon)}):T.jsx(Ff,{className:G((E=y[s])==null?void 0:E.icon)})})]}),!!t&&T.jsx("label",{className:G("cursor-pointer",a&&"cursor-not-allowed"),htmlFor:d,children:_()})]})},ON=O.forwardRef(mK);ON.displayName="Checkbox";const UC={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"}},KC={checkbox:"disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled cursor-not-allowed",icon:"peer-disabled:text-border-disabled cursor-not-allowed"},gK={sm:"text-sm leading-5",md:"text-base leading-6"},_v={sm:{checkbox:"size-4",icon:"size-1.5",info:"size-4"},md:{checkbox:"size-5",icon:"size-2",info:"size-5"}},HC={sm:{switch:"mt-1",radio:"mt-0.5"},md:{switch:"mt-0.5",radio:"mt-px"}},yK={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"},vK="border-0 border-r border-border-subtle border-solid",bK="bg-background-primary text-primary cursor-pointer flex items-center justify-center",xK="hover:bg-button-tertiary-hover",wK="focus:outline-none";function Nm(){return typeof window<"u"}function Ca(e){return CN(e)?(e.nodeName||"").toLowerCase():"#document"}function cr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fi(e){var t;return(t=(CN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function CN(e){return Nm()?e instanceof Node||e instanceof cr(e).Node:!1}function vt(e){return Nm()?e instanceof Element||e instanceof cr(e).Element:!1}function en(e){return Nm()?e instanceof HTMLElement||e instanceof cr(e).HTMLElement:!1}function Vb(e){return!Nm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof cr(e).ShadowRoot}function Wf(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=kr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function _K(e){return["table","td","th"].includes(Ca(e))}function $m(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Aw(e){const t=Dm(),n=vt(e)?kr(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function SK(e){let t=So(e);for(;en(t)&&!ga(t);){if(Aw(t))return t;if($m(t))return null;t=So(t)}return null}function Dm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ga(e){return["html","body","#document"].includes(Ca(e))}function kr(e){return cr(e).getComputedStyle(e)}function Im(e){return vt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function So(e){if(Ca(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vb(e)&&e.host||Fi(e);return Vb(t)?t.host:t}function PN(e){const t=So(e);return ga(t)?e.ownerDocument?e.ownerDocument.body:e.body:en(t)&&Wf(t)?t:PN(t)}function ca(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=PN(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=cr(i);if(o){const s=Ub(a);return t.concat(a,a.visualViewport||[],Wf(i)?i:[],s&&n?ca(s):[])}return t.concat(i,ca(i,[],n))}function Ub(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ui(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Qt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Vb(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function AN(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function TN(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function EN(e){return e.mozInputSource===0&&e.isTrusted?!0:Kb()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Tw(e){return OK()?!1:!Kb()&&e.width===0&&e.height===0||Kb()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ew(){return/apple/i.test(navigator.vendor)}function Kb(){const e=/android/i;return e.test(AN())||e.test(TN())}function kN(){return AN().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function OK(){return TN().includes("jsdom/")}function Vc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function CK(e){return"nativeEvent"in e}function PK(e){return e.matches("html,body")}function Mn(e){return(e==null?void 0:e.ownerDocument)||document}function Sv(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function so(e){return"composedPath"in e?e.composedPath()[0]:e.target}const AK="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function kw(e){return en(e)&&e.matches(AK)}function kn(e){e.preventDefault(),e.stopPropagation()}function Hb(e){return e?e.getAttribute("role")==="combobox"&&kw(e):!1}const ya=Math.min,Cr=Math.max,Gh=Math.round,cl=Math.floor,Ei=e=>({x:e,y:e}),TK={left:"right",right:"left",bottom:"top",top:"bottom"},EK={start:"end",end:"start"};function Gb(e,t,n){return Cr(e,ya(t,n))}function hu(e,t){return typeof e=="function"?e(t):e}function va(e){return e.split("-")[0]}function pu(e){return e.split("-")[1]}function MN(e){return e==="x"?"y":"x"}function Mw(e){return e==="y"?"height":"width"}function ys(e){return["top","bottom"].includes(va(e))?"y":"x"}function jw(e){return MN(ys(e))}function kK(e,t,n){n===void 0&&(n=!1);const r=pu(e),i=jw(e),o=Mw(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Yh(a)),[a,Yh(a)]}function MK(e){const t=Yh(e);return[Yb(e),t,Yb(t)]}function Yb(e){return e.replace(/start|end/g,t=>EK[t])}function jK(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function NK(e,t,n,r){const i=pu(e);let o=jK(va(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Yb)))),o}function Yh(e){return e.replace(/left|right|bottom|top/g,t=>TK[t])}function $K(e){return{top:0,right:0,bottom:0,left:0,...e}}function jN(e){return typeof e!="number"?$K(e):{top:e,right:e,bottom:e,left:e}}function qh(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}/*! +* tabbable 6.2.0 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/var DK=["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])"],Xh=DK.join(","),NN=typeof Element>"u",Ml=NN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zh=!NN&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Jh=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&e(t.parentNode);return a},IK=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},RK=function(t,n,r){if(Jh(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Xh));return n&&Ml.call(t,Xh)&&i.unshift(t),i=i.filter(r),i},LK=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Jh(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,u=e(l,!0,r);r.flatten?i.push.apply(i,u):i.push({scopeParent:a,candidates:u})}else{var f=Ml.call(a,Xh);f&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var d=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Jh(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(d&&p){var m=e(d===!0?a.children:d.children,!0,r);r.flatten?i.push.apply(i,m):i.push({scopeParent:a,candidates:m})}else o.unshift.apply(o,a.children)}}return i},$N=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},DN=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||IK(t))&&!$N(t)?0:t.tabIndex},BK=function(t,n){var r=DN(t);return r<0&&n&&!$N(t)?0:r},FK=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},IN=function(t){return t.tagName==="INPUT"},WK=function(t){return IN(t)&&t.type==="hidden"},zK=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},VK=function(t,n){for(var r=0;rsummary:first-of-type"),a=o?t.parentElement:t;if(Ml.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,u=Zh(t);if(l&&!l.shadowRoot&&i(l)===!0)return GC(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=s}if(GK(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return GC(t);return!1},qK=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},JK=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=BK(s,a),u=a?e(i.candidates):s;l===0?a?n.push.apply(n,u):n.push(s):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:u})}),r.sort(FK).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},Rm=function(t,n){n=n||{};var r;return n.getShadowRoot?r=LK([t],n.includeContainer,{filter:qb.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ZK}):r=RK(t,n.includeContainer,qb.bind(null,n)),JK(r)},QK=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Ml.call(t,Xh)===!1?!1:qb(n,t)};function YC(e,t,n){let{reference:r,floating:i}=e;const o=ys(t),a=jw(t),s=Mw(a),l=va(t),u=o==="y",f=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let m;switch(l){case"top":m={x:f,y:r.y-i.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-i.width,y:d};break;default:m={x:r.x,y:r.y}}switch(pu(t)){case"start":m[a]-=p*(n&&u?-1:1);break;case"end":m[a]+=p*(n&&u?-1:1);break}return m}const eH=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=YC(u,r,l),p=r,m={},g=0;for(let v=0;v({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:l}=t,{element:u,padding:f=0}=hu(e,t)||{};if(u==null)return{};const d=jN(f),p={x:n,y:r},m=jw(i),g=Mw(m),v=await a.getDimensions(u),y=m==="y",x=y?"top":"left",w=y?"bottom":"right",S=y?"clientHeight":"clientWidth",P=o.reference[g]+o.reference[m]-p[m]-o.floating[g],_=p[m]-o.reference[m],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=C?C[S]:0;(!E||!await(a.isElement==null?void 0:a.isElement(C)))&&(E=s.floating[S]||o.floating[g]);const k=P/2-_/2,M=E/2-v[g]/2-1,D=ya(d[x],M),$=ya(d[w],M),N=D,B=E-v[g]-$,L=E/2-v[g]/2+k,F=Gb(N,L,B),W=!l.arrow&&pu(i)!=null&&L!==F&&o.reference[g]/2-(LL<=0)){var $,N;const L=((($=o.flip)==null?void 0:$.index)||0)+1,F=E[L];if(F)return{data:{index:L,overflows:D},reset:{placement:F}};let W=(N=D.filter(z=>z.overflows[0]<=0).sort((z,H)=>z.overflows[1]-H.overflows[1])[0])==null?void 0:N.placement;if(!W)switch(m){case"bestFit":{var B;const z=(B=D.filter(H=>{if(C){const U=ys(H.placement);return U===w||U==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(U=>U>0).reduce((U,K)=>U+K,0)]).sort((H,U)=>H[1]-U[1])[0])==null?void 0:B[0];z&&(W=z);break}case"initialPlacement":W=s;break}if(i!==W)return{reset:{placement:W}}}return{}}}};async function rH(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=va(n),s=pu(n),l=ys(n)==="y",u=["left","top"].includes(a)?-1:1,f=o&&l?-1:1,d=hu(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof g=="number"&&(m=s==="end"?g*-1:g),l?{x:m*f,y:p*u}:{x:p*u,y:m*f}}const iH=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await rH(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},oH=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x,y:w}=y;return{x,y:w}}},...l}=hu(e,t),u={x:n,y:r},f=await Nw(t,l),d=ys(va(i)),p=MN(d);let m=u[p],g=u[d];if(o){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",w=m+f[y],S=m-f[x];m=Gb(w,m,S)}if(a){const y=d==="y"?"top":"left",x=d==="y"?"bottom":"right",w=g+f[y],S=g-f[x];g=Gb(w,g,S)}const v=s.fn({...t,[p]:m,[d]:g});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:o,[d]:a}}}}}},aH=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...u}=hu(e,t),f=await Nw(t,u),d=va(i),p=pu(i),m=ys(i)==="y",{width:g,height:v}=o.floating;let y,x;d==="top"||d==="bottom"?(y=d,x=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(x=d,y=p==="end"?"top":"bottom");const w=v-f.top-f.bottom,S=g-f.left-f.right,P=ya(v-f[y],w),_=ya(g-f[x],S),C=!t.middlewareData.shift;let E=P,k=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=w),C&&!p){const D=Cr(f.left,0),$=Cr(f.right,0),N=Cr(f.top,0),B=Cr(f.bottom,0);m?k=g-2*(D!==0||$!==0?D+$:Cr(f.left,f.right)):E=v-2*(N!==0||B!==0?N+B:Cr(f.top,f.bottom))}await l({...t,availableWidth:k,availableHeight:E});const M=await a.getDimensions(s.floating);return g!==M.width||v!==M.height?{reset:{rects:!0}}:{}}}};function RN(e){const t=kr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=en(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Gh(n)!==o||Gh(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function $w(e){return vt(e)?e:e.contextElement}function Sl(e){const t=$w(e);if(!en(t))return Ei(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=RN(t);let a=(o?Gh(n.width):n.width)/r,s=(o?Gh(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const sH=Ei(0);function LN(e){const t=cr(e);return!Dm()||!t.visualViewport?sH:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lH(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==cr(e)?!1:t}function vs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=$w(e);let a=Ei(1);t&&(r?vt(r)&&(a=Sl(r)):a=Sl(e));const s=lH(o,n,r)?LN(o):Ei(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,f=i.width/a.x,d=i.height/a.y;if(o){const p=cr(o),m=r&&vt(r)?cr(r):r;let g=p,v=Ub(g);for(;v&&r&&m!==g;){const y=Sl(v),x=v.getBoundingClientRect(),w=kr(v),S=x.left+(v.clientLeft+parseFloat(w.paddingLeft))*y.x,P=x.top+(v.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,u*=y.y,f*=y.x,d*=y.y,l+=S,u+=P,g=cr(v),v=Ub(g)}}return qh({width:f,height:d,x:l,y:u})}function Dw(e,t){const n=Im(e).scrollLeft;return t?t.left+n:vs(Fi(e)).left+n}function BN(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:Dw(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function uH(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=Fi(r),s=t?$m(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=Ei(1);const f=Ei(0),d=en(r);if((d||!d&&!o)&&((Ca(r)!=="body"||Wf(a))&&(l=Im(r)),en(r))){const m=vs(r);u=Sl(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const p=a&&!d&&!o?BN(a,l,!0):Ei(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-l.scrollTop*u.y+f.y+p.y}}function cH(e){return Array.from(e.getClientRects())}function fH(e){const t=Fi(e),n=Im(e),r=e.ownerDocument.body,i=Cr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Cr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Dw(e);const s=-n.scrollTop;return kr(r).direction==="rtl"&&(a+=Cr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function dH(e,t){const n=cr(e),r=Fi(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=Dm();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function hH(e,t){const n=vs(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=en(e)?Sl(e):Ei(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:s,x:l,y:u}}function qC(e,t,n){let r;if(t==="viewport")r=dH(e,n);else if(t==="document")r=fH(Fi(e));else if(vt(t))r=hH(t,n);else{const i=LN(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return qh(r)}function FN(e,t){const n=So(e);return n===t||!vt(n)||ga(n)?!1:kr(n).position==="fixed"||FN(n,t)}function pH(e,t){const n=t.get(e);if(n)return n;let r=ca(e,[],!1).filter(s=>vt(s)&&Ca(s)!=="body"),i=null;const o=kr(e).position==="fixed";let a=o?So(e):e;for(;vt(a)&&!ga(a);){const s=kr(a),l=Aw(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Wf(a)&&!l&&FN(e,a))?r=r.filter(f=>f!==a):i=s,a=So(a)}return t.set(e,r),r}function mH(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?$m(t)?[]:pH(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,f)=>{const d=qC(t,f,i);return u.top=Cr(d.top,u.top),u.right=ya(d.right,u.right),u.bottom=ya(d.bottom,u.bottom),u.left=Cr(d.left,u.left),u},qC(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function gH(e){const{width:t,height:n}=RN(e);return{width:t,height:n}}function yH(e,t,n){const r=en(t),i=Fi(t),o=n==="fixed",a=vs(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=Ei(0);if(r||!r&&!o)if((Ca(t)!=="body"||Wf(i))&&(s=Im(t)),r){const p=vs(t,!0,o,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&(l.x=Dw(i));const u=i&&!r&&!o?BN(i,s):Ei(0),f=a.left+s.scrollLeft-l.x-u.x,d=a.top+s.scrollTop-l.y-u.y;return{x:f,y:d,width:a.width,height:a.height}}function Ov(e){return kr(e).position==="static"}function XC(e,t){if(!en(e)||kr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Fi(e)===n&&(n=n.ownerDocument.body),n}function WN(e,t){const n=cr(e);if($m(e))return n;if(!en(e)){let i=So(e);for(;i&&!ga(i);){if(vt(i)&&!Ov(i))return i;i=So(i)}return n}let r=XC(e,t);for(;r&&_K(r)&&Ov(r);)r=XC(r,t);return r&&ga(r)&&Ov(r)&&!Aw(r)?n:r||SK(e)||n}const vH=async function(e){const t=this.getOffsetParent||WN,n=this.getDimensions,r=await n(e.floating);return{reference:yH(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bH(e){return kr(e).direction==="rtl"}const xH={convertOffsetParentRelativeRectToViewportRelativeRect:uH,getDocumentElement:Fi,getClippingRect:mH,getOffsetParent:WN,getElementRects:vH,getClientRects:cH,getDimensions:gH,getScale:Sl,isElement:vt,isRTL:bH};function wH(e,t){let n=null,r;const i=Fi(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:u,top:f,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const m=cl(f),g=cl(i.clientWidth-(u+d)),v=cl(i.clientHeight-(f+p)),y=cl(u),w={rootMargin:-m+"px "+-g+"px "+-v+"px "+-y+"px",threshold:Cr(0,ya(1,l))||1};let S=!0;function P(_){const C=_[0].intersectionRatio;if(C!==l){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}S=!1}try{n=new IntersectionObserver(P,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(P,w)}n.observe(e)}return a(!0),o}function Lm(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=$w(e),f=i||o?[...u?ca(u):[],...ca(t)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const d=u&&s?wH(u,n):null;let p=-1,m=null;a&&(m=new ResizeObserver(x=>{let[w]=x;w&&w.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=m)==null||S.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let g,v=l?vs(e):null;l&&y();function y(){const x=vs(e);v&&(x.x!==v.x||x.y!==v.y||x.width!==v.width||x.height!==v.height)&&n(),v=x,g=requestAnimationFrame(y)}return n(),()=>{var x;f.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),d==null||d(),(x=m)==null||x.disconnect(),m=null,l&&cancelAnimationFrame(g)}}const _H=iH,SH=oH,OH=nH,CH=aH,ZC=tH,PH=(e,t,n)=>{const r=new Map,i={platform:xH,...n},o={...i.platform,_c:r};return eH(e,t,{...i,platform:o})};var Lh=typeof document<"u"?O.useLayoutEffect:O.useEffect;function Qh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Qh(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Qh(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function zN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function JC(e,t){const n=zN(e);return Math.round(t*n)/n}function Cv(e){const t=ee.useRef(e);return Lh(()=>{t.current=e}),t}function AH(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[f,d]=ee.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=ee.useState(r);Qh(p,r)||m(r);const[g,v]=ee.useState(null),[y,x]=ee.useState(null),w=ee.useCallback(H=>{H!==C.current&&(C.current=H,v(H))},[]),S=ee.useCallback(H=>{H!==E.current&&(E.current=H,x(H))},[]),P=o||g,_=a||y,C=ee.useRef(null),E=ee.useRef(null),k=ee.useRef(f),M=l!=null,D=Cv(l),$=Cv(i),N=Cv(u),B=ee.useCallback(()=>{if(!C.current||!E.current)return;const H={placement:t,strategy:n,middleware:p};$.current&&(H.platform=$.current),PH(C.current,E.current,H).then(U=>{const K={...U,isPositioned:N.current!==!1};L.current&&!Qh(k.current,K)&&(k.current=K,dN.flushSync(()=>{d(K)}))})},[p,t,n,$,N]);Lh(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(H=>({...H,isPositioned:!1})))},[u]);const L=ee.useRef(!1);Lh(()=>(L.current=!0,()=>{L.current=!1}),[]),Lh(()=>{if(P&&(C.current=P),_&&(E.current=_),P&&_){if(D.current)return D.current(P,_,B);B()}},[P,_,B,D,M]);const F=ee.useMemo(()=>({reference:C,floating:E,setReference:w,setFloating:S}),[w,S]),W=ee.useMemo(()=>({reference:P,floating:_}),[P,_]),z=ee.useMemo(()=>{const H={position:n,left:0,top:0};if(!W.floating)return H;const U=JC(W.floating,f.x),K=JC(W.floating,f.y);return s?{...H,transform:"translate("+U+"px, "+K+"px)",...zN(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:K}},[n,s,W.floating,f.x,f.y]);return ee.useMemo(()=>({...f,update:B,refs:F,elements:W,floatingStyles:z}),[f,B,F,W,z])}const TH=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ZC({element:r.current,padding:i}).fn(n):{}:r?ZC({element:r,padding:i}).fn(n):{}}}},Bm=(e,t)=>({..._H(e),options:[e,t]}),VN=(e,t)=>({...SH(e),options:[e,t]}),Fm=(e,t)=>({...OH(e),options:[e,t]}),UN=(e,t)=>({...CH(e),options:[e,t]}),EH=(e,t)=>({...TH(e),options:[e,t]}),KN={...ee},kH=KN.useInsertionEffect,MH=kH||(e=>e());function vn(e){const t=ee.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return MH(()=>{t.current=e}),ee.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i=e.current.length}function Pv(e,t){return Ln(e,{disabledIndices:t})}function QC(e,t){return Ln(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ln(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do s+=r?-o:o;while(s>=0&&s<=a.length-1&&Bh(a,s,i));return s}function jH(e,t){let{event:n,orientation:r,loop:i,rtl:o,cols:a,disabledIndices:s,minIndex:l,maxIndex:u,prevIndex:f,stopEvent:d=!1}=t,p=f;if(n.key===Iw){if(d&&kn(n),f===-1)p=u;else if(p=Ln(e,{startingIndex:p,amount:a,decrement:!0,disabledIndices:s}),i&&(f-am?v:v-a}Oc(e,p)&&(p=f)}if(n.key===zf&&(d&&kn(n),f===-1?p=l:(p=Ln(e,{startingIndex:f,amount:a,disabledIndices:s}),i&&f+a>u&&(p=Ln(e,{startingIndex:f%a-a,amount:a,disabledIndices:s}))),Oc(e,p)&&(p=f)),r==="both"){const m=cl(f/a);n.key===(o?fa:da)&&(d&&kn(n),f%a!==a-1?(p=Ln(e,{startingIndex:f,disabledIndices:s}),i&&sh(p,a,m)&&(p=Ln(e,{startingIndex:f-f%a-1,disabledIndices:s}))):i&&(p=Ln(e,{startingIndex:f-f%a-1,disabledIndices:s})),sh(p,a,m)&&(p=f)),n.key===(o?da:fa)&&(d&&kn(n),f%a!==0?(p=Ln(e,{startingIndex:f,decrement:!0,disabledIndices:s}),i&&sh(p,a,m)&&(p=Ln(e,{startingIndex:f+(a-f%a),decrement:!0,disabledIndices:s}))):i&&(p=Ln(e,{startingIndex:f+(a-f%a),decrement:!0,disabledIndices:s})),sh(p,a,m)&&(p=f));const g=cl(u/a)===m;Oc(e,p)&&(i&&g?p=n.key===(o?da:fa)?u:Ln(e,{startingIndex:f-f%a-1,disabledIndices:s}):p=f)}return p}function NH(e,t,n){const r=[];let i=0;return e.forEach((o,a)=>{let{width:s,height:l}=o;if(s>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let u=!1;for(n&&(i=0);!u;){const f=[];for(let d=0;dr[d]==null)?(f.forEach(d=>{r[d]=a}),u=!0):i++}}),[...r]}function $H(e,t,n,r,i){if(e===-1)return-1;const o=n.indexOf(e),a=t[e];switch(i){case"tl":return o;case"tr":return a?o+a.width-1:o;case"bl":return a?o+(a.height-1)*r:o;case"br":return n.lastIndexOf(e)}}function DH(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function Bh(e,t,n){if(n)return n.includes(t);const r=e[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}var wt=typeof document<"u"?O.useLayoutEffect:O.useEffect;function Uc(){return Uc=Object.assign?Object.assign.bind():function(e){for(var t=1;t"floating-ui-"+Math.random().toString(36).slice(2,6)+IH++;function RH(){const[e,t]=ee.useState(()=>eP?tP():void 0);return wt(()=>{e==null&&t(tP())},[]),ee.useEffect(()=>{eP=!0},[]),e}const LH=KN.useId,Wm=LH||RH;let Kc;process.env.NODE_ENV!=="production"&&(Kc=new Set);function Fh(){for(var e,t=arguments.length,n=new Array(t),r=0;r{if(!i)return;kr(i).direction==="rtl"&&S(!0)},[i]),!i)return null;const[P,_]=r.split("-"),C=P==="top"||P==="bottom";let E=d;(C&&a!=null&&a.x||!C&&a!=null&&a.y)&&(E=null);const k=f*2,M=k/2,D=s/2*(u/-8+1),$=l/2*u/4,N=!!m,B=E&&_==="end"?"bottom":"top";let L=E&&_==="end"?"right":"left";E&&w&&(L=_==="end"?"left":"right");const F=(o==null?void 0:o.x)!=null?E||o.x:"",W=(o==null?void 0:o.y)!=null?E||o.y:"",z=m||"M0,0"+(" H"+s)+(" L"+(s-D)+","+(l-$))+(" Q"+s/2+","+l+" "+D+","+(l-$))+" Z",H={top:N?"rotate(180deg)":"",left:N?"rotate(90deg)":"rotate(-90deg)",bottom:N?"":"rotate(180deg)",right:N?"rotate(-90deg)":"rotate(90deg)"}[P];return ee.createElement("svg",Uc({},y,{"aria-hidden":!0,ref:n,width:N?s:s+k,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[L]:F,[B]:W,[P]:C||N?"100%":"calc(100% - "+k/2+"px)",transform:[H,g].filter(U=>!!U).join(" "),...v}}),k>0&&ee.createElement("path",{clipPath:"url(#"+x+")",fill:"none",stroke:p,strokeWidth:k+(m?0:1),d:z}),ee.createElement("path",{stroke:k&&!m?y.fill:"none",d:z}),ee.createElement("clipPath",{id:x},ee.createElement("rect",{x:-M,y:M*(N?-1:1),width:s+k,height:s})))});function WH(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const zH=ee.createContext(null),VH=ee.createContext(null),zm=()=>{var e;return((e=ee.useContext(zH))==null?void 0:e.id)||null},Vf=()=>ee.useContext(VH);function bs(e){return"data-floating-ui-"+e}function Nn(e){const t=O.useRef(e);return wt(()=>{t.current=e}),t}const nP=bs("safe-polygon");function Av(e,t,n){return n&&!Vc(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function UH(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:o,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:u=null,mouseOnly:f=!1,restMs:d=0,move:p=!0}=t,m=Vf(),g=zm(),v=Nn(u),y=Nn(l),x=Nn(n),w=ee.useRef(),S=ee.useRef(-1),P=ee.useRef(),_=ee.useRef(-1),C=ee.useRef(!0),E=ee.useRef(!1),k=ee.useRef(()=>{}),M=ee.useRef(!1),D=ee.useCallback(()=>{var z;const H=(z=i.current.openEvent)==null?void 0:z.type;return(H==null?void 0:H.includes("mouse"))&&H!=="mousedown"},[i]);ee.useEffect(()=>{if(!s)return;function z(H){let{open:U}=H;U||(clearTimeout(S.current),clearTimeout(_.current),C.current=!0,M.current=!1)}return o.on("openchange",z),()=>{o.off("openchange",z)}},[s,o]),ee.useEffect(()=>{if(!s||!v.current||!n)return;function z(U){D()&&r(!1,U,"hover")}const H=Mn(a.floating).documentElement;return H.addEventListener("mouseleave",z),()=>{H.removeEventListener("mouseleave",z)}},[a.floating,n,r,s,v,D]);const $=ee.useCallback(function(z,H,U){H===void 0&&(H=!0),U===void 0&&(U="hover");const K=Av(y.current,"close",w.current);K&&!P.current?(clearTimeout(S.current),S.current=window.setTimeout(()=>r(!1,z,U),K)):H&&(clearTimeout(S.current),r(!1,z,U))},[y,r]),N=vn(()=>{k.current(),P.current=void 0}),B=vn(()=>{if(E.current){const z=Mn(a.floating).body;z.style.pointerEvents="",z.removeAttribute(nP),E.current=!1}}),L=vn(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);ee.useEffect(()=>{if(!s)return;function z(Y){if(clearTimeout(S.current),C.current=!1,f&&!Vc(w.current)||d>0&&!Av(y.current,"open"))return;const te=Av(y.current,"open",w.current);te?S.current=window.setTimeout(()=>{x.current||r(!0,Y,"hover")},te):n||r(!0,Y,"hover")}function H(Y){if(L())return;k.current();const te=Mn(a.floating);if(clearTimeout(_.current),M.current=!1,v.current&&i.current.floatingContext){n||clearTimeout(S.current),P.current=v.current({...i.current.floatingContext,tree:m,x:Y.clientX,y:Y.clientY,onClose(){B(),N(),L()||$(Y,!0,"safe-polygon")}});const ie=P.current;te.addEventListener("mousemove",ie),k.current=()=>{te.removeEventListener("mousemove",ie)};return}(w.current==="touch"?!Qt(a.floating,Y.relatedTarget):!0)&&$(Y)}function U(Y){L()||i.current.floatingContext&&(v.current==null||v.current({...i.current.floatingContext,tree:m,x:Y.clientX,y:Y.clientY,onClose(){B(),N(),L()||$(Y)}})(Y))}if(vt(a.domReference)){var K;const Y=a.domReference;return n&&Y.addEventListener("mouseleave",U),(K=a.floating)==null||K.addEventListener("mouseleave",U),p&&Y.addEventListener("mousemove",z,{once:!0}),Y.addEventListener("mouseenter",z),Y.addEventListener("mouseleave",H),()=>{var te;n&&Y.removeEventListener("mouseleave",U),(te=a.floating)==null||te.removeEventListener("mouseleave",U),p&&Y.removeEventListener("mousemove",z),Y.removeEventListener("mouseenter",z),Y.removeEventListener("mouseleave",H)}}},[a,s,e,f,d,p,$,N,B,r,n,x,m,y,v,i,L]),wt(()=>{var z;if(s&&n&&(z=v.current)!=null&&z.__options.blockPointerEvents&&D()){E.current=!0;const U=a.floating;if(vt(a.domReference)&&U){var H;const K=Mn(a.floating).body;K.setAttribute(nP,"");const Y=a.domReference,te=m==null||(H=m.nodesRef.current.find(ne=>ne.id===g))==null||(H=H.context)==null?void 0:H.elements.floating;return te&&(te.style.pointerEvents=""),K.style.pointerEvents="none",Y.style.pointerEvents="auto",U.style.pointerEvents="auto",()=>{K.style.pointerEvents="",Y.style.pointerEvents="",U.style.pointerEvents=""}}}},[s,n,g,a,m,v,D]),wt(()=>{n||(w.current=void 0,M.current=!1,N(),B())},[n,N,B]),ee.useEffect(()=>()=>{N(),clearTimeout(S.current),clearTimeout(_.current),B()},[s,a.domReference,N,B]);const F=ee.useMemo(()=>{function z(H){w.current=H.pointerType}return{onPointerDown:z,onPointerEnter:z,onMouseMove(H){const{nativeEvent:U}=H;function K(){!C.current&&!x.current&&r(!0,U,"hover")}f&&!Vc(w.current)||n||d===0||M.current&&H.movementX**2+H.movementY**2<2||(clearTimeout(_.current),w.current==="touch"?K():(M.current=!0,_.current=window.setTimeout(K,d)))}}},[f,r,n,x,d]),W=ee.useMemo(()=>({onMouseEnter(){clearTimeout(S.current)},onMouseLeave(z){L()||$(z.nativeEvent,!1)}}),[$,L]);return ee.useMemo(()=>s?{reference:F,floating:W}:{},[s,F,W])}let rP=0;function na(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(rP);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():rP=requestAnimationFrame(o)}function KH(e,t){var n;let r=[],i=(n=e.find(o=>o.id===t))==null?void 0:n.parentId;for(;i;){const o=e.find(a=>a.id===i);i=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function cs(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(a=>{var s;return i.parentId===a.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function HH(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),cs(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let el=new WeakMap,lh=new WeakSet,uh={},Tv=0;const GH=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,HN=e=>e&&(e.host||HN(e.parentNode)),YH=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=HN(n);return e.contains(r)?r:null}).filter(n=>n!=null);function qH(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=YH(t,e),s=new Set,l=new Set(a),u=[];uh[i]||(uh[i]=new WeakMap);const f=uh[i];a.forEach(d),p(t),s.clear();function d(m){!m||s.has(m)||(s.add(m),m.parentNode&&d(m.parentNode))}function p(m){!m||l.has(m)||[].forEach.call(m.children,g=>{if(Ca(g)!=="script")if(s.has(g))p(g);else{const v=o?g.getAttribute(o):null,y=v!==null&&v!=="false",x=(el.get(g)||0)+1,w=(f.get(g)||0)+1;el.set(g,x),f.set(g,w),u.push(g),x===1&&y&&lh.add(g),w===1&&g.setAttribute(i,""),!y&&o&&g.setAttribute(o,"true")}})}return Tv++,()=>{u.forEach(m=>{const g=(el.get(m)||0)-1,v=(f.get(m)||0)-1;el.set(m,g),f.set(m,v),g||(!lh.has(m)&&o&&m.removeAttribute(o),lh.delete(m)),v||m.removeAttribute(i)}),Tv--,Tv||(el=new WeakMap,el=new WeakMap,lh=new WeakSet,uh={})}}function iP(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Mn(e[0]).body;return qH(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Hc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function GN(e,t){const n=Rm(e,Hc());t==="prev"&&n.reverse();const r=n.indexOf(ui(Mn(e)));return n.slice(r+1)[0]}function YN(){return GN(document.body,"next")}function qN(){return GN(document.body,"prev")}function Cc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Qt(n,r)}function XH(e){Rm(e,Hc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function oP(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Vm={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};let ZH;function aP(e){e.key==="Tab"&&(e.target,clearTimeout(ZH))}const ep=ee.forwardRef(function(t,n){const[r,i]=ee.useState();wt(()=>(Ew()&&i("button"),document.addEventListener("keydown",aP),()=>{document.removeEventListener("keydown",aP)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[bs("focus-guard")]:"",style:Vm};return ee.createElement("span",Uc({},t,o))}),XN=ee.createContext(null),sP=bs("portal");function JH(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Wm(),i=ZN(),[o,a]=ee.useState(null),s=ee.useRef(null);return wt(()=>()=>{o==null||o.remove(),queueMicrotask(()=>{s.current=null})},[o]),wt(()=>{if(!r||s.current)return;const l=t?document.getElementById(t):null;if(!l)return;const u=document.createElement("div");u.id=r,u.setAttribute(sP,""),l.appendChild(u),s.current=u,a(u)},[t,r]),wt(()=>{if(n===null||!r||s.current)return;let l=n||(i==null?void 0:i.portalNode);l&&!vt(l)&&(l=l.current),l=l||document.body;let u=null;t&&(u=document.createElement("div"),u.id=t,l.appendChild(u));const f=document.createElement("div");f.id=r,f.setAttribute(sP,""),l=u||l,l.appendChild(f),s.current=f,a(f)},[t,n,r,i]),o}function Um(e){const{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,o=JH({id:n,root:r}),[a,s]=ee.useState(null),l=ee.useRef(null),u=ee.useRef(null),f=ee.useRef(null),d=ee.useRef(null),p=a==null?void 0:a.modal,m=a==null?void 0:a.open,g=!!a&&!a.modal&&a.open&&i&&!!(r||o);return ee.useEffect(()=>{if(!o||!i||p)return;function v(y){o&&Cc(y)&&(y.type==="focusin"?oP:XH)(o)}return o.addEventListener("focusin",v,!0),o.addEventListener("focusout",v,!0),()=>{o.removeEventListener("focusin",v,!0),o.removeEventListener("focusout",v,!0)}},[o,i,p]),ee.useEffect(()=>{o&&(m||oP(o))},[m,o]),ee.createElement(XN.Provider,{value:ee.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:f,afterInsideRef:d,portalNode:o,setFocusManagerState:s}),[i,o])},g&&o&&ee.createElement(ep,{"data-type":"outside",ref:l,onFocus:v=>{if(Cc(v,o)){var y;(y=f.current)==null||y.focus()}else{const x=qN()||(a==null?void 0:a.refs.domReference.current);x==null||x.focus()}}}),g&&o&&ee.createElement("span",{"aria-owns":o.id,style:Vm}),o&&dN.createPortal(t,o),g&&o&&ee.createElement(ep,{"data-type":"outside",ref:u,onFocus:v=>{if(Cc(v,o)){var y;(y=d.current)==null||y.focus()}else{const x=YN()||(a==null?void 0:a.refs.domReference.current);x==null||x.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,v.nativeEvent,"focus-out"))}}}))}const ZN=()=>ee.useContext(XN),Xb="data-floating-ui-focusable";function JN(e){return e?e.hasAttribute(Xb)?e:e.querySelector("["+Xb+"]")||e:null}const lP=20;let qa=[];function Ev(e){qa=qa.filter(n=>n.isConnected);let t=e;if(!(!t||Ca(t)==="body")){if(!QK(t,Hc())){const n=Rm(t,Hc())[0];n&&(t=n)}qa.push(t),qa.length>lP&&(qa=qa.slice(-lP))}}function uP(){return qa.slice().reverse().find(e=>e.isConnected)}const QH=ee.forwardRef(function(t,n){return ee.createElement("button",Uc({},t,{type:"button",ref:n,tabIndex:-1,style:Vm}))});function eG(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:u=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:m,nodeId:g,onOpenChange:v,events:y,dataRef:x,floatingId:w,elements:{domReference:S,floating:P}}=t,_=typeof a=="number"&&a<0,C=Hb(S)&&_,E=GH()?o:!0,k=Nn(i),M=Nn(a),D=Nn(s),$=Vf(),N=ZN(),B=ee.useRef(null),L=ee.useRef(null),F=ee.useRef(!1),W=ee.useRef(!1),z=ee.useRef(-1),H=N!=null,U=JN(P),K=vn(function(ie){return ie===void 0&&(ie=U),ie?Rm(ie,Hc()):[]}),Y=vn(ie=>{const ce=K(ie);return k.current.map(ae=>S&&ae==="reference"?S:U&&ae==="floating"?U:ce).filter(Boolean).flat()});ee.useEffect(()=>{if(r||!u)return;function ie(ae){if(ae.key==="Tab"){Qt(U,ui(Mn(U)))&&K().length===0&&!C&&kn(ae);const le=Y(),re=so(ae);k.current[0]==="reference"&&re===S&&(kn(ae),ae.shiftKey?na(le[le.length-1]):na(le[1])),k.current[1]==="floating"&&re===U&&ae.shiftKey&&(kn(ae),na(le[0]))}}const ce=Mn(U);return ce.addEventListener("keydown",ie),()=>{ce.removeEventListener("keydown",ie)}},[r,S,U,u,k,C,K,Y]),ee.useEffect(()=>{if(r||!P)return;function ie(ce){const ae=so(ce),re=K().indexOf(ae);re!==-1&&(z.current=re)}return P.addEventListener("focusin",ie),()=>{P.removeEventListener("focusin",ie)}},[r,P,K]),ee.useEffect(()=>{if(r||!d)return;function ie(){W.current=!0,setTimeout(()=>{W.current=!1})}function ce(ae){const le=ae.relatedTarget;queueMicrotask(()=>{const re=!(Qt(S,le)||Qt(P,le)||Qt(le,P)||Qt(N==null?void 0:N.portalNode,le)||le!=null&&le.hasAttribute(bs("focus-guard"))||$&&(cs($.nodesRef.current,g).find(Q=>{var fe,ye;return Qt((fe=Q.context)==null?void 0:fe.elements.floating,le)||Qt((ye=Q.context)==null?void 0:ye.elements.domReference,le)})||KH($.nodesRef.current,g).find(Q=>{var fe,ye;return((fe=Q.context)==null?void 0:fe.elements.floating)===le||((ye=Q.context)==null?void 0:ye.elements.domReference)===le})));if(l&&re&&ui(Mn(U))===Mn(U).body){en(U)&&U.focus();const Q=z.current,fe=K(),ye=fe[Q]||fe[fe.length-1]||U;en(ye)&&ye.focus()}(C||!u)&&le&&re&&!W.current&&le!==uP()&&(F.current=!0,v(!1,ae,"focus-out"))})}if(P&&en(S))return S.addEventListener("focusout",ce),S.addEventListener("pointerdown",ie),P.addEventListener("focusout",ce),()=>{S.removeEventListener("focusout",ce),S.removeEventListener("pointerdown",ie),P.removeEventListener("focusout",ce)}},[r,S,P,U,u,g,$,N,v,d,l,K,C]),ee.useEffect(()=>{var ie;if(r)return;const ce=Array.from((N==null||(ie=N.portalNode)==null?void 0:ie.querySelectorAll("["+bs("portal")+"]"))||[]);if(P){const ae=[P,...ce,B.current,L.current,k.current.includes("reference")||C?S:null].filter(re=>re!=null),le=u||C?iP(ae,E,!E):iP(ae);return()=>{le()}}},[r,S,P,u,k,N,C,E]),wt(()=>{if(r||!en(U))return;const ie=Mn(U),ce=ui(ie);queueMicrotask(()=>{const ae=Y(U),le=M.current,re=(typeof le=="number"?ae[le]:le.current)||U,Q=Qt(U,ce);!_&&!Q&&p&&na(re,{preventScroll:re===U})})},[r,p,U,_,Y,M]),wt(()=>{if(r||!U)return;let ie=!1;const ce=Mn(U),ae=ui(ce);let re=x.current.openEvent;Ev(ae);function Q(X){let{open:Re,reason:pe,event:Ie,nested:Ze}=X;Re&&(re=Ie),pe==="escape-key"&&m.domReference.current&&Ev(m.domReference.current),pe==="hover"&&Ie.type==="mouseleave"&&(F.current=!0),pe==="outside-press"&&(Ze?(F.current=!1,ie=!0):F.current=!(EN(Ie)||Tw(Ie)))}y.on("openchange",Q);const fe=ce.createElement("span");fe.setAttribute("tabindex","-1"),fe.setAttribute("aria-hidden","true"),Object.assign(fe.style,Vm),H&&S&&S.insertAdjacentElement("afterend",fe);function ye(){return typeof D.current=="boolean"?uP()||fe:D.current.current||fe}return()=>{y.off("openchange",Q);const X=ui(ce),Re=Qt(P,X)||$&&cs($.nodesRef.current,g).some(Ze=>{var tt;return Qt((tt=Ze.context)==null?void 0:tt.elements.floating,X)});(Re||re&&["click","mousedown"].includes(re.type))&&m.domReference.current&&Ev(m.domReference.current);const Ie=ye();queueMicrotask(()=>{D.current&&!F.current&&en(Ie)&&(!(Ie!==X&&X!==ce.body)||Re)&&Ie.focus({preventScroll:ie}),fe.remove()})}},[r,P,U,D,x,m,y,$,g,H,S]),ee.useEffect(()=>{queueMicrotask(()=>{F.current=!1})},[r]),wt(()=>{if(!r&&N)return N.setFocusManagerState({modal:u,closeOnFocusOut:d,open:p,onOpenChange:v,refs:m}),()=>{N.setFocusManagerState(null)}},[r,N,u,p,v,m,d]),wt(()=>{if(r||!U||typeof MutationObserver!="function"||_)return;const ie=()=>{const ae=U.getAttribute("tabindex"),le=K(),re=ui(Mn(P)),Q=le.indexOf(re);Q!==-1&&(z.current=Q),k.current.includes("floating")||re!==m.domReference.current&&le.length===0?ae!=="0"&&U.setAttribute("tabindex","0"):ae!=="-1"&&U.setAttribute("tabindex","-1")};ie();const ce=new MutationObserver(ie);return ce.observe(U,{childList:!0,subtree:!0,attributes:!0}),()=>{ce.disconnect()}},[r,P,U,m,k,K,_]);function te(ie){return r||!f||!u?null:ee.createElement(QH,{ref:ie==="start"?B:L,onClick:ce=>v(!1,ce.nativeEvent)},typeof f=="string"?f:"Dismiss")}const ne=!r&&E&&(u?!C:!0)&&(H||u);return ee.createElement(ee.Fragment,null,ne&&ee.createElement(ep,{"data-type":"inside",ref:N==null?void 0:N.beforeInsideRef,onFocus:ie=>{if(u){const ae=Y();na(i[0]==="reference"?ae[0]:ae[ae.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(F.current=!1,Cc(ie,N.portalNode)){const ae=YN()||S;ae==null||ae.focus()}else{var ce;(ce=N.beforeOutsideRef.current)==null||ce.focus()}}}),!C&&te("start"),n,te("end"),ne&&ee.createElement(ep,{"data-type":"inside",ref:N==null?void 0:N.afterInsideRef,onFocus:ie=>{if(u)na(Y()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(F.current=!0),Cc(ie,N.portalNode)){const ae=qN()||S;ae==null||ae.focus()}else{var ce;(ce=N.afterOutsideRef.current)==null||ce.focus()}}}))}function cP(e){return en(e.target)&&e.target.tagName==="BUTTON"}function fP(e){return kw(e)}function Rw(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:f=!0,stickIfOpen:d=!0}=t,p=ee.useRef(),m=ee.useRef(!1),g=ee.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){const y=p.current;v.button===0&&s!=="click"&&(Vc(y,!0)&&u||(n&&l&&(!(i.current.openEvent&&d)||i.current.openEvent.type==="mousedown")?r(!1,v.nativeEvent,"click"):(v.preventDefault(),r(!0,v.nativeEvent,"click"))))},onClick(v){const y=p.current;if(s==="mousedown"&&p.current){p.current=void 0;return}Vc(y,!0)&&u||(n&&l&&(!(i.current.openEvent&&d)||i.current.openEvent.type==="click")?r(!1,v.nativeEvent,"click"):r(!0,v.nativeEvent,"click"))},onKeyDown(v){p.current=void 0,!(v.defaultPrevented||!f||cP(v))&&(v.key===" "&&!fP(o)&&(v.preventDefault(),m.current=!0),v.key==="Enter"&&r(!(n&&l),v.nativeEvent,"click"))},onKeyUp(v){v.defaultPrevented||!f||cP(v)||fP(o)||v.key===" "&&m.current&&(m.current=!1,r(!(n&&l),v.nativeEvent,"click"))}}),[i,o,s,u,f,r,n,d,l]);return ee.useMemo(()=>a?{reference:g}:{},[a,g])}const tG={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},nG={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},dP=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function Km(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:i,dataRef:o}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:u="pointerdown",referencePress:f=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:g}=t,v=Vf(),y=vn(typeof l=="function"?l:()=>!1),x=typeof l=="function"?y:l,w=ee.useRef(!1),S=ee.useRef(!1),{escapeKey:P,outsidePress:_}=dP(m),{escapeKey:C,outsidePress:E}=dP(g),k=ee.useRef(!1),M=vn(F=>{var W;if(!n||!a||!s||F.key!=="Escape"||k.current)return;const z=(W=o.current.floatingContext)==null?void 0:W.nodeId,H=v?cs(v.nodesRef.current,z):[];if(!P&&(F.stopPropagation(),H.length>0)){let U=!0;if(H.forEach(K=>{var Y;if((Y=K.context)!=null&&Y.open&&!K.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}r(!1,CK(F)?F.nativeEvent:F,"escape-key")}),D=vn(F=>{var W;const z=()=>{var H;M(F),(H=so(F))==null||H.removeEventListener("keydown",z)};(W=so(F))==null||W.addEventListener("keydown",z)}),$=vn(F=>{var W;const z=w.current;w.current=!1;const H=S.current;if(S.current=!1,u==="click"&&H||z||typeof x=="function"&&!x(F))return;const U=so(F),K="["+bs("inert")+"]",Y=Mn(i.floating).querySelectorAll(K);let te=vt(U)?U:null;for(;te&&!ga(te);){const ae=So(te);if(ga(ae)||!vt(ae))break;te=ae}if(Y.length&&vt(U)&&!PK(U)&&!Qt(U,i.floating)&&Array.from(Y).every(ae=>!Qt(te,ae)))return;if(en(U)&&L){const ae=U.clientWidth>0&&U.scrollWidth>U.clientWidth,le=U.clientHeight>0&&U.scrollHeight>U.clientHeight;let re=le&&F.offsetX>U.clientWidth;if(le&&kr(U).direction==="rtl"&&(re=F.offsetX<=U.offsetWidth-U.clientWidth),re||ae&&F.offsetY>U.clientHeight)return}const ne=(W=o.current.floatingContext)==null?void 0:W.nodeId,ie=v&&cs(v.nodesRef.current,ne).some(ae=>{var le;return Sv(F,(le=ae.context)==null?void 0:le.elements.floating)});if(Sv(F,i.floating)||Sv(F,i.domReference)||ie)return;const ce=v?cs(v.nodesRef.current,ne):[];if(ce.length>0){let ae=!0;if(ce.forEach(le=>{var re;if((re=le.context)!=null&&re.open&&!le.context.dataRef.current.__outsidePressBubbles){ae=!1;return}}),!ae)return}r(!1,F,"outside-press")}),N=vn(F=>{var W;const z=()=>{var H;$(F),(H=so(F))==null||H.removeEventListener(u,z)};(W=so(F))==null||W.addEventListener(u,z)});ee.useEffect(()=>{if(!n||!a)return;o.current.__escapeKeyBubbles=P,o.current.__outsidePressBubbles=_;let F=-1;function W(Y){r(!1,Y,"ancestor-scroll")}function z(){window.clearTimeout(F),k.current=!0}function H(){F=window.setTimeout(()=>{k.current=!1},Dm()?5:0)}const U=Mn(i.floating);s&&(U.addEventListener("keydown",C?D:M,C),U.addEventListener("compositionstart",z),U.addEventListener("compositionend",H)),x&&U.addEventListener(u,E?N:$,E);let K=[];return p&&(vt(i.domReference)&&(K=ca(i.domReference)),vt(i.floating)&&(K=K.concat(ca(i.floating))),!vt(i.reference)&&i.reference&&i.reference.contextElement&&(K=K.concat(ca(i.reference.contextElement)))),K=K.filter(Y=>{var te;return Y!==((te=U.defaultView)==null?void 0:te.visualViewport)}),K.forEach(Y=>{Y.addEventListener("scroll",W,{passive:!0})}),()=>{s&&(U.removeEventListener("keydown",C?D:M,C),U.removeEventListener("compositionstart",z),U.removeEventListener("compositionend",H)),x&&U.removeEventListener(u,E?N:$,E),K.forEach(Y=>{Y.removeEventListener("scroll",W)}),window.clearTimeout(F)}},[o,i,s,x,u,n,r,p,a,P,_,M,C,D,$,E,N]),ee.useEffect(()=>{w.current=!1},[x,u]);const B=ee.useMemo(()=>({onKeyDown:M,[tG[d]]:F=>{f&&r(!1,F.nativeEvent,"reference-press")}}),[M,r,f,d]),L=ee.useMemo(()=>({onKeyDown:M,onMouseDown(){S.current=!0},onMouseUp(){S.current=!0},[nG[u]]:()=>{w.current=!0}}),[M,u]);return ee.useMemo(()=>a?{reference:B,floating:L}:{},[a,B,L])}function rG(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=Wm(),o=ee.useRef({}),[a]=ee.useState(()=>WH()),s=zm()!=null;if(process.env.NODE_ENV!=="production"){const m=r.reference;m&&!vt(m)&&BH("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,u]=ee.useState(r.reference),f=vn((m,g,v)=>{o.current.openEvent=m?g:void 0,a.emit("openchange",{open:m,event:g,reason:v,nested:s}),n==null||n(m,g,v)}),d=ee.useMemo(()=>({setPositionReference:u}),[]),p=ee.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return ee.useMemo(()=>({dataRef:o,open:t,onOpenChange:f,elements:p,events:a,floatingId:i,refs:d}),[t,f,p,a,i,d])}function Hm(e){e===void 0&&(e={});const{nodeId:t}=e,n=rG({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,a]=ee.useState(null),[s,l]=ee.useState(null),f=(i==null?void 0:i.domReference)||o,d=ee.useRef(null),p=Vf();wt(()=>{f&&(d.current=f)},[f]);const m=AH({...e,elements:{...i,...s&&{reference:s}}}),g=ee.useCallback(S=>{const P=vt(S)?{getBoundingClientRect:()=>S.getBoundingClientRect(),contextElement:S}:S;l(P),m.refs.setReference(P)},[m.refs]),v=ee.useCallback(S=>{(vt(S)||S===null)&&(d.current=S,a(S)),(vt(m.refs.reference.current)||m.refs.reference.current===null||S!==null&&!vt(S))&&m.refs.setReference(S)},[m.refs]),y=ee.useMemo(()=>({...m.refs,setReference:v,setPositionReference:g,domReference:d}),[m.refs,v,g]),x=ee.useMemo(()=>({...m.elements,domReference:f}),[m.elements,f]),w=ee.useMemo(()=>({...m,...r,refs:y,elements:x,nodeId:t}),[m,y,x,t,r]);return wt(()=>{r.dataRef.current.floatingContext=w;const S=p==null?void 0:p.nodesRef.current.find(P=>P.id===t);S&&(S.context=w)}),ee.useMemo(()=>({...m,context:w,refs:y,elements:x}),[m,y,x,w])}function iG(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,dataRef:o,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,u=ee.useRef(!1),f=ee.useRef(),d=ee.useRef(!0);ee.useEffect(()=>{if(!s)return;const m=cr(a.domReference);function g(){!n&&en(a.domReference)&&a.domReference===ui(Mn(a.domReference))&&(u.current=!0)}function v(){d.current=!0}return m.addEventListener("blur",g),m.addEventListener("keydown",v,!0),()=>{m.removeEventListener("blur",g),m.removeEventListener("keydown",v,!0)}},[a.domReference,n,s]),ee.useEffect(()=>{if(!s)return;function m(g){let{reason:v}=g;(v==="reference-press"||v==="escape-key")&&(u.current=!0)}return i.on("openchange",m),()=>{i.off("openchange",m)}},[i,s]),ee.useEffect(()=>()=>{clearTimeout(f.current)},[]);const p=ee.useMemo(()=>({onPointerDown(m){Tw(m.nativeEvent)||(d.current=!1)},onMouseLeave(){u.current=!1},onFocus(m){if(u.current)return;const g=so(m.nativeEvent);if(l&&vt(g))try{if(Ew()&&kN())throw Error();if(!g.matches(":focus-visible"))return}catch{if(!d.current&&!kw(g))return}r(!0,m.nativeEvent,"focus")},onBlur(m){u.current=!1;const g=m.relatedTarget,v=m.nativeEvent,y=vt(g)&&g.hasAttribute(bs("focus-guard"))&&g.getAttribute("data-type")==="outside";f.current=window.setTimeout(()=>{var x;const w=ui(a.domReference?a.domReference.ownerDocument:document);!g&&w===a.domReference||Qt((x=o.current.floatingContext)==null?void 0:x.refs.floating.current,w)||Qt(a.domReference,w)||y||r(!1,v,"focus")})}}),[o,a.domReference,r,l]);return ee.useMemo(()=>s?{reference:p}:{},[s,p])}const hP="active",pP="selected";function kv(e,t,n){const r=new Map,i=n==="item";let o=e;if(i&&e){const{[hP]:a,[pP]:s,...l}=e;o=l}return{...n==="floating"&&{tabIndex:-1,[Xb]:""},...o,...t.map(a=>{const s=a?a[n]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[u,f]=l;if(!(i&&[hP,pP].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof f=="function"){var d;(d=r.get(u))==null||d.push(f),a[u]=function(){for(var p,m=arguments.length,g=new Array(m),v=0;vy(...g)).find(y=>y!==void 0)}}}else a[u]=f}),a),{})}}function Gm(e){e===void 0&&(e=[]);const t=e.map(s=>s==null?void 0:s.reference),n=e.map(s=>s==null?void 0:s.floating),r=e.map(s=>s==null?void 0:s.item),i=ee.useCallback(s=>kv(s,e,"reference"),t),o=ee.useCallback(s=>kv(s,e,"floating"),n),a=ee.useCallback(s=>kv(s,e,"item"),r);return ee.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:a}),[i,o,a])}let mP=!1;function Ym(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function gP(e,t){return Ym(t,e===Iw||e===zf,e===fa||e===da)}function Mv(e,t,n){return Ym(t,e===zf,n?e===fa:e===da)||e==="Enter"||e===" "||e===""}function oG(e,t,n){return Ym(t,n?e===fa:e===da,e===zf)}function yP(e,t,n){return Ym(t,n?e===da:e===fa,e===Iw)}function aG(e,t){const{open:n,onOpenChange:r,elements:i}=e,{listRef:o,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:u=null,allowEscape:f=!1,loop:d=!1,nested:p=!1,rtl:m=!1,virtual:g=!1,focusItemOnOpen:v="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:x=!0,disabledIndices:w=void 0,orientation:S="vertical",cols:P=1,scrollItemIntoView:_=!0,virtualItemRef:C,itemSizes:E,dense:k=!1}=t;process.env.NODE_ENV!=="production"&&(f&&(d||Fh("`useListNavigation` looping must be enabled to allow escaping."),g||Fh("`useListNavigation` must be virtual to allow escaping.")),S==="vertical"&&P>1&&Fh("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const M=JN(i.floating),D=Nn(M),$=zm(),N=Vf(),B=vn(s),L=Hb(i.domReference),F=ee.useRef(v),W=ee.useRef(u??-1),z=ee.useRef(null),H=ee.useRef(!0),U=ee.useRef(B),K=ee.useRef(!!i.floating),Y=ee.useRef(n),te=ee.useRef(!1),ne=ee.useRef(!1),ie=Nn(w),ce=Nn(n),ae=Nn(_),le=Nn(u),[re,Q]=ee.useState(),[fe,ye]=ee.useState(),X=vn(function(Me,nt,Se){Se===void 0&&(Se=!1);function ze(at){g?(Q(at.id),N==null||N.events.emit("virtualfocus",at),C&&(C.current=at)):na(at,{preventScroll:!0,sync:kN()&&Ew()?mP||te.current:!1})}const Lt=Me.current[nt.current];Lt&&ze(Lt),requestAnimationFrame(()=>{const at=Me.current[nt.current]||Lt;if(!at)return;Lt||ze(at);const Wt=ae.current;Wt&&pe&&(Se||!H.current)&&(at.scrollIntoView==null||at.scrollIntoView(typeof Wt=="boolean"?{block:"nearest",inline:"nearest"}:Wt))})});wt(()=>{document.createElement("div").focus({get preventScroll(){return mP=!0,!1}})},[]),wt(()=>{l&&(n&&i.floating?F.current&&u!=null&&(ne.current=!0,W.current=u,B(u)):K.current&&(W.current=-1,U.current(null)))},[l,n,i.floating,u,B]),wt(()=>{if(l&&n&&i.floating)if(a==null){if(te.current=!1,le.current!=null)return;if(K.current&&(W.current=-1,X(o,W)),(!Y.current||!K.current)&&F.current&&(z.current!=null||F.current===!0&&z.current==null)){let Me=0;const nt=()=>{o.current[0]==null?(Me<2&&(Me?requestAnimationFrame:queueMicrotask)(nt),Me++):(W.current=z.current==null||Mv(z.current,S,m)||p?Pv(o,ie.current):QC(o,ie.current),z.current=null,B(W.current))};nt()}}else Oc(o,a)||(W.current=a,X(o,W,ne.current),ne.current=!1)},[l,n,i.floating,a,le,p,o,S,m,B,X,ie]),wt(()=>{var Me;if(!l||i.floating||!N||g||!K.current)return;const nt=N.nodesRef.current,Se=(Me=nt.find(at=>at.id===$))==null||(Me=Me.context)==null?void 0:Me.elements.floating,ze=ui(Mn(i.floating)),Lt=nt.some(at=>at.context&&Qt(at.context.elements.floating,ze));Se&&!Lt&&H.current&&Se.focus({preventScroll:!0})},[l,i.floating,N,$,g]),wt(()=>{if(!l||!N||!g||$)return;function Me(nt){ye(nt.id),C&&(C.current=nt)}return N.events.on("virtualfocus",Me),()=>{N.events.off("virtualfocus",Me)}},[l,N,g,$,C]),wt(()=>{U.current=B,K.current=!!i.floating}),wt(()=>{n||(z.current=null)},[n]),wt(()=>{Y.current=n},[n]);const Re=a!=null,pe=ee.useMemo(()=>{function Me(Se){if(!n)return;const ze=o.current.indexOf(Se);ze!==-1&&B(ze)}return{onFocus(Se){let{currentTarget:ze}=Se;Me(ze)},onClick:Se=>{let{currentTarget:ze}=Se;return ze.focus({preventScroll:!0})},...y&&{onMouseMove(Se){let{currentTarget:ze}=Se;Me(ze)},onPointerLeave(Se){let{pointerType:ze}=Se;!H.current||ze==="touch"||(W.current=-1,X(o,W),B(null),g||na(D.current,{preventScroll:!0}))}}}},[n,D,X,y,o,B,g]),Ie=vn(Me=>{if(H.current=!1,te.current=!0,Me.which===229||!ce.current&&Me.currentTarget===D.current)return;if(p&&yP(Me.key,S,m)){kn(Me),r(!1,Me.nativeEvent,"list-navigation"),en(i.domReference)&&(g?N==null||N.events.emit("virtualfocus",i.domReference):i.domReference.focus());return}const nt=W.current,Se=Pv(o,w),ze=QC(o,w);if(L||(Me.key==="Home"&&(kn(Me),W.current=Se,B(W.current)),Me.key==="End"&&(kn(Me),W.current=ze,B(W.current))),P>1){const Lt=E||Array.from({length:o.current.length},()=>({width:1,height:1})),at=NH(Lt,P,k),Wt=at.findIndex(rn=>rn!=null&&!Bh(o.current,rn,w)),Nr=at.reduce((rn,tr,qe)=>tr!=null&&!Bh(o.current,tr,w)?qe:rn,-1),pn=at[jH({current:at.map(rn=>rn!=null?o.current[rn]:null)},{event:Me,orientation:S,loop:d,rtl:m,cols:P,disabledIndices:DH([...w||o.current.map((rn,tr)=>Bh(o.current,tr)?tr:void 0),void 0],at),minIndex:Wt,maxIndex:Nr,prevIndex:$H(W.current>ze?Se:W.current,Lt,at,P,Me.key===zf?"bl":Me.key===(m?fa:da)?"tr":"tl"),stopEvent:!0})];if(pn!=null&&(W.current=pn,B(W.current)),S==="both")return}if(gP(Me.key,S)){if(kn(Me),n&&!g&&ui(Me.currentTarget.ownerDocument)===Me.currentTarget){W.current=Mv(Me.key,S,m)?Se:ze,B(W.current);return}Mv(Me.key,S,m)?d?W.current=nt>=ze?f&&nt!==o.current.length?-1:Se:Ln(o,{startingIndex:nt,disabledIndices:w}):W.current=Math.min(ze,Ln(o,{startingIndex:nt,disabledIndices:w})):d?W.current=nt<=Se?f&&nt!==-1?o.current.length:ze:Ln(o,{startingIndex:nt,decrement:!0,disabledIndices:w}):W.current=Math.max(Se,Ln(o,{startingIndex:nt,decrement:!0,disabledIndices:w})),Oc(o,W.current)?B(null):B(W.current)}}),Ze=ee.useMemo(()=>g&&n&&Re&&{"aria-activedescendant":fe||re},[g,n,Re,fe,re]),tt=ee.useMemo(()=>({"aria-orientation":S==="both"?void 0:S,...!Hb(i.domReference)&&Ze,onKeyDown:Ie,onPointerMove(){H.current=!0}}),[Ze,Ie,i.domReference,S]),Dn=ee.useMemo(()=>{function Me(Se){v==="auto"&&EN(Se.nativeEvent)&&(F.current=!0)}function nt(Se){F.current=v,v==="auto"&&Tw(Se.nativeEvent)&&(F.current=!0)}return{...Ze,onKeyDown(Se){H.current=!1;const ze=Se.key.startsWith("Arrow"),Lt=["Home","End"].includes(Se.key),at=ze||Lt,Wt=oG(Se.key,S,m),Nr=yP(Se.key,S,m),pn=gP(Se.key,S),rn=(p?Wt:pn)||Se.key==="Enter"||Se.key.trim()==="";if(g&&n){const pt=N==null?void 0:N.nodesRef.current.find($r=>$r.parentId==null),Sn=N&&pt?HH(N.nodesRef.current,pt.id):null;if(at&&Sn&&C){const $r=new KeyboardEvent("keydown",{key:Se.key,bubbles:!0});if(Wt||Nr){var tr,qe;const Hi=((tr=Sn.context)==null?void 0:tr.elements.domReference)===Se.currentTarget,Xt=Nr&&!Hi?(qe=Sn.context)==null?void 0:qe.elements.domReference:Wt?o.current.find(hr=>(hr==null?void 0:hr.id)===re):null;Xt&&(kn(Se),Xt.dispatchEvent($r),ye(void 0))}if((pn||Lt)&&Sn.context&&Sn.context.open&&Sn.parentId&&Se.currentTarget!==Sn.context.elements.domReference){var $t;kn(Se),($t=Sn.context.elements.domReference)==null||$t.dispatchEvent($r);return}}return Ie(Se)}if(!(!n&&!x&&ze)){if(rn&&(z.current=p&&pn?null:Se.key),p){Wt&&(kn(Se),n?(W.current=Pv(o,ie.current),B(W.current)):r(!0,Se.nativeEvent,"list-navigation"));return}pn&&(u!=null&&(W.current=u),kn(Se),!n&&x?r(!0,Se.nativeEvent,"list-navigation"):Ie(Se),n&&B(W.current))}},onFocus(){n&&!g&&B(null)},onPointerDown:nt,onMouseDown:Me,onClick:Me}},[re,Ze,Ie,ie,v,o,p,B,r,n,x,S,m,u,N,g,C]);return ee.useMemo(()=>l?{reference:Dn,floating:tt,item:pe}:{},[l,Dn,tt,pe])}const sG=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Lw(e,t){var n;t===void 0&&(t={});const{open:r,floatingId:i}=e,{enabled:o=!0,role:a="dialog"}=t,s=(n=sG.get(a))!=null?n:a,l=Wm(),f=zm()!=null,d=ee.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:r?i:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":r?i:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&f&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,i,f,r,l,a]),p=ee.useMemo(()=>{const g={id:i,...s&&{role:s}};return s==="tooltip"||a==="label"?g:{...g,...s==="menu"&&{"aria-labelledby":l}}},[s,i,l,a]),m=ee.useCallback(g=>{let{active:v,selected:y}=g;const x={role:"option",...v&&{id:i+"-option"}};switch(a){case"select":return{...x,"aria-selected":v&&y};case"combobox":return{...x,...v&&{"aria-selected":!0}}}return{}},[i,a]);return ee.useMemo(()=>o?{reference:d,floating:p,item:m}:{},[o,d,p,m])}const vP=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function tl(e,t){return typeof e=="function"?e(t):e}function lG(e,t){const[n,r]=ee.useState(e);return e&&!n&&r(!0),ee.useEffect(()=>{if(!e&&n){const i=setTimeout(()=>r(!1),t);return()=>clearTimeout(i)}},[e,n,t]),n}function uG(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,a=(typeof i=="number"?i:i.close)||0,[s,l]=ee.useState("unmounted"),u=lG(n,a);return!u&&s==="close"&&l("unmounted"),wt(()=>{if(r){if(n){l("initial");const f=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(f)}}l("close")}},[n,r]),{isMounted:u,status:s}}function QN(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:i,common:o,duration:a=250}=t,s=e.placement,l=s.split("-")[0],u=ee.useMemo(()=>({side:l,placement:s}),[l,s]),f=typeof a=="number",d=(f?a:a.open)||0,p=(f?a:a.close)||0,[m,g]=ee.useState(()=>({...tl(o,u),...tl(n,u)})),{isMounted:v,status:y}=uG(e,{duration:a}),x=Nn(n),w=Nn(r),S=Nn(i),P=Nn(o);return wt(()=>{const _=tl(x.current,u),C=tl(S.current,u),E=tl(P.current,u),k=tl(w.current,u)||Object.keys(_).reduce((M,D)=>(M[D]="",M),{});if(y==="initial"&&g(M=>({transitionProperty:M.transitionProperty,...E,..._})),y==="open"&&g({transitionProperty:Object.keys(k).map(vP).join(","),transitionDuration:d+"ms",...E,...k}),y==="close"){const M=C||_;g({transitionProperty:Object.keys(M).map(vP).join(","),transitionDuration:p+"ms",...E,...M})}},[p,S,x,w,P,d,y,u]),{isMounted:v,styles:m}}function cG(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:u=!0,findMatch:f=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:m=null}=t,g=ee.useRef(),v=ee.useRef(""),y=ee.useRef((n=m??a)!=null?n:-1),x=ee.useRef(null),w=vn(s),S=vn(l),P=Nn(f),_=Nn(p);wt(()=>{r&&(clearTimeout(g.current),x.current=null,v.current="")},[r]),wt(()=>{if(r&&v.current===""){var D;y.current=(D=m??a)!=null?D:-1}},[r,m,a]);const C=vn(D=>{D?i.current.typing||(i.current.typing=D,S(D)):i.current.typing&&(i.current.typing=D,S(D))}),E=vn(D=>{function $(W,z,H){const U=P.current?P.current(z,H):z.find(K=>(K==null?void 0:K.toLocaleLowerCase().indexOf(H.toLocaleLowerCase()))===0);return U?W.indexOf(U):-1}const N=o.current;if(v.current.length>0&&v.current[0]!==" "&&($(N,N,v.current)===-1?C(!1):D.key===" "&&kn(D)),N==null||_.current.includes(D.key)||D.key.length!==1||D.ctrlKey||D.metaKey||D.altKey)return;r&&D.key!==" "&&(kn(D),C(!0)),N.every(W=>{var z,H;return W?((z=W[0])==null?void 0:z.toLocaleLowerCase())!==((H=W[1])==null?void 0:H.toLocaleLowerCase()):!0})&&v.current===D.key&&(v.current="",y.current=x.current),v.current+=D.key,clearTimeout(g.current),g.current=setTimeout(()=>{v.current="",y.current=x.current,C(!1)},d);const L=y.current,F=$(N,[...N.slice((L||0)+1),...N.slice(0,(L||0)+1)],v.current);F!==-1?(w(F),x.current=F):D.key!==" "&&(v.current="",C(!1))}),k=ee.useMemo(()=>({onKeyDown:E}),[E]),M=ee.useMemo(()=>({onKeyDown:E,onKeyUp(D){D.key===" "&&C(!1)}}),[E,C]);return ee.useMemo(()=>u?{reference:k,floating:M}:{},[u,k,M])}function bP(e,t){const[n,r]=e;let i=!1;const o=t.length;for(let a=0,s=o-1;a=r!=d>=r&&n<=(f-l)*(r-u)/(d-u)+l&&(i=!i)}return i}function fG(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function dG(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let i,o=!1,a=null,s=null,l=performance.now();function u(d,p){const m=performance.now(),g=m-l;if(a===null||s===null||g===0)return a=d,s=p,l=m,null;const v=d-a,y=p-s,w=Math.sqrt(v*v+y*y)/g;return a=d,s=p,l=m,w}const f=d=>{let{x:p,y:m,placement:g,elements:v,onClose:y,nodeId:x,tree:w}=d;return function(P){function _(){clearTimeout(i),y()}if(clearTimeout(i),!v.domReference||!v.floating||g==null||p==null||m==null)return;const{clientX:C,clientY:E}=P,k=[C,E],M=so(P),D=P.type==="mouseleave",$=Qt(v.floating,M),N=Qt(v.domReference,M),B=v.domReference.getBoundingClientRect(),L=v.floating.getBoundingClientRect(),F=g.split("-")[0],W=p>L.right-L.width/2,z=m>L.bottom-L.height/2,H=fG(k,B),U=L.width>B.width,K=L.height>B.height,Y=(U?B:L).left,te=(U?B:L).right,ne=(K?B:L).top,ie=(K?B:L).bottom;if($&&(o=!0,!D))return;if(N&&(o=!1),N&&!D){o=!0;return}if(D&&vt(P.relatedTarget)&&Qt(v.floating,P.relatedTarget)||w&&cs(w.nodesRef.current,x).some(le=>{let{context:re}=le;return re==null?void 0:re.open}))return;if(F==="top"&&m>=B.bottom-1||F==="bottom"&&m<=B.top+1||F==="left"&&p>=B.right-1||F==="right"&&p<=B.left+1)return _();let ce=[];switch(F){case"top":ce=[[Y,B.top+1],[Y,L.bottom-1],[te,L.bottom-1],[te,B.top+1]];break;case"bottom":ce=[[Y,L.top+1],[Y,B.bottom-1],[te,B.bottom-1],[te,L.top+1]];break;case"left":ce=[[L.right-1,ie],[L.right-1,ne],[B.left+1,ne],[B.left+1,ie]];break;case"right":ce=[[B.right-1,ie],[B.right-1,ne],[L.left+1,ne],[L.left+1,ie]];break}function ae(le){let[re,Q]=le;switch(F){case"top":{const fe=[U?re+t/2:W?re+t*4:re-t*4,Q+t+1],ye=[U?re-t/2:W?re+t*4:re-t*4,Q+t+1],X=[[L.left,W||U?L.bottom-t:L.top],[L.right,W?U?L.bottom-t:L.top:L.bottom-t]];return[fe,ye,...X]}case"bottom":{const fe=[U?re+t/2:W?re+t*4:re-t*4,Q-t],ye=[U?re-t/2:W?re+t*4:re-t*4,Q-t],X=[[L.left,W||U?L.top+t:L.bottom],[L.right,W?U?L.top+t:L.bottom:L.top+t]];return[fe,ye,...X]}case"left":{const fe=[re+t+1,K?Q+t/2:z?Q+t*4:Q-t*4],ye=[re+t+1,K?Q-t/2:z?Q+t*4:Q-t*4];return[...[[z||K?L.right-t:L.left,L.top],[z?K?L.right-t:L.left:L.right-t,L.bottom]],fe,ye]}case"right":{const fe=[re-t,K?Q+t/2:z?Q+t*4:Q-t*4],ye=[re-t,K?Q-t/2:z?Q+t*4:Q-t*4],X=[[z||K?L.left+t:L.right,L.top],[z?K?L.left+t:L.right:L.left+t,L.bottom]];return[fe,ye,...X]}}}if(!bP([C,E],ce)){if(o&&!H)return _();if(!D&&r){const le=u(P.clientX,P.clientY);if(le!==null&&le<.1)return _()}bP([C,E],ae([p,m]))?!o&&r&&(i=window.setTimeout(_,40)):_()}}};return f.__options={blockPointerEvents:n},f}const Uf="light",e$="neutral",hG="button",pG=({theme:e=Uf,variant:t=e$})=>{let n=e==="light"?"text-icon-secondary":"text-icon-inverse";return n={info:e==="light"?"text-support-info":"text-support-info-inverse",success:e==="light"?"text-support-success":"text-support-success-inverse",warning:e==="light"?"text-support-warning":"text-support-warning-inverse",error:e==="light"?"text-support-error":"text-support-error-inverse"}[t]||n,n},tp=({icon:e,theme:t=Uf,variant:n=e$})=>{var a;const r="[&>svg]:h-5 [&>svg]:w-5",i=pG({theme:t,variant:n});if(e&&O.isValidElement(e))return O.cloneElement(e,{className:G(r,i,((a=e==null?void 0:e.props)==null?void 0:a.className)??"")});const o={neutral:T.jsx(zb,{className:G(r,i)}),info:T.jsx(zb,{className:G(r,i)}),success:T.jsx(Ff,{className:G(r,i)}),warning:T.jsx(hK,{className:G(r,i)}),error:T.jsx(fK,{className:G(r,i)})};return o[n]||o.neutral},Zb=({actionType:e=hG,onAction:t=()=>{},actionLabel:n="",theme:r=Uf})=>{const i="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none";let o="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch(r==="dark"&&(o="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),e){case"button":return T.jsx(Wn,{variant:"outline",size:"xs",onClick:t,className:G("rounded",i,o,r==="dark"?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:n});case"link":return T.jsx(Wn,{variant:"link",size:"xs",onClick:t,className:G(i,o),children:n});default:return null}},np=({theme:e=Uf,title:t="",inline:n=!1})=>{if(!t)return null;const r={light:"text-text-primary",dark:"text-text-inverse"};return T.jsx("span",{className:G("block",r[e],"text-sm leading-5 font-semibold",n?"inline":"block"),children:t})},rp=({theme:e=Uf,content:t="",inline:n=!1})=>{if(!t)return null;const r={light:"text-text-primary",dark:"text-text-inverse"};return T.jsx("span",{className:G(r[e],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal",n?"inline":"block"),children:t})},mG=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},Bw=({variant:e="dark",placement:t="bottom",title:n="",content:r,arrow:i=!1,open:o,setOpen:a,children:s,className:l,tooltipPortalRoot:u,tooltipPortalId:f,boundary:d="clippingAncestors",strategy:p="fixed",offset:m=8,triggers:g=["hover","focus"],interactive:v=!1})=>{const y=O.useMemo(()=>typeof o=="boolean"&&typeof a=="function",[o,a]),[x,w]=O.useState(!1),S=O.useRef(null),{refs:P,floatingStyles:_,context:C}=Hm({open:y?o:x,onOpenChange:y?a:w,placement:t,strategy:p,middleware:[Bm(m),Fm({boundary:d}),VN({boundary:d}),EH({element:S})],whileElementsMounted:Lm}),E=Rw(C,{enabled:!y&&g.includes("click")}),k=UH(C,{move:!1,enabled:!y&&g.includes("hover"),...v&&{handleClose:dG()}}),M=iG(C,{enabled:!y&&g.includes("focus")}),D=Km(C),$=Lw(C,{role:"tooltip"}),{getReferenceProps:N,getFloatingProps:B}=Gm([E,k,M,D,$]),{isMounted:L,styles:F}=QN(C,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),W="absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",z={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"}[e],H=e==="dark"?"text-tooltip-background-dark":"text-tooltip-background-light";return T.jsxs(T.Fragment,{children:[O.isValidElement(s)&&O.cloneElement(s,{...s.props,ref:mG(s.ref,P.setReference),className:G(s.props.className),...N()}),T.jsx(Um,{id:f,root:u,children:L&&T.jsxs("div",{className:G(W,z,"max-w-80 w-fit",l),ref:P.setFloating,style:{..._,...F},...B(),children:[T.jsxs("div",{children:[!!n&&T.jsx("span",{className:"font-semibold",children:n}),!!r&&T.jsx("div",{className:"font-normal",children:r})]}),i&&T.jsx(FH,{ref:S,context:C,className:G("fill-current",H)})]})})]})},t$=O.createContext({}),n$=()=>O.useContext(t$),r$=({children:e,name:t,style:n="simple",size:r="md",value:i,defaultValue:o,by:a="id",as:s="div",onChange:l,className:u,disableGroup:f=!1,vertical:d=!1,columns:p=4,multiSelection:m=!1,gapClassName:g="gap-2"})=>{const v=O.useMemo(()=>typeof i<"u",[i]),y=O.useMemo(()=>t||`radio-button-group-${jo()}`,[t]);let x;v?x=i:m?x=o??[]:x=o;const[w,S]=O.useState(x),P=O.useCallback(E=>{if(m)S(k=>{const M=Array.isArray(k)&&typeof E=="string"&&k.includes(E);let D;return M?D=k.filter($=>$!==E):D=[...Array.isArray(k)?k:[],...typeof E=="string"?[E]:[]],typeof l=="function"&&l(D),D});else{if(v||S(E),typeof l!="function")return;l(E)}},[l]);u=G("grid grid-cols-4",Y8[p],g,n==="tile"&&"gap-0",d&&"grid-cols-1",u);const _=G(n==="tile"?"border border-border-subtle border-solid rounded-md shadow-sm":"gap-6",u),C=()=>T.jsx(t$.Provider,{value:{name:y,value:v?i:w,by:a,onChange:P,isControlled:v,disableAll:f,style:n,columns:p,multiSelection:m,size:r},children:O.Children.map(e,E=>O.isValidElement(E)?E:null)});return T.jsx(T.Fragment,{children:n==="tile"?T.jsx("div",{className:_,children:C()}):T.jsx(s,{...s===O.Fragment?{}:{className:u},children:C()})})};r$.displayName="RadioButton.Group";const gG=({id:e,label:t,value:n,children:r,disabled:i,icon:o=null,inlineIcon:a=!1,hideSelection:s=!1,reversePosition:l=!1,borderOn:u=!1,borderOnActive:f=!0,badgeItem:d=null,useSwitch:p=!1,info:m=void 0,minWidth:g=!0,...v},y)=>{var z,H;const{buttonWrapperClasses:x}=v,w=n$(),{name:S,value:P,by:_,onChange:C,disableAll:E,checked:k,multiSelection:M,size:D="md"}=w,$="primary",N=O.useMemo(()=>e||`radio-button-${jo()}`,[e]),B=O.useMemo(()=>E||i,[E,i]),L=O.useMemo(()=>M?Array.isArray(P)&&P.includes(n):typeof k<"u"?k:typeof P!=typeof n?!1:typeof P=="string"?P===n:Array.isArray(P)?P.includes(n):P[_]===n[_],[P,n,k]),F=O.useCallback(()=>O.isValidElement(t)?t:t!=null&&t.heading?T.jsxs("div",{className:G(!a&&"space-y-1.5 mt-[2px]",l&&(p?"ml-10":"ml-4"),a&&"flex gap-2",a&&!t.description&&"items-center"),children:[o&&T.jsx(T.Fragment,{children:o}),T.jsxs("div",{className:G("space-y-1.5"),children:[T.jsx("p",{className:G("text-text-primary font-medium m-0",gK[D],i&&"text-text-disabled cursor-not-allowed"),children:t.heading}),t.description&&T.jsx("p",{className:"text-text-tertiary text-sm font-normal leading-5 m-0",children:t.description})]})]}):null,[t]);if(w.style==="tile")return T.jsx(yG,{id:e,label:t,value:n,disabled:i,size:D,children:r});const W=()=>{B||(M?p&&C(n,!L):C(n))};return T.jsxs("label",{className:G("inline-flex items-center relative cursor-pointer transition-all duration-300",!!t&&"items-start justify-between",g&&"min-w-[180px]",u&&"border border-border-subtle border-solid rounded-md shadow-sm hover:ring-2 hover:ring-border-interactive",f&&u&&L&&"ring-2 ring-border-interactive",D==="sm"?"px-3 py-3":"px-4 py-4","pr-12",B&&"cursor-not-allowed opacity-40",x),htmlFor:N,onClick:W,children:[!!t&&T.jsx("label",{className:G("cursor-pointer",B&&"cursor-not-allowed"),htmlFor:N,children:F()}),!!m&&T.jsx("div",{className:"absolute mr-0.5 bottom-1.5 right-3",children:T.jsx(Bw,{title:m==null?void 0:m.heading,content:m==null?void 0:m.description,children:T.jsx(zb,{className:G("text-text-primary",(z=_v[D])==null?void 0:z.info)})})}),T.jsxs("label",{className:G("absolute mr-0.5 right-3 flex items-center cursor-pointer rounded-full gap-2",l&&"left-0",B&&"cursor-not-allowed",a&&"mr-3",p?HC[D].switch:HC[D].radio),onClick:W,children:[!!d&&d,!s&&(p?T.jsx(T.Fragment,{children:T.jsx(Ow,{defaultValue:!1,size:D==="md"?"lg":"sm",onChange:()=>{M?C(n,!L):C(n)},checked:L,...v,"aria-label":(t==null?void 0:t.heading)??"Switch"})}):T.jsxs("span",{className:"relative p-0.5",children:[T.jsx("input",{ref:y,id:N,type:M?"checkbox":"radio",className:G("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",!M&&"rounded-full",UC[$].checkbox,_v[D].checkbox,B&&KC.checkbox),name:S,value:n,onChange:U=>C(U.target.value),checked:L,disabled:B,...v}),T.jsx("span",{className:G("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",UC[$].icon,B&&KC.icon),children:M?T.jsx(Ff,{className:D==="sm"?"size-3":"size-4"}):T.jsx("div",{className:G("rounded-full bg-current",D==="sm"&&"mt-[0.5px]",(H=_v[D])==null?void 0:H.icon)})})]}))]})]})},Jb=O.forwardRef(gG);Jb.displayName="RadioButton.Button";const yG=({id:e,children:t,value:n,disabled:r,size:i="md",...o})=>{const a=n$(),{name:s,value:l,by:u,onChange:f,disableAll:d,checked:p}=a||{},m=O.useMemo(()=>e||`radio-button-${jo()}`,[e]),g=O.useMemo(()=>d||r,[d,r]),v=O.useMemo(()=>typeof p<"u"?p:typeof l!=typeof n?!1:typeof l=="string"?l===n:Array.isArray(l)?l.includes(n):l&&u?l[u]===n[u]:!1,[l,n,p,u]),y=()=>{f&&f(n)},w=G(bK,xK,wK,g?"text-text-disabled cursor-not-allowed":"",yK[i],vK);return T.jsx(T.Fragment,{children:T.jsxs("button",{type:"button",id:m,"aria-label":"Radio Button",className:G(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",v&&"bg-button-disabled"),onClick:y,disabled:g,...o,children:[T.jsx("input",{type:"hidden",value:n,name:s,checked:v,onChange:S=>f==null?void 0:f(S.target.value)}),t]})})},vG=Object.assign(Jb,{Group:r$,Button:Jb}),Kf=O.forwardRef(({label:e="",size:t="sm",className:n="",type:r="pill",variant:i="neutral",icon:o=null,disabled:a=!1,onClose:s=()=>{},closable:l=!1,onMouseDown:u=()=>{}},f)=>{const d="font-medium border-badge-border-gray flex items-center justify-center border border-solid box-border max-w-full",p={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"},m={pill:"rounded-full",rounded:"rounded"},g={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"};let v="",y="group relative justify-center flex items-center cursor-pointer";const x={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return a?(v=g.disabled,y+=" cursor-not-allowed disabled"):v=g[i],e?T.jsxs("span",{className:G(d,p[t],m[r],"gap-0.5",v,n),ref:f,children:[o?T.jsx("span",{className:G("justify-center flex items-center",x[t]),children:o}):null,T.jsx("span",{className:"px-1 truncate",children:e}),l&&T.jsxs("span",{className:G(y,x[t]),onMouseDown:u,role:"button",tabIndex:0,...!a&&{onClick:s},children:[T.jsx("span",{className:"sr-only",children:`Remove ${e}`}),T.jsx(ma,{}),T.jsx("span",{className:"absolute -inset-1"})]})]}):null});Kf.displayName="Badge";const bG=({id:e,defaultValue:t="",value:n,size:r="sm",className:i="",disabled:o=!1,onChange:a=()=>{},error:s=!1,onError:l=()=>{},...u},f)=>{const d=O.useMemo(()=>e||`input-textarea-${jo()}`,[e]),p=O.useMemo(()=>typeof n<"u",[n]),[m,g]=O.useState(t),v=O.useCallback(()=>p?n:m,[p,n,m]),y=E=>{if(o)return;const k=E.target.value;p||g(k),typeof a=="function"&&a(k)},x="py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none",w={sm:"px-3 rounded text-xs",md:"px-3 rounded-md text-sm",lg:"px-4 rounded-lg text-base"},S=o?"hover:border-border-disabled":"hover:border-border-strong",P="focus:border-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",_=s?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"",C=o?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"";return T.jsx("textarea",{ref:f,id:d,className:G(x,C,w[r],P,S,_,i),disabled:o,onChange:y,onInvalid:l,value:v(),...u})},i$=O.forwardRef(bG);i$.displayName="TextArea";const xG=O.forwardRef(({variant:e="primary",size:t="md",border:n="subtle",src:r,alt:i,children:o,className:a,...s},l)=>{const[u,f]=O.useState(!1),d=r&&n==="none"?"subtle":n,p="rounded-full overflow-hidden flex items-center justify-center",m={white:"text-text-primary bg-background-primary",gray:"text-text-primary bg-background-secondary",primary:"text-text-on-color bg-background-brand","primary-light":"text-text-primary bg-brand-background-50",dark:"text-text-on-color bg-button-secondary"}[e],g={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"}[t],v={none:"",subtle:"ring-1 ring-border-transparent-subtle",ring:"ring ring-border-subtle"}[d],y=r?"object-cover object-center":"",x=()=>{var _,C,E;if(r&&u){if(i&&typeof i=="string")return(_=i==null?void 0:i[0])==null?void 0:_.toUpperCase();if(o&&typeof o=="string")return(C=o==null?void 0:o[0])==null?void 0:C.toUpperCase();if(!o&&!i)return T.jsx(pK,{})}return o?typeof o=="string"?(E=o==null?void 0:o[0])==null?void 0:E.toUpperCase():o:null},w=()=>{f(!0)},S=!r||u,P=S?"div":"img";return O.useEffect(()=>{f(!1)},[r]),T.jsx(P,{ref:l,className:G(p,S&&m,g,v,y,a),...S?{children:x()}:{src:r,alt:i,onError:w},...s})}),wG=({id:e,type:t="text",defaultValue:n="",value:r,size:i="sm",className:o="",disabled:a=!1,onChange:s=()=>{},error:l=!1,onError:u=()=>{},prefix:f=null,suffix:d=null,label:p="",...m},g)=>{const v=O.useRef(null),y=O.useMemo(()=>e||`input-${t}-${jo()}`,[e]),x=O.useMemo(()=>typeof r<"u",[r]),[w,S]=O.useState(n),[P,_]=O.useState(null),C=O.useCallback(()=>x?r:w,[x,r,w]),E=re=>{if(a)return;let Q;t==="file"?(Q=re.target.files,Q&&Q.length>0?_(Q[0].name):_(null)):Q=re.target.value,!x&&t!=="file"&&S(Q),typeof s=="function"&&s(Q)},k=()=>{_(null),v.current&&(v.current.value=""),s(null)},M="bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200",D={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"},$={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},N={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},B={sm:f?"pl-8":"",md:f?"pl-9":"",lg:f?"pl-10":""},L={sm:d?"pr-8":"",md:d?"pr-9":"",lg:d?"pr-10":""},F=a?"hover:outline-border-disabled":"hover:outline-border-strong",W="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",z=l?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",H=l?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",U=a?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",K=a?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",Y="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",te=a?"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",ne={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},ie=()=>f?T.jsx("div",{className:G(Y,"left-0 pl-3",N[i]),children:f}):null,ce=()=>t==="file"?P?T.jsx("div",{className:G(te,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",ne[i]),onClick:k,role:"button",tabIndex:0,onKeyDown:re=>{(re.key==="Enter"||re.key===" ")&&k()},children:T.jsx(ma,{})}):T.jsx("div",{className:G(te,"right-0 pr-3",ne[i]),children:T.jsx(VC,{})}):d?T.jsx("div",{className:G(Y,"right-0 pr-3",N[i]),children:d}):null,ae=O.useMemo(()=>p?T.jsx("label",{className:G($[i],"text-field-label"),htmlFor:y,children:p}):null,[p,i,y]),le=P?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return t==="file"?T.jsxs("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[ae,T.jsxs("div",{className:G("w-full relative flex focus-within:z-10",o),children:[T.jsx("input",{ref:g,id:y,type:"file",className:G(M,K,D[i],N[i],W,F,H,le),disabled:a,onChange:E,onInvalid:u,...m}),T.jsx("div",{className:G(te,"right-0 pr-3",ne[i]),children:T.jsx(VC,{})})]})]}):T.jsxs("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[ae,T.jsxs("div",{className:G("w-full relative flex focus-within:z-10",o),children:[ie(),T.jsx("input",{ref:v,id:y,type:t,className:G(M,U,D[i],N[i],B[i],L[i],W,F,z),disabled:a,onChange:E,onInvalid:u,value:C(),...m}),ce()]})]})},o$=O.forwardRef(wG);o$.displayName="Input";const Hf=O.forwardRef(({children:e=null,tag:t="label",size:n="sm",className:r="",variant:i="neutral",required:o=!1,...a},s)=>{const l="font-medium text-field-label flex items-center gap-0.5",u={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"},f={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"};if(!e)return null;let d="";return o&&(d="after:content-['*'] after:text-field-required after:ml-0.5"),T.jsx(t,{ref:s,className:G(l,u[n],f[i],d,r),...a,children:e})}),_G=({title:e="",description:t="",icon:n=null,iconPosition:r="right",tag:i="h2",size:o="sm",className:a=""})=>{const s={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(!e)return null;const l=()=>{const f=i,d="font-semibold p-0 m-0",p={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"};return T.jsx(f,{className:G(d,p[o]),children:e})},u=()=>{const f={xs:"text-sm",sm:"text-sm",md:"text-base",lg:"text-base"};return T.jsx("p",{className:G("text-text-secondary font-normal my-0",f[o]),children:t})};return t?T.jsxs("div",{className:a,children:[T.jsxs("div",{children:[n&&r==="left"&&T.jsxs("div",{className:G("flex items-center",s[o]),children:[n,l()]}),n&&r==="right"&&T.jsxs("div",{className:G("flex items-center",s[o]),children:[l(),n]}),!n&&l()]}),u()]}):T.jsxs("div",{className:a,children:[n&&r==="left"&&T.jsxs("div",{className:G("flex items-center",s[o]),children:[n,l()]}),n&&r==="right"&&T.jsxs("div",{className:G("flex items-center",s[o]),children:[l(),n]}),!n&&l()]})},Fw=({variant:e="primary",size:t="md",icon:n=null,className:r=""})=>{const i={primary:"text-brand-primary-600",secondary:"text-background-primary"}[e],o={sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6",xl:"[&>svg]:size-8"}[t];return T.jsx("span",{className:G("flex",o,i,r),children:n||T.jsx(lK,{className:"animate-spin shrink-0"})})},SG=({progress:e=0,speed:t=200,className:n=""})=>{let r=e;e<0&&(r=0),e>100&&(r=100);const i=`translateX(-${100-r}%)`,o=`h-2 rounded-full bg-background-brand absolute left-0 top-0 w-full bottom-0 origin-left transition-transform duration-${t} ease-linear`;return T.jsx("div",{className:G("h-2 rounded-full bg-misc-progress-background overflow-hidden relative",n),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Progress Bar",children:T.jsx("div",{className:o,style:{transform:i}})})},a$=O.createContext({activeItem:null,onChange:()=>{},size:"md",iconPosition:"left"}),OG=({children:e,activeItem:t=null,onChange:n,className:r,size:i="md",iconPosition:o="left"})=>{const a=O.useCallback(l=>{n&&n(l)},[n]),s=G("box-border flex border border-border-subtle border-solid rounded",r);return T.jsx("div",{className:s,children:T.jsx(a$.Provider,{value:{activeItem:t,onChange:a,size:i,iconPosition:o},children:O.Children.map(e,(l,u)=>{if(!O.isValidElement(l))return null;const f=u===0,d=u===O.Children.count(e)-1;return O.cloneElement(l,{...l.props,index:u,isFirstChild:f,isLastChild:d})})})})},CG=({slug:e,text:t,icon:n,className:r,disabled:i=!1,isFirstChild:o,isLastChild:a,...s},l)=>{const u=O.useContext(a$);if(!u)throw new Error("Button should be used inside Button Group");const{activeItem:f,onChange:d,size:p,iconPosition:m}=u,g={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"},v="bg-background-primary text-primary cursor-pointer flex items-center justify-center",y="hover:bg-button-tertiary-hover",x="focus:outline-none",w=i?"text-text-disabled cursor-not-allowed":"",S=o?"rounded-tl rounded-bl border-0 border-r border-border-subtle":"",P=a?"rounded-tr rounded-br border-0":"",_="border-0 border-r border-border-subtle border-solid",C=f===e?"bg-button-disabled":"",E=G(v,y,x,w,g[p],_,C,S,P,r),k=M=>{d({event:M,value:{slug:e,text:t}})};return T.jsxs("button",{ref:l,className:E,disabled:i,onClick:k,...s,children:[m==="left"&&n&&T.jsx("span",{className:"mr-1",children:n}),t,m==="right"&&n&&T.jsx("span",{className:"ml-1",children:n})]})},s$=O.forwardRef(CG);s$.displayName="Button";const PG={Group:OG,Button:s$},xP=new Set;function qm(e,t,n){e||xP.has(t)||(console.warn(t),xP.add(t))}function AG(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&qm(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function Xm(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Qb=e=>Array.isArray(e);function l$(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Ww(e,t,n,r){if(typeof t=="function"){const[i,o]=wP(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=wP(r);t=t(n!==void 0?n:e.custom,i,o)}return t}function Zm(e,t,n){const r=e.getProps();return Ww(r,t,n!==void 0?n:r.custom,e)}const zw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vw=["initial",...zw],Gf=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ts=new Set(Gf),ki=e=>e*1e3,mo=e=>e/1e3,TG={type:"spring",stiffness:500,damping:25,restSpeed:10},EG=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),kG={type:"keyframes",duration:.8},MG={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jG=(e,{keyframes:t})=>t.length>2?kG:Ts.has(e)?e.startsWith("scale")?EG(t[1]):TG:MG;function Uw(e,t){return e?e[t]||e.default||e:void 0}const NG={skipAnimations:!1,useManualTiming:!1},$G=e=>e!==null;function Jm(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter($G),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const $n=e=>e;function DG(e){let t=new Set,n=new Set,r=!1,i=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(u){o.has(u)&&(l.schedule(u),e()),u(a)}const l={schedule:(u,f=!1,d=!1)=>{const m=d&&r?t:n;return f&&o.add(u),m.has(u)||m.add(u),u},cancel:u=>{n.delete(u),o.delete(u)},process:u=>{if(a=u,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,i&&(i=!1,l.process(u))}};return l}const ch=["read","resolveKeyframes","update","preRender","render","postRender"],IG=40;function u$(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=ch.reduce((x,w)=>(x[w]=DG(o),x),{}),{read:s,resolveKeyframes:l,update:u,preRender:f,render:d,postRender:p}=a,m=()=>{const x=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(x-i.timestamp,IG),1),i.timestamp=x,i.isProcessing=!0,s.process(i),l.process(i),u.process(i),f.process(i),d.process(i),p.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},g=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:ch.reduce((x,w)=>{const S=a[w];return x[w]=(P,_=!1,C=!1)=>(n||g(),S.schedule(P,_,C)),x},{}),cancel:x=>{for(let w=0;w(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,RG=1e-7,LG=12;function BG(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=c$(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>RG&&++sBG(o,0,1,e,n);return o=>o===0||o===1?o:c$(i(o),t,r)}const f$=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,d$=e=>t=>1-e(1-t),h$=Yf(.33,1.53,.69,.99),Kw=d$(h$),p$=f$(Kw),m$=e=>(e*=2)<1?.5*Kw(e):.5*(2-Math.pow(2,-10*(e-1))),Hw=e=>1-Math.sin(Math.acos(e)),g$=d$(Hw),y$=f$(Hw),v$=e=>/^0[^.\s]+$/u.test(e);function FG(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||v$(e):!0}let mu=$n,Oo=$n;process.env.NODE_ENV!=="production"&&(mu=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Oo=(e,t)=>{if(!e)throw new Error(t)});const b$=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),x$=e=>t=>typeof t=="string"&&t.startsWith(e),w$=x$("--"),WG=x$("var(--"),Gw=e=>WG(e)?zG.test(e.split("/*")[0].trim()):!1,zG=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,VG=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function UG(e){const t=VG.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const KG=4;function _$(e,t,n=1){Oo(n<=KG,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=UG(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return b$(a)?parseFloat(a):a}return Gw(i)?_$(i,t,n+1):i}const xa=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Yc={...gu,transform:e=>xa(0,1,e)},fh={...gu,default:1},qf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ea=qf("deg"),Mi=qf("%"),De=qf("px"),HG=qf("vh"),GG=qf("vw"),_P={...Mi,parse:e=>Mi.parse(e)/100,transform:e=>Mi.transform(e*100)},YG=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),SP=e=>e===gu||e===De,OP=(e,t)=>parseFloat(e.split(", ")[t]),CP=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return OP(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?OP(o[1],e):0}},qG=new Set(["x","y","z"]),XG=Gf.filter(e=>!qG.has(e));function ZG(e){const t=[];return XG.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const jl={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:CP(4,13),y:CP(5,14)};jl.translateX=jl.x;jl.translateY=jl.y;const S$=e=>t=>t.test(e),JG={test:e=>e==="auto",parse:e=>e},O$=[gu,De,Mi,ea,GG,HG,JG],PP=e=>O$.find(S$(e)),fs=new Set;let ex=!1,tx=!1;function C$(){if(tx){const e=Array.from(fs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=ZG(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{var s;(s=r.getValue(o))===null||s===void 0||s.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}tx=!1,ex=!1,fs.forEach(e=>e.complete()),fs.clear()}function P$(){fs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(tx=!0)})}function QG(){P$(),C$()}class Yw{constructor(t,n,r,i,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(fs.add(this),ex||(ex=!0,bt.read(P$),bt.resolveKeyframes(C$))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;oMath.round(e*1e5)/1e5,qw=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function eY(e){return e==null}const tY=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Xw=(e,t)=>n=>!!(typeof n=="string"&&tY.test(n)&&n.startsWith(e)||t&&!eY(n)&&Object.prototype.hasOwnProperty.call(n,t)),A$=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,s]=r.match(qw);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},nY=e=>xa(0,255,e),Nv={...gu,transform:e=>Math.round(nY(e))},rs={test:Xw("rgb","red"),parse:A$("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Nv.transform(e)+", "+Nv.transform(t)+", "+Nv.transform(n)+", "+Pc(Yc.transform(r))+")"};function rY(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const nx={test:Xw("#"),parse:rY,transform:rs.transform},fl={test:Xw("hsl","hue"),parse:A$("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Mi.transform(Pc(t))+", "+Mi.transform(Pc(n))+", "+Pc(Yc.transform(r))+")"},Bn={test:e=>rs.test(e)||nx.test(e)||fl.test(e),parse:e=>rs.test(e)?rs.parse(e):fl.test(e)?fl.parse(e):nx.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?rs.transform(e):fl.transform(e)},iY=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function oY(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(qw))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(iY))===null||n===void 0?void 0:n.length)||0)>0}const T$="number",E$="color",aY="var",sY="var(",AP="${}",lY=/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 qc(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const s=t.replace(lY,l=>(Bn.test(l)?(r.color.push(o),i.push(E$),n.push(Bn.parse(l))):l.startsWith(sY)?(r.var.push(o),i.push(aY),n.push(l)):(r.number.push(o),i.push(T$),n.push(parseFloat(l))),++o,AP)).split(AP);return{values:n,split:s,indexes:r,types:i}}function k$(e){return qc(e).values}function M$(e){const{split:t,types:n}=qc(e),r=t.length;return i=>{let o="";for(let a=0;atypeof e=="number"?0:e;function cY(e){const t=k$(e);return M$(e)(t.map(uY))}const wa={test:oY,parse:k$,createTransformer:M$,getAnimatableNone:cY},fY=new Set(["brightness","contrast","saturate","opacity"]);function dY(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(qw)||[];if(!r)return e;const i=n.replace(r,"");let o=fY.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const hY=/\b([a-z-]*)\(.*?\)/gu,rx={...wa,getAnimatableNone:e=>{const t=e.match(hY);return t?t.map(dY).join(" "):e}},pY={borderWidth:De,borderTopWidth:De,borderRightWidth:De,borderBottomWidth:De,borderLeftWidth:De,borderRadius:De,radius:De,borderTopLeftRadius:De,borderTopRightRadius:De,borderBottomRightRadius:De,borderBottomLeftRadius:De,width:De,maxWidth:De,height:De,maxHeight:De,top:De,right:De,bottom:De,left:De,padding:De,paddingTop:De,paddingRight:De,paddingBottom:De,paddingLeft:De,margin:De,marginTop:De,marginRight:De,marginBottom:De,marginLeft:De,backgroundPositionX:De,backgroundPositionY:De},mY={rotate:ea,rotateX:ea,rotateY:ea,rotateZ:ea,scale:fh,scaleX:fh,scaleY:fh,scaleZ:fh,skew:ea,skewX:ea,skewY:ea,distance:De,translateX:De,translateY:De,translateZ:De,x:De,y:De,z:De,perspective:De,transformPerspective:De,opacity:Yc,originX:_P,originY:_P,originZ:De},TP={...gu,transform:Math.round},Zw={...pY,...mY,zIndex:TP,size:De,fillOpacity:Yc,strokeOpacity:Yc,numOctaves:TP},gY={...Zw,color:Bn,backgroundColor:Bn,outlineColor:Bn,fill:Bn,stroke:Bn,borderColor:Bn,borderTopColor:Bn,borderRightColor:Bn,borderBottomColor:Bn,borderLeftColor:Bn,filter:rx,WebkitFilter:rx},Jw=e=>gY[e];function j$(e,t){let n=Jw(e);return n!==rx&&(n=wa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const yY=new Set(["auto","none","0"]);function vY(e,t,n){let r=0,i;for(;r{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Qw(e){return typeof e=="function"}let Wh;function bY(){Wh=void 0}const ji={now:()=>(Wh===void 0&&ji.set(Tn.isProcessing||NG.useManualTiming?Tn.timestamp:performance.now()),Wh),set:e=>{Wh=e,queueMicrotask(bY)}},EP=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(wa.test(e)||e==="0")&&!e.startsWith("url("));function xY(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n_Y?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&QG(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=ji.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:a,onComplete:s,onUpdate:l,isGenerator:u}=this.options;if(!u&&!wY(t,r,i,o))if(a)this.options.duration=0;else{l==null||l(Jm(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function D$(e,t){return t?e*(1e3/t):0}const SY=5;function I$(e,t,n){const r=Math.max(t-SY,0);return D$(n-e(r),t-r)}const $v=.001,OY=.01,kP=10,CY=.05,PY=1;function AY({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;mu(e<=ki(kP),"Spring duration must be 10 seconds or less");let a=1-t;a=xa(CY,PY,a),e=xa(OY,kP,mo(e)),a<1?(i=u=>{const f=u*a,d=f*e,p=f-n,m=ix(u,a),g=Math.exp(-d);return $v-p/m*g},o=u=>{const d=u*a*e,p=d*n+n,m=Math.pow(a,2)*Math.pow(u,2)*e,g=Math.exp(-d),v=ix(Math.pow(u,2),a);return(-i(u)+$v>0?-1:1)*((p-m)*g)/v}):(i=u=>{const f=Math.exp(-u*e),d=(u-n)*e+1;return-$v+f*d},o=u=>{const f=Math.exp(-u*e),d=(n-u)*(e*e);return f*d});const s=5/e,l=EY(i,o,s);if(e=ki(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const TY=12;function EY(e,t,n){let r=n;for(let i=1;ie[n]!==void 0)}function jY(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!MP(e,MY)&&MP(e,kY)){const n=AY(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function R$({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],a={done:!1,value:i},{stiffness:s,damping:l,mass:u,duration:f,velocity:d,isResolvedFromDuration:p}=jY({...r,velocity:-mo(r.velocity||0)}),m=d||0,g=l/(2*Math.sqrt(s*u)),v=o-i,y=mo(Math.sqrt(s/u)),x=Math.abs(v)<5;n||(n=x?.01:2),t||(t=x?.005:.5);let w;if(g<1){const S=ix(y,g);w=P=>{const _=Math.exp(-g*y*P);return o-_*((m+g*y*v)/S*Math.sin(S*P)+v*Math.cos(S*P))}}else if(g===1)w=S=>o-Math.exp(-y*S)*(v+(m+y*v)*S);else{const S=y*Math.sqrt(g*g-1);w=P=>{const _=Math.exp(-g*y*P),C=Math.min(S*P,300);return o-_*((m+g*y*v)*Math.sinh(C)+S*v*Math.cosh(C))/S}}return{calculatedDuration:p&&f||null,next:S=>{const P=w(S);if(p)a.done=S>=f;else{let _=0;g<1&&(_=S===0?ki(m):I$(w,S,P));const C=Math.abs(_)<=n,E=Math.abs(o-P)<=t;a.done=C&&E}return a.value=a.done?o:P,a}}}function jP({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:s,max:l,restDelta:u=.5,restSpeed:f}){const d=e[0],p={done:!1,value:d},m=k=>s!==void 0&&kl,g=k=>s===void 0?l:l===void 0||Math.abs(s-k)-v*Math.exp(-k/r),S=k=>x+w(k),P=k=>{const M=w(k),D=S(k);p.done=Math.abs(M)<=u,p.value=p.done?x:D};let _,C;const E=k=>{m(p.value)&&(_=k,C=R$({keyframes:[p.value,g(p.value)],velocity:I$(S,k,p.value),damping:i,stiffness:o,restDelta:u,restSpeed:f}))};return E(0),{calculatedDuration:null,next:k=>{let M=!1;return!C&&_===void 0&&(M=!0,P(k),E(k)),_!==void 0&&k>=_?C.next(k-_):(!M&&P(k),p)}}}const NY=Yf(.42,0,1,1),$Y=Yf(0,0,.58,1),L$=Yf(.42,0,.58,1),DY=e=>Array.isArray(e)&&typeof e[0]!="number",e1=e=>Array.isArray(e)&&typeof e[0]=="number",NP={linear:$n,easeIn:NY,easeInOut:L$,easeOut:$Y,circIn:Hw,circInOut:y$,circOut:g$,backIn:Kw,backInOut:p$,backOut:h$,anticipate:m$},$P=e=>{if(e1(e)){Oo(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return Yf(t,n,r,i)}else if(typeof e=="string")return Oo(NP[e]!==void 0,`Invalid easing type '${e}'`),NP[e];return e},IY=(e,t)=>n=>t(e(n)),go=(...e)=>e.reduce(IY),Nl=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ft=(e,t,n)=>e+(t-e)*n;function Dv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function RY({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Dv(l,s,e+1/3),o=Dv(l,s,e),a=Dv(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function ip(e,t){return n=>n>0?t:e}const Iv=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},LY=[nx,rs,fl],BY=e=>LY.find(t=>t.test(e));function DP(e){const t=BY(e);if(mu(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===fl&&(n=RY(n)),n}const IP=(e,t)=>{const n=DP(e),r=DP(t);if(!n||!r)return ip(e,t);const i={...n};return o=>(i.red=Iv(n.red,r.red,o),i.green=Iv(n.green,r.green,o),i.blue=Iv(n.blue,r.blue,o),i.alpha=Ft(n.alpha,r.alpha,o),rs.transform(i))},ox=new Set(["none","hidden"]);function FY(e,t){return ox.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function WY(e,t){return n=>Ft(e,t,n)}function t1(e){return typeof e=="number"?WY:typeof e=="string"?Gw(e)?ip:Bn.test(e)?IP:UY:Array.isArray(e)?B$:typeof e=="object"?Bn.test(e)?IP:zY:ip}function B$(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>t1(o)(o,t[a]));return o=>{for(let a=0;a{for(const o in r)n[o]=r[o](i);return n}}function VY(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o{const n=wa.createTransformer(t),r=qc(e),i=qc(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?ox.has(e)&&!i.values.length||ox.has(t)&&!r.values.length?FY(e,t):go(B$(VY(r,i),i.values),n):(mu(!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.`),ip(e,t))};function F$(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ft(e,t,n):t1(e)(e,t)}function KY(e,t,n){const r=[],i=n||F$,o=e.length-1;for(let a=0;at[0];if(o===2&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=KY(t,r,i),s=a.length,l=u=>{let f=0;if(s>1)for(;fl(xa(e[0],e[o-1],u)):l}function GY(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Nl(0,t,r);e.push(Ft(n,1,i))}}function YY(e){const t=[0];return GY(t,e.length-1),t}function qY(e,t){return e.map(n=>n*t)}function XY(e,t){return e.map(()=>t||L$).splice(0,e.length-1)}function op({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=DY(r)?r.map($P):$P(r),o={done:!1,value:t[0]},a=qY(n&&n.length===t.length?n:YY(t),e),s=HY(a,t,{ease:Array.isArray(i)?i:XY(t,i)});return{calculatedDuration:e,next:l=>(o.value=s(l),o.done=l>=e,o)}}const RP=2e4;function ZY(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=RP?1/0:t}const JY=e=>{const t=({timestamp:n})=>e(n);return{start:()=>bt.update(t,!0),stop:()=>ba(t),now:()=>Tn.isProcessing?Tn.timestamp:ji.now()}},QY={decay:jP,inertia:jP,tween:op,keyframes:op,spring:R$},eq=e=>e/100;class n1 extends $${constructor(t){super(t),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,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:o}=this.options,a=(i==null?void 0:i.KeyframeResolver)||Yw,s=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new a(o,s,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=this.options,s=Qw(n)?n:QY[n]||op;let l,u;s!==op&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Oo(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=go(eq,F$(t[0],t[1])),t=[0,100]);const f=s({...this.options,keyframes:t});o==="mirror"&&(u=s({...this.options,keyframes:[...t].reverse(),velocity:-a})),f.calculatedDuration===null&&(f.calculatedDuration=ZY(f));const{calculatedDuration:d}=f,p=d+i,m=p*(r+1)-i;return{generator:f,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:p,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:k}=this.options;return{done:!0,value:k[k.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:a,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:u,totalDuration:f,resolvedDuration:d}=r;if(this.startTime===null)return o.next(0);const{delay:p,repeat:m,repeatType:g,repeatDelay:v,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-p*(this.speed>=0?1:-1),w=this.speed>=0?x<0:x>f;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let S=this.currentTime,P=o;if(m){const k=Math.min(this.currentTime,f)/d;let M=Math.floor(k),D=k%1;!D&&k>=1&&(D=1),D===1&&M--,M=Math.min(M,m+1),!!(M%2)&&(g==="reverse"?(D=1-D,v&&(D-=v/d)):g==="mirror"&&(P=a)),S=xa(0,1,D)*d}const _=w?{done:!1,value:l[0]}:P.next(S);s&&(_.value=s(_.value));let{done:C}=_;!w&&u!==null&&(C=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&i!==void 0&&(_.value=Jm(l,this.options,i)),y&&y(_.value),E&&this.finish(),_}get duration(){const{resolved:t}=this;return t?mo(t.calculatedDuration):0}get time(){return mo(this.currentTime)}set time(t){t=ki(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=mo(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=JY,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&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(t){return this.startTime=0,this.tick(t,!0)}}const tq=new Set(["opacity","clipPath","filter","transform"]),nq=10,rq=(e,t)=>{let n="";const r=Math.max(Math.round(t/nq),2);for(let i=0;i(t===void 0&&(t=e()),t)}const iq={linearEasing:void 0};function oq(e,t){const n=r1(e);return()=>{var r;return(r=iq[t])!==null&&r!==void 0?r:n()}}const ap=oq(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function W$(e){return!!(typeof e=="function"&&ap()||!e||typeof e=="string"&&(e in ax||ap())||e1(e)||Array.isArray(e)&&e.every(W$))}const vc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ax={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vc([0,.65,.55,1]),circOut:vc([.55,0,1,.45]),backIn:vc([.31,.01,.66,-.59]),backOut:vc([.33,1.53,.69,.99])};function z$(e,t){if(e)return typeof e=="function"&&ap()?rq(e,t):e1(e)?vc(e):Array.isArray(e)?e.map(n=>z$(n,t)||ax.easeOut):ax[e]}function aq(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const f=z$(s,i);return Array.isArray(f)&&(u.easing=f),e.animate(u,{delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}function LP(e,t){e.timeline=t,e.onfinish=null}const sq=r1(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sp=10,lq=2e4;function uq(e){return Qw(e.type)||e.type==="spring"||!W$(e.ease)}function cq(e,t){const n=new n1({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&othis.onKeyframesResolved(a,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:o,ease:a,type:s,motionValue:l,name:u,startTime:f}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(typeof a=="string"&&ap()&&fq(a)&&(a=V$[a]),uq(this.options)){const{onComplete:p,onUpdate:m,motionValue:g,element:v,...y}=this.options,x=cq(t,y);t=x.keyframes,t.length===1&&(t[1]=t[0]),i=x.duration,o=x.times,a=x.ease,s="keyframes"}const d=aq(l.owner.current,u,t,{...this.options,duration:i,times:o,ease:a});return d.startTime=f??this.calcStartTime(),this.pendingTimeline?(LP(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:p}=this.options;l.set(Jm(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:i,times:o,type:s,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return mo(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return mo(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ki(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return $n;const{animation:r}=n;LP(r,t)}return $n}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:o,ease:a,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:f,onComplete:d,element:p,...m}=this.options,g=new n1({...m,keyframes:r,duration:i,type:o,ease:a,times:s,isGenerator:!0}),v=ki(this.time);u.setWithVelocity(g.sample(v-sp).value,g.sample(v).value,sp)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:a,type:s}=t;return sq()&&r&&tq.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&a!==0&&s!=="inertia"}}const dq=r1(()=>window.ScrollTimeline!==void 0);class hq{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;rdq()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,o)=>{i&&i(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function pq({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,elapsed:u,...f}){return!!Object.keys(f).length}const i1=(e,t,n,r={},i,o)=>a=>{const s=Uw(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u=u-ki(l);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:p=>{t.set(p),s.onUpdate&&s.onUpdate(p)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};pq(s)||(f={...f,...jG(e,f)}),f.duration&&(f.duration=ki(f.duration)),f.repeatDelay&&(f.repeatDelay=ki(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(d=!0)),d&&!o&&t.get()!==void 0){const p=Jm(f.keyframes,s);if(p!==void 0)return bt.update(()=>{f.onUpdate(p),f.onComplete()}),new hq([])}return!o&&BP.supports(f)?new BP(f):new n1(f)},mq=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),gq=e=>Qb(e)?e[e.length-1]||0:e;function o1(e,t){e.indexOf(t)===-1&&e.push(t)}function a1(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class s1{constructor(){this.subscriptions=[]}add(t){return o1(this.subscriptions,t),()=>a1(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o!isNaN(parseFloat(e));class vq{constructor(t,n={}){this.version="11.11.17",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=ji.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ji.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=yq(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&qm(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new s1);const r=this.events[t].add(n);return t==="change"?()=>{r(),bt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ji.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>FP)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,FP);return D$(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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 Xc(e,t){return new vq(e,t)}function bq(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Xc(n))}function xq(e,t){const n=Zm(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const s=gq(o[a]);bq(e,a,s)}}const l1=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),wq="framerAppearId",U$="data-"+l1(wq);function K$(e){return e.props[U$]}const Vn=e=>!!(e&&e.getVelocity);function _q(e){return!!(Vn(e)&&e.add)}function sx(e,t){const n=e.getValue("willChange");if(_q(n))return n.add(t)}function Sq({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function H$(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const u=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const d in l){const p=e.getValue(d,(o=e.latestValues[d])!==null&&o!==void 0?o:null),m=l[d];if(m===void 0||f&&Sq(f,d))continue;const g={delay:n,...Uw(a||{},d)};let v=!1;if(window.MotionHandoffAnimation){const x=K$(e);if(x){const w=window.MotionHandoffAnimation(x,d,bt);w!==null&&(g.startTime=w,v=!0)}}sx(e,d),p.start(i1(d,p,m,e.shouldReduceMotion&&Ts.has(d)?{type:!1}:g,e,v));const y=p.animation;y&&u.push(y)}return s&&Promise.all(u).then(()=>{bt.update(()=>{s&&xq(e,s)})}),u}function lx(e,t,n={}){var r;const i=Zm(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>Promise.all(H$(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:p}=o;return Oq(e,t,f+u,d,p,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,f]=l==="beforeChildren"?[a,s]:[s,a];return u().then(()=>f())}else return Promise.all([a(),s(n.delay)])}function Oq(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>s-u*r;return Array.from(e.variantChildren).sort(Cq).forEach((u,f)=>{u.notify("AnimationStart",t),a.push(lx(u,t,{...o,delay:n+l(f)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function Cq(e,t){return e.sortNodePosition(t)}function Pq(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>lx(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=lx(e,t,n);else{const i=typeof t=="function"?Zm(e,t,n.custom):t;r=Promise.all(H$(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Aq=Vw.length;function G$(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?G$(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>Pq(e,n,r)))}function Mq(e){let t=kq(e),n=WP(),r=!0;const i=l=>(u,f)=>{var d;const p=Zm(e,f,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(p){const{transition:m,transitionEnd:g,...v}=p;u={...u,...v,...g}}return u};function o(l){t=l(e)}function a(l){const{props:u}=e,f=G$(e.parent)||{},d=[],p=new Set;let m={},g=1/0;for(let y=0;yg&&P,M=!1;const D=Array.isArray(S)?S:[S];let $=D.reduce(i(x),{});_===!1&&($={});const{prevResolvedValues:N={}}=w,B={...N,...$},L=z=>{k=!0,p.has(z)&&(M=!0,p.delete(z)),w.needsAnimating[z]=!0;const H=e.getValue(z);H&&(H.liveStyle=!1)};for(const z in B){const H=$[z],U=N[z];if(m.hasOwnProperty(z))continue;let K=!1;Qb(H)&&Qb(U)?K=!l$(H,U):K=H!==U,K?H!=null?L(z):p.add(z):H!==void 0&&p.has(z)?L(z):w.protectedKeys[z]=!0}w.prevProp=S,w.prevResolvedValues=$,w.isActive&&(m={...m,...$}),r&&e.blockInitialAnimation&&(k=!1),k&&(!(C&&E)||M)&&d.push(...D.map(z=>({animation:z,options:{type:x}})))}if(p.size){const y={};p.forEach(x=>{const w=e.getBaseTarget(x),S=e.getValue(x);S&&(S.liveStyle=!0),y[x]=w??null}),d.push({animation:y})}let v=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(d):Promise.resolve()}function s(l,u){var f;if(n[l].isActive===u)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(p=>{var m;return(m=p.animationState)===null||m===void 0?void 0:m.setActive(l,u)}),n[l].isActive=u;const d=a(l);for(const p in n)n[p].protectedKeys={};return d}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n,reset:()=>{n=WP(),r=!0}}}function jq(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!l$(t,e):!1}function Ua(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function WP(){return{animate:Ua(!0),whileInView:Ua(),whileHover:Ua(),whileTap:Ua(),whileDrag:Ua(),whileFocus:Ua(),exit:Ua()}}class Pa{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Nq extends Pa{constructor(t){super(t),t.animationState||(t.animationState=Mq(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Xm(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let $q=0;class Dq extends Pa{constructor(){super(...arguments),this.id=$q++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Iq={animation:{Feature:Nq},exit:{Feature:Dq}},Y$=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Qm(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const Rq=e=>t=>Y$(t)&&e(t,Qm(t));function lo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function yo(e,t,n,r){return lo(e,t,Rq(n),r)}const zP=(e,t)=>Math.abs(e-t);function Lq(e,t){const n=zP(e.x,t.x),r=zP(e.y,t.y);return Math.sqrt(n**2+r**2)}class q${constructor(t,n,{transformPagePoint:r,contextWindow:i,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 d=Lv(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=Lq(d.offset,{x:0,y:0})>=3;if(!p&&!m)return;const{point:g}=d,{timestamp:v}=Tn;this.history.push({...g,timestamp:v});const{onStart:y,onMove:x}=this.handlers;p||(y&&y(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Rv(p,this.transformPagePoint),bt.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Lv(d.type==="pointercancel"?this.lastMoveEventInfo:Rv(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,y),g&&g(d,y)},!Y$(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const a=Qm(t),s=Rv(a,this.transformPagePoint),{point:l}=s,{timestamp:u}=Tn;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,Lv(s,this.history)),this.removeListeners=go(yo(this.contextWindow,"pointermove",this.handlePointerMove),yo(this.contextWindow,"pointerup",this.handlePointerUp),yo(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ba(this.updatePoint)}}function Rv(e,t){return t?{point:t(e.point)}:e}function VP(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Lv({point:e},t){return{point:e,delta:VP(e,X$(t)),offset:VP(e,Bq(t)),velocity:Fq(t,.1)}}function Bq(e){return e[0]}function X$(e){return e[e.length-1]}function Fq(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=X$(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ki(t)));)n--;if(!r)return{x:0,y:0};const o=mo(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Z$(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const UP=Z$("dragHorizontal"),KP=Z$("dragVertical");function J$(e){let t=!1;if(e==="y")t=KP();else if(e==="x")t=UP();else{const n=UP(),r=KP();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function Q$(){const e=J$(!0);return e?(e(),!1):!0}function dl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const eD=1e-4,Wq=1-eD,zq=1+eD,tD=.01,Vq=0-tD,Uq=0+tD;function Mr(e){return e.max-e.min}function Kq(e,t,n){return Math.abs(e-t)<=n}function HP(e,t,n,r=.5){e.origin=r,e.originPoint=Ft(t.min,t.max,e.origin),e.scale=Mr(n)/Mr(t),e.translate=Ft(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Wq&&e.scale<=zq||isNaN(e.scale))&&(e.scale=1),(e.translate>=Vq&&e.translate<=Uq||isNaN(e.translate))&&(e.translate=0)}function Ac(e,t,n,r){HP(e.x,t.x,n.x,r?r.originX:void 0),HP(e.y,t.y,n.y,r?r.originY:void 0)}function GP(e,t,n){e.min=n.min+t.min,e.max=e.min+Mr(t)}function Hq(e,t,n){GP(e.x,t.x,n.x),GP(e.y,t.y,n.y)}function YP(e,t,n){e.min=t.min-n.min,e.max=e.min+Mr(t)}function Tc(e,t,n){YP(e.x,t.x,n.x),YP(e.y,t.y,n.y)}function Gq(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?Ft(n,e,r.max):Math.min(e,n)),e}function qP(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Yq(e,{top:t,left:n,bottom:r,right:i}){return{x:qP(e.x,n,i),y:qP(e.y,t,r)}}function XP(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Nl(t.min,t.max-r,e.min):r>i&&(n=Nl(e.min,e.max-i,t.min)),xa(0,1,n)}function Zq(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ux=.35;function Jq(e=ux){return e===!1?e=0:e===!0&&(e=ux),{x:ZP(e,"left","right"),y:ZP(e,"top","bottom")}}function ZP(e,t,n){return{min:JP(e,t),max:JP(e,n)}}function JP(e,t){return typeof e=="number"?e:e[t]||0}const QP=()=>({translate:0,scale:1,origin:0,originPoint:0}),hl=()=>({x:QP(),y:QP()}),eA=()=>({min:0,max:0}),Yt=()=>({x:eA(),y:eA()});function Yr(e){return[e("x"),e("y")]}function nD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Qq({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function e9(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}}function Bv(e){return e===void 0||e===1}function cx({scale:e,scaleX:t,scaleY:n}){return!Bv(e)||!Bv(t)||!Bv(n)}function Xa(e){return cx(e)||rD(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function rD(e){return tA(e.x)||tA(e.y)}function tA(e){return e&&e!=="0%"}function lp(e,t,n){const r=e-n,i=t*r;return n+i}function nA(e,t,n,r,i){return i!==void 0&&(e=lp(e,i,r)),lp(e,n,r)+t}function fx(e,t=0,n=1,r,i){e.min=nA(e.min,t,n,r,i),e.max=nA(e.max,t,n,r,i)}function iD(e,{x:t,y:n}){fx(e.x,t.translate,t.scale,t.originPoint),fx(e.y,n.translate,n.scale,n.originPoint)}const rA=.999999999999,iA=1.0000000000001;function t9(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let s=0;srA&&(t.x=1),t.yrA&&(t.y=1)}function pl(e,t){e.min=e.min+t,e.max=e.max+t}function oA(e,t,n,r,i=.5){const o=Ft(e.min,e.max,i);fx(e,t,n,o,r)}function ml(e,t){oA(e.x,t.x,t.scaleX,t.scale,t.originX),oA(e.y,t.y,t.scaleY,t.scale,t.originY)}function oD(e,t){return nD(e9(e.getBoundingClientRect(),t))}function n9(e,t,n){const r=oD(e,n),{scroll:i}=t;return i&&(pl(r.x,i.offset.x),pl(r.y,i.offset.y)),r}const aD=({current:e})=>e?e.ownerDocument.defaultView:null,r9=new WeakMap;class i9{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Yt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Qm(f,"page").point)},o=(f,d)=>{const{drag:p,dragPropagation:m,onDragStart:g}=this.getProps();if(p&&!m&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=J$(p),!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),Yr(y=>{let x=this.getAxisMotionValue(y).get()||0;if(Mi.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const S=w.layout.layoutBox[y];S&&(x=Mr(S)*(parseFloat(x)/100))}}this.originPoint[y]=x}),g&&bt.postRender(()=>g(f,d)),sx(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},a=(f,d)=>{const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:g,onDrag:v}=this.getProps();if(!p&&!this.openGlobalLock)return;const{offset:y}=d;if(m&&this.currentDirection===null){this.currentDirection=o9(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,y),this.updateAxis("y",d.point,y),this.visualElement.render(),v&&v(f,d)},s=(f,d)=>this.stop(f,d),l=()=>Yr(f=>{var d;return this.getAnimationState(f)==="paused"&&((d=this.getAxisMotionValue(f).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new q$(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:aD(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&bt.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!dh(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Gq(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&dl(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Yq(i.layoutBox,n):this.constraints=!1,this.elastic=Jq(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Yr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=Zq(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!dl(t))return!1;const r=t.current;Oo(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=n9(r,i.root,this.visualElement.getTransformPagePoint());let a=qq(i.layout.layoutBox,o);if(n){const s=n(Qq(a));this.hasMutatedConstraints=!!s,s&&(a=nD(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Yr(f=>{if(!dh(f,n,this.currentDirection))return;let d=l&&l[f]||{};a&&(d={min:0,max:0});const p=i?200:1e6,m=i?40:1e7,g={type:"inertia",velocity:r?t[f]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(f,g)});return Promise.all(u).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return sx(this.visualElement,t),r.start(i1(t,r,0,n,this.visualElement,!1))}stopAnimation(){Yr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Yr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Yr(n=>{const{drag:r}=this.getProps();if(!dh(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-Ft(a,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!dl(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Yr(a=>{const s=this.getAxisMotionValue(a);if(s&&this.constraints!==!1){const l=s.get();i[a]=Xq({min:l,max:l},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Yr(a=>{if(!dh(a,t,null))return;const s=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];s.set(Ft(l,u,i[a]))})}addListeners(){if(!this.visualElement.current)return;r9.set(this.visualElement,this);const t=this.visualElement.current,n=yo(t,"pointerdown",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();dl(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),bt.read(r);const a=lo(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Yr(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=l[f].translate,d.set(d.get()+l[f].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=ux,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function dh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function o9(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class a9 extends Pa{constructor(t){super(t),this.removeGroupControls=$n,this.removeListeners=$n,this.controls=new i9(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$n}unmount(){this.removeGroupControls(),this.removeListeners()}}const aA=e=>(t,n)=>{e&&bt.postRender(()=>e(t,n))};class s9 extends Pa{constructor(){super(...arguments),this.removePointerDownListener=$n}onPointerDown(t){this.session=new q$(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:aD(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:aA(t),onStart:aA(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&bt.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=yo(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const eg=O.createContext(null);function l9(){const e=O.useContext(eg);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=O.useId();O.useEffect(()=>r(i),[]);const o=O.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,o]:[!0]}const u1=O.createContext({}),sD=O.createContext({}),zh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function sA(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const tc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(De.test(e))e=parseFloat(e);else return e;const n=sA(e,t.target.x),r=sA(e,t.target.y);return`${n}% ${r}%`}},u9={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=wa.parse(e);if(i.length>5)return r;const o=wa.createTransformer(e),a=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+a]/=s,i[1+a]/=l;const u=Ft(s,l,.5);return typeof i[2+a]=="number"&&(i[2+a]/=u),typeof i[3+a]=="number"&&(i[3+a]/=u),o(i)}},up={};function c9(e){Object.assign(up,e)}const{schedule:c1,cancel:HTe}=u$(queueMicrotask,!1);class f9 extends O.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;c9(d9),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),zh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||bt.postRender(()=>{const s=a.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),c1.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function lD(e){const[t,n]=l9(),r=O.useContext(u1);return T.jsx(f9,{...e,layoutGroup:r,switchLayoutGroup:O.useContext(sD),isPresent:t,safeToRemove:n})}const d9={borderRadius:{...tc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:tc,borderTopRightRadius:tc,borderBottomLeftRadius:tc,borderBottomRightRadius:tc,boxShadow:u9},uD=["TopLeft","TopRight","BottomLeft","BottomRight"],h9=uD.length,lA=e=>typeof e=="string"?parseFloat(e):e,uA=e=>typeof e=="number"||De.test(e);function p9(e,t,n,r,i,o){i?(e.opacity=Ft(0,n.opacity!==void 0?n.opacity:1,m9(r)),e.opacityExit=Ft(t.opacity!==void 0?t.opacity:1,0,g9(r))):o&&(e.opacity=Ft(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;art?1:n(Nl(e,t,r))}function fA(e,t){e.min=t.min,e.max=t.max}function Ur(e,t){fA(e.x,t.x),fA(e.y,t.y)}function dA(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function hA(e,t,n,r,i){return e-=t,e=lp(e,1/n,r),i!==void 0&&(e=lp(e,1/i,r)),e}function y9(e,t=0,n=1,r=.5,i,o=e,a=e){if(Mi.test(t)&&(t=parseFloat(t),t=Ft(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=Ft(o.min,o.max,r);e===o&&(s-=t),e.min=hA(e.min,t,n,s,i),e.max=hA(e.max,t,n,s,i)}function pA(e,t,[n,r,i],o,a){y9(e,t[n],t[r],t[i],t.scale,o,a)}const v9=["x","scaleX","originX"],b9=["y","scaleY","originY"];function mA(e,t,n,r){pA(e.x,t,v9,n?n.x:void 0,r?r.x:void 0),pA(e.y,t,b9,n?n.y:void 0,r?r.y:void 0)}function gA(e){return e.translate===0&&e.scale===1}function fD(e){return gA(e.x)&&gA(e.y)}function yA(e,t){return e.min===t.min&&e.max===t.max}function x9(e,t){return yA(e.x,t.x)&&yA(e.y,t.y)}function vA(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function dD(e,t){return vA(e.x,t.x)&&vA(e.y,t.y)}function bA(e){return Mr(e.x)/Mr(e.y)}function xA(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class w9{constructor(){this.members=[]}add(t){o1(this.members,t),t.scheduleRender()}remove(t){if(a1(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function _9(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:d,rotateY:p,skewX:m,skewY:g}=n;u&&(r=`perspective(${u}px) ${r}`),f&&(r+=`rotate(${f}deg) `),d&&(r+=`rotateX(${d}deg) `),p&&(r+=`rotateY(${p}deg) `),m&&(r+=`skewX(${m}deg) `),g&&(r+=`skewY(${g}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const S9=(e,t)=>e.depth-t.depth;class O9{constructor(){this.children=[],this.isDirty=!1}add(t){o1(this.children,t),this.isDirty=!0}remove(t){a1(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(S9),this.isDirty=!1,this.children.forEach(t)}}function Vh(e){const t=Vn(e)?e.get():e;return mq(t)?t.toValue():t}function C9(e,t){const n=ji.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(ba(r),e(o-t))};return bt.read(r,!0),()=>ba(r)}function P9(e){return e instanceof SVGElement&&e.tagName!=="svg"}function A9(e,t,n){const r=Vn(e)?e:Xc(e);return r.start(i1("",r,t,n)),r.animation}const Za={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},bc=typeof window<"u"&&window.MotionDebug!==void 0,Fv=["","X","Y","Z"],T9={visibility:"hidden"},wA=1e3;let E9=0;function Wv(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function hD(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=K$(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",bt,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&hD(r)}function pD({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},s=t==null?void 0:t()){this.id=E9++,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,bc&&(Za.totalNodes=Za.resolvedTargetDeltas=Za.recalculatedProjection=0),this.nodes.forEach(j9),this.nodes.forEach(R9),this.nodes.forEach(L9),this.nodes.forEach(N9),bc&&window.MotionDebug.record(Za)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=C9(p,250),zh.hasAnimatedSinceResize&&(zh.hasAnimatedSinceResize=!1,this.nodes.forEach(SA))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||f.getDefaultTransition()||V9,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=f.getProps(),w=!this.targetLayout||!dD(this.targetLayout,g)||m,S=!p&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||S||p&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,S);const P={...Uw(v,"layout"),onPlay:y,onComplete:x};(f.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else p||SA(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ba(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(B9),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&hD(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const _=P/1e3;OA(d.x,a.x,_),OA(d.y,a.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tc(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),W9(this.relativeTarget,this.relativeTargetOrigin,p,_),S&&x9(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=Yt()),Ur(S,this.relativeTarget)),v&&(this.animationValues=f,p9(f,u,this.latestValues,_,w,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ba(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=bt.update(()=>{zh.hasAnimatedSinceResize=!0,this.currentAnimation=A9(0,wA,{...a,onUpdate:s=>{this.mixTargetDelta(s),a.onUpdate&&a.onUpdate(s)},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(wA),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:u,latestValues:f}=a;if(!(!s||!l||!u)){if(this!==a&&this.layout&&u&&mD(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Yt();const d=Mr(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const p=Mr(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+p}Ur(s,l),ml(s,f),Ac(this.projectionDeltaWithTransform,this.layoutCorrected,s,f)}}registerSharedNode(a,s){this.sharedNodes.has(a)||this.sharedNodes.set(a,new w9),this.sharedNodes.get(a).add(s);const u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const u={};l.z&&Wv("z",a,u,this.animationValues);for(let f=0;f{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(_A),this.root.sharedNodes.clear()}}}function k9(e){e.updateLayout()}function M9(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?Yr(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],m=Mr(p);p.min=r[d].min,p.max=p.min+m}):mD(o,n.layoutBox,r)&&Yr(d=>{const p=a?n.measuredBox[d]:n.layoutBox[d],m=Mr(r[d]);p.max=p.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+m)});const s=hl();Ac(s,r,n.layoutBox);const l=hl();a?Ac(l,e.applyTransform(i,!0),n.measuredBox):Ac(l,r,n.layoutBox);const u=!fD(s);let f=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:m}=d;if(p&&m){const g=Yt();Tc(g,n.layoutBox,p.layoutBox);const v=Yt();Tc(v,r,m.layoutBox),dD(g,v)||(f=!0),d.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function j9(e){bc&&Za.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function N9(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function $9(e){e.clearSnapshot()}function _A(e){e.clearMeasurements()}function D9(e){e.isLayoutDirty=!1}function I9(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function SA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function R9(e){e.resolveTargetDelta()}function L9(e){e.calcProjection()}function B9(e){e.resetSkewAndRotation()}function F9(e){e.removeLeadSnapshot()}function OA(e,t,n){e.translate=Ft(t.translate,0,n),e.scale=Ft(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function CA(e,t,n,r){e.min=Ft(t.min,n.min,r),e.max=Ft(t.max,n.max,r)}function W9(e,t,n,r){CA(e.x,t.x,n.x,r),CA(e.y,t.y,n.y,r)}function z9(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const V9={duration:.45,ease:[.4,0,.1,1]},PA=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),AA=PA("applewebkit/")&&!PA("chrome/")?Math.round:$n;function TA(e){e.min=AA(e.min),e.max=AA(e.max)}function U9(e){TA(e.x),TA(e.y)}function mD(e,t,n){return e==="position"||e==="preserve-aspect"&&!Kq(bA(t),bA(n),.2)}function K9(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const H9=pD({attachResizeListener:(e,t)=>lo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zv={current:void 0},gD=pD({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zv.current){const e=new H9({});e.mount(window),e.setOptions({layoutScroll:!0}),zv.current=e}return zv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),G9={pan:{Feature:s9},drag:{Feature:a9,ProjectionNode:gD,MeasureLayout:lD}};function EA(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd",i=(o,a)=>{if(o.pointerType==="touch"||Q$())return;const s=e.getProps();e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",t);const l=s[r];l&&bt.postRender(()=>l(o,a))};return yo(e.current,n,i,{passive:!e.getProps()[r]})}class Y9 extends Pa{mount(){this.unmount=go(EA(this.node,!0),EA(this.node,!1))}unmount(){}}class q9 extends Pa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=go(lo(this.node.current,"focus",()=>this.onFocus()),lo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const yD=(e,t)=>t?e===t?!0:yD(e,t.parentElement):!1;function Vv(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Qm(n))}class X9 extends Pa{constructor(){super(...arguments),this.removeStartListeners=$n,this.removeEndListeners=$n,this.removeAccessibleListeners=$n,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=yo(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:f,globalTapTarget:d}=this.node.getProps(),p=!d&&!yD(this.node.current,s.target)?f:u;p&&bt.update(()=>p(s,l))},{passive:!(r.onTap||r.onPointerUp)}),a=yo(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=go(o,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const a=s=>{s.key!=="Enter"||!this.checkPressEnd()||Vv("up",(l,u)=>{const{onTap:f}=this.node.getProps();f&&bt.postRender(()=>f(l,u))})};this.removeEndListeners(),this.removeEndListeners=lo(this.node.current,"keyup",a),Vv("down",(s,l)=>{this.startPress(s,l)})},n=lo(this.node.current,"keydown",t),r=()=>{this.isPressing&&Vv("cancel",(o,a)=>this.cancelPress(o,a))},i=lo(this.node.current,"blur",r);this.removeAccessibleListeners=go(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&bt.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Q$()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&bt.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=yo(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=lo(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=go(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const dx=new WeakMap,Uv=new WeakMap,Z9=e=>{const t=dx.get(e.target);t&&t(e)},J9=e=>{e.forEach(Z9)};function Q9({root:e,...t}){const n=e||document;Uv.has(n)||Uv.set(n,{});const r=Uv.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(J9,{root:e,...t})),r[i]}function e7(e,t,n){const r=Q9(t);return dx.set(e,n),r.observe(e),()=>{dx.delete(e),r.unobserve(e)}}const t7={some:0,all:1};class n7 extends Pa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:t7[i]},s=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),p=u?f:d;p&&p(l)};return e7(this.node.current,a,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(r7(t,n))&&this.startObserver()}unmount(){}}function r7({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const i7={inView:{Feature:n7},tap:{Feature:X9},focus:{Feature:q9},hover:{Feature:Y9}},o7={layout:{ProjectionNode:gD,MeasureLayout:lD}},f1=O.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),tg=O.createContext({}),d1=typeof window<"u",vD=d1?O.useLayoutEffect:O.useEffect,bD=O.createContext({strict:!1});function a7(e,t,n,r,i){var o,a;const{visualElement:s}=O.useContext(tg),l=O.useContext(bD),u=O.useContext(eg),f=O.useContext(f1).reducedMotion,d=O.useRef();r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:f}));const p=d.current,m=O.useContext(sD);p&&!p.projection&&i&&(p.type==="html"||p.type==="svg")&&s7(d.current,n,i,m);const g=O.useRef(!1);O.useInsertionEffect(()=>{p&&g.current&&p.update(n,u)});const v=n[U$],y=O.useRef(!!v&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,v))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,v)));return vD(()=>{p&&(g.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),c1.render(p.render),y.current&&p.animationState&&p.animationState.animateChanges())}),O.useEffect(()=>{p&&(!y.current&&p.animationState&&p.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,v)}),y.current=!1))}),p}function s7(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:xD(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||s&&dl(s),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function xD(e){if(e)return e.options.allowProjection!==!1?e.projection:xD(e.parent)}function l7(e,t,n){return O.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):dl(n)&&(n.current=r))},[t])}function ng(e){return Xm(e.animate)||Vw.some(t=>Gc(e[t]))}function wD(e){return!!(ng(e)||e.variants)}function u7(e,t){if(ng(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gc(n)?n:void 0,animate:Gc(r)?r:void 0}}return e.inherit!==!1?t:{}}function c7(e){const{initial:t,animate:n}=u7(e,O.useContext(tg));return O.useMemo(()=>({initial:t,animate:n}),[kA(t),kA(n)])}function kA(e){return Array.isArray(e)?e.join(" "):e}const MA={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"]},$l={};for(const e in MA)$l[e]={isEnabled:t=>MA[e].some(n=>!!t[n])};function f7(e){for(const t in e)$l[t]={...$l[t],...e[t]}}const d7=Symbol.for("motionComponentSymbol");function h7({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&f7(e);function o(s,l){let u;const f={...O.useContext(f1),...s,layoutId:p7(s)},{isStatic:d}=f,p=c7(s),m=r(s,d);if(!d&&d1){m7(f,e);const g=g7(f);u=g.MeasureLayout,p.visualElement=a7(i,m,f,t,g.ProjectionNode)}return T.jsxs(tg.Provider,{value:p,children:[u&&p.visualElement?T.jsx(u,{visualElement:p.visualElement,...f}):null,n(i,s,l7(m,p.visualElement,l),m,d,p.visualElement)]})}const a=O.forwardRef(o);return a[d7]=i,a}function p7({layoutId:e}){const t=O.useContext(u1).id;return t&&e!==void 0?t+"-"+e:e}function m7(e,t){const n=O.useContext(bD).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?mu(!1,r):Oo(!1,r)}}function g7(e){const{drag:t,layout:n}=$l;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const y7=["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 h1(e){return typeof e!="string"||e.includes("-")?!1:!!(y7.indexOf(e)>-1||/[A-Z]/u.test(e))}function _D(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const SD=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 OD(e,t,n,r){_D(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(SD.has(i)?i:l1(i),t.attrs[i])}function CD(e,{layout:t,layoutId:n}){return Ts.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!up[e]||e==="opacity")}function p1(e,t,n){var r;const{style:i}=e,o={};for(const a in i)(Vn(i[a])||t.style&&Vn(t.style[a])||CD(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return o}function PD(e,t,n){const r=p1(e,t,n);for(const i in e)if(Vn(e[i])||Vn(t[i])){const o=Gf.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function m1(e){const t=O.useRef(null);return t.current===null&&(t.current=e()),t.current}function v7({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:b7(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const AD=e=>(t,n)=>{const r=O.useContext(tg),i=O.useContext(eg),o=()=>v7(e,t,r,i);return n?o():m1(o)};function b7(e,t,n,r){const i={},o=r(e,{});for(const p in o)i[p]=Vh(o[p]);let{initial:a,animate:s}=e;const l=ng(e),u=wD(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let f=n?n.initial===!1:!1;f=f||a===!1;const d=f?s:a;if(d&&typeof d!="boolean"&&!Xm(d)){const p=Array.isArray(d)?d:[d];for(let m=0;m({style:{},transform:{},transformOrigin:{},vars:{}}),TD=()=>({...g1(),attrs:{}}),ED=(e,t)=>t&&typeof e=="number"?t.transform(e):e,x7={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},w7=Gf.length;function _7(e,t,n){let r="",i=!0;for(let o=0;otypeof e=="string"&&e.toLowerCase()==="svg",A7={useVisualState:AD({scrapeMotionValuesFromProps:PD,createRenderState:TD,onMount:(e,t,{renderState:n,latestValues:r})=>{bt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),bt.render(()=>{v1(n,r,b1(t.tagName),e.transformTemplate),OD(t,n)})}})},T7={useVisualState:AD({scrapeMotionValuesFromProps:p1,createRenderState:g1})};function kD(e,t,n){for(const r in t)!Vn(t[r])&&!CD(r,n)&&(e[r]=t[r])}function E7({transformTemplate:e},t){return O.useMemo(()=>{const n=g1();return y1(n,t,e),Object.assign({},n.vars,n.style)},[t])}function k7(e,t){const n=e.style||{},r={};return kD(r,n,e),Object.assign(r,E7(e,t)),r}function M7(e,t){const n={},r=k7(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const j7=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 cp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||j7.has(e)}let MD=e=>!cp(e);function N7(e){e&&(MD=t=>t.startsWith("on")?!cp(t):e(t))}try{N7(require("@emotion/is-prop-valid").default)}catch{}function $7(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(MD(i)||n===!0&&cp(i)||!t&&!cp(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function D7(e,t,n,r){const i=O.useMemo(()=>{const o=TD();return v1(o,t,b1(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};kD(o,e.style,e),i.style={...o,...i.style}}return i}function I7(e=!1){return(n,r,i,{latestValues:o},a)=>{const l=(h1(n)?D7:M7)(r,o,a,n),u=$7(r,typeof n=="string",e),f=n!==O.Fragment?{...u,...l,ref:i}:{},{children:d}=r,p=O.useMemo(()=>Vn(d)?d.get():d,[d]);return O.createElement(n,{...f,children:p})}}function R7(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const a={...h1(r)?A7:T7,preloadedFeatures:e,useRender:I7(i),createVisualElement:t,Component:r};return h7(a)}}const hx={current:null},jD={current:!1};function L7(){if(jD.current=!0,!!d1)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>hx.current=e.matches;e.addListener(t),t()}else hx.current=!1}function B7(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Vn(i))e.addValue(r,i),process.env.NODE_ENV==="development"&&qm(i.version==="11.11.17",`Attempting to mix Motion versions ${i.version} with 11.11.17 may not work as expected.`);else if(Vn(o))e.addValue(r,Xc(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,Xc(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const NA=new WeakMap,F7=[...O$,Bn,wa],W7=e=>F7.find(S$(e)),$A=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class z7{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Yw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=ji.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),jD.current||L7(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:hx.current,process.env.NODE_ENV!=="production"&&qm(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){NA.delete(this.current),this.projection&&this.projection.unmount(),ba(this.notifyUpdate),ba(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ts.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&bt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in $l){const n=$l[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Yt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<$A.length;r++){const i=$A[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,a=t[o];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=B7(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Xc(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(b$(i)||v$(i))?i=parseFloat(i):!W7(i)&&wa.test(n)&&(i=j$(t,n)),this.setBaseTarget(t,Vn(i)?i.get():i)),Vn(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const a=Ww(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(i=a[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Vn(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new s1),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class ND extends z7{constructor(){super(...arguments),this.KeyframeResolver=N$}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function V7(e){return window.getComputedStyle(e)}class U7 extends ND{constructor(){super(...arguments),this.type="html",this.renderInstance=_D}readValueFromInstance(t,n){if(Ts.has(n)){const r=Jw(n);return r&&r.default||0}else{const r=V7(t),i=(w$(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return oD(t,n)}build(t,n,r){y1(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return p1(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Vn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class K7 extends ND{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Yt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ts.has(n)){const r=Jw(n);return r&&r.default||0}return n=SD.has(n)?n:l1(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return PD(t,n,r)}build(t,n,r){v1(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){OD(t,n,r,i)}mount(t){this.isSVGTag=b1(t.tagName),super.mount(t)}}const H7=(e,t)=>h1(e)?new K7(t):new U7(t,{allowProjection:e!==O.Fragment}),G7=R7({...Iq,...i7,...G9,...o7},H7),hi=AG(G7);class Y7 extends ee.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function q7({children:e,isPresent:t}){const n=O.useId(),r=O.useRef(null),i=O.useRef({width:0,height:0,top:0,left:0}),{nonce:o}=O.useContext(f1);return O.useInsertionEffect(()=>{const{width:a,height:s,top:l,left:u}=i.current;if(t||!r.current||!a||!s)return;r.current.dataset.motionPopId=n;const f=document.createElement("style");return o&&(f.nonce=o),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(` + [data-motion-pop-id="${n}"] { + position: absolute !important; + width: ${a}px !important; + height: ${s}px !important; + top: ${l}px !important; + left: ${u}px !important; + } + `),()=>{document.head.removeChild(f)}},[t]),T.jsx(Y7,{isPresent:t,childRef:r,sizeRef:i,children:ee.cloneElement(e,{ref:r})})}const X7=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=m1(Z7),l=O.useId(),u=O.useCallback(d=>{s.set(d,!0);for(const p of s.values())if(!p)return;r&&r()},[s,r]),f=O.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:u,register:d=>(s.set(d,!1),()=>s.delete(d))}),o?[Math.random(),u]:[n,u]);return O.useMemo(()=>{s.forEach((d,p)=>s.set(p,!1))},[n]),ee.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=T.jsx(q7,{isPresent:n,children:e})),T.jsx(eg.Provider,{value:f,children:e})};function Z7(){return new Map}const hh=e=>e.key||"";function DA(e){const t=[];return O.Children.forEach(e,n=>{O.isValidElement(n)&&t.push(n)}),t}const Es=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{Oo(!t,"Replace exitBeforeEnter with mode='wait'");const s=O.useMemo(()=>DA(e),[e]),l=s.map(hh),u=O.useRef(!0),f=O.useRef(s),d=m1(()=>new Map),[p,m]=O.useState(s),[g,v]=O.useState(s);vD(()=>{u.current=!1,f.current=s;for(let w=0;w1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:x}=O.useContext(u1);return T.jsx(T.Fragment,{children:g.map(w=>{const S=hh(w),P=s===g||l.includes(S),_=()=>{if(d.has(S))d.set(S,!0);else return;let C=!0;d.forEach(E=>{E||(C=!1)}),C&&(x==null||x(),v(f.current),i&&i())};return T.jsx(X7,{isPresent:P,initial:!u.current||r?void 0:!1,custom:P?void 0:n,presenceAffectsLayout:o,mode:a,onExitComplete:P?void 0:_,children:w},S)})})},$D=O.createContext({}),DD=()=>O.useContext($D),ID=O.createContext(null),J7=()=>O.useContext(ID),RD=({children:e,activeItem:t=null,onChange:n,className:r,size:i="sm",orientation:o="horizontal",variant:a="pill",iconPosition:s="left",width:l="full"})=>{const u=DD(),f=(u==null?void 0:u.activeItem)||t,d=O.useCallback((_,C)=>{n&&n({event:_,value:C})},[n]);let p="rounded-full",m="p-1",g,v="ring-1 ring-tab-border";o==="vertical"?g="gap-0.5":(a==="rounded"||a==="pill")&&(i==="xs"||i==="sm"?g="gap-0.5":(i==="md"||i==="lg")&&(g="gap-1")),a==="rounded"||o==="vertical"?p="rounded-md":a==="underline"&&(p="rounded-none",m="p-0",v="border-t-0 border-r-0 border-l-0 border-b border-solid border-tab-border",i==="xs"?g="gap-0":i==="sm"?g="gap-2.5":(i==="md"||i==="lg")&&(g="gap-3"));const P=G(`box-border [&>*]:box-border flex items-center ${l==="full"?"w-full":""} ${o==="vertical"?"flex-col":""}`,p,m,g,v,a!=="underline"?"bg-tab-background":"",r);return T.jsx("div",{className:P,children:T.jsx(ID.Provider,{value:{activeItem:f,onChange:d,size:i,variant:a,orientation:o,iconPosition:s,width:l},children:O.Children.map(e,_=>O.isValidElement(_)?O.cloneElement(_):null)})})};RD.displayName="Tabs.Group";const LD=O.forwardRef(({slug:e,text:t,icon:n,className:r,disabled:i=!1,badge:o=null,...a},s)=>{const l=J7();if(!l)throw new Error("Tab should be used inside Tabs Group");const{activeItem:u,onChange:f,size:d,variant:p,orientation:m,iconPosition:g,width:v}=l,y={xs:"px-1.5 py-0.5 text-xs [&_svg]:size-3",sm:p==="underline"?"py-1.5 text-sm [&_svg]:size-4":"px-3 py-1.5 text-sm [&_svg]:size-4",md:p==="underline"?"py-2 text-base [&_svg]:size-5":"px-3.5 py-1.5 text-base [&_svg]:size-5",lg:p==="underline"?"p-2.5 text-lg [&_svg]:size-6":"px-3.5 py-1.5 text-lg [&_svg]:size-6"}[d],S=G("relative border-none bg-transparent text-text-secondary cursor-pointer flex items-center justify-center transition-[box-shadow,color,background-color] duration-200",v==="full"?"flex-1":"",m==="vertical"?"w-full justify-between":""),P="border-none";let _="rounded-full";p==="rounded"?_="rounded-md":p==="underline"&&(_="rounded-none");const D=G(S,P,_,"hover:text-text-primary group","focus:outline-none",y,u===e?"bg-background-primary text-text-primary shadow-sm":"",i?"text-text-disabled cursor-not-allowed hover:text-text-disabled":"",r),$=G("flex items-center gap-1 group-hover:text-text-primary",i&&"group-hover:text-text-disabled"),N=B=>{f(B,{slug:e,text:t})};return T.jsxs("button",{ref:s,className:D,disabled:i,onClick:N,...a,children:[u===e&&p==="underline"&&T.jsx(hi.span,{layoutId:"underline",className:"absolute right-0 left-0 -bottom-px h-px bg-border-interactive"}),T.jsxs("span",{className:$,children:[g==="left"&&n&&T.jsx("span",{className:"mr-1 contents center-center transition duration-150",children:n}),t,g==="right"&&n&&T.jsx("span",{className:"ml-1 contents center-center transition duration-150",children:n})]}),o&&O.isValidElement(o)&&o]})});LD.displayName="Tabs.Tab";const rg=({activeItem:e,children:t})=>T.jsx($D.Provider,{value:{activeItem:e},children:t}),BD=({slug:e,children:t})=>{const n=DD();if(!n)throw new Error("TabPanel should be used inside Tabs");return e===n.activeItem?T.jsx(T.Fragment,{children:t}):null};BD.displayName="Tabs.Panel";rg.Group=RD;rg.Tab=LD;rg.Panel=BD;const ci={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"}},ph={selectButton:"group disabled:outline-field-border-disabled [&:hover:has(:disabled)]:outline-field-border-disabled disabled:cursor-default",icon:"group-disabled:text-icon-disabled",text:"group-disabled:text-field-color-disabled"},FD=O.createContext({}),x1=()=>O.useContext(FD);function WD({children:e,icon:t=null,placeholder:n="Select an option",optionIcon:r=null,displayBy:i="name",label:o,className:a,...s}){var M,D;const{sizeValue:l,getReferenceProps:u,getValues:f,selectId:d,refs:p,isOpen:m,multiple:g,combobox:v,setSelected:y,onChange:x,isControlled:w,disabled:S,by:P}=x1(),_={sm:"xs",md:"sm",lg:"md"}[l],C=O.useCallback(()=>{if(t)return t;const $="text-field-placeholder "+ph.icon;return v?T.jsx(rK,{className:$}):T.jsx(Cw,{className:$})},[t]),E=O.useCallback(()=>{const $=f();if(!$)return null;if(typeof e=="function"){const B={value:$,...g?{onClose:k($)}:{}};return e(B)}if(g)return $.map((B,L)=>{var F;return T.jsx(Kf,{className:"cursor-default",icon:r,type:"rounded",size:_,onMouseDown:k(B),label:typeof B=="object"?(F=B[i])==null?void 0:F.toString():B.toString(),closable:!0,disabled:S},L)});let N=typeof $=="object"?$[i]:$;return O.isValidElement(e)&&(N=e),T.jsx("span",{className:G("truncate",ci[l].displaySelected,ph.text),children:N})},[f,S]),k=$=>N=>{N==null||N.preventDefault(),N==null||N.stopPropagation();const B=[...f()??[]],L=B.findIndex(F=>F!==null&&$!==null&&typeof F=="object"?F[P]===$[P]:F===$);L!==-1&&(B.splice(L,1),w||y(B),typeof x=="function"&&x(B))};return T.jsxs("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!o&&T.jsx("label",{className:G((M=ci[l])==null?void 0:M.label,"text-field-label"),htmlFor:d,children:o}),T.jsxs("button",{id:d,ref:p.setReference,className:G("flex items-center justify-between w-full box-border transition-[outline,background-color,color,box-shadow] duration-200 bg-white","outline outline-1 outline-field-border border-none cursor-pointer",!m&&"focus:ring-2 focus:ring-offset-4 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",ci[l].selectButton,g&&ci[l].multiSelect,ph.selectButton,a),tabIndex:0,disabled:S,...s,...u(),children:[T.jsxs("div",{className:G("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",f()&&"flex flex-wrap"),children:[E(),(g?!((D=f())!=null&&D.length):!f())&&T.jsx("div",{className:G("[grid-area:1/1/2/3] text-field-input px-1",ci[l].displaySelected,ph.text),children:n})]}),T.jsx("div",{className:G("flex items-center [&>svg]:shrink-0",ci[l].icon),children:C()})]})]})}function zD({children:e,searchBy:t="name",searchPlaceholder:n="Search...",className:r}){const{isOpen:i,context:o,refs:a,combobox:s,floatingStyles:l,getFloatingProps:u,sizeValue:f,setSearchKeyword:d,setActiveIndex:p,setSelectedIndex:m,value:g,selected:v,getValues:y,searchKeyword:x,listContentRef:w,by:S}=x1(),P=O.useMemo(()=>{const E=y();let k=0;return E&&(k=O.Children.toArray(e).findIndex(M=>O.isValidElement(M)?typeof M.props.value=="object"?M.props.value[S]===E[S]:M.props.value===E:!1)),k===-1?0:k},[g,v,e]);O.useLayoutEffect(()=>{p(P),m(P)},[]);const _=O.useMemo(()=>O.Children.map(e,(E,k)=>{if(!O.isValidElement(E))return null;if(x){const M=E.props.value;if(typeof M=="object"){if(M[t].toLowerCase().indexOf(x.toLowerCase())===-1)return null}else if(M.toLowerCase().indexOf(x.toLowerCase())===-1)return null}return O.cloneElement(E,{...E.props,index:k})}),[x,g,v,e]),C=O.Children.count(_);return O.useEffect(()=>{w.current=[],O.Children.forEach(e,E=>{if(O.isValidElement(E)&&E.props.value){if(x){const k=E.props.value;if(typeof k=="object"){if(k[t].toLowerCase().indexOf(x.toLowerCase())===-1)return}else if(k.toLowerCase().indexOf(x.toLowerCase())===-1)return}w.current.push(typeof E.props.value=="object"?E.props.value[t||S]:E.props.value)}})},[x]),T.jsx(T.Fragment,{children:i&&T.jsx(T.Fragment,{children:T.jsx(eG,{context:o,modal:!1,children:T.jsxs("div",{ref:a.setFloating,className:G("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",s&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",ci[f].dropdown,!s&&"h-auto",s?"overflow-hidden":"overflow-y-auto",r),style:{...l},...u(),children:[s&&T.jsxs("div",{className:G(ci[f].searchbarWrapper),children:[T.jsx(SN,{className:G("text-icon-secondary shrink-0",ci[f].searchbarIcon)}),T.jsx("input",{className:G("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",ci[f].searchbar),type:"search",name:"keyword",placeholder:n,onChange:E=>d(E.target.value),autoComplete:"off"})]}),T.jsxs("div",{className:G("overflow-y-auto",!s&&"w-full h-full",ci[f].dropdownItemsWrapper),children:[!!C&&_,!C&&T.jsx("div",{className:"p-2 text-center text-base font-medium text-field-placeholder",children:"No items found"})]})]})})})})}function VD({children:e,root:t,id:n}){return T.jsx(Um,{id:n,root:t,children:e})}function UD({value:e,selected:t,children:n,className:r,...i}){const{sizeValue:o,getItemProps:a,onKeyDownItem:s,onClickItem:l,activeIndex:u,selectedIndex:f,updateListRef:d,getValues:p,by:m,multiple:g}=x1(),{index:v}=i,y={sm:"py-1.5 px-2 text-sm font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"},x={sm:"size-4",md:"size-4",lg:"size-5"},w=O.useMemo(()=>{if(!g)return!1;const P=p();return P?P.some(_=>_!==null&&e!==null&&typeof _=="object"?_[m]===e[m]:_===e):!1},[e,p]),S=O.useMemo(()=>typeof t=="boolean"?t:g?w:v===f,[w,f,t]);return T.jsxs("div",{className:G("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",y[o],v===u&&"bg-button-tertiary-hover",r),ref:P=>{d(v,P)},role:"option",tabIndex:v===u?0:-1,"aria-selected":S&&v===u,...a({onClick(){l(v,e)},onKeyDown(P){s(P,v,e)}}),children:[T.jsx("span",{className:"w-full truncate",children:n}),S&&T.jsx(Ff,{className:G("text-icon-on-color-disabled",x[o])})]})}const Xf=({id:e,size:t="md",value:n,defaultValue:r,onChange:i,by:o="id",children:a,multiple:s=!1,combobox:l=!1,disabled:u=!1})=>{const f=O.useMemo(()=>e||`select-${jo()}`,[e]),d=O.useMemo(()=>typeof n<"u",[n]),[p,m]=O.useState(r),[g,v]=O.useState(""),y=O.useCallback(()=>d?n:p,[d,n,p]),[x,w]=O.useState(!1),[S,P]=O.useState(null),[_,C]=O.useState(null),E={sm:l?256:172,md:l?256:216,lg:l?256:216},{refs:k,floatingStyles:M,context:D}=Hm({placement:"bottom-start",open:x,onOpenChange:w,whileElementsMounted:Lm,middleware:[Bm(5),Fm({padding:10}),UN({apply({rects:le,elements:re,availableHeight:Q}){Object.assign(re.floating.style,{maxHeight:`min(${Q}px, ${E[t]}px)`,maxWidth:`${le.reference.width}px`})},padding:10})]}),$=O.useRef([]),N=O.useRef([]),B=O.useRef(!1),L=Rw(D,{event:"mousedown"}),F=Km(D),W=Lw(D,{role:"listbox"}),z=aG(D,{listRef:$,activeIndex:S,selectedIndex:_,onNavigate:P,loop:!0}),H=cG(D,{listRef:N,activeIndex:S,selectedIndex:_,onMatch:x?P:C,onTypingChange(le){B.current=le}}),{getReferenceProps:U,getFloatingProps:K,getItemProps:Y}=Gm([F,W,z,L,...l?[]:[H]]),te=(le,re)=>{const Q=[...y()??[]];Q.findIndex(ye=>ye!==null&&re!==null&&typeof ye=="object"?ye[o]===re[o]:ye===re)===-1&&(Q.push(re),d||m(Q),C(le),k.reference.current.focus(),w(!1),v(""),typeof i=="function"&&i(Q))},ne=(le,re)=>{if(s)return te(le,re);C(le),d||m(re),k.reference.current.focus(),w(!1),v(""),typeof i=="function"&&i(re)},ie=O.useCallback((le,re)=>{$.current[le]=re},[]),ce=(le,re)=>{ne(le,re)},ae=(le,re,Q)=>{le.key==="Enter"&&(le.preventDefault(),ne(re,Q)),le.key===" "&&!B.current&&(le.preventDefault(),ne(re,Q))};return T.jsx(FD.Provider,{value:{selectedIndex:_,setSelectedIndex:C,activeIndex:S,setActiveIndex:P,selected:p,setSelected:m,handleSelect:ne,combobox:l,sizeValue:t,multiple:s,onChange:i,isTypingRef:B,getItemProps:Y,onClickItem:ce,onKeyDownItem:ae,getValues:y,selectId:f,getReferenceProps:U,isOpen:x,value:n,updateListRef:ie,refs:k,listContentRef:N,by:o,getFloatingProps:K,floatingStyles:M,context:D,searchKeyword:g,setSearchKeyword:v,disabled:u,isControlled:d},children:a})};VD.displayName="Select.Portal";WD.displayName="Select.Button";zD.displayName="Select.Options";UD.displayName="Select.Option";Xf.Portal=VD;Xf.Button=WD;Xf.Options=zD;Xf.Option=UD;let Q7=1;var ar,Oi;class eX{constructor(){xv(this,ar);xv(this,Oi);Va(this,ar,[]),Va(this,Oi,[])}subscribe(t){return xr(this,Oi).push(t),()=>{Va(this,Oi,xr(this,Oi).filter(n=>n!==t))}}publish(t){xr(this,Oi).forEach(n=>n(t))}add(t){xr(this,ar).push(t),this.publish(t)}remove(t){return Va(this,ar,xr(this,ar).filter(n=>n.id!==t)),t}create(t){const{id:n=void 0,message:r="",jsx:i=void 0,...o}=t;if(!r&&typeof i!="function")return;const a=typeof n=="number"?n:Q7++;return xr(this,ar).find(l=>l.id===a)&&Va(this,ar,xr(this,ar).map(l=>l.id===a?(this.publish({...l,title:r,jsx:i,...o}),{...l,title:r,jsx:i,...o}):l)),this.add({id:a,title:r,jsx:i,...o}),a}update(t,n){const{render:r=void 0}=n;let i=n;switch(typeof r){case"function":i={jsx:r,...n};break;case"string":i={title:r,...n};break}Va(this,ar,xr(this,ar).map(o=>o.id===t?(this.publish({...o,...i}),{...o,...i}):o))}dismiss(t){return t||xr(this,ar).forEach(n=>xr(this,Oi).forEach(r=>r({id:n.id,dismiss:!0}))),xr(this,Oi).forEach(n=>n({id:t,dismiss:!0})),t}history(){return xr(this,ar)}default(t="",n={}){return this.create({message:t,type:"neutral",...n})}success(t="",n={}){return this.create({message:t,type:"success",...n})}error(t="",n={}){return this.create({message:t,type:"error",...n})}warning(t="",n={}){return this.create({message:t,type:"warning",...n})}info(t="",n={}){return this.create({message:t,type:"info",...n})}custom(t,n={}){return this.create({jsx:t,type:"custom",...n})}}ar=new WeakMap,Oi=new WeakMap;const gn=new eX,tX=(e,t)=>gn.default(e,t),nX=Object.seal(Object.assign(tX,{success:gn.success.bind(gn),error:gn.error.bind(gn),warning:gn.warning.bind(gn),info:gn.info.bind(gn),custom:gn.custom.bind(gn),dismiss:gn.dismiss.bind(gn),update:gn.update.bind(gn)},{getHistory:gn.history.bind(gn)}));let IA=!1;const rX=e=>O.memo(n=>{const r=n.singleTon;return IA&&r?null:(IA=!0,T.jsx(e,{...n}))}),RA={"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"},LA={stack:"w-[22.5rem]",inline:"lg:w-[47.5rem] w-full"},mh={light:{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"},dark:"bg-background-inverse border-background-inverse"},gh={light:"text-icon-secondary",dark:"text-icon-inverse"},iX=({position:e="top-right",design:t="stack",theme:n="light",className:r="",autoDismiss:i=!0,dismissAfter:o=5e3})=>{const[a,s]=O.useState([]);O.useEffect(()=>{gn.subscribe(u=>{if(u!=null&&u.dismiss){s(f=>f.map(d=>d.id===u.id?{...d,dismiss:!0}:d));return}setTimeout(()=>{kl.flushSync(()=>s(f=>f.findIndex(p=>p.id===u.id)!==-1?f.map(p=>p.id===u.id?{...p,...u}:p):[...f,u]))})})},[]);const l=u=>{s(f=>f.filter(d=>d.id!==u))};return T.jsx("ul",{className:G("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",RA[e]??RA["top-right"],r),children:T.jsx(Es,{initial:!1,children:a.map(u=>T.jsx(hi.li,{initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:`toast-${u.id}`,children:T.jsx(oX,{toastItem:u,title:u.title,content:u==null?void 0:u.description,icon:(u==null?void 0:u.icon)??void 0,design:(u==null?void 0:u.design)??t,autoDismiss:(u==null?void 0:u.autoDismiss)??i,dismissAfter:(u==null?void 0:u.dismissAfter)??o,removeToast:l,variant:u.type,theme:(u==null?void 0:u.theme)??n})},u.id))})})},oX=({toastItem:e,title:t="",content:n="",autoDismiss:r=!0,dismissAfter:i=5e3,theme:o="light",design:a="stack",icon:s,variant:l="neutral",removeToast:u})=>{var w,S,P,_,C,E,k;const f=O.useRef(0),d=O.useRef(0),p=O.useRef(),m=(M,D=i)=>{if(!(!r||i<0))return f.current=new Date().getTime(),setTimeout(()=>{typeof u=="function"&&u(M.id)},D)},g=()=>{clearTimeout(p.current),d.current=new Date().getTime()},v=()=>{p.current=m(e,i-(d.current-f.current))};O.useEffect(()=>{const M=i;return p.current=m(e,M),()=>{clearTimeout(p.current)}},[]),O.useEffect(()=>{!(e!=null&&e.dismiss)||typeof u!="function"||u(e.id)},[e]);const y=()=>{var M,D;typeof u=="function"&&((D=(M=e==null?void 0:e.action)==null?void 0:M.onClick)==null||D.call(M,()=>u(e.id)))};let x=null;return a==="stack"&&(x=T.jsx("div",{className:G("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg",o==="dark"?mh.dark:(w=mh.light)==null?void 0:w[l],LA.stack),onMouseEnter:g,onMouseLeave:v,children:e.type!=="custom"?T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:tp({variant:l,icon:s,theme:o})}),T.jsxs("div",{className:"flex flex-col items-start justify-start gap-0.5",children:[np({title:t,theme:o}),rp({content:n,theme:o}),((S=e==null?void 0:e.action)==null?void 0:S.label)&&typeof((P=e==null?void 0:e.action)==null?void 0:P.onClick)=="function"&&T.jsx("div",{className:"mt-2.5",children:Zb({actionLabel:(_=e==null?void 0:e.action)==null?void 0:_.label,actionType:((C=e==null?void 0:e.action)==null?void 0:C.type)??"button",onAction:y,theme:o})})]}),T.jsx("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:T.jsx("button",{className:G("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",gh[o]??gh.light),onClick:()=>{typeof u=="function"&&u(e.id)},children:T.jsx(ma,{})})})]}):(E=e==null?void 0:e.jsx)==null?void 0:E.call(e,{close:()=>u(e.id),action:e!=null&&e.action?{...e==null?void 0:e.action,onClick:y}:null})})),a==="inline"&&(x=T.jsxs("div",{className:G("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg",o==="dark"?mh.dark:(k=mh.light)==null?void 0:k[l],LA.inline),children:[T.jsx("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:tp({variant:l,icon:s,theme:o})}),T.jsxs("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[np({title:t,theme:o}),rp({content:n,theme:o})]}),T.jsx("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:T.jsx("button",{className:G("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",gh[o]??gh.light),onClick:()=>u(e.id),children:T.jsx(ma,{})})})]})),x},aX=rX(iX),sX={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"}},KD={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"}},HD={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"}},GD={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"}},lX={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"}},uX={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"}},cX={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"}},YD={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"}},qD={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"}},XD={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"}},ZD={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"}},fX={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"}},dX={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"}},hX={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"}},pX={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"}},mX={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},gX={sm:{0:"shrink-0",1:"shrink"},md:{0:"md:shrink-0",1:"md:shrink"},lg:{0:"lg:shrink-0",1:"lg:shrink"}},It=(e,t,n,r="sm")=>{var o,a,s,l,u;const i=[];switch(typeof e){case"object":for(const[d,p]of Object.entries(e))t[d]&&i.push(((o=t==null?void 0:t[d])==null?void 0:o[p])??((a=t==null?void 0:t[d])==null?void 0:a[n==null?void 0:n[d]])??"");break;case"string":case"number":const f=r;i.push(((s=t==null?void 0:t[f])==null?void 0:s[e])??((l=t==null?void 0:t[f])==null?void 0:l[n==null?void 0:n[f]])??"");break;default:if(e===void 0)break;i.push(((u=t==null?void 0:t[r])==null?void 0:u[n])??"");break}return i.join(" ")},fp=({className:e,cols:t,gap:n,gapX:r,gapY:i,align:o,justify:a,gridFlow:s,colsSubGrid:l=!1,rowsSubGrid:u=!1,autoRows:f=!1,autoCols:d=!1,children:p,...m})=>{const g=It(t,sX,1),v=It(n,KD,"sm"),y=It(r,HD,""),x=It(i,GD,""),w=It(o,qD,""),S=It(a,YD,""),P=It(s,cX,"");return T.jsx("div",{className:G("grid",{"grid-cols-subgrid":l,"grid-rows-subgrid":u,"auto-cols-auto":d,"auto-rows-auto":f},g,v,y,x,w,S,P,e),...m,children:p})},yX=({className:e,children:t,colSpan:n,colStart:r,alignSelf:i,justifySelf:o,...a})=>{const s=It(n,lX,0),l=It(r,uX,0),u=It(i,XD,""),f=It(o,ZD,"");return T.jsx("div",{className:G(s,l,u,f,e),...a,children:t})};fp.Item=yX;const px=O.createContext({}),vX=()=>O.useContext(px),w1=({containerType:e="flex",gap:t="sm",gapX:n,gapY:r,direction:i,justify:o,align:a,wrap:s,cols:l,className:u,children:f,...d})=>{if(e==="grid")return T.jsx(px.Provider,{value:{containerType:e},children:T.jsx(fp,{className:u,gap:t,gapX:n,gapY:r,cols:l,children:f,align:a,justify:o,...d})});const p=It(s,dX,""),m=It(t,KD,"sm"),g=It(n,HD,""),v=It(r,GD,""),y=It(i,fX,""),x=It(o,YD,""),w=It(a,qD,""),S=G("flex",p,m,g,v,y,x,w,u),P=()=>e==="flex"?T.jsx("div",{className:S,children:f}):T.jsx(fp,{className:u,gap:t,gapX:n,gapY:r,cols:l,children:f,align:a,justify:o,...d});return T.jsx(px.Provider,{value:{containerType:e,cols:l},children:P()})},JD=({grow:e,shrink:t,order:n,alignSelf:r,justifySelf:i,className:o,children:a,...s})=>{const{containerType:l,cols:u}=vX();if(l==="grid")return T.jsx(fp.Item,{className:o,alignSelf:r,justifySelf:i,children:a,...s});const f=It(r,XD,""),d=It(i,ZD,""),p=It(e,mX,0),m=It(t,gX,0),g=It(n,pX,0),v=It(u,hX,1);return T.jsx("div",{className:G("box-border",p,m,g,f,d,v,o),children:a})};w1.Item=JD;w1.displayName="Container";JD.displayName="Container.Item";const bX=({design:e="inline",theme:t="light",variant:n="neutral",className:r="",title:i="",content:o="",icon:a=null,onClose:s,action:l={label:"",onClick:()=>{},type:"link"}})=>{var m,g;const u=()=>{typeof s=="function"&&s()},f={light:{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"},dark:"bg-background-inverse ring-background-inverse"},d={light:"text-icon-secondary",dark:"text-icon-inverse"},p=()=>{var v;(v=l==null?void 0:l.onClick)==null||v.call(l,u)};return e==="stack"?T.jsx("div",{className:G("flex items-center justify-start p-4 gap-2 relative ring-1 rounded-md shadow-lg",t==="dark"?f.dark:(m=f.light)==null?void 0:m[n],r),children:T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:tp({variant:n,icon:a,theme:t})}),T.jsxs("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-7",children:[np({title:i,theme:t}),rp({content:o,theme:t}),(l==null?void 0:l.label)&&typeof(l==null?void 0:l.onClick)=="function"&&T.jsx("div",{className:"mt-2.5",children:Zb({actionLabel:l==null?void 0:l.label,actionType:(l==null?void 0:l.type)??"button",onAction:p,theme:t})})]}),T.jsx("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:T.jsx("button",{className:G("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",d[t]??d.light),onClick:()=>u(),"aria-label":"Close alert",children:T.jsx(ma,{})})})]})}):T.jsxs("div",{className:G("flex items-center justify-between p-3 gap-2 relative ring-1 rounded-lg shadow-lg",t==="dark"?f.dark:(g=f.light)==null?void 0:g[n],r),children:[T.jsxs("div",{className:"flex items-center justify-start gap-2",children:[T.jsx("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:tp({variant:n,icon:a,theme:t})}),T.jsxs("p",{className:"content-start space-x-1 my-0 mr-10 px-1",children:[np({title:i,theme:t,inline:!0}),rp({content:o,theme:t,inline:!0})]})]}),T.jsxs("div",{className:"flex h-full justify-start gap-4 [&_svg]:size-4",children:[(l==null?void 0:l.label)&&typeof(l==null?void 0:l.onClick)=="function"&&T.jsx("div",{className:"self-center flex h-5",children:Zb({actionLabel:l==null?void 0:l.label,actionType:(l==null?void 0:l.type)??"button",onAction:p,theme:t})}),typeof s=="function"&&T.jsx("button",{className:G("self-start bg-transparent m-0 border-none p-0.5 focus:outline-none active:outline-none cursor-pointer size-5",d[t]??d.light),onClick:()=>u(),"aria-label":"Close alert",children:T.jsx(ma,{})})]})]})};function xX(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wX=xX(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n{t.focus(()=>{const n=document.activeElement,r=t.getRootElement();r===null||n!==null&&r.contains(n)||r.focus({preventScroll:!0})},{defaultSelection:e})},[e,t]),null}function OX(e){return{}}const _1={},CX={},ds={},Ol={},mx={},Cl={},S1={},gx={},Zc={},Jc={},is={},O1={},C1={},eI={},P1={},PX={},A1={},AX={},tI={},nI={},Qc={},TX={},T1={},rI={},iI={},oI={},aI={},sI={},EX={},kX={},E1={},k1={},yx={},MX={},jX={},yh={},vh={},NX={},$X={},DX={},vi=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,IX=vi&&"documentMode"in document?document.documentMode:null,ii=vi&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ha=vi&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),dp=!(!vi||!("InputEvent"in window)||IX)&&"getTargetRanges"in new window.InputEvent("input"),M1=vi&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),ig=vi&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,RX=vi&&/Android/.test(navigator.userAgent),lI=vi&&/^(?=.*Chrome).*/i.test(navigator.userAgent),LX=vi&&RX&&lI,j1=vi&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!lI,Zf=1,Aa=3,xs=0,uI=1,Dl=2,BX=0,FX=1,WX=2,hp=4,pp=8,N1=128,zX=112|(3|hp|pp)|N1,$1=1,D1=2,I1=3,R1=4,L1=5,B1=6,og=M1||ig||j1?" ":"​",Co=` + +`,VX=ha?" ":og,cI="֑-߿יִ-﷽ﹰ-ﻼ",fI="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",UX=new RegExp("^[^"+fI+"]*["+cI+"]"),KX=new RegExp("^[^"+cI+"]*["+fI+"]"),vo={bold:1,code:16,highlight:N1,italic:2,strikethrough:hp,subscript:32,superscript:64,underline:pp},HX={directionless:1,unmergeable:2},BA={center:D1,end:B1,justify:R1,left:$1,right:I1,start:L1},GX={[D1]:"center",[B1]:"end",[R1]:"justify",[$1]:"left",[I1]:"right",[L1]:"start"},YX={normal:0,segmented:2,token:1},qX={[BX]:"normal",[WX]:"segmented",[FX]:"token"};function XX(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var we=XX(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;nZX;try{Pr(e,()=>{const i=Ee()||function(p){return p.getEditorState().read(()=>{const m=Ee();return m!==null?m.clone():null})}(e),o=new Map,a=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let u=!1,f="";for(let p=0;p0){let P=0;for(let _=0;_0)for(const[p,m]of o)if(ge(m)){const g=m.getChildrenKeys();let v=p.firstChild;for(let y=0;y0){for(let p=0;p{dI(e,t,n)})}function FA(e,t){const n=e.__mode,r=e.__format,i=e.__style,o=t.__mode,a=t.__format,s=t.__style;return!(n!==null&&n!==o||r!==null&&r!==a||i!==null&&i!==s)}function WA(e,t){const n=e.mergeWithSibling(t),r=tn()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function zA(e){let t,n,r=e;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&_e(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(FA(t,r)){r=WA(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&_e(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(FA(r,n)){r=WA(r,n);break}break}n.remove()}}else r.remove()}function tZ(e){return VA(e.anchor),VA(e.focus),e}function VA(e){for(;e.type==="element";){const t=e.getNode(),n=e.offset;let r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),_e(r)){e.set(r.__key,i?r.getTextContentSize():0,"text");break}if(!ge(r))break;e.set(r.__key,i?r.getChildrenSize():0,"element")}}let nZ=1;const rZ=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function mI(e){const t=document.activeElement;if(t===null)return!1;const n=t.nodeName;return Nt(lg(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&sg(t)==null)}function ag(e,t,n){const r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!mI(t)&&gI(t)===e}catch{return!1}}function W1(e){return e instanceof bg}function gI(e){let t=e;for(;t!=null;){const n=sg(t);if(W1(n))return n;t=cg(t)}return null}function sg(e){return e?e.__lexicalEditor:null}function sl(e){return e.isToken()||e.isSegmented()}function iZ(e){return e.nodeType===Aa}function gp(e){let t=e;for(;t!=null;){if(iZ(t))return t;t=t.firstChild}return null}function bx(e,t,n){const r=vo[t];if(n!==null&&(e&r)==(n&r))return e;let i=e^r;return t==="subscript"?i&=~vo.superscript:t==="superscript"&&(i&=~vo.subscript),i}function oZ(e,t){if(t!=null)return void(e.__key=t);sr(),HI();const n=tn(),r=No(),i=""+nZ++;r._nodeMap.set(i,e),ge(e)?n._dirtyElements.set(i,!0):n._dirtyLeaves.add(i),n._cloneNotNeeded.add(i),n._dirtyType=uI,e.__key=i}function hs(e){const t=e.getParent();if(t!==null){const n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),o=e.getNextSibling();if(i===null)if(o!==null){const a=o.getWritable();r.__first=o.__key,a.__prev=null}else r.__first=null;else{const a=i.getWritable();if(o!==null){const s=o.getWritable();s.__prev=a.__key,a.__next=s.__key}else a.__next=null;n.__prev=null}if(o===null)if(i!==null){const a=i.getWritable();r.__last=i.__key,a.__next=null}else r.__last=null;else{const a=o.getWritable();if(i!==null){const s=i.getWritable();s.__next=a.__key,a.__prev=s.__key}else a.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function yp(e){HI();const t=e.getLatest(),n=t.__parent,r=No(),i=tn(),o=r._nodeMap,a=i._dirtyElements;n!==null&&function(l,u,f){let d=l;for(;d!==null;){if(f.has(d))return;const p=u.get(d);if(p===void 0)break;f.set(d,!1),d=p.__parent}}(n,o,a);const s=t.__key;i._dirtyType=uI,ge(e)?a.set(s,!0):i._dirtyLeaves.add(s)}function jn(e){sr();const t=tn(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=bn(n);r!==null&&r.getWritable()}if(e!==null){const r=bn(e);r!==null&&r.getWritable()}}}function aa(){return td()?null:tn()._compositionKey}function bn(e,t){const n=(t||No())._nodeMap.get(e);return n===void 0?null:n}function yI(e,t){const n=e[`__lexicalKey_${tn()._key}`];return n!==void 0?bn(n,t):null}function lg(e,t){let n=e;for(;n!=null;){const r=yI(n,t);if(r!==null)return r;n=cg(n)}return null}function vI(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function UA(e){return e.read(()=>Un().getTextContent())}function Un(){return bI(No())}function bI(e){return e._nodeMap.get("root")}function Po(e){sr();const t=No();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function gl(e){const t=tn(),n=function(r,i){let o=r;for(;o!=null;){const a=o[`__lexicalKey_${i._key}`];if(a!==void 0)return a;o=cg(o)}return null}(e,t);return n===null?e===t.getRootElement()?bn("root"):null:bn(n)}function KA(e,t){return t?e.getTextContentSize():0}function xI(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function z1(e){const t=[];let n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function wI(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function _I(e){return e.nodeType===Aa?e.nodeValue:null}function V1(e,t,n){const r=Li(t._window);if(r===null)return;const i=r.anchorNode;let{anchorOffset:o,focusOffset:a}=r;if(i!==null){let s=_I(i);const l=lg(i);if(s!==null&&_e(l)){if(s===og&&n){const u=n.length;s=n,o=u,a=u}s!==null&&U1(l,s,o,a,e)}}}function U1(e,t,n,r,i){let o=e;if(o.isAttached()&&(i||!o.isDirty())){const a=o.isComposing();let s=t;(a||i)&&t[t.length-1]===og&&(s=t.slice(0,-1));const l=o.getTextContent();if(i||s!==l){if(s===""){if(jn(null),M1||ig||j1)o.remove();else{const v=tn();setTimeout(()=>{v.update(()=>{o.isAttached()&&o.remove()})},20)}return}const u=o.getParent(),f=gg(),d=o.getTextContentSize(),p=aa(),m=o.getKey();if(o.isToken()||p!==null&&m===p&&!a||xe(f)&&(u!==null&&!u.canInsertTextBefore()&&f.anchor.offset===0||f.anchor.key===e.__key&&f.anchor.offset===0&&!o.canInsertTextBefore()&&!a||f.focus.key===e.__key&&f.focus.offset===d&&!o.canInsertTextAfter()&&!a))return void o.markDirty();const g=Ee();if(!xe(g)||n===null||r===null)return void o.setTextContent(s);if(g.setTextNodeRange(o,n,o,r),o.isSegmented()){const v=En(o.getTextContent());o.replace(v),o=v}o.setTextContent(s)}}}function aZ(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;const n=e.anchor.offset,r=t.getParentOrThrow(),i=t.isToken();return n===0?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||i||function(o){const a=o.getPreviousSibling();return(_e(a)||ge(a)&&a.isInline())&&!a.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||i)}function HA(e){return e==="ArrowLeft"}function GA(e){return e==="ArrowRight"}function xc(e,t){return ii?e:t}function YA(e){return e==="Enter"}function nc(e){return e==="Backspace"}function rc(e){return e==="Delete"}function qA(e,t,n){return e.toLowerCase()==="a"&&xc(t,n)}function sZ(){const e=Un();Po(tZ(e.select(0,e.getChildrenSize())))}function Ec(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;const i=e[t];if(typeof i=="string"){const o=mp(i);return n[t]=o,o}return i}function K1(e,t,n,r,i){if(n.size===0)return;const o=r.__type,a=r.__key,s=t.get(o);s===void 0&&we(33,o);const l=s.klass;let u=e.get(l);u===void 0&&(u=new Map,e.set(l,u));const f=u.get(a),d=f==="destroyed"&&i==="created";(f===void 0||d)&&u.set(a,d?"updated":i)}function XA(e,t,n){const r=e.getParent();let i=n,o=e;return r!==null&&(t&&n===0?(i=o.getIndexWithinParent(),o=r):t||n!==o.getChildrenSize()||(i=o.getIndexWithinParent()+1,o=r)),o.getChildAtIndex(t?i-1:i)}function xx(e,t){const n=e.offset;if(e.type==="element")return XA(e.getNode(),t,n);{const r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){const i=t?r.getPreviousSibling():r.getNextSibling();return i===null?XA(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}function SI(e){const t=fg(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function Oe(e,t,n){return qI(e,t,n)}function ug(e){return!Xn(e)&&!e.isLastChild()&&!e.isInline()}function vp(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&we(75,t),n}function cg(e){const t=e.assignedSlot||e.parentElement;return t!==null&&t.nodeType===11?t.host:t}function wx(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function fg(e){const t=e._window;return t===null&&we(78),t}function lZ(e){let t=e.getParentOrThrow();for(;t!==null;){if(Jf(t))return t;t=t.getParentOrThrow()}return t}function Jf(e){return Xn(e)||ge(e)&&e.isShadowRoot()}function dg(e){const t=tn(),n=e.constructor.getType(),r=t._nodes.get(n);r===void 0&&we(97);const i=r.replace;if(i!==null){const o=i(e);return o instanceof e.constructor||we(98),o}return e}function Hv(e,t){!Xn(e.getParent())||ge(t)||Nt(t)||we(99)}function Gv(e){return(Nt(e)||ge(e)&&!e.canBeEmpty())&&!e.isInline()}function H1(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}function uZ(e,t,n){let r=e._blockCursorElement;if(xe(n)&&n.isCollapsed()&&n.anchor.type==="element"&&t.contains(document.activeElement)){const i=n.anchor,o=i.getNode(),a=i.offset;let s=!1,l=null;if(a===o.getChildrenSize())Gv(o.getChildAtIndex(a-1))&&(s=!0);else{const u=o.getChildAtIndex(a);if(Gv(u)){const f=u.getPreviousSibling();(f===null||Gv(f))&&(s=!0,l=e.getElementByKey(u.__key))}}if(s){const u=e.getElementByKey(o.__key);return r===null&&(e._blockCursorElement=r=function(f){const d=f.theme,p=document.createElement("div");p.contentEditable="false",p.setAttribute("data-lexical-cursor","true");let m=d.blockCursor;if(m!==void 0){if(typeof m=="string"){const g=mp(m);m=d.blockCursor=g}m!==void 0&&p.classList.add(...m)}return p}(e._config)),t.style.caretColor="transparent",void(l===null?u.appendChild(r):u.insertBefore(r,l))}}r!==null&&H1(r,e,t)}function Li(e){return vi?(e||window).getSelection():null}function G1(e){return e.nodeType===1}function cZ(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 e.nodeName.match(t)!==null}function ZA(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 e.nodeName.match(t)!==null}function ll(e){if(Xn(e)||Nt(e)&&!e.isInline())return!0;if(!ge(e)||Jf(e))return!1;const t=e.getFirstChild(),n=t===null||jc(t)||_e(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function Yv(e,t){let n=e;for(;n!==null&&n.getParent()!==null&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const JA=new WeakMap,fZ=new Map;function dZ(e){if(!e._readOnly&&e.isEmpty())return fZ;e._readOnly||we(192);let t=JA.get(e);if(!t){t=new Map,JA.set(e,t);for(const[n,r]of e._nodeMap){const i=r.__type;let o=t.get(i);o||(o=new Map,t.set(i,o)),o.set(n,r)}}return t}function OI(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function CI(e,t,n,r,i,o){let a=e.getFirstChild();for(;a!==null;){const s=a.__key;a.__parent===t&&(ge(a)&&CI(a,s,n,r,i,o),n.has(s)||o.delete(s),i.push(s)),a=a.getNextSibling()}}let _a,er,ef,hg,_x,Sx,ws,pi,Ox,tf,ln="",qn="",Si=null,oi="",ao="",PI=!1,nf=!1,Uh=null;function bp(e,t){const n=ws.get(e);if(t!==null){const r=Ax(e);r.parentNode===t&&t.removeChild(r)}if(pi.has(e)||er._keyToDOMMap.delete(e),ge(n)){const r=wp(n,ws);Cx(r,0,r.length-1,null)}n!==void 0&&K1(tf,ef,hg,n,"destroyed")}function Cx(e,t,n,r){let i=t;for(;i<=n;++i){const o=e[i];o!==void 0&&bp(o,r)}}function Ka(e,t){e.setProperty("text-align",t)}const hZ="40px";function AI(e,t){const n=_a.theme.indent;if(typeof n=="string"){const i=e.classList.contains(n);t>0&&!i?e.classList.add(n):t<1&&i&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||hZ;e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${r})`)}function TI(e,t){const n=e.style;t===0?Ka(n,""):t===$1?Ka(n,"left"):t===D1?Ka(n,"center"):t===I1?Ka(n,"right"):t===R1?Ka(n,"justify"):t===L1?Ka(n,"start"):t===B1&&Ka(n,"end")}function xp(e,t,n){const r=pi.get(e);r===void 0&&we(60);const i=r.createDOM(_a,er);if(function(o,a,s){const l=s._keyToDOMMap;a["__lexicalKey_"+s._key]=o,l.set(o,a)}(e,i,er),_e(r)?i.setAttribute("data-lexical-text","true"):Nt(r)&&i.setAttribute("data-lexical-decorator","true"),ge(r)){const o=r.__indent,a=r.__size;if(o!==0&&AI(i,o),a!==0){const l=a-1;(function(u,f,d,p){const m=qn;qn="",Px(u,d,0,f,p,null),kI(d,p),qn=m})(wp(r,pi),l,r,i)}const s=r.__format;s!==0&&TI(i,s),r.isInline()||EI(null,r,i),ug(r)&&(ln+=Co,ao+=Co)}else{const o=r.getTextContent();if(Nt(r)){const a=r.decorate(er,_a);a!==null&&MI(e,a),i.contentEditable="false"}else _e(r)&&(r.isDirectionless()||(qn+=o));ln+=o,ao+=o}if(t!==null)if(n!=null)t.insertBefore(i,n);else{const o=t.__lexicalLineBreak;o!=null?t.insertBefore(i,o):t.appendChild(i)}return K1(tf,ef,hg,r,"created"),i}function Px(e,t,n,r,i,o){const a=ln;ln="";let s=n;for(;s<=r;++s){xp(e[s],i,o);const l=pi.get(e[s]);l!==null&&_e(l)&&(Si===null&&(Si=l.getFormat()),oi===""&&(oi=l.getStyle()))}ug(t)&&(ln+=Co),i.__lexicalTextContent=ln,ln=a+ln}function QA(e,t){const n=t.get(e);return jc(n)||Nt(n)&&n.isInline()}function EI(e,t,n){const r=e!==null&&(e.__size===0||QA(e.__last,ws)),i=t.__size===0||QA(t.__last,pi);if(r){if(!i){const o=n.__lexicalLineBreak;if(o!=null)try{n.removeChild(o)}catch(a){if(typeof a=="object"&&a!=null){const s=`${a.toString()} Parent: ${n.tagName}, child: ${o.tagName}.`;throw new Error(s)}throw a}n.__lexicalLineBreak=null}}else if(i){const o=document.createElement("br");n.__lexicalLineBreak=o,n.appendChild(o)}}function kI(e,t){const n=t.__lexicalDirTextContent,r=t.__lexicalDir;if(n!==qn||r!==Uh){const o=qn==="",a=o?Uh:(i=qn,UX.test(i)?"rtl":KX.test(i)?"ltr":null);if(a!==r){const s=t.classList,l=_a.theme;let u=r!==null?l[r]:void 0,f=a!==null?l[a]:void 0;if(u!==void 0){if(typeof u=="string"){const d=mp(u);u=l[r]=d}s.remove(...u)}if(a===null||o&&a==="ltr")t.removeAttribute("dir");else{if(f!==void 0){if(typeof f=="string"){const d=mp(f);f=l[a]=d}f!==void 0&&s.add(...f)}t.dir=a}nf||(e.getWritable().__dir=a)}Uh=a,t.__lexicalDirTextContent=qn,t.__lexicalDir=a}var i}function pZ(e,t,n){const r=qn;var i;qn="",Si=null,oi="",function(o,a,s){const l=ln,u=o.__size,f=a.__size;if(ln="",u===1&&f===1){const d=o.__first,p=a.__first;if(d===p)wc(d,s);else{const g=Ax(d),v=xp(p,null,null);try{s.replaceChild(v,g)}catch(y){if(typeof y=="object"&&y!=null){const x=`${y.toString()} Parent: ${s.tagName}, new child: {tag: ${v.tagName} key: ${p}}, old child: {tag: ${g.tagName}, key: ${d}}.`;throw new Error(x)}throw y}bp(d,null)}const m=pi.get(p);_e(m)&&(Si===null&&(Si=m.getFormat()),oi===""&&(oi=m.getStyle()))}else{const d=wp(o,ws),p=wp(a,pi);if(u===0)f!==0&&Px(p,a,0,f-1,s,null);else if(f===0){if(u!==0){const m=s.__lexicalLineBreak==null;Cx(d,0,u-1,m?null:s),m&&(s.textContent="")}}else(function(m,g,v,y,x,w){const S=y-1,P=x-1;let _,C,E=(D=w,D.firstChild),k=0,M=0;for(var D;k<=S&&M<=P;){const B=g[k],L=v[M];if(B===L)E=qv(wc(L,w)),k++,M++;else{_===void 0&&(_=new Set(g)),C===void 0&&(C=new Set(v));const W=C.has(B),z=_.has(L);if(W)if(z){const H=vp(er,L);H===E?E=qv(wc(L,w)):(E!=null?w.insertBefore(H,E):w.appendChild(H),wc(L,w)),k++,M++}else xp(L,w,E),M++;else E=qv(Ax(B)),bp(B,w),k++}const F=pi.get(L);F!==null&&_e(F)&&(Si===null&&(Si=F.getFormat()),oi===""&&(oi=F.getStyle()))}const $=k>S,N=M>P;if($&&!N){const B=v[P+1];Px(v,m,M,P,w,B===void 0?null:er.getElementByKey(B))}else N&&!$&&Cx(g,k,S,w)})(a,d,p,u,f,s)}ug(a)&&(ln+=Co),s.__lexicalTextContent=ln,ln=l+ln}(e,t,n),kI(t,n),$x(i=t)&&Si!=null&&Si!==i.__textFormat&&!nf&&(i.setTextFormat(Si),i.setTextStyle(oi)),function(o){$x(o)&&oi!==""&&oi!==o.__textStyle&&!nf&&o.setTextStyle(oi)}(t),qn=r}function wp(e,t){const n=[];let r=e.__first;for(;r!==null;){const i=t.get(r);i===void 0&&we(101),n.push(r),r=i.__next}return n}function wc(e,t){const n=ws.get(e);let r=pi.get(e);n!==void 0&&r!==void 0||we(61);const i=PI||Sx.has(e)||_x.has(e),o=vp(er,e);if(n===r&&!i){if(ge(n)){const a=o.__lexicalTextContent;a!==void 0&&(ln+=a,ao+=a);const s=o.__lexicalDirTextContent;s!==void 0&&(qn+=s)}else{const a=n.getTextContent();_e(n)&&!n.isDirectionless()&&(qn+=a),ao+=a,ln+=a}return o}if(n!==r&&i&&K1(tf,ef,hg,r,"updated"),r.updateDOM(n,o,_a)){const a=xp(e,null,null);return t===null&&we(62),t.replaceChild(a,o),bp(e,null),a}if(ge(n)&&ge(r)){const a=r.__indent;a!==n.__indent&&AI(o,a);const s=r.__format;s!==n.__format&&TI(o,s),i&&(pZ(n,r,o),Xn(r)||r.isInline()||EI(n,r,o)),ug(r)&&(ln+=Co,ao+=Co)}else{const a=r.getTextContent();if(Nt(r)){const s=r.decorate(er,_a);s!==null&&MI(e,s)}else _e(r)&&!r.isDirectionless()&&(qn+=a);ln+=a,ao+=a}if(!nf&&Xn(r)&&r.__cachedText!==ao){const a=r.getWritable();a.__cachedText=ao,r=a}return o}function MI(e,t){let n=er._pendingDecorators;const r=er._decorators;if(n===null){if(r[e]===t)return;n=vI(er)}n[e]=t}function qv(e){let t=e.nextSibling;return t!==null&&t===er._blockCursorElement&&(t=t.nextSibling),t}function mZ(e,t,n,r,i,o){ln="",ao="",qn="",PI=r===Dl,Uh=null,er=n,_a=n._config,ef=n._nodes,hg=er._listeners.mutation,_x=i,Sx=o,ws=e._nodeMap,pi=t._nodeMap,nf=t._readOnly,Ox=new Map(n._keyToDOMMap);const a=new Map;return tf=a,wc("root",null),er=void 0,ef=void 0,_x=void 0,Sx=void 0,ws=void 0,pi=void 0,_a=void 0,Ox=void 0,tf=void 0,a}function Ax(e){const t=Ox.get(e);return t===void 0&&we(75,e),t}const ro=Object.freeze({}),Tx=30,Ex=[["keydown",function(e,t){if(kc=e.timeStamp,jI=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:i,metaKey:o,altKey:a}=e;Oe(t,eI,e)||n!=null&&(function(s,l,u,f){return GA(s)&&!l&&!f&&!u}(n,i,a,o)?Oe(t,P1,e):function(s,l,u,f,d){return GA(s)&&!f&&!u&&(l||d)}(n,i,r,a,o)?Oe(t,PX,e):function(s,l,u,f){return HA(s)&&!l&&!f&&!u}(n,i,a,o)?Oe(t,A1,e):function(s,l,u,f,d){return HA(s)&&!f&&!u&&(l||d)}(n,i,r,a,o)?Oe(t,AX,e):function(s,l,u){return function(f){return f==="ArrowUp"}(s)&&!l&&!u}(n,i,o)?Oe(t,tI,e):function(s,l,u){return function(f){return f==="ArrowDown"}(s)&&!l&&!u}(n,i,o)?Oe(t,nI,e):function(s,l){return YA(s)&&l}(n,r)?(Mc=!0,Oe(t,Qc,e)):function(s){return s===" "}(n)?Oe(t,TX,e):function(s,l){return ii&&l&&s.toLowerCase()==="o"}(n,i)?(e.preventDefault(),Mc=!0,Oe(t,Ol,!0)):function(s,l){return YA(s)&&!l}(n,r)?(Mc=!1,Oe(t,Qc,e)):function(s,l,u,f){return ii?!l&&!u&&(nc(s)||s.toLowerCase()==="h"&&f):!(f||l||u)&&nc(s)}(n,a,o,i)?nc(n)?Oe(t,T1,e):(e.preventDefault(),Oe(t,ds,!0)):function(s){return s==="Escape"}(n)?Oe(t,rI,e):function(s,l,u,f,d){return ii?!(u||f||d)&&(rc(s)||s.toLowerCase()==="d"&&l):!(l||f||d)&&rc(s)}(n,i,r,a,o)?rc(n)?Oe(t,iI,e):(e.preventDefault(),Oe(t,ds,!1)):function(s,l,u){return nc(s)&&(ii?l:u)}(n,a,i)?(e.preventDefault(),Oe(t,Zc,!0)):function(s,l,u){return rc(s)&&(ii?l:u)}(n,a,i)?(e.preventDefault(),Oe(t,Zc,!1)):function(s,l){return ii&&l&&nc(s)}(n,o)?(e.preventDefault(),Oe(t,Jc,!0)):function(s,l){return ii&&l&&rc(s)}(n,o)?(e.preventDefault(),Oe(t,Jc,!1)):function(s,l,u,f){return s.toLowerCase()==="b"&&!l&&xc(u,f)}(n,a,o,i)?(e.preventDefault(),Oe(t,is,"bold")):function(s,l,u,f){return s.toLowerCase()==="u"&&!l&&xc(u,f)}(n,a,o,i)?(e.preventDefault(),Oe(t,is,"underline")):function(s,l,u,f){return s.toLowerCase()==="i"&&!l&&xc(u,f)}(n,a,o,i)?(e.preventDefault(),Oe(t,is,"italic")):function(s,l,u,f){return s==="Tab"&&!l&&!u&&!f}(n,a,i,o)?Oe(t,oI,e):function(s,l,u,f){return s.toLowerCase()==="z"&&!l&&xc(u,f)}(n,r,o,i)?(e.preventDefault(),Oe(t,O1,void 0)):function(s,l,u,f){return ii?s.toLowerCase()==="z"&&u&&l:s.toLowerCase()==="y"&&f||s.toLowerCase()==="z"&&f&&l}(n,r,o,i)?(e.preventDefault(),Oe(t,C1,void 0)):mg(t._editorState._selection)?function(s,l,u,f){return!l&&s.toLowerCase()==="c"&&(ii?u:f)}(n,r,o,i)?(e.preventDefault(),Oe(t,E1,e)):function(s,l,u,f){return!l&&s.toLowerCase()==="x"&&(ii?u:f)}(n,r,o,i)?(e.preventDefault(),Oe(t,k1,e)):qA(n,o,i)&&(e.preventDefault(),Oe(t,yx,e)):!ha&&qA(n,o,i)&&(e.preventDefault(),Oe(t,yx,e)),function(s,l,u,f){return s||l||u||f}(i,r,a,o)&&Oe(t,DX,e))}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;n instanceof Node&&r!=="touch"&&Pr(t,()=>{Nt(lg(n))||(Mx=!0)})}],["compositionstart",function(e,t){Pr(t,()=>{const n=Ee();if(xe(n)&&!t.isComposing()){const r=n.anchor,i=n.anchor.getNode();jn(r.key),(e.timeStamp{Xv(t,e.data)})}],["input",function(e,t){e.stopPropagation(),Pr(t,()=>{const n=Ee(),r=e.data,i=II(e);if(r!=null&&xe(n)&&DI(n,i,r,e.timeStamp,!1)){ic&&(Xv(t,r),ic=!1);const o=n.anchor.getNode(),a=Li(t._window);if(a===null)return;const s=n.isBackward(),l=s?n.anchor.offset:n.focus.offset,u=s?n.focus.offset:n.anchor.offset;dp&&!n.isCollapsed()&&_e(o)&&a.anchorNode!==null&&o.getTextContent().slice(0,l)+r+o.getTextContent().slice(l+u)===_I(a.anchorNode)||Oe(t,Cl,r);const f=r.length;ha&&f>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=f),M1||ig||j1||!t.isComposing()||(kc=0,jn(null))}else V1(!1,t,r!==null?r:void 0),ic&&(Xv(t,r||void 0),ic=!1);sr(),hI(tn())}),ul=null}],["click",function(e,t){Pr(t,()=>{const n=Ee(),r=Li(t._window),i=gg();if(r){if(xe(n)){const o=n.anchor,a=o.getNode();o.type==="element"&&o.offset===0&&n.isCollapsed()&&!Xn(a)&&Un().getChildrenSize()===1&&a.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i)?(r.removeAllRanges(),n.dirty=!0):e.detail===3&&!n.isCollapsed()&&a!==n.focus.getNode()&&(ge(a)?a.select(0):a.getParentOrThrow().select(0))}else if(e.pointerType==="touch"){const o=r.anchorNode;if(o!==null){const a=o.nodeType;(a===Zf||a===Aa)&&Po(X1(i,r,t,e))}}}Oe(t,CX,e)})}],["cut",ro],["copy",ro],["dragstart",ro],["dragover",ro],["dragend",ro],["paste",ro],["focus",ro],["blur",ro],["drop",ro]];dp&&Ex.push(["beforeinput",(e,t)=>function(n,r){const i=n.inputType,o=II(n);i==="deleteCompositionText"||ha&&SI(r)||i!=="insertCompositionText"&&Pr(r,()=>{const a=Ee();if(i==="deleteContentBackward"){if(a===null){const m=gg();if(!xe(m))return;Po(m.clone())}if(xe(a)){const m=a.anchor.key===a.focus.key;if(s=n.timeStamp,jI==="MediaLast"&&s{Pr(r,()=>{jn(null)})},Tx),xe(a)){const g=a.anchor.getNode();g.markDirty(),a.format=g.getFormat(),_e(g)||we(142),a.style=g.getStyle()}}else{jn(null),n.preventDefault();const g=a.anchor.getNode().getTextContent(),v=a.anchor.offset===0&&a.focus.offset===g.length;LX&&m&&!v||Oe(r,ds,!0)}return}}var s;if(!xe(a))return;const l=n.data;ul!==null&&V1(!1,r,ul),a.dirty&&ul===null||!a.isCollapsed()||Xn(a.anchor.getNode())||o===null||a.applyDOMRange(o),ul=null;const u=a.anchor,f=a.focus,d=u.getNode(),p=f.getNode();if(i!=="insertText"&&i!=="insertTranspose")switch(n.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Oe(r,Cl,n);break;case"insertFromComposition":jn(null),Oe(r,Cl,n);break;case"insertLineBreak":jn(null),Oe(r,Ol,!1);break;case"insertParagraph":jn(null),Mc&&!ig?(Mc=!1,Oe(r,Ol,!1)):Oe(r,mx,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Oe(r,S1,n);break;case"deleteByComposition":(function(m,g){return m!==g||ge(m)||ge(g)||!m.isToken()||!g.isToken()})(d,p)&&Oe(r,gx,n);break;case"deleteByDrag":case"deleteByCut":Oe(r,gx,n);break;case"deleteContent":Oe(r,ds,!1);break;case"deleteWordBackward":Oe(r,Zc,!0);break;case"deleteWordForward":Oe(r,Zc,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Oe(r,Jc,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Oe(r,Jc,!1);break;case"formatStrikeThrough":Oe(r,is,"strikethrough");break;case"formatBold":Oe(r,is,"bold");break;case"formatItalic":Oe(r,is,"italic");break;case"formatUnderline":Oe(r,is,"underline");break;case"historyUndo":Oe(r,O1,void 0);break;case"historyRedo":Oe(r,C1,void 0)}else{if(l===` +`)n.preventDefault(),Oe(r,Ol,!1);else if(l===Co)n.preventDefault(),Oe(r,mx,void 0);else if(l==null&&n.dataTransfer){const m=n.dataTransfer.getData("text/plain");n.preventDefault(),a.insertRawText(m)}else l!=null&&DI(a,o,l,n.timeStamp,!0)?(n.preventDefault(),Oe(r,Cl,l)):ul=l;NI=n.timeStamp}})}(e,t)]);let kc=0,jI=null,NI=0,ul=null;const _p=new WeakMap;let kx=!1,Mx=!1,Mc=!1,ic=!1,$I=[0,"",0,"root",0];function DI(e,t,n,r,i){const o=e.anchor,a=e.focus,s=o.getNode(),l=tn(),u=Li(l._window),f=u!==null?u.anchorNode:null,d=o.key,p=l.getElementByKey(d),m=n.length;return d!==a.key||!_e(s)||(!i&&(!dp||NI1||(i||!dp)&&p!==null&&!s.isComposing()&&f!==gp(p)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||aZ(e,s)}function eT(e,t){return e!==null&&e.nodeValue!==null&&e.nodeType===Aa&&t!==0&&t!==e.nodeValue.length}function tT(e,t,n){const{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:a}=e;kx&&(kx=!1,eT(r,i)&&eT(o,a))||Pr(t,()=>{if(!n)return void Po(null);if(!ag(t,r,o))return;const s=Ee();if(xe(s)){const l=s.anchor,u=l.getNode();if(s.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(s.dirty=!0);const f=fg(t).event,d=f?f.timeStamp:performance.now(),[p,m,g,v,y]=$I,x=Un(),w=t.isComposing()===!1&&x.getTextContent()==="";if(d{const u=gg(),f=n.anchorNode;if(f===null)return;const d=f.nodeType;d!==Zf&&d!==Aa||Po(X1(u,n,r,e))}));const i=z1(r),o=i[i.length-1],a=o._key,s=Pl.get(a),l=s||o;l!==r&&tT(n,l,!1),tT(n,r,!0),r!==o?Pl.set(a,r):s&&Pl.delete(a)}function nT(e){e._lexicalHandled=!0}function rT(e){return e._lexicalHandled===!0}function gZ(e){const t=e.ownerDocument,n=_p.get(t);n===void 0&&we(162);const r=n-1;r>=0||we(164),_p.set(t,r),r===0&&t.removeEventListener("selectionchange",LI);const i=sg(e);W1(i)?(function(a){if(a._parentEditor!==null){const s=z1(a),l=s[s.length-1]._key;Pl.get(l)===a&&Pl.delete(l)}else Pl.delete(a._key)}(i),e.__lexicalEditor=null):i&&we(198);const o=RI(e);for(let a=0;ai.__key===this.__key);if(_e(this))return r;if(xe(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const i=this.getParent();if(Nt(this)&&this.isInline()&&i){const o=n.isBackward()?n.focus:n.anchor,a=o.getNode();if(o.offset===a.getChildrenSize()&&a.is(i)&&a.getLastChildOrThrow().is(this))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let n=t.getFirstChild(),r=0;for(;n!==null;){if(this.is(n))return r;r++,n=n.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:bn(t)}getParentOrThrow(){const t=this.getParent();return t===null&&we(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const n=t.getParent();if(Jf(n))return ge(t)||t===this&&Nt(t)||we(194),t;t=n}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&we(67,this.__key),t}getParents(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n),n=n.getParent();return t}getParentKeys(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n.__key),n=n.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:bn(t)}getPreviousSiblings(){const t=[],n=this.getParent();if(n===null)return t;let r=n.getFirstChild();for(;r!==null&&!r.is(this);)t.push(r),r=r.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:bn(t)}getNextSiblings(){const t=[];let n=this.getNextSibling();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getCommonAncestor(t){const n=this.getParents(),r=t.getParents();ge(this)&&n.unshift(this),ge(t)&&r.unshift(t);const i=n.length,o=r.length;if(i===0||o===0||n[i-1]!==r[o-1])return null;const a=new Set(r);for(let s=0;s{s.append(v)})),xe(r)){Po(r);const v=r.anchor,y=r.focus;v.key===o&&sT(v,s),y.key===o&&sT(y,s)}return aa()===o&&jn(a),s}insertAfter(t,n=!0){sr(),Hv(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.getParent(),a=Ee();let s=!1,l=!1;if(o!==null){const m=t.getIndexWithinParent();if(hs(i),xe(a)){const g=o.__key,v=a.anchor,y=a.focus;s=v.type==="element"&&v.key===g&&v.offset===m+1,l=y.type==="element"&&y.key===g&&y.offset===m+1}}const u=this.getNextSibling(),f=this.getParentOrThrow().getWritable(),d=i.__key,p=r.__next;if(u===null?f.__last=d:u.getWritable().__prev=d,f.__size++,r.__next=d,i.__next=p,i.__prev=r.__key,i.__parent=r.__parent,n&&xe(a)){const m=this.getIndexWithinParent();Sp(a,f,m+1);const g=f.__key;s&&a.anchor.set(g,m+2,"element"),l&&a.focus.set(g,m+2,"element")}return t}insertBefore(t,n=!0){sr(),Hv(this,t);const r=this.getWritable(),i=t.getWritable(),o=i.__key;hs(i);const a=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),l=r.__prev,u=this.getIndexWithinParent();a===null?s.__first=o:a.getWritable().__next=o,s.__size++,r.__prev=o,i.__prev=l,i.__next=r.__key,i.__parent=r.__parent;const f=Ee();return n&&xe(f)&&Sp(f,this.getParentOrThrow(),u),t}isParentRequired(){return!1}createParentElementNode(){return bo()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,n){sr();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(ge(r))return r.select();if(!_e(r)){const o=r.getIndexWithinParent()+1;return i.select(o,o)}return r.select(t,n)}selectNext(t,n){sr();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(ge(r))return r.select(0,0);if(!_e(r)){const o=r.getIndexWithinParent();return i.select(o,o)}return r.select(t,n)}markDirty(){this.getWritable()}}class Qf extends pg{static getType(){return"linebreak"}static clone(t){return new Qf(t.__key)}constructor(t){super(t)}getTextContent(){return` +`}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:t=>function(n){const r=n.parentElement;if(r!==null&&ZA(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&bh(i)){const o=r.lastChild;if(o===n||o.previousSibling===n&&bh(o))return!0}}return!1}(t)||function(n){const r=n.parentElement;if(r!==null&&ZA(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&bh(i))return!1;const o=r.lastChild;if(o===n||o.previousSibling===n&&bh(o))return!0}return!1}(t)?null:{conversion:yZ,priority:0}}}static importJSON(t){return rf()}exportJSON(){return{type:"linebreak",version:1}}}function yZ(e){return{node:rf()}}function rf(){return dg(new Qf)}function jc(e){return e instanceof Qf}function bh(e){return e.nodeType===Aa&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function Zv(e,t){return 16&t?"code":t&N1?"mark":32&t?"sub":64&t?"sup":null}function Jv(e,t){return 1&t?"strong":2&t?"em":"span"}function BI(e,t,n,r,i){const o=r.classList;let a=Ec(i,"base");a!==void 0&&o.add(...a),a=Ec(i,"underlineStrikethrough");let s=!1;const l=t&pp&&t&hp;a!==void 0&&(n&pp&&n&hp?(s=!0,l||o.add(...a)):l&&o.remove(...a));for(const u in vo){const f=vo[u];if(a=Ec(i,u),a!==void 0)if(n&f){if(s&&(u==="underline"||u==="strikethrough")){t&f&&o.remove(...a);continue}t&f&&(!l||u!=="underline")&&u!=="strikethrough"||o.add(...a)}else t&f&&o.remove(...a)}}function FI(e,t,n){const r=t.firstChild,i=n.isComposing(),o=e+(i?og:"");if(r==null)t.textContent=o;else{const a=r.nodeValue;if(a!==o)if(i||ha){const[s,l,u]=function(f,d){const p=f.length,m=d.length;let g=0,v=0;for(;g({conversion:wZ,priority:0}),b:()=>({conversion:bZ,priority:0}),code:()=>({conversion:Jo,priority:0}),em:()=>({conversion:Jo,priority:0}),i:()=>({conversion:Jo,priority:0}),s:()=>({conversion:Jo,priority:0}),span:()=>({conversion:vZ,priority:0}),strong:()=>({conversion:Jo,priority:0}),sub:()=>({conversion:Jo,priority:0}),sup:()=>({conversion:Jo,priority:0}),u:()=>({conversion:Jo,priority:0})}}static importJSON(t){const n=En(t.text);return n.setFormat(t.format),n.setDetail(t.detail),n.setMode(t.mode),n.setStyle(t.style),n}exportDOM(t){let{element:n}=super.exportDOM(t);return n!==null&&G1(n)||we(132),n.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(n=xh(n,"b")),this.hasFormat("italic")&&(n=xh(n,"i")),this.hasFormat("strikethrough")&&(n=xh(n,"s")),this.hasFormat("underline")&&(n=xh(n,"u")),{element:n}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(t,n){}setFormat(t){const n=this.getWritable();return n.__format=typeof t=="string"?vo[t]:t,n}setDetail(t){const n=this.getWritable();return n.__detail=typeof t=="string"?HX[t]:t,n}setStyle(t){const n=this.getWritable();return n.__style=t,n}toggleFormat(t){const n=bx(this.getFormat(),t,null);return this.setFormat(n)}toggleDirectionless(){const t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){const t=this.getWritable();return t.__detail^=2,t}setMode(t){const n=YX[t];if(this.__mode===n)return this;const r=this.getWritable();return r.__mode=n,r}setTextContent(t){if(this.__text===t)return this;const n=this.getWritable();return n.__text=t,n}select(t,n){sr();let r=t,i=n;const o=Ee(),a=this.getTextContent(),s=this.__key;if(typeof a=="string"){const l=a.length;r===void 0&&(r=l),i===void 0&&(i=l)}else r=0,i=0;if(!xe(o))return KI(s,r,s,i,"text","text");{const l=aa();l!==o.anchor.key&&l!==o.focus.key||jn(s),o.setTextNodeRange(this,r,this,i)}return o}selectStart(){return this.select(0,0)}selectEnd(){const t=this.getTextContentSize();return this.select(t,t)}spliceText(t,n,r,i){const o=this.getWritable(),a=o.__text,s=r.length;let l=t;l<0&&(l=s+l,l<0&&(l=0));const u=Ee();if(i&&xe(u)){const d=t+s;u.setTextNodeRange(o,d,o,d)}const f=a.slice(0,l)+r+a.slice(l+n);return o.__text=f,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){sr();const n=this.getLatest(),r=n.getTextContent(),i=n.__key,o=aa(),a=new Set(t),s=[],l=r.length;let u="";for(let _=0;_P&&$.offset<=D&&($.key=M,$.offset-=P,w.dirty=!0),N.key===i&&N.type==="text"&&N.offset>P&&N.offset<=D&&(N.key=M,N.offset-=P,w.dirty=!0)}o===i&&jn(M),P=D,S.push(k)}if(p!==null){(function(E){const k=E.getPreviousSibling(),M=E.getNextSibling();k!==null&&yp(k),M!==null&&yp(M)})(this);const _=p.getWritable(),C=this.getIndexWithinParent();x?(_.splice(C,0,S),this.remove()):_.splice(C,1,S),xe(w)&&Sp(w,p,C,f-1)}return S}mergeWithSibling(t){const n=t===this.getPreviousSibling();n||t===this.getNextSibling()||we(50);const r=this.__key,i=t.__key,o=this.__text,a=o.length;aa()===i&&jn(r);const s=Ee();if(xe(s)){const d=s.anchor,p=s.focus;d!==null&&d.key===i&&(pT(d,n,r,t,a),s.dirty=!0),p!==null&&p.key===i&&(pT(p,n,r,t,a),s.dirty=!0)}const l=t.__text,u=n?l+o:o+l;this.setTextContent(u);const f=this.getWritable();return t.remove(),f}isTextEntity(){return!1}}function vZ(e){return{forChild:Y1(e.style),node:null}}function bZ(e){const t=e,n=t.style.fontWeight==="normal";return{forChild:Y1(t.style,n?void 0:"bold"),node:null}}const oT=new WeakMap;function xZ(e){return e.nodeName==="PRE"||e.nodeType===Zf&&e.style!==void 0&&e.style.whiteSpace!==void 0&&e.style.whiteSpace.startsWith("pre")}function wZ(e){const t=e;e.parentElement===null&&we(129);let n=t.textContent||"";if(function(r){let i,o=r.parentNode;const a=[r];for(;o!==null&&(i=oT.get(o))===void 0&&!xZ(o);)a.push(o),o=o.parentNode;const s=i===void 0?o:i;for(let l=0;l0){/[ \t\n]$/.test(o)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=aT(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:En(n)}}function aT(e,t){let n=e;for(;;){let r;for(;(r=t?n.nextSibling:n.previousSibling)===null;){const o=n.parentElement;if(o===null)return null;n=o}if(n=r,n.nodeType===Zf){const o=n.style.display;if(o===""&&!cZ(n)||o!==""&&!o.startsWith("inline"))return null}let i=n;for(;(i=t?n.firstChild:n.lastChild)!==null;)n=i;if(n.nodeType===Aa)return n;if(n.nodeName==="BR")return null}}const _Z={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Jo(e){const t=_Z[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:Y1(e.style,t),node:null}}function En(e=""){return dg(new yu(e))}function _e(e){return e instanceof yu}function Y1(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),i=n==="700"||n==="bold",o=r.includes("line-through"),a=e.fontStyle==="italic",s=r.includes("underline"),l=e.verticalAlign;return u=>(_e(u)&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),o&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),a&&!u.hasFormat("italic")&&u.toggleFormat("italic"),s&&!u.hasFormat("underline")&&u.toggleFormat("underline"),l!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),l!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),t&&!u.hasFormat(t)&&u.toggleFormat(t)),u)}class ed extends yu{static getType(){return"tab"}static clone(t){return new ed(t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__text=t.__text}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}static importJSON(t){const n=q1();return n.setFormat(t.format),n.setStyle(t.style),n}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(t){we(126)}setDetail(t){we(127)}setMode(t){we(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function q1(){return dg(new ed)}function SZ(e){return e instanceof ed}class OZ{constructor(t,n,r){this._selection=null,this.key=t,this.offset=n,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){let n=this.getNode(),r=t.getNode();const i=this.offset,o=t.offset;if(ge(n)){const a=n.getDescendantByIndex(i);n=a??n}if(ge(r)){const a=r.getDescendantByIndex(o);r=a??r}return n===r?io&&(r=o)}else if(!ge(t)){const o=t.getNextSibling();if(_e(o))n=o.__key,r=0,i="text";else{const a=t.getParent();a&&(n=a.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function sT(e,t){if(ge(t)){const n=t.getLastDescendant();ge(n)||_e(n)?Qv(e,n):Qv(e,t)}else Qv(e,t)}function ra(e,t,n,r){e.key=t,e.offset=n,e.type=r}let WI=class zI{constructor(t){this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!mg(t))return!1;const n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new zI(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const n=this.getNodes(),r=n.length,i=n[r-1];let o;if(_e(i))o=i.select();else{const a=i.getIndexWithinParent()+1;o=i.getParentOrThrow().select(a,a)}o.insertNodes(t);for(let a=0;a0?[]:[s]:s.getNodesBetween(l),td()||(this._cachedNodes=d),d}setTextNodeRange(t,n,r,i){ra(this.anchor,t.__key,n,"text"),ra(this.focus,r.__key,i,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const n=t[0],r=t[t.length-1],i=this.anchor,o=this.focus,a=i.isBefore(o),[s,l]=Nx(this);let u="",f=!0;for(let d=0;d=0;k--){const M=P[k];if(M.is(p)||ge(M)&&M.isParentOf(p))break;M.isAttached()&&(!_.has(M)||M.is(S)?C||E.insertAfter(M,!1):M.remove())}if(!C){let k=w,M=null;for(;k!==null;){const D=k.getChildren(),$=D.length;($===0||D[$-1].is(M))&&(y.delete(k.__key),M=k),k=k.getParent()}}if(p.isToken())if(l===m)p.select();else{const k=En(t);k.select(),p.replace(k)}else p=p.spliceText(l,m-l,t,!0),p.getTextContent()===""?p.remove():p.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);for(let k=1;k0&&(y===v.getTextContentSize()||sl(v)||([v]=v.splitText(y)),v.setFormat(x));for(let w=f+1;w(ge(m)||Nt(m))&&!m.isInline())){ge(n)||we(135);const m=eb(this);return n.splice(m,0,t),void r.selectEnd()}const i=function(m){const g=bo();let v=null;for(let y=0;yu?u:l,p=l>u?l:u,m=a.splitText(d,p),g=d===0?m[0]:m[1];return g!=null?[g]:[]}return[a]}const f=i.isBefore(o);if(_e(a)){const d=f?l:u;d===a.getTextContentSize()?t.shift():d!==0&&([,a]=a.splitText(d),t[0]=a)}if(_e(s)){const d=s.getTextContent().length,p=f?u:l;p===0?t.pop():p!==d&&([s]=s.splitText(p),t[r]=s)}return t}modify(t,n,r){const i=this.focus,o=this.anchor,a=t==="move",s=xx(i,n);if(Nt(s)&&!s.isIsolated()){if(a&&s.isKeyboardSelectable()){const m=dT();return m.add(s.__key),void Po(m)}const p=n?s.getPreviousSibling():s.getNextSibling();if(_e(p)){const m=p.__key,g=n?p.getTextContent().length:0;return i.set(m,g,"text"),void(a&&o.set(m,g,"text"))}{const m=s.getParentOrThrow();let g,v;return ge(p)?(v=p.__key,g=n?p.getChildrenSize():0):(g=s.getIndexWithinParent(),v=m.__key,n||g++),i.set(v,g,"element"),void(a&&o.set(v,g,"element"))}}const l=tn(),u=Li(l._window);if(!u)return;const f=l._blockCursorElement,d=l._rootElement;if(d===null||f===null||!ge(s)||s.isInline()||s.canBeEmpty()||H1(f,l,d),function(p,m,g,v){p.modify(m,g,v)}(u,t,n?"backward":"forward",r),u.rangeCount>0){const p=u.getRangeAt(0),m=this.anchor.getNode(),g=Xn(m)?m:lZ(m);if(this.applyDOMRange(p),this.dirty=!0,!a){const v=this.getNodes(),y=[];let x=!1;for(let w=0;w0)if(n){const w=y[0];ge(w)?w.selectStart():w.getParentOrThrow().selectStart()}else{const w=y[y.length-1];ge(w)?w.selectEnd():w.getParentOrThrow().selectEnd()}u.anchorNode===p.startContainer&&u.anchorOffset===p.startOffset||function(w){const S=w.focus,P=w.anchor,_=P.key,C=P.offset,E=P.type;ra(P,S.key,S.offset,S.type),ra(S,_,C,E),w._cachedNodes=null}(this)}}}forwardDeletion(t,n,r){if(!r&&(t.type==="element"&&ge(n)&&t.offset===n.getChildrenSize()||t.type==="text"&&t.offset===n.getTextContentSize())){const i=n.getParent(),o=n.getNextSibling()||(i===null?null:i.getNextSibling());if(ge(o)&&o.isShadowRoot())return!0}return!1}deleteCharacter(t){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,t))return;const o=this.focus,a=xx(o,t);if(Nt(a)&&!a.isIsolated()){if(a.isKeyboardSelectable()&&ge(i)&&i.getChildrenSize()===0){i.remove();const s=dT();s.add(a.__key),Po(s)}else a.remove(),tn().dispatchCommand(_1,void 0);return}if(!t&&ge(a)&&ge(i)&&i.isEmpty())return i.remove(),void a.selectStart();if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&(r.type==="element"?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const s=o.type==="text"?o.getNode():null;if(i=r.type==="text"?r.getNode():null,s!==null&&s.isSegmented()){const l=o.offset,u=s.getTextContentSize();if(s.is(i)||t&&l!==u||!t&&l!==0)return void uT(s,t,l)}else if(i!==null&&i.isSegmented()){const l=r.offset,u=i.getTextContentSize();if(i.is(s)||t&&l!==0||!t&&l!==u)return void uT(i,t,l)}(function(l,u){const f=l.anchor,d=l.focus,p=f.getNode(),m=d.getNode();if(p===m&&f.type==="text"&&d.type==="text"){const g=f.offset,v=d.offset,y=gn||f){i.splice(u,1),f&&(s=void 0);break}}const l=i.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(s,s))}function cT(e,t,n,r){let i,o=t;if(e.nodeType===Zf){let a=!1;const s=e.childNodes,l=s.length,u=r._blockCursorElement;o===l&&(a=!0,o=l-1);let f=s[o],d=!1;if(f===u)f=s[o+1],d=!0;else if(u!==null){const p=u.parentNode;e===p&&t>Array.prototype.indexOf.call(p.children,u)&&o--}if(i=gl(f),_e(i))o=KA(i,a);else{let p=gl(e);if(p===null)return null;if(ge(p)){o=Math.min(p.getChildrenSize(),o);let m=p.getChildAtIndex(o);if(ge(m)&&function(g,v,y){const x=g.getParent();return y===null||x===null||!x.canBeEmpty()||x!==y.getNode()}(m,0,n)){const g=a?m.getLastDescendant():m.getFirstDescendant();g===null?p=m:(m=g,p=ge(m)?m:m.getParentOrThrow()),o=0}_e(m)?(i=m,p=null,o=KA(m,a)):m!==p&&a&&!d&&o++}else{const m=p.getIndexWithinParent();o=t===0&&Nt(p)&&gl(e)===p?m:m+1,p=p.getParentOrThrow()}if(ge(p))return Sa(p.__key,o,"element")}}else i=gl(e);return _e(i)?Sa(i.__key,o,"text"):null}function fT(e,t,n){const r=e.offset,i=e.getNode();if(r===0){const o=i.getPreviousSibling(),a=i.getParent();if(t){if((n||!t)&&o===null&&ge(a)&&a.isInline()){const s=a.getPreviousSibling();_e(s)&&(e.key=s.__key,e.offset=s.getTextContent().length)}}else ge(o)&&!n&&o.isInline()?(e.key=o.__key,e.offset=o.getChildrenSize(),e.type="element"):_e(o)&&(e.key=o.__key,e.offset=o.getTextContent().length)}else if(r===i.getTextContent().length){const o=i.getNextSibling(),a=i.getParent();if(t&&ge(o)&&o.isInline())e.key=o.__key,e.offset=0,e.type="element";else if((n||t)&&o===null&&ge(a)&&a.isInline()&&!a.canInsertTextAfter()){const s=a.getNextSibling();_e(s)&&(e.key=s.__key,e.offset=0)}}}function VI(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),i=e.is(t);fT(e,r,i),fT(t,!r,i),i&&(t.key=e.key,t.offset=e.offset,t.type=e.type);const o=tn();if(o.isComposing()&&o._compositionKey!==e.key&&xe(n)){const a=n.anchor,s=n.focus;ra(e,a.key,a.offset,a.type),ra(t,s.key,s.offset,s.type)}}}function UI(e,t,n,r,i,o){if(e===null||n===null||!ag(i,e,n))return null;const a=cT(e,t,xe(o)?o.anchor:null,i);if(a===null)return null;const s=cT(n,r,xe(o)?o.focus:null,i);if(s===null)return null;if(a.type==="element"&&s.type==="element"){const l=gl(e),u=gl(n);if(Nt(l)&&Nt(u))return null}return VI(a,s,o),[a,s]}function KI(e,t,n,r,i,o){const a=No(),s=new ks(Sa(e,t,i),Sa(n,r,o),0,"");return s.dirty=!0,a._selection=s,s}function dT(){return new WI(new Set)}function X1(e,t,n,r){const i=n._window;if(i===null)return null;const o=r||i.event,a=o?o.type:void 0,s=a==="selectionchange",l=!vx&&(s||a==="beforeinput"||a==="compositionstart"||a==="compositionend"||a==="click"&&o&&o.detail===3||a==="drop"||a===void 0);let u,f,d,p;if(xe(e)&&!l)return e.clone();if(t===null)return null;if(u=t.anchorNode,f=t.focusNode,d=t.anchorOffset,p=t.focusOffset,s&&xe(e)&&!ag(n,u,f))return e.clone();const m=UI(u,d,f,p,n,e);if(m===null)return null;const[g,v]=m;return new ks(g,v,xe(e)?e.format:0,xe(e)?e.style:"")}function Ee(){return No()._selection}function gg(){return tn()._editorState._selection}function Sp(e,t,n,r=1){const i=e.anchor,o=e.focus,a=i.getNode(),s=o.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const u=i.offset;if(n<=u&&r>0||n0||n0||n=s,u=l?o.getChildAtIndex(s-1):o.getChildAtIndex(n);if(_e(u)){let f=0;l&&(f=u.getTextContentSize()),t.set(u.__key,f,"text"),r.set(u.__key,f,"text")}}else{if(ge(o)){const s=o.getChildrenSize(),l=n>=s,u=l?o.getChildAtIndex(s-1):o.getChildAtIndex(n);if(_e(u)){let f=0;l&&(f=u.getTextContentSize()),t.set(u.__key,f,"text")}}if(ge(a)){const s=a.getChildrenSize(),l=i>=s,u=l?a.getChildAtIndex(s-1):a.getChildAtIndex(i);if(_e(u)){let f=0;l&&(f=u.getTextContentSize()),r.set(u.__key,f,"text")}}}}function Op(e,t,n,r,i){let o=null,a=0,s=null;r!==null?(o=r.__key,_e(r)?(a=r.getTextContentSize(),s="text"):ge(r)&&(a=r.getChildrenSize(),s="element")):i!==null&&(o=i.__key,_e(i)?s="text":ge(i)&&(s="element")),o!==null&&s!==null?e.set(o,a,s):(a=t.getIndexWithinParent(),a===-1&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function pT(e,t,n,r,i){e.type==="text"?(e.key=n,t||(e.offset+=i)):e.offset>r.getIndexWithinParent()&&(e.offset-=1)}function CZ(e,t,n,r,i,o,a){const s=r.anchorNode,l=r.focusNode,u=r.anchorOffset,f=r.focusOffset,d=document.activeElement;if(i.has("collaboration")&&d!==o||d!==null&&mI(d))return;if(!xe(t))return void(e!==null&&ag(n,s,l)&&r.removeAllRanges());const p=t.anchor,m=t.focus,g=p.key,v=m.key,y=vp(n,g),x=vp(n,v),w=p.offset,S=m.offset,P=t.format,_=t.style,C=t.isCollapsed();let E=y,k=x,M=!1;if(p.type==="text"){E=gp(y);const F=p.getNode();M=F.getFormat()!==P||F.getStyle()!==_}else xe(e)&&e.anchor.type==="text"&&(M=!0);var D,$,N,B,L;if(m.type==="text"&&(k=gp(x)),E!==null&&k!==null&&(C&&(e===null||M||xe(e)&&(e.format!==P||e.style!==_))&&(D=P,$=_,N=w,B=g,L=performance.now(),$I=[D,$,N,B,L]),u!==w||f!==S||s!==E||l!==k||r.type==="Range"&&C||(d!==null&&o.contains(d)||o.focus({preventScroll:!0}),p.type==="element"))){try{r.setBaseAndExtent(E,w,k,S)}catch{}if(!i.has("skip-scroll-into-view")&&t.isCollapsed()&&o!==null&&o===document.activeElement){const F=t instanceof ks&&t.anchor.type==="element"?E.childNodes[w]||null:r.rangeCount>0?r.getRangeAt(0):null;if(F!==null){let W;if(F instanceof Text){const z=document.createRange();z.selectNode(F),W=z.getBoundingClientRect()}else W=F.getBoundingClientRect();(function(z,H,U){const K=U.ownerDocument,Y=K.defaultView;if(Y===null)return;let{top:te,bottom:ne}=H,ie=0,ce=0,ae=U;for(;ae!==null;){const le=ae===K.body;if(le)ie=0,ce=fg(z).innerHeight;else{const Q=ae.getBoundingClientRect();ie=Q.top,ce=Q.bottom}let re=0;if(tece&&(re=ne-ce),re!==0)if(le)Y.scrollBy(0,re);else{const Q=ae.scrollTop;ae.scrollTop+=re;const fe=ae.scrollTop-Q;te-=fe,ne-=fe}if(le)break;ae=cg(ae)}})(n,W,o)}}kx=!0}}function eb(e){let t=e;e.isCollapsed()||t.removeText();const n=Ee();xe(n)&&(t=n),xe(t)||we(161);const r=t.anchor;let i=r.getNode(),o=r.offset;for(;!ll(i);)[i,o]=PZ(i,o);return o}function PZ(e,t){const n=e.getParent();if(!n){const i=bo();return Un().append(i),i.select(),[Un(),0]}if(_e(e)){const i=e.splitText(t);if(i.length===0)return[n,e.getIndexWithinParent()];const o=t===0?0:1;return[n,i[0].getIndexWithinParent()+o]}if(!ge(e)||t===0)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const i=new ks(Sa(e.__key,t,"element"),Sa(e.__key,t,"element"),0,""),o=e.insertNewAfter(i);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}let xn=null,wn=null,fr=!1,tb=!1,Kh=0;const mT={characterData:!0,childList:!0,subtree:!0};function td(){return fr||xn!==null&&xn._readOnly}function sr(){fr&&we(13)}function HI(){Kh>99&&we(14)}function No(){return xn===null&&we(195,GI()),xn}function tn(){return wn===null&&we(196,GI()),wn}function GI(){let e=0;const t=new Set,n=bg.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const o=sg(i);if(W1(o))e++;else if(o){let a=String(o.constructor.version||"<0.17.1");a===n&&(a+=" (separately built, likely a bundler configuration issue)"),t.add(a)}}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 AZ(){return wn}function gT(e,t,n){const r=t.__type,i=function(s,l){const u=s._nodes.get(l);return u===void 0&&we(30,l),u}(e,r);let o=n.get(r);o===void 0&&(o=Array.from(i.transforms),n.set(r,o));const a=o.length;for(let s=0;s{i=qI(e,t,n)}),i}const r=z1(e);for(let i=4;i>=0;i--)for(let o=0;o0||N>0;){if(D>0){S._dirtyLeaves=new Set;for(const B of M){const L=C.get(B);_e(L)&&L.isAttached()&&L.isSimpleText()&&!L.isUnmergeable()&&zA(L),L!==void 0&&yT(L,E)&&gT(S,L,k),P.add(B)}if(M=S._dirtyLeaves,D=M.size,D>0){Kh++;continue}}S._dirtyLeaves=new Set,S._dirtyElements=new Map;for(const B of $){const L=B[0],F=B[1];if(L!=="root"&&!F)continue;const W=C.get(L);W!==void 0&&yT(W,E)&&gT(S,W,k),_.set(L,F)}M=S._dirtyLeaves,D=M.size,$=S._dirtyElements,N=$.size,Kh++}S._dirtyLeaves=P,S._dirtyElements=_}(u,e),bT(e),function(w,S,P,_){const C=w._nodeMap,E=S._nodeMap,k=[];for(const[M]of _){const D=E.get(M);D!==void 0&&(D.isAttached()||(ge(D)&&CI(D,M,C,E,k,_),C.has(M)||_.delete(M),k.push(M)))}for(const M of k)E.delete(M);for(const M of P){const D=E.get(M);D===void 0||D.isAttached()||(C.has(M)||P.delete(M),E.delete(M))}}(l,u,e._dirtyLeaves,e._dirtyElements)),y!==e._compositionKey&&(u._flushSync=!0);const x=u._selection;if(xe(x)){const w=u._nodeMap,S=x.anchor.key,P=x.focus.key;w.get(S)!==void 0&&w.get(P)!==void 0||we(19)}else mg(x)&&x._nodes.size===0&&(u._selection=null)}catch(y){return y instanceof Error&&e._onError(y),e._pendingEditorState=l,e._dirtyType=Dl,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void sa(e)}finally{xn=d,fr=p,wn=m,e._updating=g,Kh=0}e._dirtyType!==xs||function(y,x){const w=x.getEditorState()._selection,S=y._selection;if(S!==null){if(S.dirty||!S.is(w))return!0}else if(w!==null)return!0;return!1}(u,e)?u._flushSync?(u._flushSync=!1,sa(e)):f&&rZ(()=>{sa(e)}):(u._flushSync=!1,f&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Pr(e,t,n){e._updating?e._updates.push([t,n]):XI(e,t,n)}class yg extends pg{constructor(t){super(t),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null}afterCloneFrom(t){super.afterCloneFrom(t),this.__first=t.__first,this.__last=t.__last,this.__size=t.__size,this.__indent=t.__indent,this.__format=t.__format,this.__style=t.__style,this.__dir=t.__dir}getFormat(){return this.getLatest().__format}getFormatType(){const t=this.getFormat();return GX[t]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getChildrenKeys(){const t=[];let n=this.getFirstChild();for(;n!==null;)t.push(n.__key),n=n.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const t=tn()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){const t=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(t)}getAllTextNodes(){const t=[];let n=this.getFirstChild();for(;n!==null;){if(_e(n)&&t.push(n),ge(n)){const r=n.getAllTextNodes();t.push(...r)}n=n.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;ge(t);){const n=t.getFirstChild();if(n===null)break;t=n}return t}getLastDescendant(){let t=this.getLastChild();for(;ge(t);){const n=t.getLastChild();if(n===null)break;t=n}return t}getDescendantByIndex(t){const n=this.getChildren(),r=n.length;if(t>=r){const o=n[r-1];return ge(o)&&o.getLastDescendant()||o||null}const i=n[t];return ge(i)&&i.getFirstDescendant()||i||null}getFirstChild(){const t=this.getLatest().__first;return t===null?null:bn(t)}getFirstChildOrThrow(){const t=this.getFirstChild();return t===null&&we(45,this.__key),t}getLastChild(){const t=this.getLatest().__last;return t===null?null:bn(t)}getLastChildOrThrow(){const t=this.getLastChild();return t===null&&we(96,this.__key),t}getChildAtIndex(t){const n=this.getChildrenSize();let r,i;if(t=t;){if(i===t)return r;r=r.getPreviousSibling(),i--}return null}getTextContent(){let t="";const n=this.getChildren(),r=n.length;for(let i=0;in.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){const n=this.getWritable();return n.__dir=t,n}setFormat(t){return this.getWritable().__format=t!==""?BA[t]:0,this}setStyle(t){return this.getWritable().__style=t||"",this}setIndent(t){return this.getWritable().__indent=t,this}splice(t,n,r){const i=r.length,o=this.getChildrenSize(),a=this.getWritable(),s=a.__key,l=[],u=[],f=this.getChildAtIndex(t+n);let d=null,p=o-n+i;if(t!==0)if(t===o)d=this.getLastChild();else{const g=this.getChildAtIndex(t);g!==null&&(d=g.getPreviousSibling())}if(n>0){let g=d===null?this.getFirstChild():d.getNextSibling();for(let v=0;v({root:JI(Un())}))}}class TZ extends yg{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class vu extends yg{constructor(t){super(t),this.__textFormat=0,this.__textStyle=""}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(t){const n=this.getWritable();return n.__textFormat=t,n}hasTextFormat(t){const n=vo[t];return!!(this.getTextFormat()&n)}getTextStyle(){return this.getLatest().__textStyle}setTextStyle(t){const n=this.getWritable();return n.__textStyle=t,n}static clone(t){return new vu(t.__key)}afterCloneFrom(t){super.afterCloneFrom(t),this.__textFormat=t.__textFormat,this.__textStyle=t.__textStyle}createDOM(t){const n=document.createElement("p"),r=Ec(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:t=>({conversion:EZ,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(n&&G1(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();n.style.textAlign=r;const i=this.getDirection();i&&(n.dir=i);const o=this.getIndent();o>0&&(n.style.textIndent=20*o+"px")}return{element:n}}static importJSON(t){const n=bo();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n.setTextFormat(t.textFormat),n}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle(),type:"paragraph",version:1}}insertNewAfter(t,n){const r=bo();r.setTextFormat(t.format),r.setTextStyle(t.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getTextStyle()),this.insertAfter(r,n),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||_e(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function EZ(e){const t=bo();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 bo(){return dg(new vu)}function $x(e){return e instanceof vu}const Vt=0,Il=1;function QI(e,t,n,r){const i=e._keyToDOMMap;i.clear(),e._editorState=Z1(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=xs,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const o=e._observer;o!==null&&(o.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function kZ(e){const t=e||{},n=AZ(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,o=t.disableEvents||!1,a=Z1(),s=t.namespace||(i!==null?i._config.namespace:wI()),l=t.editorState,u=[nd,yu,Qf,ed,vu,TZ,...t.nodes||[]],{onError:f,html:d}=t,p=t.editable===void 0||t.editable;let m;if(e===void 0&&n!==null)m=n._nodes;else{m=new Map;for(let v=0;v{Object.keys(P).forEach(_=>{let C=x.get(_);C===void 0&&(C=[],x.set(_,C)),C.push(P[_])})};return v.forEach(P=>{const _=P.klass.importDOM;if(_==null||w.has(_))return;w.add(_);const C=_.call(P.klass);C!==null&&S(C)}),y&&S(y),x}(m,d?d.import:void 0),p);return l!==void 0&&(g._pendingEditorState=l,g._dirtyType=Dl),g}class bg{constructor(t,n,r,i,o,a,s){this._parentEditor=n,this._rootElement=null,this._editorState=t,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=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=xs,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=wI(),this._onError=o,this._htmlConversions=a,this._editable=s,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){const n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){const n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){const n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){const n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){const n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&we(35);const i=this._commands;i.has(t)||i.set(t,[new Set,new Set,new Set,new Set,new Set]);const o=i.get(t);o===void 0&&we(36,String(t));const a=o[r];return a.add(n),()=>{a.delete(n),o.every(s=>s.size===0)&&i.delete(t)}}registerMutationListener(t,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,o=this._listeners.mutation;o.set(n,i);const a=r&&r.skipInitialization;return a===void 0||a||this.initializeMutationListener(n,i),()=>{o.delete(n)}}getRegisteredNode(t){const n=this._nodes.get(t.getType());return n===void 0&&we(37,t.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,n){const r=this._editorState,i=dZ(r).get(n.getType());if(!i)return;const o=new Map;for(const a of i.keys())o.set(a,"created");o.size>0&&t(o,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,n){const r=this.getRegisteredNode(t);return r.transforms.add(n),r}registerNodeTransform(t,n){const r=this.registerNodeTransformToKlass(t,n),i=[r],o=r.replaceWithKlass;if(o!=null){const l=this.registerNodeTransformToKlass(o,n);i.push(l)}var a,s;return a=this,s=t.getType(),Pr(a,()=>{const l=No();if(l.isEmpty())return;if(s==="root")return void Un().markDirty();const u=l._nodeMap;for(const[,f]of u)f.markDirty()},a._pendingEditorState===null?{tag:"history-merge"}:void 0),()=>{i.forEach(l=>l.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return Oe(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const n=this._rootElement;if(t!==n){const r=Ec(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,QI(this,n,t,i),n!==null&&(this._config.disableEvents||gZ(n),r!=null&&n.classList.remove(...r)),t!==null){const o=function(s){const l=s.ownerDocument;return l&&l.defaultView||null}(t),a=t.style;a.userSelect="text",a.whiteSpace="pre-wrap",a.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=o,this._dirtyType=Dl,pI(this),this._updateTags.add("history-merge"),sa(this),this._config.disableEvents||function(s,l){const u=s.ownerDocument,f=_p.get(u);(f===void 0||f<1)&&u.addEventListener("selectionchange",LI),_p.set(u,(f||0)+1),s.__lexicalEditor=l;const d=RI(s);for(let p=0;p{rT(y)||(nT(y),(l.isEditable()||m==="click")&&g(y,l))}:y=>{if(rT(y))return;nT(y);const x=l.isEditable();switch(m){case"cut":return x&&Oe(l,k1,y);case"copy":return Oe(l,E1,y);case"paste":return x&&Oe(l,S1,y);case"dragstart":return x&&Oe(l,sI,y);case"dragover":return x&&Oe(l,EX,y);case"dragend":return x&&Oe(l,kX,y);case"focus":return x&&Oe(l,NX,y);case"blur":return x&&Oe(l,$X,y);case"drop":return x&&Oe(l,aI,y)}};s.addEventListener(m,v),d.push(()=>{s.removeEventListener(m,v)})}}(t,this),r!=null&&t.classList.add(...r)}else this._editorState=i,this._pendingEditorState=null,this._window=null;Nc("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&we(38),hI(this);const r=this._pendingEditorState,i=this._updateTags,o=n!==void 0?n.tag:null;r===null||r.isEmpty()||(o!=null&&i.add(o),sa(this)),this._pendingEditorState=t,this._dirtyType=Dl,this._dirtyElements.set("root",!1),this._compositionKey=null,o!=null&&i.add(o),sa(this)}parseEditorState(t,n){return function(r,i,o){const a=Z1(),s=xn,l=fr,u=wn,f=i._dirtyElements,d=i._dirtyLeaves,p=i._cloneNotNeeded,m=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,xn=a,fr=!1,wn=i;try{const g=i._nodes;YI(r.root,g),o&&o(),a._readOnly=!0}catch(g){g instanceof Error&&i._onError(g)}finally{i._dirtyElements=f,i._dirtyLeaves=d,i._cloneNotNeeded=p,i._dirtyType=m,xn=s,fr=l,wn=u}return a}(typeof t=="string"?JSON.parse(t):t,this,n)}read(t){return sa(this),this.getEditorState().read(t,{editor:this})}update(t,n){Pr(this,t,n)}focus(t,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),Pr(this,()=>{const i=Ee(),o=Un();i!==null?i.dirty=!0:o.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?o.selectStart():o.selectEnd())},{onUpdate:()=>{r.removeAttribute("autocapitalize"),t&&t()},tag:"focus"}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const n=Li(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,Nc("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}bg.version="0.17.1+prod.esm";const eR=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,MZ=eR?O.useLayoutEffect:O.useEffect,wh={tag:"history-merge"};function jZ({initialConfig:e,children:t}){const n=O.useMemo(()=>{const{theme:r,namespace:i,nodes:o,onError:a,editorState:s,html:l}=e,u=_X(null,r),f=kZ({editable:e.editable,html:l,namespace:i,nodes:o,onError:d=>a(d,f),theme:r});return function(d,p){if(p!==null){if(p===void 0)d.update(()=>{const m=Un();if(m.isEmpty()){const g=bo();m.append(g);const v=eR?document.activeElement:null;(Ee()!==null||v!==null&&v===d.getRootElement())&&g.select()}},wh);else if(p!==null)switch(typeof p){case"string":{const m=d.parseEditorState(p);d.setEditorState(m,wh);break}case"object":d.setEditorState(p,wh);break;case"function":d.update(()=>{Un().isEmpty()&&p(d)},wh)}}}(f,s),[f,u]},[]);return MZ(()=>{const r=e.editable,[i]=n;i.setEditable(r===void 0||r)},[]),T.jsx(QD.Provider,{value:n,children:t})}const NZ=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?O.useLayoutEffect:O.useEffect;function $Z(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function DZ(){return function(e){const[t]=jr(),n=O.useMemo(()=>e(t),[t,e]),r=O.useRef(n.initialValueFn()),[i,o]=O.useState(r.current);return NZ(()=>{const{initialValueFn:a,subscribe:s}=n,l=a();return r.current!==l&&(r.current=l,o(l)),s(u=>{r.current=u,o(u)})},[n,e]),i}($Z)}function IZ(){return Un().getTextContent()}function RZ(e,t=!0){if(e)return!1;let n=IZ();return t&&(n=n.trim()),n===""}function LZ(e){if(!RZ(e,!1))return!1;const t=Un().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;rLZ(e)}function BZ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}BZ(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;nd?d:f,v=f>d?f:d):m?(y=o?d:f,v=void 0):g&&(y=0,v=o?f:d),t.__text=t.__text.slice(y,v),t}}return t}function wT(e,t){const n=xx(e.focus,t);return Nt(n)&&!n.isIsolated()||ge(n)&&!n.isInline()&&!n.canBeEmpty()}function zZ(e,t,n,r){e.modify(t?"extend":"move",n,r)}function VZ(e){const t=e.anchor.getNode();return(Xn(t)?t:t.getParentOrThrow()).getDirection()==="rtl"}function _T(e,t,n){const r=VZ(e);zZ(e,t,n?!r:r,"character")}function UZ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}UZ(function(e){const t=new URLSearchParams;t.append("code",e);for(let n=1;n{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function HZ(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function GZ(e){const t=window.location.origin,n=r=>{if(r.origin!==t)return;const i=e.getRootElement();if(document.activeElement!==i)return;const o=r.data;if(typeof o=="string"){let a;try{a=JSON.parse(o)}catch{return}if(a&&a.protocol==="nuanria_messaging"&&a.type==="request"){const s=a.payload;if(s&&s.functionId==="makeChanges"){const l=s.args;if(l){const[u,f,d,p,m,g]=l;e.update(()=>{const v=Ee();if(xe(v)){const y=v.anchor;let x=y.getNode(),w=0,S=0;if(_e(x)&&u>=0&&f>=0&&(w=u,S=u+f,v.setTextNodeRange(x,w,x,S)),w===S&&d===""||(v.insertRawText(d),x=y.getNode()),_e(x)){w=p,S=p+m;const P=x.getTextContentSize();w=w>P?P:w,S=S>P?P:S,v.setTextNodeRange(x,w,x,S)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}function YZ(e,t){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=Un().getChildren();for(let i=0;i{if(e!==null){const n=HZ(e,KeyboardEvent)?null:e.clipboardData,r=Ee();if(r!==null&&n!=null){e.preventDefault();const i=ZZ(t);i!==null&&n.setData("text/html",i),n.setData("text/plain",r.getTextContent())}}})}function iJ(e){return Ao(e.registerCommand(ds,t=>{const n=Ee();return!!xe(n)&&(n.deleteCharacter(t),!0)},Vt),e.registerCommand(Zc,t=>{const n=Ee();return!!xe(n)&&(n.deleteWord(t),!0)},Vt),e.registerCommand(Jc,t=>{const n=Ee();return!!xe(n)&&(n.deleteLine(t),!0)},Vt),e.registerCommand(Cl,t=>{const n=Ee();if(!xe(n))return!1;if(typeof t=="string")n.insertText(t);else{const r=t.dataTransfer;if(r!=null)ST(r,n);else{const i=t.data;i&&n.insertText(i)}}return!0},Vt),e.registerCommand(gx,()=>{const t=Ee();return!!xe(t)&&(t.removeText(),!0)},Vt),e.registerCommand(Ol,t=>{const n=Ee();return!!xe(n)&&(n.insertLineBreak(t),!0)},Vt),e.registerCommand(mx,()=>{const t=Ee();return!!xe(t)&&(t.insertLineBreak(),!0)},Vt),e.registerCommand(A1,t=>{const n=Ee();if(!xe(n))return!1;const r=t,i=r.shiftKey;return!!wT(n,!0)&&(r.preventDefault(),_T(n,i,!0),!0)},Vt),e.registerCommand(P1,t=>{const n=Ee();if(!xe(n))return!1;const r=t,i=r.shiftKey;return!!wT(n,!1)&&(r.preventDefault(),_T(n,i,!1),!0)},Vt),e.registerCommand(T1,t=>{const n=Ee();return!!xe(n)&&(t.preventDefault(),e.dispatchCommand(ds,!0))},Vt),e.registerCommand(iI,t=>{const n=Ee();return!!xe(n)&&(t.preventDefault(),e.dispatchCommand(ds,!1))},Vt),e.registerCommand(Qc,t=>{const n=Ee();if(!xe(n))return!1;if(t!==null){if((tJ||eJ||rJ)&&QZ)return!1;t.preventDefault()}return e.dispatchCommand(Ol,!1)},Vt),e.registerCommand(yx,()=>(sZ(),!0),Vt),e.registerCommand(E1,t=>{const n=Ee();return!!xe(n)&&(OT(t,e),!0)},Vt),e.registerCommand(k1,t=>{const n=Ee();return!!xe(n)&&(function(r,i){OT(r,i),i.update(()=>{const o=Ee();xe(o)&&o.removeText()})}(t,e),!0)},Vt),e.registerCommand(S1,t=>{const n=Ee();return!!xe(n)&&(function(r,i){r.preventDefault(),i.update(()=>{const o=Ee(),{clipboardData:a}=r;a!=null&&xe(o)&&ST(a,o)},{tag:"paste"})}(t,e),!0)},Vt),e.registerCommand(aI,t=>{const n=Ee();return!!xe(n)&&(t.preventDefault(),!0)},Vt),e.registerCommand(sI,t=>{const n=Ee();return!!xe(n)&&(t.preventDefault(),!0)},Vt))}const Dx=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?O.useLayoutEffect:O.useEffect;function CT(e){return e.getEditorState().read(tR(e.isComposing()))}function oJ({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=jr(),i=function(o,a){const[s,l]=O.useState(()=>o.getDecorators());return Dx(()=>o.registerDecoratorListener(u=>{kl.flushSync(()=>{l(u)})}),[o]),O.useEffect(()=>{l(o.getDecorators())},[o]),O.useMemo(()=>{const u=[],f=Object.keys(s);for(let d=0;do._onError(v),children:T.jsx(O.Suspense,{fallback:null,children:s[p]})}),g=o.getElementByKey(p);g!==null&&u.push(kl.createPortal(m,g,p))}return u},[a,s,o])}(r,n);return function(o){Dx(()=>Ao(iJ(o),GZ(o)),[o])}(r),T.jsxs(T.Fragment,{children:[e,T.jsx(aJ,{content:t}),i]})}function aJ({content:e}){const[t]=jr(),n=function(i){const[o,a]=O.useState(()=>CT(i));return Dx(()=>{function s(){const l=CT(i);a(l)}return s(),Ao(i.registerUpdateListener(()=>{s()}),i.registerEditableListener(()=>{s()}))},[i]),o}(t),r=DZ();return n?typeof e=="function"?e(r):e:null}const iR=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?O.useLayoutEffect:O.useEffect;function sJ({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaExpanded:o,ariaLabel:a,ariaLabelledBy:s,ariaMultiline:l,ariaOwns:u,ariaRequired:f,autoCapitalize:d,className:p,id:m,role:g="textbox",spellCheck:v=!0,style:y,tabIndex:x,"data-testid":w,...S},P){const[_,C]=O.useState(e.isEditable()),E=O.useCallback(M=>{M&&M.ownerDocument&&M.ownerDocument.defaultView?e.setRootElement(M):e.setRootElement(null)},[e]),k=O.useMemo(()=>function(...M){return D=>{M.forEach($=>{typeof $=="function"?$(D):$!=null&&($.current=D)})}}(P,E),[E,P]);return iR(()=>(C(e.isEditable()),e.registerEditableListener(M=>{C(M)})),[e]),T.jsx("div",{...S,"aria-activedescendant":_?t:void 0,"aria-autocomplete":_?n:"none","aria-controls":_?r:void 0,"aria-describedby":i,"aria-expanded":_&&g==="combobox"?!!o:void 0,"aria-label":a,"aria-labelledby":s,"aria-multiline":l,"aria-owns":_?u:void 0,"aria-readonly":!_||void 0,"aria-required":f,autoCapitalize:d,className:p,contentEditable:_,"data-testid":w,id:m,ref:k,role:_?g:void 0,spellCheck:v,style:y,tabIndex:x})}const lJ=O.forwardRef(sJ);function PT(e){return e.getEditorState().read(tR(e.isComposing()))}const uJ=O.forwardRef(cJ);function cJ(e,t){const{placeholder:n,...r}=e,[i]=jr();return T.jsxs(T.Fragment,{children:[T.jsx(lJ,{editor:i,...r,ref:t}),n!=null&&T.jsx(fJ,{editor:i,content:n})]})}function fJ({content:e,editor:t}){const n=function(a){const[s,l]=O.useState(()=>PT(a));return iR(()=>{function u(){const f=PT(a);l(f)}return u(),Ao(a.registerUpdateListener(()=>{u()}),a.registerEditableListener(()=>{u()}))},[a]),s}(t),[r,i]=O.useState(t.isEditable());if(O.useLayoutEffect(()=>(i(t.isEditable()),t.registerEditableListener(a=>{i(a)})),[t]),!n)return null;let o=null;return typeof e=="function"?o=e(r):e!==null&&(o=e),o===null?null:T.jsx("div",{"aria-hidden":!0,children:o})}const _h=0,Ix=1,Rx=2,ai=0,dJ=1,AT=2,hJ=3,pJ=4;function mJ(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return ai;const o=t._selection,a=e._selection;if(i)return dJ;if(!(xe(o)&&xe(a)&&a.isCollapsed()&&o.isCollapsed()))return ai;const s=function(x,w,S){const P=x._nodeMap,_=[];for(const C of w){const E=P.get(C);E!==void 0&&_.push(E)}for(const[C,E]of S){if(!E)continue;const k=P.get(C);k===void 0||Xn(k)||_.push(k)}return _}(t,n,r);if(s.length===0)return ai;if(s.length>1){const x=t._nodeMap,w=x.get(o.anchor.key),S=x.get(a.anchor.key);return w&&S&&!e._nodeMap.has(w.__key)&&_e(w)&&w.__text.length===1&&o.anchor.offset===1?AT:ai}const l=s[0],u=e._nodeMap.get(l.__key);if(!_e(u)||!_e(l)||u.__mode!==l.__mode)return ai;const f=u.__text,d=l.__text;if(f===d)return ai;const p=o.anchor,m=a.anchor;if(p.key!==m.key||p.type!=="text")return ai;const g=p.offset,v=m.offset,y=d.length-f.length;return y===1&&v===g-1?AT:y===-1&&v===g+1?hJ:y===-1&&v===g?pJ:ai}function gJ(e,t){let n=Date.now(),r=ai;return(i,o,a,s,l,u)=>{const f=Date.now();if(u.has("historic"))return r=ai,n=f,Rx;const d=mJ(i,o,s,l,e.isComposing()),p=(()=>{const m=a===null||a.editor===e,g=u.has("history-push");if(!g&&m&&u.has("history-merge"))return _h;if(i===null)return Ix;const v=o._selection;return s.size>0||l.size>0?g===!1&&d!==ai&&d===r&&fS.exportJSON()))===JSON.stringify(w.read(()=>P.exportJSON()))}(Array.from(s)[0],i,o)?_h:Ix:v!==null?_h:Rx})();return n=f,r=d,p}}function TT(e){e.undoStack=[],e.redoStack=[],e.current=null}function yJ(e,t,n){const r=gJ(e,n);return Ao(e.registerCommand(O1,()=>(function(o,a){const s=a.redoStack,l=a.undoStack;if(l.length!==0){const u=a.current,f=l.pop();u!==null&&(s.push(u),o.dispatchCommand(yh,!0)),l.length===0&&o.dispatchCommand(vh,!1),a.current=f||null,f&&f.editor.setEditorState(f.editorState,{tag:"historic"})}}(e,t),!0),Vt),e.registerCommand(C1,()=>(function(o,a){const s=a.redoStack,l=a.undoStack;if(s.length!==0){const u=a.current;u!==null&&(l.push(u),o.dispatchCommand(vh,!0));const f=s.pop();s.length===0&&o.dispatchCommand(yh,!1),a.current=f||null,f&&f.editor.setEditorState(f.editorState,{tag:"historic"})}}(e,t),!0),Vt),e.registerCommand(MX,()=>(TT(t),!1),Vt),e.registerCommand(jX,()=>(TT(t),e.dispatchCommand(yh,!1),e.dispatchCommand(vh,!1),!0),Vt),e.registerUpdateListener(({editorState:o,prevEditorState:a,dirtyLeaves:s,dirtyElements:l,tags:u})=>{const f=t.current,d=t.redoStack,p=t.undoStack,m=f===null?null:f.editorState;if(f!==null&&o===m)return;const g=r(a,o,f,s,l,u);if(g===Ix)d.length!==0&&(t.redoStack=[],e.dispatchCommand(yh,!1)),f!==null&&(p.push({...f}),e.dispatchCommand(vh,!0));else if(g===Rx)return;t.current={editor:e,editorState:o}}))}function vJ(){return{current:null,redoStack:[],undoStack:[]}}function bJ({delay:e,externalHistoryState:t}){const[n]=jr();return function(r,i,o=1e3){const a=O.useMemo(()=>i||vJ(),[i]);O.useEffect(()=>yJ(r,a,o),[o,r,a])}(n,t,e),null}function Lx(e,t){return Lx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Lx(e,t)}var ET={error:null},xJ=function(e){var t,n;function r(){for(var o,a=arguments.length,s=new Array(a),l=0;l{if(n)return r.registerUpdateListener(({editorState:i,dirtyElements:o,dirtyLeaves:a,prevEditorState:s,tags:l})=>{t&&o.size===0&&a.size===0||e&&l.has("history-merge")||s.isEmpty()||n(i,r,l)})},[r,e,t,n]),null}function OJ({editorRef:e}){const[t]=jr();return ee.useEffect(()=>{typeof e=="function"?e(t):typeof e=="object"&&(e.current=t)},[t]),null}const CJ="w-full [&>p]:w-full [&>p]:m-0",PJ="focus-within:ring-2 focus-within:ring-offset-2 hover:outline-border-strong hover:focus-within:outline-focus-border focus-within:outline-focus-border focus-within:ring-focus transition-[color,outline,box-shadow] duration-150 ease-in-out outline outline-1 outline-field-border",AJ="bg-field-secondary-background outline-field-border-disabled hover:outline-field-border-disabled [&_p]:text-badge-color-disabled cursor-not-allowed",TJ={sm:"px-3 py-1.5 rounded [&_.editor-content>p]:text-xs [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-xs [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-5",md:"px-3.5 py-2 rounded-md [&_.editor-content>p]:text-sm [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-sm [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-6",lg:"px-4 py-2.5 rounded-md [&_.editor-content>p]:text-base [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-base [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-7"},EJ="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",kJ={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]"},MJ="m-0 text-text-primary cursor-pointer",jJ={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"},NJ="bg-button-tertiary-hover",kT="startTransition",$J=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?O.useLayoutEffect:O.useEffect,MT=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 jT(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>r.top&&n.top{if(t!=null&&e!=null){const o=i.getRootElement(),a=o!=null?function(d,p){let m=getComputedStyle(d);const g=m.position==="absolute",v=/(auto|scroll)/;if(m.position==="fixed")return document.body;for(let y=d;y=y.parentElement;)if(m=getComputedStyle(y),(!g||m.position!=="static")&&v.test(m.overflow+m.overflowY+m.overflowX))return y;return document.body}(o):document.body;let s=!1,l=jT(t,a);const u=function(){s||(window.requestAnimationFrame(function(){n(),s=!1}),s=!0);const d=jT(t,a);d!==l&&(l=d,r!=null&&r(d))},f=new ResizeObserver(n);return window.addEventListener("resize",n),document.addEventListener("scroll",u,{capture:!0,passive:!0}),f.observe(t),()=>{f.unobserve(t),window.removeEventListener("resize",n),document.removeEventListener("scroll",u,!0)}}},[t,i,r,n,e])}const NT=OX();function IJ({close:e,editor:t,anchorElementRef:n,resolution:r,options:i,menuRenderFn:o,onSelectOption:a,shouldSplitNodeWithQuery:s=!1,commandPriority:l=Il}){const[u,f]=O.useState(null),d=r.match&&r.match.matchingString;O.useEffect(()=>{f(0)},[d]);const p=O.useCallback(g=>{t.update(()=>{const v=r.match!=null&&s?function(y){const x=Ee();if(!xe(x)||!x.isCollapsed())return null;const w=x.anchor;if(w.type!=="text")return null;const S=w.getNode();if(!S.isSimpleText())return null;const P=w.offset,_=S.getTextContent().slice(0,P),C=y.replaceableString.length,E=P-function(M,D,$){let N=$;for(let B=N;B<=D.length;B++)M.substr(-B)===D.substr(0,B)&&(N=B);return N}(_,y.matchingString,C);if(E<0)return null;let k;return E===0?[k]=S.splitText(P):[,k]=S.splitText(E,P),k}(r.match):null;a(g,v,e,r.match?r.match.matchingString:"")})},[t,s,r.match,a,e]),m=O.useCallback(g=>{const v=t.getRootElement();v!==null&&(v.setAttribute("aria-activedescendant","typeahead-item-"+g),f(g))},[t]);return O.useEffect(()=>()=>{const g=t.getRootElement();g!==null&&g.removeAttribute("aria-activedescendant")},[t]),$J(()=>{i===null?f(null):u===null&&m(0)},[i,u,m]),O.useEffect(()=>Ao(t.registerCommand(NT,({option:g})=>!(!g.ref||g.ref.current==null)&&(MT(g.ref.current),!0),l)),[t,m,l]),O.useEffect(()=>Ao(t.registerCommand(nI,g=>{const v=g;if(i!==null&&i.length&&u!==null){const y=u!==i.length-1?u+1:0;m(y);const x=i[y];x.ref!=null&&x.ref.current&&t.dispatchCommand(NT,{index:y,option:x}),v.preventDefault(),v.stopImmediatePropagation()}return!0},l),t.registerCommand(tI,g=>{const v=g;if(i!==null&&i.length&&u!==null){const y=u!==0?u-1:i.length-1;m(y);const x=i[y];x.ref!=null&&x.ref.current&&MT(x.ref.current),v.preventDefault(),v.stopImmediatePropagation()}return!0},l),t.registerCommand(rI,g=>{const v=g;return v.preventDefault(),v.stopImmediatePropagation(),e(),!0},l),t.registerCommand(oI,g=>{const v=g;return i!==null&&u!==null&&i[u]!=null&&(v.preventDefault(),v.stopImmediatePropagation(),p(i[u]),!0)},l),t.registerCommand(Qc,g=>i!==null&&u!==null&&i[u]!=null&&(g!==null&&(g.preventDefault(),g.stopImmediatePropagation()),p(i[u]),!0),l)),[p,e,t,i,u,m,l]),o(n,O.useMemo(()=>({options:i,selectOptionAndCleanUp:p,selectedIndex:u,setHighlightedIndex:f}),[p,u,i]),r.match?r.match.matchingString:"")}function RJ({options:e,onQueryChange:t,onSelectOption:n,onOpen:r,onClose:i,menuRenderFn:o,triggerFn:a,anchorClassName:s,commandPriority:l=Il,parent:u}){const[f]=jr(),[d,p]=O.useState(null),m=function(y,x,w,S=document.body){const[P]=jr(),_=O.useRef(document.createElement("div")),C=O.useCallback(()=>{_.current.style.top=_.current.style.bottom;const k=P.getRootElement(),M=_.current,D=M.firstChild;if(k!==null&&y!==null){const{left:$,top:N,width:B,height:L}=y.getRect(),F=_.current.offsetHeight;if(M.style.top=`${N+window.pageYOffset+F+3}px`,M.style.left=`${$+window.pageXOffset}px`,M.style.height=`${L}px`,M.style.width=`${B}px`,D!==null){D.style.top=`${N}`;const W=D.getBoundingClientRect(),z=W.height,H=W.width,U=k.getBoundingClientRect();$+H>U.right&&(M.style.left=`${U.right-H+window.pageXOffset}px`),(N+z>window.innerHeight||N+z>U.bottom)&&N-U.top>z+L&&(M.style.top=N-z+window.pageYOffset-L+"px")}M.isConnected||(w!=null&&(M.className=w),M.setAttribute("aria-label","Typeahead menu"),M.setAttribute("id","typeahead-menu"),M.setAttribute("role","listbox"),M.style.display="block",M.style.position="absolute",S.append(M)),_.current=M,k.setAttribute("aria-controls","typeahead-menu")}},[P,y,w,S]);O.useEffect(()=>{const k=P.getRootElement();if(y!==null)return C(),()=>{k!==null&&k.removeAttribute("aria-controls");const M=_.current;M!==null&&M.isConnected&&M.remove()}},[P,C,y]);const E=O.useCallback(k=>{y!==null&&(k||x(null))},[y,x]);return DJ(y,_.current,C,E),_}(d,p,s,u),g=O.useCallback(()=>{p(null),i!=null&&d!==null&&i()},[i,d]),v=O.useCallback(y=>{p(y),r!=null&&d===null&&r(y)},[r,d]);return O.useEffect(()=>{const y=f.registerUpdateListener(()=>{f.getEditorState().read(()=>{const x=f._window||window,w=x.document.createRange(),S=Ee(),P=function(E){let k=null;return E.getEditorState().read(()=>{const M=Ee();xe(M)&&(k=function(D){const $=D.anchor;if($.type!=="text")return null;const N=$.getNode();if(!N.isSimpleText())return null;const B=$.offset;return N.getTextContent().slice(0,B)}(M))}),k}(f);if(!xe(S)||!S.isCollapsed()||P===null||w===null)return void g();const _=a(P,f);if(t(_?_.matchingString:null),_!==null&&!function(E,k){return k===0&&E.getEditorState().read(()=>{const M=Ee();if(xe(M)){const D=M.anchor.getNode().getPreviousSibling();return _e(D)&&D.isTextEntity()}return!1})}(f,_.leadOffset)&&function(k,M,D){const $=D.getSelection();if($===null||!$.isCollapsed)return!1;const N=$.anchorNode,B=k,L=$.anchorOffset;if(N==null||L==null)return!1;try{M.setStart(N,B),M.setEnd(N,L)}catch{return!1}return!0}(_.leadOffset,w,x)!==null)return C=()=>v({getRect:()=>w.getBoundingClientRect(),match:_}),void(kT in O?O[kT](C):C());var C;g()})});return()=>{y()}},[f,a,t,d,g,v]),d===null||f===null?null:T.jsx(IJ,{close:g,resolution:d,editor:f,anchorElementRef:m,options:e,menuRenderFn:o,shouldSplitNodeWithQuery:!0,onSelectOption:n,commandPriority:l})}const LJ=e=>{switch(e){case"sm":return"xs";case"md":return"sm";case"lg":return"md";default:return"sm"}},BJ=({data:e,by:t,size:n,nodeKey:r})=>{const[i]=jr(),o=!i.isEditable(),a=f=>{f.stopPropagation(),f.preventDefault(),!o&&i.update(()=>{const d=bn(r);d&&d.remove()})};let s=e;typeof e=="object"&&(s=e[t]);const l=O.useCallback(f=>{const d=bn(r);if(!d||!d.isSelected())return!1;let p=!1;const m=d.getPreviousSibling();return ge(m)&&(m.selectEnd(),p=!0),_e(m)&&(m.select(),p=!0),Nt(m)&&(m.selectNext(),p=!0),m===null&&(d.selectPrevious(),p=!0),p&&f.preventDefault(),p},[r]),u=O.useCallback(f=>{const d=bn(r);if(!d||!d.isSelected())return!1;let p=!1;const m=d.getNextSibling();return ge(m)&&(m.selectStart(),p=!0),_e(m)&&(m.select(0,0),p=!0),Nt(m)&&(m.selectPrevious(),p=!0),m===null&&(d.selectNext(),p=!0),p&&f.preventDefault(),p},[r]);return O.useEffect(()=>{const f=Ao(i.registerCommand(A1,l,Il),i.registerCommand(P1,u,Il));return()=>{f()}},[i,l,u]),T.jsx(Kf,{className:"inline-flex mr-0.5",type:"rounded",size:LJ(n),label:s,icon:null,closable:!0,onClose:a,disabled:o})};class Rl extends ZI{constructor(n,r,i,o){super(o);qo(this,"__data");qo(this,"__by");qo(this,"__size");this.__data=n,this.__by=r,this.__size=i}static getType(){return"mention"}static clone(n){return new Rl(n.__data,n.__by,n.__size,n.__key)}static importJSON(n){return oR(n.data,n.by,n.size)}createDOM(){return document.createElement("span")}updateDOM(){return!1}exportDOM(){return{element:document.createElement("span")}}exportJSON(){return{type:Rl.getType(),data:this.__data,by:this.__by,size:this.__size,version:1}}decorate(){return T.jsx(BJ,{data:this.__data,by:this.__by,size:this.__size,nodeKey:this.__key})}}const oR=(e,t,n)=>new Rl(e,t,n),FJ=e=>e instanceof Rl;class WJ{constructor(t){qo(this,"data");qo(this,"key");qo(this,"ref");qo(this,"setRefElement");this.initData=t,this.key="",this.data=t,this.ref={current:null},this.setRefElement=n=>{this.ref.current=n}}}const nb=new Map;function zJ(e,t,n="name"){const[r,i]=O.useState([]);return O.useEffect(()=>{if(t===null){i([]);return}const o=nb.get(t);if(o!==null){if(o!==void 0){i(o);return}nb.set(t,null),VJ.search(e,t,a=>{nb.set(t,a),i(a)},n)}},[t]),r}const VJ={search(e,t,n,r){setTimeout(()=>{if(!Array.isArray(e))return[];const i=e.filter(o=>{var s;if(typeof o=="string")return o.toLowerCase().includes(t.toLowerCase());const a=(s=o==null?void 0:o[r])==null?void 0:s.toString();return a?a.toLowerCase().includes(t.toLowerCase()):!1});n(i)},500)}},Cp=({size:e,className:t,children:n})=>T.jsx("ul",{role:"menu",className:G(EJ,kJ[e],t),children:n});Cp.displayName="EditorCombobox";const aR=O.forwardRef(({size:e,children:t,selected:n=!1,className:r,...i},o)=>T.jsx("li",{role:"option",ref:o,className:G(MJ,jJ[e],n&&NJ,r),...i,children:t}));aR.displayName="EditorCombobox.Item";Cp.Item=aR;const UJ=({optionsArray:e,by:t="name",size:n="md",trigger:r="@",menuComponent:i=Cp,menuItemComponent:o=Cp.Item,autoSpace:a=!0})=>{const s=O.useRef(!1),l=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`,u=[r].join(""),f="[^"+u+l+"\\s]",d="(?:\\.[ |$]| |["+l+"]|)",p=75,m=new RegExp(`(^|\\s|\\()([${u}]((?:${f}${d}){0,${p}}))$`),g=50,v=new RegExp(`(^|\\s|\\()([${u}]((?:${f}){0,${g}}))$`),y=M=>{let D=m.exec(M);if(D===null&&(D=v.exec(M)),D!==null){const $=D[1],N=D[3];if(N.length>=0)return{leadOffset:D.index+$.length,matchingString:N,replaceableString:D[2]}}return null},[x]=jr(),[w,S]=O.useState(null),P=zJ(e,w,t),_=O.useCallback((M,D,$)=>{x.update(()=>{const N=oR(M.data,t,n);D&&D.replace(N),$()})},[x]),C=O.useMemo(()=>P.map(M=>new WJ(M)),[x,P]),E=O.useCallback(M=>{if(!a)return!1;const{key:D,ctrlKey:$,metaKey:N}=M;if($||N||D===" "||D.length>1||s.current)return s.current&&(s.current=!1),!1;const B=Ee(),{focus:L,anchor:F}=B,[W]=B.getNodes();if(!F||!L||(F==null?void 0:F.key)!==(L==null?void 0:L.key)||(F==null?void 0:F.offset)!==(L==null?void 0:L.offset)||!W)return!1;if(FJ(W)){const z=En(" ");return W.insertAfter(z),!0}return!1},[x,r,a]),k=O.useCallback(M=>{const{key:D}=M;return D==="Backspace"?(s.current=!0,!0):!1},[s]);return O.useEffect(()=>{if(x)return Ao(x.registerCommand(eI,E,Il),x.registerCommand(T1,k,Il))},[x,E]),T.jsx(RJ,{onQueryChange:S,onSelectOption:_,triggerFn:y,options:C,menuRenderFn:(M,{selectedIndex:D,selectOptionAndCleanUp:$,setHighlightedIndex:N})=>M.current&&(C!=null&&C.length)?T.jsx(i,{size:n,children:C.map((B,L)=>{var F;return T.jsx(o,{ref:B.ref,size:n,selected:L===D,onMouseEnter:()=>{N(L)},onClick:()=>$(B),children:typeof B.data=="string"?B.data:(F=B.data)==null?void 0:F[t]},L)})}):null})},KJ={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"}},HJ=({content:e})=>T.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-start text-field-placeholder w-full",children:T.jsx("span",{className:"truncate",children:e})});function GJ(e){console.error(e)}const YJ=`{ + "root": { + "children": [ + { + "children": [], + "direction": null, + "format": "", + "indent": 0, + "type": "paragraph", + "version": 1, + "textFormat": 0, + "textStyle": "" + } + ], + "direction": null, + "format": "", + "indent": 0, + "type": "root", + "version": 1 + } +}`,sR=O.forwardRef(({defaultValue:e="",placeholder:t="Press @ to view variable suggestions",onChange:n,size:r="md",autoFocus:i=!1,options:o,by:a="name",trigger:s="@",menuComponent:l,menuItemComponent:u,className:f,wrapperClassName:d,disabled:p=!1,autoSpaceAfterMention:m=!1},g)=>{const v={namespace:"Editor",editorTheme:KJ,onError:GJ,nodes:[Rl],editorState:e||YJ,editable:!p},y=(S,P)=>{typeof n=="function"&&n(S,P)};let x,w;return O.isValidElement(l)&&(x=l),O.isValidElement(u)&&(w=u),T.jsx("div",{className:G("relative w-full",PJ,TJ[r],p&&AJ,d),children:T.jsxs(jZ,{initialConfig:v,children:[T.jsx("div",{className:"relative w-full [&_p]:m-0",children:T.jsx(oJ,{contentEditable:T.jsx(uJ,{className:G("editor-content focus-visible:outline-none outline-none",CJ,f)}),placeholder:T.jsx(HJ,{content:t}),ErrorBoundary:wJ})}),T.jsx(bJ,{}),T.jsx(UJ,{menuComponent:x,menuItemComponent:w,size:r,by:a,optionsArray:o,trigger:s,autoSpace:m}),T.jsx(SJ,{onChange:y,ignoreSelectionChange:!0}),g&&T.jsx(OJ,{editorRef:g}),i&&T.jsx(SX,{})]})})});sR.displayName="EditorInput";const qJ=(e,t,n,r)=>{const i=`absolute rounded-full transition-colors duration-500 ${n[r].dot}`;return e==="dot"?G(i,n[r].dot,t?"bg-brand-primary-600":"bg-text-tertiary"):e==="number"?G(i,n[r].dot,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):e==="icon"?G(i,t?"text-brand-primary-600":"text-text-tertiary","flex items-center justify-center"):""},XJ=(e,t,n)=>G("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),ZJ=(e,t)=>G("rounded-full text-brand-primary-600 transition-colors duration-300",e[t].dot,e[t].ring),JJ={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"}},lR=({variant:e="dot",size:t="sm",type:n="inline",currentStep:r=1,children:i,className:o,lineClassName:a="min-w-10",...s})=>{const l=O.Children.count(i);r===-1&&(r=l+1);const u=O.Children.map(i,(f,d)=>{const p=d+1{const m=QJ(a,r,n,s,l,t,f),g={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)]"},v={lg:"top-3.5",md:"top-3",sm:"top-2.5"},y=()=>{if(e){const w=G(s[l].label,"text-text-tertiary",n?"text-brand-primary-600":"","break-word",o==="stack"?"mt-2 transform max-w-xs":"mx-2 max-w-32");return T.jsx("span",{className:w,children:e})}return null},x=()=>{if(!u){const w=G("block",r?"border-brand-primary-600":"border-border-subtle",d);return o==="stack"?T.jsx("div",{className:G("relative","flex","border-solid","border-y","absolute",r?"border-brand-primary-600":"border-border-subtle",v[l],g[l]),children:T.jsx("span",{className:"block"})}):T.jsx("div",{className:"flex-1",children:T.jsx("span",{className:G("mr-2 border-y border-solid",!e&&"ml-2",w)})})}return null};return o==="stack"?T.jsxs("div",{className:"relative flex-1 justify-center",children:[T.jsxs("div",{className:G("flex items-center flex-col",i),...p,children:[m,y()]}),x()]}):T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:G("flex items-center",i),...p,children:[m,y()]}),x()]})};uR.displayName="ProgressSteps.Step";const QJ=(e,t,n,r,i,o,a)=>{if(t)return T.jsx(Ff,{className:ZJ(r,i)});const s=XJ(!!n,r,i),l=qJ(e,n,r,i);let u=null;return e==="number"?u=a+1:e==="icon"&&o&&(u=o),T.jsx("span",{className:s,children:T.jsx("span",{className:l,children:u})})};lR.Step=uR;const eQ=({variant:e="rectangular",className:t,...n})=>{const r={circular:"rounded-full bg-gray-200 ",rectangular:"rounded-md bg-gray-200"}[e],i={circular:"size-10",rectangular:"w-96 h-3"}[e];return T.jsx("div",{className:G(r,"animate-pulse",i,t),...n})},cR=O.createContext({}),fR=()=>O.useContext(cR),$o=({size:e="md",children:t,className:n})=>T.jsx(cR.Provider,{value:{size:e},children:T.jsx("div",{className:G("flex flex-col bg-background-primary p-2",n),children:t})});$o.displayName="Menu";const dR=({heading:e,arrow:t=!1,showArrowOnHover:n=!1,open:r=!0,onClick:i,children:o,className:a})=>{const[s,l]=O.useState(r),[u,f]=O.useState(!1),{size:d}=fR(),p="text-text-primary bg-transparent cursor-pointer flex justify-between items-center gap-1",m={sm:"text-xs",md:"text-sm"}[d??"md"],g={sm:"[&>svg]:size-4",md:"[&>svg]:size-5"}[d??"md"],v=()=>{l(!s),i&&i(!s)},y={open:{rotate:180},closed:{rotate:0}},x={open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},w={visible:{opacity:1},hidden:{opacity:0}},S=()=>n?s||u?"visible":"hidden":"visible";return T.jsxs("div",{children:[!!e&&T.jsxs("div",{role:"button",tabIndex:0,onClick:v,onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&v()},onMouseEnter:()=>n&&f(!0),onMouseLeave:()=>n&&f(!1),className:G(p,m,e?"p-1":"p-0",a),"aria-expanded":s,children:[T.jsx("span",{className:"text-text-tertiary",children:e}),t&&T.jsx(hi.span,{variants:y,animate:s?"open":"closed",transition:{duration:.15},className:G("flex items-center text-border-strong",g),children:T.jsx(hi.div,{initial:"hidden",animate:S(),exit:"hidden",variants:w,transition:{duration:.15},children:T.jsx(Cw,{})})})]}),T.jsx(Es,{initial:!1,children:s&&T.jsx(hi.ul,{role:"menu",variants:x,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",children:o})})]})};dR.displayName="Menu.List";const hR=({disabled:e=!1,active:t,onClick:n,children:r,className:i})=>{const{size:o}=fR(),a="flex p-1 gap-1 items-center bg-transparent border-none rounded text-text-secondary cursor-pointer m-0",s={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"}[o??"md"],l="hover:bg-background-secondary hover:text-text-primary",u=e?"text-text-disabled hover:text-text-disabled cursor-not-allowed hover:bg-transparent":"",f=t?"text-icon-primary [&>svg]:text-icon-interactive bg-background-secondary":"";return T.jsx("li",{role:"menuitem",tabIndex:0,onClick:n,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(n==null||n())},className:G(a,s,l,u,f,"transition-colors duration-300 ease-in-out",i),children:r})};hR.displayName="Menu.Item";const pR=({variant:e="solid",className:t})=>{const n={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",double:"border-double",hidden:"border-hidden",none:"border-none"}[e];return T.jsx("li",{className:"m-0 p-0 list-none",role:"separator","aria-hidden":"true",children:T.jsx("hr",{className:G("w-full border-0 border-t border-border-subtle",n,t)})})};pR.displayName="Menu.Separator";$o.List=dR;$o.Item=hR;$o.Separator=pR;const mR=O.createContext({isCollapsed:!1,setIsCollapsed:()=>{},collapsible:!0}),gR=({children:e,className:t,onCollapseChange:n,collapsible:r=!0,screenHeight:i=!0,borderOn:o=!0,...a})=>{const s=O.useRef(null),[l,u]=O.useState(()=>{const f=yc.get("sidebar-collapsed"),d=window.innerWidth<1280;return f||d});return O.useEffect(()=>{n&&n(l)},[l,n]),O.useEffect(()=>{const f=()=>{const d=window.innerWidth<1280;if(!r)u(!1),yc.remove("sidebar-collapsed");else if(d)u(!0),yc.set("sidebar-collapsed",!0);else{const p=yc.get("sidebar-collapsed");u(p||!1)}s.current&&(i?s.current.style.height=`${window.innerHeight}px`:s.current.style.height="auto")};return window.addEventListener("resize",f),f(),()=>{window.removeEventListener("resize",f)}},[i,r]),T.jsx(mR.Provider,{value:{isCollapsed:l,setIsCollapsed:u,collapsible:r},children:T.jsx("div",{ref:s,className:G("overflow-auto w-72 px-4 py-4 gap-4 flex flex-col bg-background-primary",o&&"border-0 border-r border-solid border-border-subtle",!!i&&"h-screen","transition-all duration-200",l&&"w-16 px-2",t),...a,children:e})})};gR.displayName="Sidebar";const yR=({children:e})=>T.jsx("div",{className:"space-y-2",children:e});yR.displayName="Sidebar.Header";const vR=({children:e})=>T.jsx("div",{className:G("space-y-4 grow items-start"),children:e});vR.displayName="Sidebar.Body";const bR=({children:e})=>{const{isCollapsed:t,setIsCollapsed:n,collapsible:r}=O.useContext(mR);return T.jsxs("div",{className:"space-y-4",children:[e,r&&T.jsx("button",{className:G("bg-transparent w-full border-0 p-0 m-0 flex items-center gap-2 text-base cursor-pointer",t&&"justify-center"),onClick:()=>{n(!t),yc.set("sidebar-collapsed",!t)},"aria-label":t?"Expand sidebar":"Collapse sidebar",children:t?T.jsx(T.Fragment,{children:T.jsx(Bw,{title:"Expand",children:T.jsx(cK,{className:"size-5"})})}):T.jsxs(T.Fragment,{children:[T.jsx(uK,{className:"size-5"})," Collapse"]})})]})};bR.displayName="Sidebar.Footer";const xR=({children:e,className:t})=>T.jsx("div",{className:G("w-full",t),children:e});xR.displayName="Sidebar.Item";const tQ=Object.assign(gR,{Header:yR,Body:vR,Footer:bR,Item:xR}),Bx={sm:{text:"text-sm",separator:"text-sm",separatorIconSize:16},md:{text:"text-base",separator:"text-base",separatorIconSize:18}},rd=O.createContext({sizes:Bx.sm}),Ta=({children:e,size:t="sm"})=>{const n=Bx[t]||Bx.sm;return T.jsx(rd.Provider,{value:{sizes:n},children:T.jsx("nav",{className:"flex m-0","aria-label":"Breadcrumb",children:T.jsx("ul",{className:"m-0 inline-flex items-center space-x-1 md:space-x-1",children:e})})})};Ta.displayName="Breadcrumb";const wR=({children:e})=>T.jsx(T.Fragment,{children:e});wR.displayName="Breadcrumb.List";const _R=({children:e})=>T.jsx("li",{className:"m-0 inline-flex items-center gap-2",children:e});_R.displayName="Breadcrumb.Item";const SR=({href:e,children:t,className:n,as:r="a",...i})=>{const{sizes:o}=O.useContext(rd);return T.jsx(r,{href:e,className:G(o.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",n),...i,children:t})};SR.displayName="Breadcrumb.Link";const OR=({type:e})=>{const{sizes:t}=O.useContext(rd),n={slash:T.jsx("span",{className:G("mx-1",t.separator),children:"/"}),arrow:T.jsx(Pw,{size:t.separatorIconSize})};return T.jsx("li",{role:"separator",className:"flex items-center text-text-tertiary mx-2 p-0 list-none","aria-hidden":"true",children:n[e]||n.arrow})};OR.displayName="Breadcrumb.Separator";const CR=()=>{const{sizes:e}=O.useContext(rd);return T.jsx(oK,{className:"mt-[2px] cursor-pointer text-text-tertiary hover:text-text-primary",size:e.separatorIconSize+4})};CR.displayName="Breadcrumb.Ellipsis";const PR=({children:e})=>{const{sizes:t}=O.useContext(rd);return T.jsx("span",{className:G(t.text,"font-medium text-text-primary"),children:e})};PR.displayName="Breadcrumb.Page";Ta.List=wR;Ta.Item=_R;Ta.Link=SR;Ta.Separator=OR;Ta.Ellipsis=CR;Ta.Page=PR;const AR=O.createContext({}),xg=()=>O.useContext(AR),TR={open:{opacity:1},exit:{opacity:0}},ER={duration:.2},Wi=({open:e,setOpen:t,children:n,trigger:r=null,className:i,exitOnClickOutside:o=!1,exitOnEsc:a=!0,design:s="simple",scrollLock:l=!0})=>{const u=e!==void 0&&t!==void 0,[f,d]=O.useState(!1),p=O.useRef(null),m=O.useRef(null),g=O.useMemo(()=>u?e:f,[e,f]),v=O.useMemo(()=>u?t:d,[d,d]),y=()=>{g||v(!0)},x=()=>{g&&v(!1)},w=O.useCallback(()=>{var _;return O.isValidElement(r)?O.cloneElement(r,{onClick:zc(y,(_=r==null?void 0:r.props)==null?void 0:_.onClick)}):typeof r=="function"?r({onClick:y}):null},[r,y,x]),S=_=>{switch(_.key){case"Escape":a&&x();break}},P=_=>{o&&p.current&&!p.current.contains(_.target)&&x()};return O.useEffect(()=>(window.addEventListener("keydown",S),document.addEventListener("mousedown",P),()=>{window.removeEventListener("keydown",S),document.removeEventListener("mousedown",P)}),[g]),O.useEffect(()=>{if(!l)return;const _=document.querySelector("html");return g&&_&&(_.style.overflow="hidden"),()=>{_&&(_.style.overflow="")}},[g]),T.jsxs(T.Fragment,{children:[w(),T.jsx(AR.Provider,{value:{open:g,setOpen:v,handleClose:x,design:s,dialogContainerRef:m,dialogRef:p},children:T.jsx("div",{ref:m,className:G("fixed z-999999 w-0 h-0 overflow-visible",i),children:n})})]})};Wi.displayName="Dialog";const kR=({children:e,className:t})=>{const{open:n,handleClose:r,dialogRef:i}=xg();return T.jsx(Es,{children:n&&T.jsx(hi.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:TR,role:"dialog",transition:ER,children:T.jsx("div",{className:"flex items-center justify-center min-h-full",children:T.jsx("div",{ref:i,className:G("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",t),children:typeof e=="function"?e({close:r}):e})})})})};kR.displayName="Dialog.Panel";const MR=({className:e,...t})=>{const{open:n,dialogContainerRef:r}=xg();return r!=null&&r.current?T.jsx(T.Fragment,{children:kl.createPortal(T.jsx(Es,{children:n&&T.jsx(hi.div,{className:G("fixed inset-0 -z-10 bg-background-inverse/90 backdrop-blur-sm",e),...t,initial:"exit",animate:"open",exit:"exit",variants:TR,transition:ER})}),r.current)}):null};MR.displayName="Dialog.Backdrop";const jR=({children:e,className:t,...n})=>T.jsx("div",{className:G("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});jR.displayName="Dialog.Header";const NR=({children:e,as:t="h3",className:n,...r})=>T.jsx(t,{className:G("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});NR.displayName="Dialog.Title";const $R=({children:e,as:t="p",className:n,...r})=>T.jsx(t,{className:G("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});$R.displayName="Dialog.Description";const nQ=({className:e,...t})=>T.jsx("button",{className:G("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close dialog",...t,children:T.jsx(ma,{className:"size-4 text-text-primary shrink-0"})}),DR=({children:e,as:t=O.Fragment,...n})=>{const{handleClose:r}=xg();return e?t===O.Fragment?typeof e=="function"?e({close:r}):O.cloneElement(e,{onClick:r}):T.jsx(t,{...n,onClick:r,children:e}):T.jsx(nQ,{onClick:r,...n})};DR.displayName="Dialog.CloseButton";const IR=({children:e,className:t,...n})=>T.jsx("div",{className:G("px-5",t),...n,children:e});IR.displayName="Dialog.Body";const RR=({children:e,className:t})=>{const{design:n,handleClose:r}=xg(),i=()=>e?typeof e=="function"?e({close:r}):e:null;return T.jsx("div",{className:G("p-4 flex justify-end gap-3",{"bg-background-secondary":n==="footer-divided"},t),children:i()})};RR.displayName="Dialog.Footer";Wi.Panel=kR;Wi.Title=NR;Wi.Description=$R;Wi.CloseButton=DR;Wi.Header=jR;Wi.Body=IR;Wi.Footer=RR;Wi.Backdrop=MR;const xu=({children:e,gap:t="lg",className:n,...r})=>T.jsx("div",{className:G("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",jm(t),n),...r,children:e});xu.displayName="Topbar";const LR=({gap:e="sm",children:t,className:n})=>T.jsx("div",{className:G("flex items-center",jm(e),n),children:t});LR.displayName="Topbar.Left";const BR=({gap:e="md",children:t,align:n="center",className:r})=>{const i={left:"justify-start",center:"justify-center",right:"justify-end"}[n];return T.jsx("div",{className:G("flex items-center grow",jm(e),i,r),children:t})};BR.displayName="Topbar.Middle";const FR=({gap:e="sm",children:t,className:n})=>T.jsx("div",{className:G("flex items-center",jm(e),n),children:t});FR.displayName="Topbar.Right";const WR=({children:e,className:t})=>T.jsx("div",{className:G("flex items-center [&>svg]:block h-full",t),children:e});WR.displayName="Topbar.Item";xu.Left=LR;xu.Middle=BR;xu.Right=FR;xu.Item=WR;var Pp={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */Pp.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,f="__lodash_placeholder__",d=1,p=2,m=4,g=1,v=2,y=1,x=2,w=4,S=8,P=16,_=32,C=64,E=128,k=256,M=512,D=30,$="...",N=800,B=16,L=1,F=2,W=3,z=1/0,H=9007199254740991,U=17976931348623157e292,K=NaN,Y=4294967295,te=Y-1,ne=Y>>>1,ie=[["ary",E],["bind",y],["bindKey",x],["curry",S],["curryRight",P],["flip",M],["partial",_],["partialRight",C],["rearg",k]],ce="[object Arguments]",ae="[object Array]",le="[object AsyncFunction]",re="[object Boolean]",Q="[object Date]",fe="[object DOMException]",ye="[object Error]",X="[object Function]",Re="[object GeneratorFunction]",pe="[object Map]",Ie="[object Number]",Ze="[object Null]",tt="[object Object]",Dn="[object Promise]",Me="[object Proxy]",nt="[object RegExp]",Se="[object Set]",ze="[object String]",Lt="[object Symbol]",at="[object Undefined]",Wt="[object WeakMap]",Nr="[object WeakSet]",pn="[object ArrayBuffer]",rn="[object DataView]",tr="[object Float32Array]",qe="[object Float64Array]",$t="[object Int8Array]",pt="[object Int16Array]",Sn="[object Int32Array]",$r="[object Uint8Array]",Hi="[object Uint8ClampedArray]",Xt="[object Uint16Array]",hr="[object Uint32Array]",Zt=/\b__p \+= '';/g,Dr=/\b(__p \+=) '' \+/g,lt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,yd=/&(?:amp|lt|gt|quot|#39);/g,vd=/[&<>"']/g,sy=RegExp(yd.source),Iu=RegExp(vd.source),Ru=/<%-([\s\S]+?)%>/g,WW=/<%([\s\S]+?)%>/g,dS=/<%=([\s\S]+?)%>/g,zW=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,VW=/^\w*$/,UW=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ly=/[\\^$.*+?()[\]{}|]/g,KW=RegExp(ly.source),uy=/^\s+/,HW=/\s/,GW=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,YW=/\{\n\/\* \[wrapped with (.+)\] \*/,qW=/,? & /,XW=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ZW=/[()=,{}\[\]\/\s]/,JW=/\\(\\)?/g,QW=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,hS=/\w*$/,ez=/^[-+]0x[0-9a-f]+$/i,tz=/^0b[01]+$/i,nz=/^\[object .+?Constructor\]$/,rz=/^0o[0-7]+$/i,iz=/^(?:0|[1-9]\d*)$/,oz=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bd=/($^)/,az=/['\n\r\u2028\u2029\\]/g,xd="\\ud800-\\udfff",sz="\\u0300-\\u036f",lz="\\ufe20-\\ufe2f",uz="\\u20d0-\\u20ff",pS=sz+lz+uz,mS="\\u2700-\\u27bf",gS="a-z\\xdf-\\xf6\\xf8-\\xff",cz="\\xac\\xb1\\xd7\\xf7",fz="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",dz="\\u2000-\\u206f",hz=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",yS="A-Z\\xc0-\\xd6\\xd8-\\xde",vS="\\ufe0e\\ufe0f",bS=cz+fz+dz+hz,cy="['’]",pz="["+xd+"]",xS="["+bS+"]",wd="["+pS+"]",wS="\\d+",mz="["+mS+"]",_S="["+gS+"]",SS="[^"+xd+bS+wS+mS+gS+yS+"]",fy="\\ud83c[\\udffb-\\udfff]",gz="(?:"+wd+"|"+fy+")",OS="[^"+xd+"]",dy="(?:\\ud83c[\\udde6-\\uddff]){2}",hy="[\\ud800-\\udbff][\\udc00-\\udfff]",Fs="["+yS+"]",CS="\\u200d",PS="(?:"+_S+"|"+SS+")",yz="(?:"+Fs+"|"+SS+")",AS="(?:"+cy+"(?:d|ll|m|re|s|t|ve))?",TS="(?:"+cy+"(?:D|LL|M|RE|S|T|VE))?",ES=gz+"?",kS="["+vS+"]?",vz="(?:"+CS+"(?:"+[OS,dy,hy].join("|")+")"+kS+ES+")*",bz="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xz="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",MS=kS+ES+vz,wz="(?:"+[mz,dy,hy].join("|")+")"+MS,_z="(?:"+[OS+wd+"?",wd,dy,hy,pz].join("|")+")",Sz=RegExp(cy,"g"),Oz=RegExp(wd,"g"),py=RegExp(fy+"(?="+fy+")|"+_z+MS,"g"),Cz=RegExp([Fs+"?"+_S+"+"+AS+"(?="+[xS,Fs,"$"].join("|")+")",yz+"+"+TS+"(?="+[xS,Fs+PS,"$"].join("|")+")",Fs+"?"+PS+"+"+AS,Fs+"+"+TS,xz,bz,wS,wz].join("|"),"g"),Pz=RegExp("["+CS+xd+pS+vS+"]"),Az=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Tz=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ez=-1,Et={};Et[tr]=Et[qe]=Et[$t]=Et[pt]=Et[Sn]=Et[$r]=Et[Hi]=Et[Xt]=Et[hr]=!0,Et[ce]=Et[ae]=Et[pn]=Et[re]=Et[rn]=Et[Q]=Et[ye]=Et[X]=Et[pe]=Et[Ie]=Et[tt]=Et[nt]=Et[Se]=Et[ze]=Et[Wt]=!1;var St={};St[ce]=St[ae]=St[pn]=St[rn]=St[re]=St[Q]=St[tr]=St[qe]=St[$t]=St[pt]=St[Sn]=St[pe]=St[Ie]=St[tt]=St[nt]=St[Se]=St[ze]=St[Lt]=St[$r]=St[Hi]=St[Xt]=St[hr]=!0,St[ye]=St[X]=St[Wt]=!1;var kz={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Mz={"&":"&","<":"<",">":">",'"':""","'":"'"},jz={"&":"&","<":"<",">":">",""":'"',"'":"'"},Nz={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$z=parseFloat,Dz=parseInt,jS=typeof Qe.commonjsGlobal=="object"&&Qe.commonjsGlobal&&Qe.commonjsGlobal.Object===Object&&Qe.commonjsGlobal,Iz=typeof self=="object"&&self&&self.Object===Object&&self,On=jS||Iz||Function("return this")(),my=t&&!t.nodeType&&t,$a=my&&!0&&e&&!e.nodeType&&e,NS=$a&&$a.exports===my,gy=NS&&jS.process,Ir=function(){try{var Z=$a&&$a.require&&$a.require("util").types;return Z||gy&&gy.binding&&gy.binding("util")}catch{}}(),$S=Ir&&Ir.isArrayBuffer,DS=Ir&&Ir.isDate,IS=Ir&&Ir.isMap,RS=Ir&&Ir.isRegExp,LS=Ir&&Ir.isSet,BS=Ir&&Ir.isTypedArray;function pr(Z,ue,oe){switch(oe.length){case 0:return Z.call(ue);case 1:return Z.call(ue,oe[0]);case 2:return Z.call(ue,oe[0],oe[1]);case 3:return Z.call(ue,oe[0],oe[1],oe[2])}return Z.apply(ue,oe)}function Rz(Z,ue,oe,Ce){for(var We=-1,st=Z==null?0:Z.length;++We-1}function yy(Z,ue,oe){for(var Ce=-1,We=Z==null?0:Z.length;++Ce-1;);return oe}function GS(Z,ue){for(var oe=Z.length;oe--&&Ws(ue,Z[oe],0)>-1;);return oe}function Hz(Z,ue){for(var oe=Z.length,Ce=0;oe--;)Z[oe]===ue&&++Ce;return Ce}var Gz=wy(kz),Yz=wy(Mz);function qz(Z){return"\\"+Nz[Z]}function Xz(Z,ue){return Z==null?n:Z[ue]}function zs(Z){return Pz.test(Z)}function Zz(Z){return Az.test(Z)}function Jz(Z){for(var ue,oe=[];!(ue=Z.next()).done;)oe.push(ue.value);return oe}function Cy(Z){var ue=-1,oe=Array(Z.size);return Z.forEach(function(Ce,We){oe[++ue]=[We,Ce]}),oe}function YS(Z,ue){return function(oe){return Z(ue(oe))}}function zo(Z,ue){for(var oe=-1,Ce=Z.length,We=0,st=[];++oe-1}function B5(c,h){var b=this.__data__,A=Bd(b,c);return A<0?(++this.size,b.push([c,h])):b[A][1]=h,this}Gi.prototype.clear=D5,Gi.prototype.delete=I5,Gi.prototype.get=R5,Gi.prototype.has=L5,Gi.prototype.set=B5;function Yi(c){var h=-1,b=c==null?0:c.length;for(this.clear();++h=h?c:h)),c}function Fr(c,h,b,A,j,R){var V,q=h&d,J=h&p,de=h&m;if(b&&(V=j?b(c,A,j,R):b(c)),V!==n)return V;if(!Bt(c))return c;var he=Ve(c);if(he){if(V=V3(c),!q)return nr(c,V)}else{var me=Rn(c),be=me==X||me==Re;if(Yo(c))return kO(c,q);if(me==tt||me==ce||be&&!j){if(V=J||be?{}:qO(c),!q)return J?j3(c,t3(V,c)):M3(c,aO(V,c))}else{if(!St[me])return j?c:{};V=U3(c,me,q)}}R||(R=new ei);var Ae=R.get(c);if(Ae)return Ae;R.set(c,V),OC(c)?c.forEach(function(Ne){V.add(Fr(Ne,h,b,Ne,c,R))}):_C(c)&&c.forEach(function(Ne,Je){V.set(Je,Fr(Ne,h,b,Je,c,R))});var je=de?J?Zy:Xy:J?ir:mn,Ye=he?n:je(c);return Rr(Ye||c,function(Ne,Je){Ye&&(Je=Ne,Ne=c[Je]),Uu(V,Je,Fr(Ne,h,b,Je,c,R))}),V}function n3(c){var h=mn(c);return function(b){return sO(b,c,h)}}function sO(c,h,b){var A=b.length;if(c==null)return!A;for(c=xt(c);A--;){var j=b[A],R=h[j],V=c[j];if(V===n&&!(j in c)||!R(V))return!1}return!0}function lO(c,h,b){if(typeof c!="function")throw new Lr(a);return Zu(function(){c.apply(n,b)},h)}function Ku(c,h,b,A){var j=-1,R=_d,V=!0,q=c.length,J=[],de=h.length;if(!q)return J;b&&(h=Dt(h,mr(b))),A?(R=yy,V=!1):h.length>=i&&(R=Lu,V=!1,h=new Ra(h));e:for(;++jj?0:j+b),A=A===n||A>j?j:Ke(A),A<0&&(A+=j),A=b>A?0:PC(A);b0&&b(q)?h>1?Cn(q,h-1,b,A,j):Wo(j,q):A||(j[j.length]=q)}return j}var jy=IO(),fO=IO(!0);function xi(c,h){return c&&jy(c,h,mn)}function Ny(c,h){return c&&fO(c,h,mn)}function Wd(c,h){return Fo(h,function(b){return Qi(c[b])})}function Ba(c,h){h=Ho(h,c);for(var b=0,A=h.length;c!=null&&bh}function o3(c,h){return c!=null&&mt.call(c,h)}function a3(c,h){return c!=null&&h in xt(c)}function s3(c,h,b){return c>=In(h,b)&&c=120&&he.length>=120)?new Ra(V&&he):n}he=c[0];var me=-1,be=q[0];e:for(;++me-1;)q!==c&&jd.call(q,J,1),jd.call(c,J,1);return c}function _O(c,h){for(var b=c?h.length:0,A=b-1;b--;){var j=h[b];if(b==A||j!==R){var R=j;Ji(j)?jd.call(c,j,1):Vy(c,j)}}return c}function Fy(c,h){return c+Dd(nO()*(h-c+1))}function x3(c,h,b,A){for(var j=-1,R=an($d((h-c)/(b||1)),0),V=oe(R);R--;)V[A?R:++j]=c,c+=b;return V}function Wy(c,h){var b="";if(!c||h<1||h>H)return b;do h%2&&(b+=c),h=Dd(h/2),h&&(c+=c);while(h);return b}function Xe(c,h){return iv(JO(c,h,or),c+"")}function w3(c){return oO(Qs(c))}function _3(c,h){var b=Qs(c);return Jd(b,La(h,0,b.length))}function Yu(c,h,b,A){if(!Bt(c))return c;h=Ho(h,c);for(var j=-1,R=h.length,V=R-1,q=c;q!=null&&++jj?0:j+h),b=b>j?j:b,b<0&&(b+=j),j=h>b?0:b-h>>>0,h>>>=0;for(var R=oe(j);++A>>1,V=c[R];V!==null&&!yr(V)&&(b?V<=h:V=i){var de=h?null:I3(c);if(de)return Od(de);V=!1,j=Lu,J=new Ra}else J=h?[]:q;e:for(;++A=A?c:Wr(c,h,b)}var EO=h5||function(c){return On.clearTimeout(c)};function kO(c,h){if(h)return c.slice();var b=c.length,A=ZS?ZS(b):new c.constructor(b);return c.copy(A),A}function Gy(c){var h=new c.constructor(c.byteLength);return new kd(h).set(new kd(c)),h}function A3(c,h){var b=h?Gy(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.byteLength)}function T3(c){var h=new c.constructor(c.source,hS.exec(c));return h.lastIndex=c.lastIndex,h}function E3(c){return Vu?xt(Vu.call(c)):{}}function MO(c,h){var b=h?Gy(c.buffer):c.buffer;return new c.constructor(b,c.byteOffset,c.length)}function jO(c,h){if(c!==h){var b=c!==n,A=c===null,j=c===c,R=yr(c),V=h!==n,q=h===null,J=h===h,de=yr(h);if(!q&&!de&&!R&&c>h||R&&V&&J&&!q&&!de||A&&V&&J||!b&&J||!j)return 1;if(!A&&!R&&!de&&c=q)return J;var de=b[A];return J*(de=="desc"?-1:1)}}return c.index-h.index}function NO(c,h,b,A){for(var j=-1,R=c.length,V=b.length,q=-1,J=h.length,de=an(R-V,0),he=oe(J+de),me=!A;++q1?b[j-1]:n,V=j>2?b[2]:n;for(R=c.length>3&&typeof R=="function"?(j--,R):n,V&&Hn(b[0],b[1],V)&&(R=j<3?n:R,j=1),h=xt(h);++A-1?j[R?h[V]:V]:n}}function BO(c){return Zi(function(h){var b=h.length,A=b,j=Br.prototype.thru;for(c&&h.reverse();A--;){var R=h[A];if(typeof R!="function")throw new Lr(a);if(j&&!V&&Xd(R)=="wrapper")var V=new Br([],!0)}for(A=V?A:b;++A1&&it.reverse(),he&&Jq))return!1;var de=R.get(c),he=R.get(h);if(de&&he)return de==h&&he==c;var me=-1,be=!0,Ae=b&v?new Ra:n;for(R.set(c,h),R.set(h,c);++me1?"& ":"")+h[A],h=h.join(b>2?", ":" "),c.replace(GW,`{ +/* [wrapped with `+h+`] */ +`)}function H3(c){return Ve(c)||za(c)||!!(eO&&c&&c[eO])}function Ji(c,h){var b=typeof c;return h=h??H,!!h&&(b=="number"||b!="symbol"&&iz.test(c))&&c>-1&&c%1==0&&c0){if(++h>=N)return arguments[0]}else h=0;return c.apply(n,arguments)}}function Jd(c,h){var b=-1,A=c.length,j=A-1;for(h=h===n?A:h;++b1?c[h-1]:n;return b=typeof b=="function"?(c.pop(),b):n,cC(c,b)});function fC(c){var h=I(c);return h.__chain__=!0,h}function r4(c,h){return h(c),c}function Qd(c,h){return h(c)}var i4=Zi(function(c){var h=c.length,b=h?c[0]:0,A=this.__wrapped__,j=function(R){return My(R,c)};return h>1||this.__actions__.length||!(A instanceof rt)||!Ji(b)?this.thru(j):(A=A.slice(b,+b+(h?1:0)),A.__actions__.push({func:Qd,args:[j],thisArg:n}),new Br(A,this.__chain__).thru(function(R){return h&&!R.length&&R.push(n),R}))});function o4(){return fC(this)}function a4(){return new Br(this.value(),this.__chain__)}function s4(){this.__values__===n&&(this.__values__=CC(this.value()));var c=this.__index__>=this.__values__.length,h=c?n:this.__values__[this.__index__++];return{done:c,value:h}}function l4(){return this}function u4(c){for(var h,b=this;b instanceof Ld;){var A=iC(b);A.__index__=0,A.__values__=n,h?j.__wrapped__=A:h=A;var j=A;b=b.__wrapped__}return j.__wrapped__=c,h}function c4(){var c=this.__wrapped__;if(c instanceof rt){var h=c;return this.__actions__.length&&(h=new rt(this)),h=h.reverse(),h.__actions__.push({func:Qd,args:[ov],thisArg:n}),new Br(h,this.__chain__)}return this.thru(ov)}function f4(){return AO(this.__wrapped__,this.__actions__)}var d4=Kd(function(c,h,b){mt.call(c,b)?++c[b]:qi(c,b,1)});function h4(c,h,b){var A=Ve(c)?FS:r3;return b&&Hn(c,h,b)&&(h=n),A(c,ke(h,3))}function p4(c,h){var b=Ve(c)?Fo:cO;return b(c,ke(h,3))}var m4=LO(oC),g4=LO(aC);function y4(c,h){return Cn(eh(c,h),1)}function v4(c,h){return Cn(eh(c,h),z)}function b4(c,h,b){return b=b===n?1:Ke(b),Cn(eh(c,h),b)}function dC(c,h){var b=Ve(c)?Rr:Uo;return b(c,ke(h,3))}function hC(c,h){var b=Ve(c)?Lz:uO;return b(c,ke(h,3))}var x4=Kd(function(c,h,b){mt.call(c,b)?c[b].push(h):qi(c,b,[h])});function w4(c,h,b,A){c=rr(c)?c:Qs(c),b=b&&!A?Ke(b):0;var j=c.length;return b<0&&(b=an(j+b,0)),oh(c)?b<=j&&c.indexOf(h,b)>-1:!!j&&Ws(c,h,b)>-1}var _4=Xe(function(c,h,b){var A=-1,j=typeof h=="function",R=rr(c)?oe(c.length):[];return Uo(c,function(V){R[++A]=j?pr(h,V,b):Hu(V,h,b)}),R}),S4=Kd(function(c,h,b){qi(c,b,h)});function eh(c,h){var b=Ve(c)?Dt:gO;return b(c,ke(h,3))}function O4(c,h,b,A){return c==null?[]:(Ve(h)||(h=h==null?[]:[h]),b=A?n:b,Ve(b)||(b=b==null?[]:[b]),xO(c,h,b))}var C4=Kd(function(c,h,b){c[b?0:1].push(h)},function(){return[[],[]]});function P4(c,h,b){var A=Ve(c)?vy:US,j=arguments.length<3;return A(c,ke(h,4),b,j,Uo)}function A4(c,h,b){var A=Ve(c)?Bz:US,j=arguments.length<3;return A(c,ke(h,4),b,j,uO)}function T4(c,h){var b=Ve(c)?Fo:cO;return b(c,rh(ke(h,3)))}function E4(c){var h=Ve(c)?oO:w3;return h(c)}function k4(c,h,b){(b?Hn(c,h,b):h===n)?h=1:h=Ke(h);var A=Ve(c)?J5:_3;return A(c,h)}function M4(c){var h=Ve(c)?Q5:O3;return h(c)}function j4(c){if(c==null)return 0;if(rr(c))return oh(c)?Vs(c):c.length;var h=Rn(c);return h==pe||h==Se?c.size:Ry(c).length}function N4(c,h,b){var A=Ve(c)?by:C3;return b&&Hn(c,h,b)&&(h=n),A(c,ke(h,3))}var $4=Xe(function(c,h){if(c==null)return[];var b=h.length;return b>1&&Hn(c,h[0],h[1])?h=[]:b>2&&Hn(h[0],h[1],h[2])&&(h=[h[0]]),xO(c,Cn(h,1),[])}),th=p5||function(){return On.Date.now()};function D4(c,h){if(typeof h!="function")throw new Lr(a);return c=Ke(c),function(){if(--c<1)return h.apply(this,arguments)}}function pC(c,h,b){return h=b?n:h,h=c&&h==null?c.length:h,Xi(c,E,n,n,n,n,h)}function mC(c,h){var b;if(typeof h!="function")throw new Lr(a);return c=Ke(c),function(){return--c>0&&(b=h.apply(this,arguments)),c<=1&&(h=n),b}}var sv=Xe(function(c,h,b){var A=y;if(b.length){var j=zo(b,Zs(sv));A|=_}return Xi(c,A,h,b,j)}),gC=Xe(function(c,h,b){var A=y|x;if(b.length){var j=zo(b,Zs(gC));A|=_}return Xi(h,A,c,b,j)});function yC(c,h,b){h=b?n:h;var A=Xi(c,S,n,n,n,n,n,h);return A.placeholder=yC.placeholder,A}function vC(c,h,b){h=b?n:h;var A=Xi(c,P,n,n,n,n,n,h);return A.placeholder=vC.placeholder,A}function bC(c,h,b){var A,j,R,V,q,J,de=0,he=!1,me=!1,be=!0;if(typeof c!="function")throw new Lr(a);h=Vr(h)||0,Bt(b)&&(he=!!b.leading,me="maxWait"in b,R=me?an(Vr(b.maxWait)||0,h):R,be="trailing"in b?!!b.trailing:be);function Ae(Gt){var ni=A,to=j;return A=j=n,de=Gt,V=c.apply(to,ni),V}function je(Gt){return de=Gt,q=Zu(Je,h),he?Ae(Gt):V}function Ye(Gt){var ni=Gt-J,to=Gt-de,LC=h-ni;return me?In(LC,R-to):LC}function Ne(Gt){var ni=Gt-J,to=Gt-de;return J===n||ni>=h||ni<0||me&&to>=R}function Je(){var Gt=th();if(Ne(Gt))return it(Gt);q=Zu(Je,Ye(Gt))}function it(Gt){return q=n,be&&A?Ae(Gt):(A=j=n,V)}function vr(){q!==n&&EO(q),de=0,A=J=j=q=n}function Gn(){return q===n?V:it(th())}function br(){var Gt=th(),ni=Ne(Gt);if(A=arguments,j=this,J=Gt,ni){if(q===n)return je(J);if(me)return EO(q),q=Zu(Je,h),Ae(J)}return q===n&&(q=Zu(Je,h)),V}return br.cancel=vr,br.flush=Gn,br}var I4=Xe(function(c,h){return lO(c,1,h)}),R4=Xe(function(c,h,b){return lO(c,Vr(h)||0,b)});function L4(c){return Xi(c,M)}function nh(c,h){if(typeof c!="function"||h!=null&&typeof h!="function")throw new Lr(a);var b=function(){var A=arguments,j=h?h.apply(this,A):A[0],R=b.cache;if(R.has(j))return R.get(j);var V=c.apply(this,A);return b.cache=R.set(j,V)||R,V};return b.cache=new(nh.Cache||Yi),b}nh.Cache=Yi;function rh(c){if(typeof c!="function")throw new Lr(a);return function(){var h=arguments;switch(h.length){case 0:return!c.call(this);case 1:return!c.call(this,h[0]);case 2:return!c.call(this,h[0],h[1]);case 3:return!c.call(this,h[0],h[1],h[2])}return!c.apply(this,h)}}function B4(c){return mC(2,c)}var F4=P3(function(c,h){h=h.length==1&&Ve(h[0])?Dt(h[0],mr(ke())):Dt(Cn(h,1),mr(ke()));var b=h.length;return Xe(function(A){for(var j=-1,R=In(A.length,b);++j=h}),za=hO(function(){return arguments}())?hO:function(c){return zt(c)&&mt.call(c,"callee")&&!QS.call(c,"callee")},Ve=oe.isArray,tU=$S?mr($S):u3;function rr(c){return c!=null&&ih(c.length)&&!Qi(c)}function Ht(c){return zt(c)&&rr(c)}function nU(c){return c===!0||c===!1||zt(c)&&Kn(c)==re}var Yo=g5||bv,rU=DS?mr(DS):c3;function iU(c){return zt(c)&&c.nodeType===1&&!Ju(c)}function oU(c){if(c==null)return!0;if(rr(c)&&(Ve(c)||typeof c=="string"||typeof c.splice=="function"||Yo(c)||Js(c)||za(c)))return!c.length;var h=Rn(c);if(h==pe||h==Se)return!c.size;if(Xu(c))return!Ry(c).length;for(var b in c)if(mt.call(c,b))return!1;return!0}function aU(c,h){return Gu(c,h)}function sU(c,h,b){b=typeof b=="function"?b:n;var A=b?b(c,h):n;return A===n?Gu(c,h,n,b):!!A}function uv(c){if(!zt(c))return!1;var h=Kn(c);return h==ye||h==fe||typeof c.message=="string"&&typeof c.name=="string"&&!Ju(c)}function lU(c){return typeof c=="number"&&tO(c)}function Qi(c){if(!Bt(c))return!1;var h=Kn(c);return h==X||h==Re||h==le||h==Me}function wC(c){return typeof c=="number"&&c==Ke(c)}function ih(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=H}function Bt(c){var h=typeof c;return c!=null&&(h=="object"||h=="function")}function zt(c){return c!=null&&typeof c=="object"}var _C=IS?mr(IS):d3;function uU(c,h){return c===h||Iy(c,h,Qy(h))}function cU(c,h,b){return b=typeof b=="function"?b:n,Iy(c,h,Qy(h),b)}function fU(c){return SC(c)&&c!=+c}function dU(c){if(q3(c))throw new We(o);return pO(c)}function hU(c){return c===null}function pU(c){return c==null}function SC(c){return typeof c=="number"||zt(c)&&Kn(c)==Ie}function Ju(c){if(!zt(c)||Kn(c)!=tt)return!1;var h=Md(c);if(h===null)return!0;var b=mt.call(h,"constructor")&&h.constructor;return typeof b=="function"&&b instanceof b&&Ad.call(b)==c5}var cv=RS?mr(RS):h3;function mU(c){return wC(c)&&c>=-H&&c<=H}var OC=LS?mr(LS):p3;function oh(c){return typeof c=="string"||!Ve(c)&&zt(c)&&Kn(c)==ze}function yr(c){return typeof c=="symbol"||zt(c)&&Kn(c)==Lt}var Js=BS?mr(BS):m3;function gU(c){return c===n}function yU(c){return zt(c)&&Rn(c)==Wt}function vU(c){return zt(c)&&Kn(c)==Nr}var bU=qd(Ly),xU=qd(function(c,h){return c<=h});function CC(c){if(!c)return[];if(rr(c))return oh(c)?Qr(c):nr(c);if(Bu&&c[Bu])return Jz(c[Bu]());var h=Rn(c),b=h==pe?Cy:h==Se?Od:Qs;return b(c)}function eo(c){if(!c)return c===0?c:0;if(c=Vr(c),c===z||c===-z){var h=c<0?-1:1;return h*U}return c===c?c:0}function Ke(c){var h=eo(c),b=h%1;return h===h?b?h-b:h:0}function PC(c){return c?La(Ke(c),0,Y):0}function Vr(c){if(typeof c=="number")return c;if(yr(c))return K;if(Bt(c)){var h=typeof c.valueOf=="function"?c.valueOf():c;c=Bt(h)?h+"":h}if(typeof c!="string")return c===0?c:+c;c=KS(c);var b=tz.test(c);return b||rz.test(c)?Dz(c.slice(2),b?2:8):ez.test(c)?K:+c}function AC(c){return wi(c,ir(c))}function wU(c){return c?La(Ke(c),-H,H):c===0?c:0}function ut(c){return c==null?"":gr(c)}var _U=qs(function(c,h){if(Xu(h)||rr(h)){wi(h,mn(h),c);return}for(var b in h)mt.call(h,b)&&Uu(c,b,h[b])}),TC=qs(function(c,h){wi(h,ir(h),c)}),ah=qs(function(c,h,b,A){wi(h,ir(h),c,A)}),SU=qs(function(c,h,b,A){wi(h,mn(h),c,A)}),OU=Zi(My);function CU(c,h){var b=Ys(c);return h==null?b:aO(b,h)}var PU=Xe(function(c,h){c=xt(c);var b=-1,A=h.length,j=A>2?h[2]:n;for(j&&Hn(h[0],h[1],j)&&(A=1);++b1),R}),wi(c,Zy(c),b),A&&(b=Fr(b,d|p|m,R3));for(var j=h.length;j--;)Vy(b,h[j]);return b});function UU(c,h){return kC(c,rh(ke(h)))}var KU=Zi(function(c,h){return c==null?{}:v3(c,h)});function kC(c,h){if(c==null)return{};var b=Dt(Zy(c),function(A){return[A]});return h=ke(h),wO(c,b,function(A,j){return h(A,j[0])})}function HU(c,h,b){h=Ho(h,c);var A=-1,j=h.length;for(j||(j=1,c=n);++Ah){var A=c;c=h,h=A}if(b||c%1||h%1){var j=nO();return In(c+j*(h-c+$z("1e-"+((j+"").length-1))),h)}return Fy(c,h)}var r6=Xs(function(c,h,b){return h=h.toLowerCase(),c+(b?NC(h):h)});function NC(c){return hv(ut(c).toLowerCase())}function $C(c){return c=ut(c),c&&c.replace(oz,Gz).replace(Oz,"")}function i6(c,h,b){c=ut(c),h=gr(h);var A=c.length;b=b===n?A:La(Ke(b),0,A);var j=b;return b-=h.length,b>=0&&c.slice(b,j)==h}function o6(c){return c=ut(c),c&&Iu.test(c)?c.replace(vd,Yz):c}function a6(c){return c=ut(c),c&&KW.test(c)?c.replace(ly,"\\$&"):c}var s6=Xs(function(c,h,b){return c+(b?"-":"")+h.toLowerCase()}),l6=Xs(function(c,h,b){return c+(b?" ":"")+h.toLowerCase()}),u6=RO("toLowerCase");function c6(c,h,b){c=ut(c),h=Ke(h);var A=h?Vs(c):0;if(!h||A>=h)return c;var j=(h-A)/2;return Yd(Dd(j),b)+c+Yd($d(j),b)}function f6(c,h,b){c=ut(c),h=Ke(h);var A=h?Vs(c):0;return h&&A>>0,b?(c=ut(c),c&&(typeof h=="string"||h!=null&&!cv(h))&&(h=gr(h),!h&&zs(c))?Go(Qr(c),0,b):c.split(h,b)):[]}var v6=Xs(function(c,h,b){return c+(b?" ":"")+hv(h)});function b6(c,h,b){return c=ut(c),b=b==null?0:La(Ke(b),0,c.length),h=gr(h),c.slice(b,b+h.length)==h}function x6(c,h,b){var A=I.templateSettings;b&&Hn(c,h,b)&&(h=n),c=ut(c),h=ah({},h,A,UO);var j=ah({},h.imports,A.imports,UO),R=mn(j),V=Oy(j,R),q,J,de=0,he=h.interpolate||bd,me="__p += '",be=Py((h.escape||bd).source+"|"+he.source+"|"+(he===dS?QW:bd).source+"|"+(h.evaluate||bd).source+"|$","g"),Ae="//# sourceURL="+(mt.call(h,"sourceURL")?(h.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ez+"]")+` +`;c.replace(be,function(Ne,Je,it,vr,Gn,br){return it||(it=vr),me+=c.slice(de,br).replace(az,qz),Je&&(q=!0,me+=`' + +__e(`+Je+`) + +'`),Gn&&(J=!0,me+=`'; +`+Gn+`; +__p += '`),it&&(me+=`' + +((__t = (`+it+`)) == null ? '' : __t) + +'`),de=br+Ne.length,Ne}),me+=`'; +`;var je=mt.call(h,"variable")&&h.variable;if(!je)me=`with (obj) { +`+me+` +} +`;else if(ZW.test(je))throw new We(s);me=(J?me.replace(Zt,""):me).replace(Dr,"$1").replace(lt,"$1;"),me="function("+(je||"obj")+`) { +`+(je?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(q?", __e = _.escape":"")+(J?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+me+`return __p +}`;var Ye=IC(function(){return st(R,Ae+"return "+me).apply(n,V)});if(Ye.source=me,uv(Ye))throw Ye;return Ye}function w6(c){return ut(c).toLowerCase()}function _6(c){return ut(c).toUpperCase()}function S6(c,h,b){if(c=ut(c),c&&(b||h===n))return KS(c);if(!c||!(h=gr(h)))return c;var A=Qr(c),j=Qr(h),R=HS(A,j),V=GS(A,j)+1;return Go(A,R,V).join("")}function O6(c,h,b){if(c=ut(c),c&&(b||h===n))return c.slice(0,qS(c)+1);if(!c||!(h=gr(h)))return c;var A=Qr(c),j=GS(A,Qr(h))+1;return Go(A,0,j).join("")}function C6(c,h,b){if(c=ut(c),c&&(b||h===n))return c.replace(uy,"");if(!c||!(h=gr(h)))return c;var A=Qr(c),j=HS(A,Qr(h));return Go(A,j).join("")}function P6(c,h){var b=D,A=$;if(Bt(h)){var j="separator"in h?h.separator:j;b="length"in h?Ke(h.length):b,A="omission"in h?gr(h.omission):A}c=ut(c);var R=c.length;if(zs(c)){var V=Qr(c);R=V.length}if(b>=R)return c;var q=b-Vs(A);if(q<1)return A;var J=V?Go(V,0,q).join(""):c.slice(0,q);if(j===n)return J+A;if(V&&(q+=J.length-q),cv(j)){if(c.slice(q).search(j)){var de,he=J;for(j.global||(j=Py(j.source,ut(hS.exec(j))+"g")),j.lastIndex=0;de=j.exec(he);)var me=de.index;J=J.slice(0,me===n?q:me)}}else if(c.indexOf(gr(j),q)!=q){var be=J.lastIndexOf(j);be>-1&&(J=J.slice(0,be))}return J+A}function A6(c){return c=ut(c),c&&sy.test(c)?c.replace(yd,n5):c}var T6=Xs(function(c,h,b){return c+(b?" ":"")+h.toUpperCase()}),hv=RO("toUpperCase");function DC(c,h,b){return c=ut(c),h=b?n:h,h===n?Zz(c)?o5(c):zz(c):c.match(h)||[]}var IC=Xe(function(c,h){try{return pr(c,n,h)}catch(b){return uv(b)?b:new We(b)}}),E6=Zi(function(c,h){return Rr(h,function(b){b=_i(b),qi(c,b,sv(c[b],c))}),c});function k6(c){var h=c==null?0:c.length,b=ke();return c=h?Dt(c,function(A){if(typeof A[1]!="function")throw new Lr(a);return[b(A[0]),A[1]]}):[],Xe(function(A){for(var j=-1;++jH)return[];var b=Y,A=In(c,Y);h=ke(h),c-=Y;for(var j=Sy(A,h);++b0||h<0)?new rt(b):(c<0?b=b.takeRight(-c):c&&(b=b.drop(c)),h!==n&&(h=Ke(h),b=h<0?b.dropRight(-h):b.take(h-c)),b)},rt.prototype.takeRightWhile=function(c){return this.reverse().takeWhile(c).reverse()},rt.prototype.toArray=function(){return this.take(Y)},xi(rt.prototype,function(c,h){var b=/^(?:filter|find|map|reject)|While$/.test(h),A=/^(?:head|last)$/.test(h),j=I[A?"take"+(h=="last"?"Right":""):h],R=A||/^find/.test(h);j&&(I.prototype[h]=function(){var V=this.__wrapped__,q=A?[1]:arguments,J=V instanceof rt,de=q[0],he=J||Ve(V),me=function(Je){var it=j.apply(I,Wo([Je],q));return A&&be?it[0]:it};he&&b&&typeof de=="function"&&de.length!=1&&(J=he=!1);var be=this.__chain__,Ae=!!this.__actions__.length,je=R&&!be,Ye=J&&!Ae;if(!R&&he){V=Ye?V:new rt(this);var Ne=c.apply(V,q);return Ne.__actions__.push({func:Qd,args:[me],thisArg:n}),new Br(Ne,be)}return je&&Ye?c.apply(this,q):(Ne=this.thru(me),je?A?Ne.value()[0]:Ne.value():Ne)})}),Rr(["pop","push","shift","sort","splice","unshift"],function(c){var h=Cd[c],b=/^(?:push|sort|unshift)$/.test(c)?"tap":"thru",A=/^(?:pop|shift)$/.test(c);I.prototype[c]=function(){var j=arguments;if(A&&!this.__chain__){var R=this.value();return h.apply(Ve(R)?R:[],j)}return this[b](function(V){return h.apply(Ve(V)?V:[],j)})}}),xi(rt.prototype,function(c,h){var b=I[h];if(b){var A=b.name+"";mt.call(Gs,A)||(Gs[A]=[]),Gs[A].push({name:h,func:b})}}),Gs[Hd(n,x).name]=[{name:"wrapper",func:n}],rt.prototype.clone=A5,rt.prototype.reverse=T5,rt.prototype.value=E5,I.prototype.at=i4,I.prototype.chain=o4,I.prototype.commit=a4,I.prototype.next=s4,I.prototype.plant=u4,I.prototype.reverse=c4,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=f4,I.prototype.first=I.prototype.head,Bu&&(I.prototype[Bu]=l4),I},Us=a5();$a?(($a.exports=Us)._=Us,my._=Us):On._=Us}).call(Qe.commonjsGlobal)})(Pp,Pp.exports);var rQ=Pp.exports;const Fx={sm:"text-xs [&>svg]:size-4 rounded",md:"text-sm [&>svg]:size-5 rounded-md",lg:"text-base [&>svg]:size-6 rounded-md"},Ni={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"}},iQ={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"},oQ="text-icon-secondary group-hover:text-icon-primary group-focus-within:text-icon-primary",$T={ghost:"cursor-not-allowed text-text-disabled placeholder:text-text-disabled",primary:"border-border-disabled hover:border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled",secondary:"border-border-disabled hover:border-border-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled"},zR=O.createContext({}),Ms=()=>O.useContext(zR),zi=O.forwardRef(({className:e,size:t="sm",open:n=!1,onOpenChange:r=()=>{},loading:i=!1,...o},a)=>{const[s,l]=O.useState(""),[u,f]=O.useState(i??!1),{refs:d,floatingStyles:p,context:m}=Hm({open:n,onOpenChange:r,placement:"bottom-start",whileElementsMounted:Lm,middleware:[Bm(t==="sm"?4:6),Fm({padding:10}),UN({apply({rects:x,elements:w,availableHeight:S}){w.floating.style.maxHeight=`${S}px`,w.floating.style.width=`${x.reference.width}px`,w.floating.style.fontFamily=window.getComputedStyle(w.reference).fontFamily}})]}),g=Km(m),{getReferenceProps:v,getFloatingProps:y}=Gm([g]);return O.useEffect(()=>{const x=q8(),w=S=>{const _=x==="Mac OS"?S.metaKey:S.ctrlKey;if(S.key==="/"&&_&&(S.preventDefault(),d.reference&&d.reference.current)){const C=d.reference.current instanceof HTMLElement?d.reference.current.querySelector("input"):null;C&&C.focus()}};return window.addEventListener("keydown",w),()=>{window.removeEventListener("keydown",w)}},[d.reference]),T.jsx(zR.Provider,{value:{size:t,open:n,onOpenChange:r,refs:d,floatingStyles:p,context:m,getReferenceProps:v,getFloatingProps:y,searchTerm:s,setSearchTerm:l,isLoading:u,setIsLoading:f},children:T.jsx("div",{className:G("searchbox-wrapper box-border relative w-full",e),...o,ref:a})})});zi.displayName="SearchBox";const VR=O.forwardRef(({className:e,type:t="text",placeholder:n="Search...",variant:r="primary",disabled:i=!1,onChange:o=()=>{},...a},s)=>{const{size:l,onOpenChange:u,refs:f,getReferenceProps:d,searchTerm:p,setSearchTerm:m}=Ms(),g=l==="lg"?"sm":"xs",v=y=>{const x=y.target.value;m(x),o(x),typeof u=="function"&&(x.trim()?u(!0):u(!1))};return T.jsxs("div",{ref:f.setReference,className:G("w-full group relative flex justify-center items-center gap-1.5 focus-within:z-10 transition-colors ease-in-out duration-150",iQ[r],Ni.input[l],i?$T[r]:"focus-within:ring-2 focus-within:ring-focus focus-within:ring-offset-2 focus-within:border-focus-border focus-within:hover:border-focus-border"),...d,children:[T.jsx("span",{className:G(Fx[l],i?"text-icon-disabled":oQ,"flex justify-center items-center"),children:T.jsx(SN,{})}),T.jsx("input",{type:t,ref:s,className:G(Fx[l],"flex-grow font-medium bg-transparent border-none outline-none border-transparent focus:ring-0 py-0",i?$T[r]:["text-field-placeholder focus-within:text-field-input group-hover:text-field-input","placeholder:text-field-placeholder"],e),disabled:i,value:p,onChange:v,placeholder:n,...rQ.omit(a,["size","open","onOpenChange","loading"])}),T.jsx(Kf,{label:"⌘/",size:g,type:"rounded",variant:"neutral"})]})});VR.displayName="SearchBox.Input";const UR=({className:e,dropdownPortalRoot:t=null,dropdownPortalId:n="",children:r,...i})=>{const{size:o,open:a,refs:s,floatingStyles:l,getFloatingProps:u}=Ms();return a?T.jsx(Um,{id:n,root:t,children:T.jsx("div",{ref:s.setFloating,style:{...l},className:G("bg-background-primary rounded-md border border-solid border-border-subtle shadow-soft-shadow-lg overflow-y-auto text-wrap",Ni.dialog[o],e),...u(),...i,children:r})}):null};UR.displayName="SearchBox.Content";const KR=({filter:e=!0,children:t})=>{const{searchTerm:n,isLoading:r}=Ms();if(!e)return T.jsx("div",{children:t});const i=O.Children.toArray(t).map(o=>{if(O.isValidElement(o)&&o.type===Q1){const a=O.Children.toArray(o.props.children).filter(s=>O.isValidElement(s)&&typeof s.props.children=="string"&&s.props.children.toLowerCase().includes(n.toLowerCase()));return a.length>0?O.cloneElement(o,{children:a}):null}return o}).filter(Boolean);return r?T.jsx(e_,{}):T.jsx("div",{children:i.some(o=>O.isValidElement(o)&&o.type!==t_)?i:T.jsx(J1,{})})};KR.displayName="SearchBox.List";const J1=({children:e="No results found."})=>{const{size:t}=Ms();return T.jsx("div",{className:G("flex justify-center items-center",Ni.item[t],"text-text-tertiary p-4"),children:e})};J1.displayName="SearchBox.Empty";const Q1=({heading:e,children:t})=>{const{size:n}=Ms();return T.jsxs("div",{className:G(Ni.content[n],Ni.item[n]),children:[e&&T.jsx("div",{className:G(Ni.title[n],"text-text-secondary"),children:e}),t]})};Q1.displayName="SearchBox.Group";const HR=O.forwardRef(({className:e,icon:t,children:n,...r},i)=>{const{size:o}=Ms();return T.jsxs("div",{ref:i,className:G("flex items-center justify-start gap-1 p-1 hover:bg-background-secondary focus:bg-background-secondary cursor-pointer",Ni.item[o]),...r,children:[t&&T.jsx("span",{className:G(Ni.icon[o],"flex items-center justify-center"),children:t}),T.jsx("span",{className:G("flex-grow p-1 font-normal cursor-pointer",Ni.item[o],e),children:n})]})});HR.displayName="SearchBox.Item";const e_=({loadingIcon:e=T.jsx(Fw,{})})=>{const{size:t}=Ms(),n=O.isValidElement(e)?O.cloneElement(e,{size:t}):e;return T.jsx("div",{className:G("flex justify-center p-4",Fx[t],Ni.item[t]),children:n})};e_.displayName="SearchBox.Loading";const t_=O.forwardRef(({className:e,...t},n)=>T.jsx("hr",{ref:n,className:G("border-0 border-t border-border-subtle border-solid m-0",e),...t}));t_.displayName="SearchBox.Separator";zi.Input=VR;zi.Loading=e_;zi.Separator=t_;zi.Content=UR;zi.List=KR;zi.Empty=J1;zi.Group=Q1;zi.Item=HR;const GR=O.createContext({}),aQ=()=>O.useContext(GR),js=({placement:e="bottom",offset:t=10,boundary:n="clippingAncestors",dropdownPortalRoot:r,dropdownPortalId:i,children:o,className:a})=>{const[s,l]=O.useState(!1),{refs:u,floatingStyles:f,context:d}=Hm({open:s,onOpenChange:l,placement:e,strategy:"absolute",middleware:[Bm(t),Fm({boundary:n}),VN({boundary:n})],whileElementsMounted:Lm}),p=Rw(d),m=Km(d),g=Lw(d,{role:"menu"}),{getReferenceProps:v,getFloatingProps:y}=Gm([p,m,g]),{isMounted:x,styles:w}=QN(d,{duration:150,initial:{opacity:0,scale:.95},open:{opacity:1,scale:1},close:{opacity:0,scale:.95}}),S=()=>l(_=>!_),P=()=>l(!1);return T.jsx(GR.Provider,{value:{handleClose:P},children:T.jsxs("div",{className:G("relative inline-block",a),children:[O.Children.map(o,_=>{var C;return O.isValidElement(_)&&((C=_==null?void 0:_.type)==null?void 0:C.displayName)==="DropdownMenu.Trigger"?O.cloneElement(_,{ref:u.setReference,onClick:S,...v()}):null}),x&&T.jsx(Um,{id:i,root:r,children:T.jsx("div",{ref:u.setFloating,style:{...f,...w},...y(),children:O.Children.map(o,_=>{var C;return((C=_==null?void 0:_.type)==null?void 0:C.displayName)==="DropdownMenu.Content"?_:null})})})]})})};js.displayName="DropdownMenu";const YR=O.forwardRef(({children:e,className:t,...n},r)=>O.isValidElement(e)?O.cloneElement(e,{className:t,ref:r,...n}):T.jsx("div",{ref:r,className:G("cursor-pointer",t),role:"button",tabIndex:0,...n,children:e}));YR.displayName="DropdownMenu.Trigger";const qR=({children:e,className:t,...n})=>T.jsx("div",{className:G("border border-solid border-border-subtle rounded-md shadow-lg overflow-hidden",t),children:T.jsx($o,{...n,children:e})});qR.displayName="DropdownMenu.Content";const XR=e=>T.jsx($o.List,{...e});XR.displayName="DropdownMenu.List";const ZR=({children:e,as:t=$o.Item,...n})=>{var i;const{handleClose:r}=aQ();return e?t===O.Fragment&&O.isValidElement(e)?O.cloneElement(e,{onClick:zc((i=e.props)==null?void 0:i.onClick,r)}):T.jsx(t,{...n,className:G("px-2",n.className),onClick:zc(n.onClick,r),children:e}):null};ZR.displayName="DropdownMenu.Item";const JR=e=>T.jsx($o.Separator,{...e});JR.displayName="DropdownMenu.Separator";js.Trigger=YR;js.Content=qR;js.List=XR;js.Item=ZR;js.Separator=JR;const sQ={left:{open:{x:0},exit:{x:"-100%"}},right:{open:{x:0},exit:{x:"100%"}}},QR=({children:e,className:t})=>{const{open:n,position:r,handleClose:i,drawerRef:o,transitionDuration:a}=wg();return T.jsx(Es,{children:n&&T.jsx("div",{className:"fixed inset-0",children:T.jsx("div",{className:G("flex items-center justify-center h-full",{"justify-start":r==="left","justify-end":r==="right"}),children:T.jsx(hi.div,{ref:o,className:G("flex flex-col gap-5 w-120 h-full bg-background-primary shadow-2xl my-5 overflow-hidden",t),initial:"exit",animate:"open",exit:"exit",variants:sQ[r],transition:a,children:typeof e=="function"?e({close:i}):e})})})})};QR.displayName="Drawer.Panel";const e2=({children:e,className:t,...n})=>T.jsx("div",{className:G("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});e2.displayName="Drawer.Header";const t2=({children:e,as:t="h3",className:n,...r})=>T.jsx(t,{className:G("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});t2.displayName="Drawer.Title";const n2=({children:e,as:t="p",className:n,...r})=>T.jsx(t,{className:G("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});n2.displayName="Drawer.Description";const r2=({children:e,className:t,...n})=>T.jsx("div",{className:G("px-5 flex flex-col flex-1 overflow-y-auto overflow-x-hidden",t),...n,children:e});r2.displayName="Drawer.Body";const i2=({children:e,className:t})=>{const{design:n,handleClose:r}=wg(),i=()=>e?typeof e=="function"?e({close:r}):e:null;return T.jsx("div",{className:G("p-5 flex justify-end gap-3 mt-auto",{"bg-background-secondary":n==="footer-divided"},t),children:i()})};i2.displayName="Drawer.Footer";const DT=({className:e,...t})=>T.jsx("button",{className:G("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close drawer",...t,children:T.jsx(ma,{className:"size-4 text-text-primary shrink-0"})}),o2=({children:e,as:t=O.Fragment,...n})=>{const{handleClose:r}=wg();return e?t===O.Fragment?typeof e=="function"?e({close:r}):O.isValidElement(e)?O.cloneElement(e,{onClick:r}):T.jsx(DT,{onClick:r,...n}):T.jsx(t,{...n,onClick:r,children:e}):T.jsx(DT,{onClick:r,...n})};o2.displayName="Drawer.CloseButton";const lQ={open:{opacity:1},exit:{opacity:0}},a2=({className:e,...t})=>{const{open:n,drawerContainerRef:r,transitionDuration:i}=wg();return r!=null&&r.current?!!r.current&&kl.createPortal(T.jsx(Es,{children:n&&T.jsx(hi.div,{className:G("fixed inset-0 -z-10 bg-background-inverse/90 backdrop-blur-sm",e),...t,initial:"exit",animate:"open",exit:"exit",variants:lQ,transition:i})}),r.current):null};a2.displayName="Drawer.Backdrop";const uQ=.2,s2=O.createContext({}),wg=()=>O.useContext(s2),Vi=({open:e,setOpen:t,children:n,trigger:r,className:i,exitOnClickOutside:o=!1,exitOnEsc:a=!0,design:s="simple",position:l="right",transitionDuration:u=uQ,scrollLock:f=!0})=>{const d=e!==void 0&&t!==void 0,[p,m]=O.useState(!1),g=O.useRef(null),v=O.useRef(null),y=O.useMemo(()=>d?e:p,[e,p]),x=O.useMemo(()=>d?t:m,[m,m]),w=()=>{y||x(!0)},S=()=>{y&&x(!1)},P=O.useCallback(()=>O.isValidElement(r)?O.cloneElement(r,{onClick:zc(w,r.props.onClick)}):typeof r=="function"?r({onClick:w}):null,[r,w,S]),_=E=>{switch(E.key){case"Escape":a&&S();break}},C=E=>{o&&g.current&&!g.current.contains(E.target)&&S()};return O.useEffect(()=>(window.addEventListener("keydown",_),document.addEventListener("mousedown",C),()=>{window.removeEventListener("keydown",_),document.removeEventListener("mousedown",C)}),[y]),O.useEffect(()=>{if(!f)return;const E=document.querySelector("html");return y&&E&&(E.style.overflow="hidden"),()=>{E&&(E.style.overflow="")}},[y]),T.jsxs(T.Fragment,{children:[P(),T.jsx(s2.Provider,{value:{open:y,setOpen:x,handleClose:S,design:s,position:l,drawerContainerRef:v,drawerRef:g,transitionDuration:{duration:u}},children:T.jsx("div",{className:G("fixed z-auto w-0 h-0 overflow-visible",i),ref:v,role:"dialog","aria-modal":"true","aria-label":"drawer",children:n})})]})};Vi.displayName="Drawer";Vi.Panel=QR;Vi.Header=e2;Vi.Title=t2;Vi.Description=n2;Vi.Body=r2;Vi.CloseButton=o2;Vi.Footer=i2;Vi.Backdrop=a2;const _g={xs:{general:"text-xs min-w-6 h-6",ellipse:"text-xs min-w-6",icon:"size-4"},sm:{general:"text-xs min-w-8 h-8",ellipse:"text-xs min-w-8",icon:"size-4"},md:{general:"text-sm min-w-10 h-10",ellipse:"text-sm min-w-10",icon:"size-5"},lg:{general:"text-base min-w-12 h-12",ellipse:"text-base min-w-12",icon:"size-6"}},_s={general:"group disabled:border-field-border-disabled opacity-50",text:"group-disabled:text-field-color-disabled"},l2=O.createContext({size:"sm",disabled:!1}),id=()=>O.useContext(l2),Ns=({size:e="sm",disabled:t=!1,children:n,className:r,...i})=>T.jsx(l2.Provider,{value:{size:e,disabled:t},children:T.jsx("nav",{role:"navigation","aria-label":"pagination",className:G("flex w-full justify-center box-border m-0",r),...i,children:n})});Ns.displayName="Pagination";const u2=O.forwardRef(({className:e,...t},n)=>T.jsx("ul",{ref:n,className:G("m-0 p-0 w-full flex justify-center flex-row items-center gap-1","list-none",e),...t}));u2.displayName="Pagination.Content";const c2=O.forwardRef(({isActive:e=!1,className:t,children:n,...r},i)=>{const{disabled:o}=id();return T.jsx("li",{ref:i,className:G("flex",o&&_s.general),children:T.jsx(n_,{isActive:e,disabled:o,className:t,...r,children:n})})});c2.displayName="Pagination.Item";const n_=({isActive:e=!1,tag:t="a",children:n,className:r,...i})=>{const{size:o,disabled:a}=id(),s=l=>l.preventDefault();return T.jsx(Wn,{tag:t,size:o,variant:"ghost",className:G("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",_g[o].general,!a&&e&&"text-button-primary active:text-button-primary bg-brand-background-50",a&&[_s.general,_s.text,"focus:ring-transparent cursor-not-allowed"],r),disabled:a,...i,onClick:l=>zc(i.onClick||(()=>{}),a?s:()=>{})(l),children:T.jsx("span",{className:"px-1 flex",children:n})})},f2=e=>{const{size:t,disabled:n}=id();return T.jsx("li",{className:G("flex",n&&_s.general),"aria-label":"Go to previous page",children:T.jsx(n_,{className:G("[&>span]:flex [&>span]:items-center"),...e,children:T.jsx(xN,{className:G(_g[t].icon)})})})};f2.displayName="Pagination.Previous";const d2=e=>{const{size:t,disabled:n}=id();return T.jsx("li",{className:G("flex",n&&_s.general),"aria-label":"Go to next page",children:T.jsx(n_,{className:G("[&>span]:flex [&>span]:items-center"),...e,children:T.jsx(Pw,{className:G(_g[t].icon)})})})};d2.displayName="Pagination.Next";const h2=e=>{const{size:t,disabled:n}=id();return T.jsx("li",{className:G("flex",n&&_s.general),children:T.jsx("span",{className:G("flex justify-center",_g[t].ellipse,n&&_s.general),...e,children:"•••"})})};h2.displayName="Pagination.Ellipsis";Ns.Content=u2;Ns.Item=c2;Ns.Previous=f2;Ns.Next=d2;Ns.Ellipsis=h2;var $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"})($e||($e={}));var Pt;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Pt||(Pt={}));var di;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(di||(di={}));const p2=6048e5,cQ=864e5,IT=Symbol.for("constructDateFrom");function dn(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&IT in e?e[IT](t):e instanceof Date?new e.constructor(t):new Date(t)}function Tt(e,t){return dn(t||e,e)}function m2(e,t,n){const r=Tt(e,n==null?void 0:n.in);return isNaN(t)?dn(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function r_(e,t,n){const r=Tt(e,n==null?void 0:n.in);if(isNaN(t))return dn(e,NaN);if(!t)return r;const i=r.getDate(),o=dn(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const a=o.getDate();return i>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}let fQ={};function od(){return fQ}function Oa(e,t){var s,l,u,f;const n=od(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,i=Tt(e,t==null?void 0:t.in),o=i.getDay(),a=(o=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function RT(e){const t=Tt(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 ad(e,...t){const n=dn.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Ll(e,t){const n=Tt(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function y2(e,t,n){const[r,i]=ad(n==null?void 0:n.in,e,t),o=Ll(r),a=Ll(i),s=+o-RT(o),l=+a-RT(a);return Math.round((s-l)/cQ)}function dQ(e,t){const n=g2(e,t),r=dn(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),of(r)}function v2(e,t,n){return m2(e,t*7,n)}function hQ(e,t,n){return r_(e,t*12,n)}function pQ(e,t){let n,r=t==null?void 0:t.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=dn.bind(null,i));const o=Tt(i,r);(!n||n{!r&&typeof i=="object"&&(r=dn.bind(null,i));const o=Tt(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),dn(r,n||NaN)}function LT(e){return dn(e,Date.now())}function gQ(e,t,n){const[r,i]=ad(n==null?void 0:n.in,e,t);return+Ll(r)==+Ll(i)}function b2(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function yQ(e){return!(!b2(e)&&typeof e!="number"||isNaN(+Tt(e)))}function vQ(e,t,n){const[r,i]=ad(n==null?void 0:n.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function Wx(e,t){const n=Tt(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function zx(e,t){const n=Tt(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function bQ(e,t){const n=Tt(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function x2(e,t){const n=Tt(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Ap(e,t){var s,l,u,f;const n=od(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,i=Tt(e,t==null?void 0:t.in),o=i.getDay(),a=(o{let r;const i=wQ[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function rb(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const SQ={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},OQ={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},CQ={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},PQ={date:rb({formats:SQ,defaultWidth:"full"}),time:rb({formats:OQ,defaultWidth:"full"}),dateTime:rb({formats:CQ,defaultWidth:"full"})},AQ={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},TQ=(e,t,n,r)=>AQ[e];function oc(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const EQ={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},kQ={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},MQ={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"]},jQ={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"]},NQ={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"}},$Q={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"}},DQ=(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"},IQ={ordinalNumber:DQ,era:oc({values:EQ,defaultWidth:"wide"}),quarter:oc({values:kQ,defaultWidth:"wide",argumentCallback:e=>e-1}),month:oc({values:MQ,defaultWidth:"wide"}),day:oc({values:jQ,defaultWidth:"wide"}),dayPeriod:oc({values:NQ,defaultWidth:"wide",formattingValues:$Q,defaultFormattingWidth:"wide"})};function ac(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?LQ(s,d=>d.test(a)):RQ(s,d=>d.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(a.length);return{value:u,rest:f}}}function RQ(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function LQ(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const FQ=/^(\d+)(th|st|nd|rd)?/i,WQ=/\d+/i,zQ={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},VQ={any:[/^b/i,/^(a|c)/i]},UQ={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},KQ={any:[/1/i,/2/i,/3/i,/4/i]},HQ={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},GQ={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]},YQ={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},qQ={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]},XQ={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},ZQ={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}},JQ={ordinalNumber:BQ({matchPattern:FQ,parsePattern:WQ,valueCallback:e=>parseInt(e,10)}),era:ac({matchPatterns:zQ,defaultMatchWidth:"wide",parsePatterns:VQ,defaultParseWidth:"any"}),quarter:ac({matchPatterns:UQ,defaultMatchWidth:"wide",parsePatterns:KQ,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ac({matchPatterns:HQ,defaultMatchWidth:"wide",parsePatterns:GQ,defaultParseWidth:"any"}),day:ac({matchPatterns:YQ,defaultMatchWidth:"wide",parsePatterns:qQ,defaultParseWidth:"any"}),dayPeriod:ac({matchPatterns:XQ,defaultMatchWidth:"any",parsePatterns:ZQ,defaultParseWidth:"any"})},Sg={code:"en-US",formatDistance:_Q,formatLong:PQ,formatRelative:TQ,localize:IQ,match:JQ,options:{weekStartsOn:0,firstWeekContainsDate:1}};function QQ(e,t){const n=Tt(e,t==null?void 0:t.in);return y2(n,x2(n))+1}function w2(e,t){const n=Tt(e,t==null?void 0:t.in),r=+of(n)-+dQ(n);return Math.round(r/p2)+1}function _2(e,t){var f,d,p,m;const n=Tt(e,t==null?void 0:t.in),r=n.getFullYear(),i=od(),o=(t==null?void 0:t.firstWeekContainsDate)??((d=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((m=(p=i.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,a=dn((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=Oa(a,t),l=dn((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const u=Oa(l,t);return+n>=+s?r+1:+n>=+u?r:r-1}function eee(e,t){var s,l,u,f;const n=od(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,i=_2(e,t),o=dn((t==null?void 0:t.in)||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Oa(o,t)}function S2(e,t){const n=Tt(e,t==null?void 0:t.in),r=+Oa(n,t)-+eee(n,t);return Math.round(r/p2)+1}function gt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Qo={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return gt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):gt(n+1,2)},d(e,t){return gt(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];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return gt(e.getHours()%12||12,t.length)},H(e,t){return gt(e.getHours(),t.length)},m(e,t){return gt(e.getMinutes(),t.length)},s(e,t){return gt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return gt(i,t.length)}},nl={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},BT={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"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Qo.y(e,t)},Y:function(e,t,n,r){const i=_2(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return gt(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):gt(o,t.length)},R:function(e,t){const n=g2(e);return gt(n,t.length)},u:function(e,t){const n=e.getFullYear();return gt(n,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 gt(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"});case"QQQQ":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 gt(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"});case"qqqq":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 Qo.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"});case"MMMM":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 gt(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"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=S2(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):gt(i,t.length)},I:function(e,t,n){const r=w2(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):gt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Qo.d(e,t)},D:function(e,t,n){const r=QQ(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):gt(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"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return gt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return gt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return gt(i,t.length);case"io":return n.ordinalNumber(i,{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"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=nl.noon:r===0?i=nl.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=nl.evening:r>=12?i=nl.afternoon:r>=4?i=nl.morning:i=nl.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Qo.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Qo.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):gt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):gt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Qo.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Qo.s(e,t)},S:function(e,t){return Qo.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return WT(r);case"XXXX":case"XX":return Ja(r);case"XXXXX":case"XXX":default:return Ja(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return WT(r);case"xxxx":case"xx":return Ja(r);case"xxxxx":case"xxx":default:return Ja(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+FT(r,":");case"OOOO":default:return"GMT"+Ja(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+FT(r,":");case"zzzz":default:return"GMT"+Ja(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return gt(r,t.length)},T:function(e,t,n){return gt(+e,t.length)}};function FT(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+gt(o,2)}function WT(e,t){return e%60===0?(e>0?"-":"+")+gt(Math.abs(e)/60,2):Ja(e,t)}function Ja(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=gt(Math.trunc(r/60),2),o=gt(r%60,2);return n+i+t+o}const zT=(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"});case"PPPP":default:return t.date({width:"full"})}},O2=(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"});case"pppp":default:return t.time({width:"full"})}},tee=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return zT(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",zT(r,t)).replace("{{time}}",O2(i,t))},nee={p:O2,P:tee},ree=/^D+$/,iee=/^Y+$/,oee=["D","DD","YY","YYYY"];function aee(e){return ree.test(e)}function see(e){return iee.test(e)}function lee(e,t,n){const r=uee(e,t,n);if(console.warn(r),oee.includes(e))throw new RangeError(r)}function uee(e,t,n){const r=e[0]==="Y"?"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`}const cee=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,fee=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dee=/^'([^]*?)'?$/,hee=/''/g,pee=/[a-zA-Z]/;function Pn(e,t,n){var f,d,p,m,g,v,y,x;const r=od(),i=(n==null?void 0:n.locale)??r.locale??Sg,o=(n==null?void 0:n.firstWeekContainsDate)??((d=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(p=r.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((v=(g=n==null?void 0:n.locale)==null?void 0:g.options)==null?void 0:v.weekStartsOn)??r.weekStartsOn??((x=(y=r.locale)==null?void 0:y.options)==null?void 0:x.weekStartsOn)??0,s=Tt(e,n==null?void 0:n.in);if(!yQ(s))throw new RangeError("Invalid time value");let l=t.match(fee).map(w=>{const S=w[0];if(S==="p"||S==="P"){const P=nee[S];return P(w,i.formatLong)}return w}).join("").match(cee).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const S=w[0];if(S==="'")return{isToken:!1,value:mee(w)};if(BT[S])return{isToken:!0,value:w};if(S.match(pee))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:w}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const u={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(w=>{if(!w.isToken)return w.value;const S=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&see(S)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&aee(S))&&lee(S,t,String(e));const P=BT[S[0]];return P(s,S,i.localize,u)}).join("")}function mee(e){const t=e.match(dee);return t?t[1].replace(hee,"'"):e}function gee(e,t){const n=Tt(e,t==null?void 0:t.in),r=n.getFullYear(),i=n.getMonth(),o=dn(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function yee(e,t){return+Tt(e)>+Tt(t)}function vee(e,t){return+Tt(e)<+Tt(t)}function bee(e,t,n){const[r,i]=ad(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function xee(e,t,n){const[r,i]=ad(n==null?void 0:n.in,e,t);return r.getFullYear()===i.getFullYear()}function wee(e,t,n){const r=Tt(e,n==null?void 0:n.in),i=r.getFullYear(),o=r.getDate(),a=dn(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const s=gee(a);return r.setMonth(t,Math.min(o,s)),r}function _ee(e,t,n){const r=Tt(e,n==null?void 0:n.in);return isNaN(+r)?dn(e,NaN):(r.setFullYear(t),r)}function VT(e){return Ll(Date.now(),e)}function UT(e){const t=LT(e==null?void 0:e.in),n=t.getFullYear(),r=t.getMonth(),i=t.getDate(),o=LT(e==null?void 0:e.in);return o.setFullYear(n,r,i-1),o.setHours(0,0,0,0),o}function Vx(e,t,n){return r_(e,-t,n)}function KT(e,t,n){return v2(e,-t,n)}class Do{constructor(t,n){this.Date=Date,this.addDays=(r,i)=>{var o;return(o=this.overrides)!=null&&o.addDays?this.overrides.addDays(r,i):m2(r,i)},this.addMonths=(r,i)=>{var o;return(o=this.overrides)!=null&&o.addMonths?this.overrides.addMonths(r,i):r_(r,i)},this.addWeeks=(r,i)=>{var o;return(o=this.overrides)!=null&&o.addWeeks?this.overrides.addWeeks(r,i):v2(r,i)},this.addYears=(r,i)=>{var o;return(o=this.overrides)!=null&&o.addYears?this.overrides.addYears(r,i):hQ(r,i)},this.differenceInCalendarDays=(r,i)=>{var o;return(o=this.overrides)!=null&&o.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,i):y2(r,i)},this.differenceInCalendarMonths=(r,i)=>{var o;return(o=this.overrides)!=null&&o.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,i):vQ(r,i)},this.endOfISOWeek=r=>{var i;return(i=this.overrides)!=null&&i.endOfISOWeek?this.overrides.endOfISOWeek(r):xQ(r)},this.endOfMonth=r=>{var i;return(i=this.overrides)!=null&&i.endOfMonth?this.overrides.endOfMonth(r):Wx(r)},this.endOfWeek=r=>{var i;return(i=this.overrides)!=null&&i.endOfWeek?this.overrides.endOfWeek(r,this.options):Ap(r,this.options)},this.endOfYear=r=>{var i;return(i=this.overrides)!=null&&i.endOfYear?this.overrides.endOfYear(r):bQ(r)},this.format=(r,i)=>{var o;return(o=this.overrides)!=null&&o.format?this.overrides.format(r,i,this.options):Pn(r,i,this.options)},this.getISOWeek=r=>{var i;return(i=this.overrides)!=null&&i.getISOWeek?this.overrides.getISOWeek(r):w2(r)},this.getWeek=r=>{var i;return(i=this.overrides)!=null&&i.getWeek?this.overrides.getWeek(r,this.options):S2(r,this.options)},this.isAfter=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isAfter?this.overrides.isAfter(r,i):yee(r,i)},this.isBefore=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isBefore?this.overrides.isBefore(r,i):vee(r,i)},this.isDate=r=>{var i;return(i=this.overrides)!=null&&i.isDate?this.overrides.isDate(r):b2(r)},this.isSameDay=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isSameDay?this.overrides.isSameDay(r,i):gQ(r,i)},this.isSameMonth=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isSameMonth?this.overrides.isSameMonth(r,i):bee(r,i)},this.isSameYear=(r,i)=>{var o;return(o=this.overrides)!=null&&o.isSameYear?this.overrides.isSameYear(r,i):xee(r,i)},this.max=r=>{var i;return(i=this.overrides)!=null&&i.max?this.overrides.max(r):pQ(r)},this.min=r=>{var i;return(i=this.overrides)!=null&&i.min?this.overrides.min(r):mQ(r)},this.setMonth=(r,i)=>{var o;return(o=this.overrides)!=null&&o.setMonth?this.overrides.setMonth(r,i):wee(r,i)},this.setYear=(r,i)=>{var o;return(o=this.overrides)!=null&&o.setYear?this.overrides.setYear(r,i):_ee(r,i)},this.startOfDay=r=>{var i;return(i=this.overrides)!=null&&i.startOfDay?this.overrides.startOfDay(r):Ll(r)},this.startOfISOWeek=r=>{var i;return(i=this.overrides)!=null&&i.startOfISOWeek?this.overrides.startOfISOWeek(r):of(r)},this.startOfMonth=r=>{var i;return(i=this.overrides)!=null&&i.startOfMonth?this.overrides.startOfMonth(r):zx(r)},this.startOfWeek=r=>{var i;return(i=this.overrides)!=null&&i.startOfWeek?this.overrides.startOfWeek(r,this.options):Oa(r,this.options)},this.startOfYear=r=>{var i;return(i=this.overrides)!=null&&i.startOfYear?this.overrides.startOfYear(r):x2(r)},this.options={locale:Sg,...t},this.overrides=n}}const $s=new Do;function See(e,t,n={}){return Object.entries(e).filter(([,i])=>i===!0).reduce((i,[o])=>(n[o]?i.push(n[o]):t[Pt[o]]?i.push(t[Pt[o]]):t[di[o]]&&i.push(t[di[o]]),i),[t[$e.Day]])}function Oee(e){return O.createElement("button",{...e})}function Cee(e){return O.createElement("span",{...e})}function Pee(e){const{size:t=24,orientation:n="left",className:r}=e;return O.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&O.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&O.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&O.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&O.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 Aee(e){const{day:t,modifiers:n,...r}=e;return O.createElement("td",{...r})}function Tee(e){const{day:t,modifiers:n,...r}=e,i=O.useRef(null);return O.useEffect(()=>{var o;n.focused&&((o=i.current)==null||o.focus())},[n.focused]),O.createElement("button",{ref:i,...r})}function Eee(e){const{options:t,className:n,components:r,classNames:i,...o}=e,a=[i[$e.Dropdown],n].join(" "),s=t==null?void 0:t.find(({value:l})=>l===o.value);return O.createElement("span",{"data-disabled":o.disabled,className:i[$e.DropdownRoot]},O.createElement(r.Select,{className:a,...o},t==null?void 0:t.map(({value:l,label:u,disabled:f})=>O.createElement(r.Option,{key:l,value:l,disabled:f},u))),O.createElement("span",{className:i[$e.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,O.createElement(r.Chevron,{orientation:"down",size:18,className:i[$e.Chevron]})))}function kee(e){return O.createElement("div",{...e})}function Mee(e){return O.createElement("div",{...e})}function jee(e){const{calendarMonth:t,displayIndex:n,...r}=e;return O.createElement("div",{...r},e.children)}function Nee(e){const{calendarMonth:t,displayIndex:n,...r}=e;return O.createElement("div",{...r})}function $ee(e){return O.createElement("table",{...e})}function Dee(e){return O.createElement("div",{...e})}const C2=O.createContext(void 0);function wu(){const e=O.useContext(C2);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Iee(e){const{components:t}=wu();return O.createElement(t.Dropdown,{...e})}function Ree(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:i,...o}=e,{components:a,classNames:s,labels:{labelPrevious:l,labelNext:u}}=wu();return O.createElement("nav",{...o},O.createElement(a.PreviousMonthButton,{type:"button",className:s[$e.PreviousMonthButton],tabIndex:r?void 0:-1,disabled:r?void 0:!0,"aria-label":l(r),onClick:e.onPreviousClick},O.createElement(a.Chevron,{disabled:r?void 0:!0,className:s[$e.Chevron],orientation:"left"})),O.createElement(a.NextMonthButton,{type:"button",className:s[$e.NextMonthButton],tabIndex:i?void 0:-1,disabled:i?void 0:!0,"aria-label":u(i),onClick:e.onNextClick},O.createElement(a.Chevron,{disabled:i?void 0:!0,orientation:"right",className:s[$e.Chevron]})))}function Lee(e){const{components:t}=wu();return O.createElement(t.Button,{...e})}function Bee(e){return O.createElement("option",{...e})}function Fee(e){const{components:t}=wu();return O.createElement(t.Button,{...e})}function Wee(e){return O.createElement("div",{...e})}function zee(e){return O.createElement("select",{...e})}function Vee(e){const{week:t,...n}=e;return O.createElement("tr",{...n})}function Uee(e){return O.createElement("th",{...e})}function Kee(e){return O.createElement("thead",null,O.createElement("tr",{...e}))}function Hee(e){const{week:t,...n}=e;return O.createElement("th",{...n})}function Gee(e){return O.createElement("th",{...e})}function Yee(e){return O.createElement("tbody",{...e})}function qee(e){const{components:t}=wu();return O.createElement(t.Dropdown,{...e})}const Xee=Object.freeze(Object.defineProperty({__proto__:null,Button:Oee,CaptionLabel:Cee,Chevron:Pee,Day:Aee,DayButton:Tee,Dropdown:Eee,DropdownNav:kee,Footer:Mee,Month:jee,MonthCaption:Nee,MonthGrid:$ee,Months:Dee,MonthsDropdown:Iee,Nav:Ree,NextMonthButton:Lee,Option:Bee,PreviousMonthButton:Fee,Root:Wee,Select:zee,Week:Vee,WeekNumber:Hee,WeekNumberHeader:Gee,Weekday:Uee,Weekdays:Kee,Weeks:Yee,YearsDropdown:qee},Symbol.toStringTag,{value:"Module"}));function Zee(e){return{...Xee,...e}}function Jee(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(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Qee(){const e={};for(const t in $e)e[$e[t]]=`rdp-${$e[t]}`;for(const t in Pt)e[Pt[t]]=`rdp-${Pt[t]}`;for(const t in di)e[di[t]]=`rdp-${di[t]}`;return e}function P2(e,t,n){return(n??new Do(t)).format(e,"LLLL y")}const ete=P2;function tte(e,t,n){return(n??new Do(t)).format(e,"d")}function nte(e,t){var n;return(n=t.localize)==null?void 0:n.month(e)}function rte(e){return e<10?`0${e.toLocaleString()}`:`${e.toLocaleString()}`}function ite(){return""}function ote(e,t,n){return(n??new Do(t)).format(e,"cccccc")}function A2(e){return e.toString()}const ate=A2,ste=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:P2,formatDay:tte,formatMonthCaption:ete,formatMonthDropdown:nte,formatWeekNumber:rte,formatWeekNumberHeader:ite,formatWeekdayName:ote,formatYearCaption:ate,formatYearDropdown:A2},Symbol.toStringTag,{value:"Module"}));function lte(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...ste,...e}}function ute(e,t,n,r,i){if(!t||!n)return;const{addMonths:o,startOfMonth:a,isBefore:s}=i,l=e.getFullYear(),u=[];let f=t;for(;u.length<12&&s(f,o(n,1));)u.push(f.getMonth()),f=o(f,1);return u.sort((m,g)=>m-g).map(m=>{const g=r.formatMonthDropdown(m,i.options.locale??Sg),v=i.Date?new i.Date(l,m):new Date(l,m),y=t&&va(n)||!1;return{value:m,label:g,disabled:y}})}function cte(e,t={},n={}){let r={...t==null?void 0:t[$e.Day]};return Object.entries(e).filter(([,i])=>i===!0).forEach(([i])=>{r={...r,...n==null?void 0:n[i]}}),r}const ib={},_c={};function $c(e,t){try{const r=(ib[e]||(ib[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in _c?_c[r]:HT(r,r.split(":"))}catch{if(e in _c)return _c[e];const n=e==null?void 0:e.match(fte);return n?HT(e,n.slice(1)):NaN}}const fte=/([+-]\d\d):?(\d\d)?/;function HT(e,t){const n=+t[0],r=+(t[1]||0);return _c[e]=n>0?n*60+r:n*60-r}class Ci extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN($c(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),T2(this),Ux(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new Ci(...n,t):new Ci(Date.now(),t)}withTimeZone(t){return new Ci(+this,t)}getTimezoneOffset(){return-$c(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Ux(this),+this}[Symbol.for("constructDateFrom")](t){return new Ci(+new Date(t),this.timeZone)}}const GT=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!GT.test(e))return;const t=e.replace(GT,"$1UTC");Ci.prototype[t]&&(e.startsWith("get")?Ci.prototype[e]=function(){return this.internal[t]()}:(Ci.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),dte(this),+this},Ci.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ux(this),+this}))});function Ux(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function dte(e){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()),T2(e)}function T2(e){const t=$c(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),i=-new Date(+n).getTimezoneOffset(),o=r-i,a=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();o&&a&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+o);const s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const l=$c(e.timeZone,e),f=-new Date(+e).getTimezoneOffset()-l,d=l!==t,p=f-s;if(d&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const m=$c(e.timeZone,e),g=l-m;g&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+g),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+g))}}class Pi extends Ci{static tz(t,...n){return n.length?new Pi(...n,t):new Pi(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),i=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+i}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,i]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${i}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,i]=this.tzComponents();return`${t} GMT${n}${r}${i} (${hte(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),i=String(Math.abs(t)%60).padStart(2,"0");return[n,r,i]}withTimeZone(t){return new Pi(+this,t)}[Symbol.for("constructDateFrom")](t){return new Pi(+new Date(t),this.timeZone)}}function hte(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}function pte(e,t,n){const r=n?Pi.tz(n):e.Date?new e.Date:new Date,i=t?e.startOfISOWeek(r):e.startOfWeek(r),o=[];for(let a=0;a<7;a++){const s=e.addDays(i,a);o.push(s)}return o}function mte(e,t,n,r,i){if(!t||!n)return;const{startOfMonth:o,startOfYear:a,endOfYear:s,addYears:l,isBefore:u,isSameYear:f}=i,d=e.getMonth(),p=a(t),m=s(n),g=[];let v=p;for(;u(v,m)||f(v,m);)g.push(v.getFullYear()),v=l(v,1);return g.map(y=>{const x=i.Date?new i.Date(y,d):new Date(y,d),w=t&&xo(n)||!1,S=r.formatYearDropdown(y);return{value:y,label:S,disabled:w}})}function E2(e,t,n){return(n??new Do(t)).format(e,"LLLL y")}const gte=E2;function yte(e,t,n,r){let i=(r??new Do(n)).format(e,"PPPP");return t!=null&&t.today&&(i=`Today, ${i}`),i}function k2(e,t,n,r){let i=(r??new Do(n)).format(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i}const vte=k2;function bte(){return""}function xte(e){return"Choose the Month"}function wte(e){return"Go to the Next Month"}function _te(e){return"Go to the Previous Month"}function Ste(e,t,n){return(n??new Do(t)).format(e,"cccc")}function Ote(e,t){return`Week ${e}`}function Cte(e){return"Week Number"}function Pte(e){return"Choose the Year"}const Ate=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:gte,labelDay:vte,labelDayButton:k2,labelGrid:E2,labelGridcell:yte,labelMonthDropdown:xte,labelNav:bte,labelNext:wte,labelPrevious:_te,labelWeekNumber:Ote,labelWeekNumberHeader:Cte,labelWeekday:Ste,labelYearDropdown:Pte},Symbol.toStringTag,{value:"Module"})),Kx=42;function Tte(e,t,n,r){const i=e[0],o=e[e.length-1],{ISOWeek:a,fixedWeeks:s}=n??{},{startOfWeek:l,endOfWeek:u,startOfISOWeek:f,endOfISOWeek:d,addDays:p,differenceInCalendarDays:m,differenceInCalendarMonths:g,isAfter:v,endOfMonth:y}=r,x=a?f(i):l(i),w=a?d(y(o)):u(y(o)),S=m(w,x),P=g(o,i)+1,_=[];for(let E=0;E<=S;E++){const k=p(x,E);if(t&&v(k,t))break;_.push(k)}const C=Kx*P;if(s&&_.length{const i=[],o=r.weeks.reduce((a,s)=>[...a,...s.days],i);return[...n,...o]},t)}function kte(e,t,n,r){const{numberOfMonths:i=1}=n,o=[];for(let a=0;at)break;o.push(s)}return o}function YT(e,t){const{month:n,defaultMonth:r,today:i=e.timeZone?Pi.tz(e.timeZone):t.Date?new t.Date:new Date,numberOfMonths:o=1,endMonth:a,startMonth:s}=e;let l=n||r||i;const{differenceInCalendarMonths:u,addMonths:f,startOfMonth:d}=t;if(a&&u(a,l)<0){const p=-1*(o-1);l=f(a,p)}return s&&u(l,s)<0&&(l=s),d(l)}class M2{constructor(t,n,r=$s){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Mte{constructor(t,n){this.date=t,this.weeks=n}}class jte{constructor(t,n){this.days=n,this.weekNumber=t}}function Nte(e,t,n,r){const{startOfWeek:i,endOfWeek:o,startOfISOWeek:a,endOfISOWeek:s,endOfMonth:l,addDays:u,getWeek:f,getISOWeek:d}=r,p=e.reduce((m,g)=>{const v=n.ISOWeek?a(g):i(g),y=n.ISOWeek?s(l(g)):o(l(g)),x=t.filter(P=>P>=v&&P<=y);if(n.fixedWeeks&&x.length{const C=Kx-x.length;return _>y&&_<=u(y,C)});x.push(...P)}const w=x.reduce((P,_)=>{const C=n.ISOWeek?d(_):f(_),E=P.find(M=>M.weekNumber===C),k=new M2(_,g,r);return E?E.days.push(k):P.push(new jte(C,[k])),P},[]),S=new Mte(g,w);return m.push(S),m},[]);return n.reverseMonths?p.reverse():p}function $te(e,t){var v;let{startMonth:n,endMonth:r}=e;const{startOfYear:i,startOfDay:o,startOfMonth:a,endOfMonth:s,addYears:l,endOfYear:u}=t,{fromYear:f,toYear:d,fromMonth:p,toMonth:m}=e;!n&&p&&(n=p),!n&&f&&(n=new Date(f,0,1)),!r&&m&&(r=m),!r&&d&&(r=new Date(d,11,31));const g=(v=e.captionLayout)==null?void 0:v.startsWith("dropdown");if(n)n=a(n);else if(f)n=new Date(f,0,1);else if(!n&&g){const y=e.today??(e.timeZone?Pi.tz(e.timeZone):t.Date?new t.Date:new Date);n=i(l(y,-100))}if(r)r=s(r);else if(d)r=new Date(d,11,31);else if(!r&&g){const y=e.today??(e.timeZone?Pi.tz(e.timeZone):t.Date?new t.Date:new Date);r=u(y)}return[n&&o(n),r&&o(r)]}function Dte(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:i,numberOfMonths:o=1}=n,{startOfMonth:a,addMonths:s,differenceInCalendarMonths:l}=r,u=i?o:1,f=a(e);if(!t)return s(f,u);if(!(l(t,e)[...n,...r.weeks],t)}function Og(e,t){const[n,r]=O.useState(e);return[t===void 0?n:t,r]}function Lte(e,t){const[n,r]=$te(e,t),{startOfMonth:i,endOfMonth:o}=t,a=YT(e,t),[s,l]=Og(a,e.month?i(e.month):void 0);O.useEffect(()=>{const C=YT(e,t);l(C)},[e.timeZone]);const u=kte(s,r,e,t),f=Tte(u,e.endMonth?o(e.endMonth):void 0,e,t),d=Nte(u,f,e,t),p=Rte(d),m=Ete(d),g=Ite(s,n,e,t),v=Dte(s,r,e,t),{disableNavigation:y,onMonthChange:x}=e,w=C=>p.some(E=>E.days.some(k=>k.isEqualTo(C))),S=C=>{if(y)return;let E=i(C);n&&Ei(r)&&(E=i(r)),l(E),x==null||x(E)};return{months:d,weeks:p,days:m,navStart:n,navEnd:r,previousMonth:g,nextMonth:v,goToMonth:S,goToDay:C=>{w(C)||S(C.date)}}}function Bte(e,t,n,r){let i,o=0,a=!1;for(;o{const l=t(s);return!l[Pt.disabled]&&!l[Pt.hidden]&&!l[Pt.outside]})),i}function uo(e,t,n=!1,r=$s){let{from:i,to:o}=e;const{differenceInCalendarDays:a,isSameDay:s}=r;return i&&o?(a(o,i)<0&&([i,o]=[o,i]),a(t,i)>=(n?1:0)&&a(o,t)>=(n?1:0)):!n&&o?s(o,t):!n&&i?s(i,t):!1}function j2(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function i_(e){return!!(e&&typeof e=="object"&&"from"in e)}function N2(e){return!!(e&&typeof e=="object"&&"after"in e)}function $2(e){return!!(e&&typeof e=="object"&&"before"in e)}function D2(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function I2(e,t){return Array.isArray(e)&&e.every(t.isDate)}function co(e,t,n=$s){const r=Array.isArray(t)?t:[t],{isSameDay:i,differenceInCalendarDays:o,isAfter:a}=n;return r.some(s=>{if(typeof s=="boolean")return s;if(n.isDate(s))return i(e,s);if(I2(s,n))return s.includes(e);if(i_(s))return uo(s,e,!1,n);if(D2(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(j2(s)){const l=o(s.before,e),u=o(s.after,e),f=l>0,d=u<0;return a(s.before,s.after)?d&&f:f||d}return N2(s)?o(e,s.after)>0:$2(s)?o(s.before,e)>0:typeof s=="function"?s(e):!1})}function Fte(e,t,n,r,i,o,a){const{ISOWeek:s}=o,{addDays:l,addMonths:u,addYears:f,addWeeks:d,startOfISOWeek:p,endOfISOWeek:m,startOfWeek:g,endOfWeek:v,max:y,min:x}=a;let S={day:l,week:d,month:u,year:f,startOfWeek:P=>s?p(P):g(P),endOfWeek:P=>s?m(P):v(P)}[e](n,t==="after"?1:-1);return t==="before"&&r?S=y([r,S]):t==="after"&&i&&(S=x([i,S])),S}function R2(e,t,n,r,i,o,a,s=0){if(s>365)return;const l=Fte(e,t,n.date,r,i,o,a),u=!!(o.disabled&&co(l,o.disabled,a)),f=!!(o.hidden&&co(l,o.hidden,a)),d=l,p=new M2(l,d,a);return!u&&!f?p:R2(e,t,p,r,i,o,a,s+1)}function Wte(e,t,n,r,i){const{autoFocus:o}=e,[a,s]=O.useState(),l=Bte(t.days,n,r||(()=>!1),a),[u,f]=O.useState(o?l:void 0);return{isFocusTarget:v=>!!(l!=null&&l.isEqualTo(v)),setFocused:f,focused:u,blur:()=>{s(u),f(void 0)},moveFocus:(v,y)=>{if(!u)return;const x=R2(v,y,u,t.navStart,t.navEnd,e,i);x&&(t.goToDay(x),f(x))}}}function zte(e,t,n){const{disabled:r,hidden:i,modifiers:o,showOutsideDays:a,today:s}=t,{isSameDay:l,isSameMonth:u,startOfMonth:f,isBefore:d,endOfMonth:p,isAfter:m}=n,g=t.startMonth&&f(t.startMonth),v=t.endMonth&&p(t.endMonth),y={[Pt.focused]:[],[Pt.outside]:[],[Pt.disabled]:[],[Pt.hidden]:[],[Pt.today]:[]},x={};for(const w of e){const{date:S,displayMonth:P}=w,_=!!(P&&!u(S,P)),C=!!(g&&d(S,g)),E=!!(v&&m(S,v)),k=!!(r&&co(S,r,n)),M=!!(i&&co(S,i,n))||C||E||!a&&_,D=l(S,s??(t.timeZone?Pi.tz(t.timeZone):n.Date?new n.Date:new Date));_&&y.outside.push(w),k&&y.disabled.push(w),M&&y.hidden.push(w),D&&y.today.push(w),o&&Object.keys(o).forEach($=>{const N=o==null?void 0:o[$];N&&co(S,N,n)&&(x[$]?x[$].push(w):x[$]=[w])})}return w=>{const S={[Pt.focused]:!1,[Pt.disabled]:!1,[Pt.hidden]:!1,[Pt.outside]:!1,[Pt.today]:!1},P={};for(const _ in y){const C=y[_];S[_]=C.some(E=>E===w)}for(const _ in x)P[_]=x[_].some(C=>C===w);return{...S,...P}}}function Vte(e,t){const{selected:n,required:r,onSelect:i}=e,[o,a]=Og(n,i?n:void 0),s=i?n:o,{isSameDay:l}=t,u=m=>(s==null?void 0:s.some(g=>l(g,m)))??!1,{min:f,max:d}=e;return{selected:s,select:(m,g,v)=>{let y=[...s??[]];if(u(m)){if((s==null?void 0:s.length)===f||r&&(s==null?void 0:s.length)===1)return;y=s==null?void 0:s.filter(x=>!l(x,m))}else(s==null?void 0:s.length)===d?y=[m]:y=[...y,m];return i||a(y),i==null||i(y,m,g,v),y},isSelected:u}}function Ute(e,t,n=0,r=0,i=!1,o=$s){const{from:a,to:s}=t||{},{isSameDay:l,isAfter:u,isBefore:f}=o;let d;if(!a&&!s)d={from:e,to:n>0?void 0:e};else if(a&&!s)l(a,e)?i?d={from:a,to:void 0}:d=void 0:f(e,a)?d={from:e,to:a}:d={from:a,to:e};else if(a&&s)if(l(a,e)&&l(s,e))i?d={from:a,to:s}:d=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(f(e,a))d={from:e,to:s};else if(u(e,a))d={from:a,to:e};else if(u(e,s))d={from:a,to:e};else throw new Error("Invalid range");if(d!=null&&d.from&&(d!=null&&d.to)){const p=o.differenceInCalendarDays(d.to,d.from);r>0&&p>r?d={from:e,to:void 0}:n>1&&ptypeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?uo(e,s,!1,n):I2(s,n)?s.some(l=>uo(e,l,!1,n)):i_(s)?s.from&&s.to?qT(e,{from:s.from,to:s.to},n):!1:D2(s)?Kte(e,s.dayOfWeek,n):j2(s)?n.isAfter(s.before,s.after)?qT(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):co(e.from,s,n)||co(e.to,s,n):N2(s)||$2(s)?co(e.from,s,n)||co(e.to,s,n):!1))return!0;const a=r.filter(s=>typeof s=="function");if(a.length){let s=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=l;u++){if(a.some(f=>f(s)))return!0;s=n.addDays(s,1)}}return!1}function Gte(e,t){const{disabled:n,excludeDisabled:r,selected:i,required:o,onSelect:a}=e,[s,l]=Og(i,a?i:void 0),u=a?i:s;return{selected:u,select:(p,m,g)=>{const{min:v,max:y}=e,x=p?Ute(p,u,v,y,o,t):void 0;return r&&n&&(x!=null&&x.from)&&x.to&&Hte({from:x.from,to:x.to},n,t)&&(x.from=p,x.to=void 0),a||l(x),a==null||a(x,p,m,g),x},isSelected:p=>u&&uo(u,p,!1,t)}}function Yte(e,t){const{selected:n,required:r,onSelect:i}=e,[o,a]=Og(n,i?n:void 0),s=i?n:o,{isSameDay:l}=t;return{selected:s,select:(d,p,m)=>{let g=d;return!r&&s&&s&&l(d,s)&&(g=void 0),i||a(g),i==null||i(g,d,p,m),g},isSelected:d=>s?l(s,d):!1}}function qte(e,t){const n=Yte(e,t),r=Vte(e,t),i=Gte(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return i;default:return}}function Xte(e){const{components:t,formatters:n,labels:r,dateLib:i,locale:o,classNames:a}=O.useMemo(()=>{const qe={...Sg,...e.locale};return{dateLib:new Do({locale:qe,weekStartsOn:e.weekStartsOn,firstWeekContainsDate:e.firstWeekContainsDate,useAdditionalWeekYearTokens:e.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:e.useAdditionalDayOfYearTokens},e.dateLib),components:Zee(e.components),formatters:lte(e.formatters),labels:{...Ate,...e.labels},locale:qe,classNames:{...Qee(),...e.classNames}}},[e.classNames,e.components,e.dateLib,e.firstWeekContainsDate,e.formatters,e.labels,e.locale,e.useAdditionalDayOfYearTokens,e.useAdditionalWeekYearTokens,e.weekStartsOn]),{captionLayout:s,mode:l,onDayBlur:u,onDayClick:f,onDayFocus:d,onDayKeyDown:p,onDayMouseEnter:m,onDayMouseLeave:g,onNextClick:v,onPrevClick:y,showWeekNumber:x,styles:w}=e,{formatCaption:S,formatDay:P,formatMonthDropdown:_,formatWeekNumber:C,formatWeekNumberHeader:E,formatWeekdayName:k,formatYearDropdown:M}=n,D=Lte(e,i),{days:$,months:N,navStart:B,navEnd:L,previousMonth:F,nextMonth:W,goToMonth:z}=D,H=zte($,e,i),{isSelected:U,select:K,selected:Y}=qte(e,i)??{},{blur:te,focused:ne,isFocusTarget:ie,moveFocus:ce,setFocused:ae}=Wte(e,D,H,U??(()=>!1),i),{labelDayButton:le,labelGridcell:re,labelGrid:Q,labelMonthDropdown:fe,labelNav:ye,labelWeekday:X,labelWeekNumber:Re,labelWeekNumberHeader:pe,labelYearDropdown:Ie}=r,Ze=O.useMemo(()=>pte(i,e.ISOWeek,e.timeZone),[i,e.ISOWeek,e.timeZone]),tt=l!==void 0||f!==void 0,Dn=O.useCallback(()=>{F&&(z(F),y==null||y(F))},[F,z,y]),Me=O.useCallback(()=>{W&&(z(W),v==null||v(W))},[z,W,v]),nt=O.useCallback((qe,$t)=>pt=>{pt.preventDefault(),pt.stopPropagation(),ae(qe),K==null||K(qe.date,$t,pt),f==null||f(qe.date,$t,pt)},[K,f,ae]),Se=O.useCallback((qe,$t)=>pt=>{ae(qe),d==null||d(qe.date,$t,pt)},[d,ae]),ze=O.useCallback((qe,$t)=>pt=>{te(),u==null||u(qe.date,$t,pt)},[te,u]),Lt=O.useCallback((qe,$t)=>pt=>{const Sn={ArrowLeft:["day",e.dir==="rtl"?"after":"before"],ArrowRight:["day",e.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[pt.shiftKey?"year":"month","before"],PageDown:[pt.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(Sn[pt.key]){pt.preventDefault(),pt.stopPropagation();const[$r,Hi]=Sn[pt.key];ce($r,Hi)}p==null||p(qe.date,$t,pt)},[ce,p,e.dir]),at=O.useCallback((qe,$t)=>pt=>{m==null||m(qe.date,$t,pt)},[m]),Wt=O.useCallback((qe,$t)=>pt=>{g==null||g(qe.date,$t,pt)},[g]),{className:Nr,style:pn}=O.useMemo(()=>({className:[a[$e.Root],e.className].filter(Boolean).join(" "),style:{...w==null?void 0:w[$e.Root],...e.style}}),[a,e.className,e.style,w]),rn=Jee(e),tr={dayPickerProps:e,selected:Y,select:K,isSelected:U,months:N,nextMonth:W,previousMonth:F,goToMonth:z,getModifiers:H,components:t,classNames:a,styles:w,labels:r,formatters:n};return O.createElement(C2.Provider,{value:tr},O.createElement(t.Root,{className:Nr,style:pn,dir:e.dir,id:e.id,lang:e.lang,nonce:e.nonce,title:e.title,...rn},O.createElement(t.Months,{className:a[$e.Months],style:w==null?void 0:w[$e.Months]},!e.hideNavigation&&O.createElement(t.Nav,{className:a[$e.Nav],style:w==null?void 0:w[$e.Nav],"aria-label":ye(),onPreviousClick:Dn,onNextClick:Me,previousMonth:F,nextMonth:W}),N.map((qe,$t)=>{const pt=Xt=>{const hr=Number(Xt.target.value),Zt=i.setMonth(i.startOfMonth(qe.date),hr);z(Zt)},Sn=Xt=>{const hr=i.setYear(i.startOfMonth(qe.date),Number(Xt.target.value));z(hr)},$r=ute(qe.date,B,L,n,i),Hi=mte(N[0].date,B,L,n,i);return O.createElement(t.Month,{className:a[$e.Month],style:w==null?void 0:w[$e.Month],key:$t,displayIndex:$t,calendarMonth:qe},O.createElement(t.MonthCaption,{className:a[$e.MonthCaption],style:w==null?void 0:w[$e.MonthCaption],calendarMonth:qe,displayIndex:$t},s!=null&&s.startsWith("dropdown")?O.createElement(t.DropdownNav,{className:a[$e.Dropdowns],style:w==null?void 0:w[$e.Dropdowns]},s==="dropdown"||s==="dropdown-months"?O.createElement(t.MonthsDropdown,{className:a[$e.MonthsDropdown],"aria-label":fe(),classNames:a,components:t,disabled:!!e.disableNavigation,onChange:pt,options:$r,style:w==null?void 0:w[$e.Dropdown],value:qe.date.getMonth()}):O.createElement("span",{role:"status","aria-live":"polite"},_(qe.date.getMonth(),o)),s==="dropdown"||s==="dropdown-years"?O.createElement(t.YearsDropdown,{className:a[$e.YearsDropdown],"aria-label":Ie(i.options),classNames:a,components:t,disabled:!!e.disableNavigation,onChange:Sn,options:Hi,style:w==null?void 0:w[$e.Dropdown],value:qe.date.getFullYear()}):O.createElement("span",{role:"status","aria-live":"polite"},M(qe.date.getFullYear()))):O.createElement(t.CaptionLabel,{className:a[$e.CaptionLabel],role:"status","aria-live":"polite"},S(qe.date,i.options,i))),O.createElement(t.MonthGrid,{role:"grid","aria-multiselectable":l==="multiple"||l==="range","aria-label":Q(qe.date,i.options,i)||void 0,className:a[$e.MonthGrid],style:w==null?void 0:w[$e.MonthGrid]},!e.hideWeekdays&&O.createElement(t.Weekdays,{className:a[$e.Weekdays],style:w==null?void 0:w[$e.Weekdays]},x&&O.createElement(t.WeekNumberHeader,{"aria-label":pe(i.options),className:a[$e.WeekNumberHeader],style:w==null?void 0:w[$e.WeekNumberHeader],scope:"col"},E()),Ze.map((Xt,hr)=>O.createElement(t.Weekday,{"aria-label":X(Xt,i.options,i),className:a[$e.Weekday],key:hr,style:w==null?void 0:w[$e.Weekday],scope:"col"},k(Xt,i.options,i)))),O.createElement(t.Weeks,{className:a[$e.Weeks],style:w==null?void 0:w[$e.Weeks]},qe.weeks.map((Xt,hr)=>O.createElement(t.Week,{className:a[$e.Week],key:Xt.weekNumber,style:w==null?void 0:w[$e.Week],week:Xt},x&&O.createElement(t.WeekNumber,{week:Xt,style:w==null?void 0:w[$e.WeekNumber],"aria-label":Re(Xt.weekNumber,{locale:o}),className:a[$e.WeekNumber],scope:"row"},C(Xt.weekNumber)),Xt.days.map(Zt=>{const{date:Dr}=Zt,lt=H(Zt);if(lt[Pt.focused]=!lt.hidden&&!!(ne!=null&&ne.isEqualTo(Zt)),lt[di.selected]=!lt.disabled&&((U==null?void 0:U(Dr))||lt.selected),i_(Y)){const{from:Iu,to:Ru}=Y;lt[di.range_start]=!!(Iu&&Ru&&i.isSameDay(Dr,Iu)),lt[di.range_end]=!!(Iu&&Ru&&i.isSameDay(Dr,Ru)),lt[di.range_middle]=uo(Y,Dr,!0,i)}const yd=cte(lt,w,e.modifiersStyles),vd=See(lt,a,e.modifiersClassNames),sy=tt?void 0:re(Dr,lt,i.options,i);return O.createElement(t.Day,{key:`${i.format(Dr,"yyyy-MM-dd")}_${i.format(Zt.displayMonth,"yyyy-MM")}`,day:Zt,modifiers:lt,className:vd.join(" "),style:yd,"aria-hidden":lt.hidden||void 0,"aria-selected":lt.selected||void 0,"aria-label":sy,"data-day":i.format(Dr,"yyyy-MM-dd"),"data-month":Zt.outside?i.format(Dr,"yyyy-MM"):void 0,"data-selected":lt.selected||void 0,"data-disabled":lt.disabled||void 0,"data-hidden":lt.hidden||void 0,"data-outside":Zt.outside||void 0,"data-focused":lt.focused||void 0,"data-today":lt.today||void 0},tt?O.createElement(t.DayButton,{className:a[$e.DayButton],style:w==null?void 0:w[$e.DayButton],type:"button",day:Zt,modifiers:lt,disabled:lt.disabled||void 0,tabIndex:ie(Zt)?0:-1,"aria-label":le(Dr,lt,i.options,i),onClick:nt(Zt,lt),onBlur:ze(Zt,lt),onFocus:Se(Zt,lt),onKeyDown:Lt(Zt,lt),onMouseEnter:at(Zt,lt),onMouseLeave:Wt(Zt,lt)},P(Dr,i.options,i)):P(Zt.date,i.options,i))}))))))})),e.footer&&O.createElement(t.Footer,{className:a[$e.Footer],style:w==null?void 0:w[$e.Footer],role:"status","aria-live":"polite"},e.footer)))}const XT=()=>T.jsx("span",{className:"bg-icon-interactive h-1 w-1 absolute rounded-full inline-block bottom-0 left-1/2 right-1/2"}),ZT=e=>Pn(e,"E").slice(0,1),Zte=(e,t=24)=>Array.from({length:t},(n,r)=>e+r),ob=({width:e,className:t,classNames:n,selectedDates:r,setSelectedDates:i,showOutsideDays:o=!0,mode:a="single",variant:s="normal",alignment:l="horizontal",numberOfMonths:u,...f})=>{const d=O.isValidElement(f.footer)||typeof f.footer=="function",[p,m]=O.useState(!1),[g,v]=O.useState(!1),[y,x]=O.useState(new Date().getFullYear()),[w,S]=O.useState(y-y%24);r==null&&(a==="multiple"?r=[]:a==="range"?r={from:null,to:null}:r=null);function P($){const{goToMonth:N,nextMonth:B,previousMonth:L}=wu(),F=Pn($.calendarMonth.date,"yyyy"),W=Pn($.calendarMonth.date,"MMMM"),z=new Date($.calendarMonth.date);z.setDate(z.getDate()-z.getDay());const H=Array.from({length:7},(ne,ie)=>{const ce=new Date(z);return ce.setDate(z.getDate()+ie),ZT(ce)}),U=()=>{if(g)S(w-24);else if(p){const ne=new Date(y-1,$.calendarMonth.date.getMonth());x(ne.getFullYear()),N(ne)}else N(L)},K=()=>{if(g)S(w+24);else if(p){const ne=new Date(y+1,$.calendarMonth.date.getMonth());x(ne.getFullYear()),N(ne)}else N(B)},Y=({yearValue:ne})=>{x(ne),v(!1),m(!0),N(new Date(ne,$.calendarMonth.date.getMonth()))};let te;return g?te=`${w} - ${w+23}`:p?te=F:te=`${W} ${F}`,T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"flex justify-between",children:[T.jsx(Wn,{variant:"ghost",onClick:U,className:"bg-background-primary border-none cursor-pointer","aria-label":"Previous Button",children:T.jsx(xN,{className:"h-4 w-4"})}),T.jsx(Wn,{variant:"ghost",onClick:()=>{u>1||(p?(v(!0),m(!1)):g?v(!1):m(!p))},children:te}),T.jsx(Wn,{variant:"ghost",onClick:K,className:"bg-background-primary border-none cursor-pointer","aria-label":"Next Button",children:T.jsx(Pw,{className:"h-4 w-4"})})]}),g&&T.jsx("div",{className:"grid grid-cols-4 w-full",children:Zte(w).map(ne=>T.jsxs(Wn,{variant:"ghost",onClick:()=>Y(ne),className:G("h-10 w-full text-center font-normal relative",ne===y&&ne!==new Date().getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black"),children:[ne,ne===new Date().getFullYear()&&XT()]},ne))}),p&&!g&&T.jsx("div",{className:"grid grid-cols-4 gap-2 my-12",children:Array.from({length:12},(ne,ie)=>T.jsxs(Wn,{variant:"ghost",onClick:()=>{m(!1),N(new Date(y,ie))},className:G("px-1.5 py-2 h-10 w-[4.375rem] text-center font-normal relative",ie===$.calendarMonth.date.getMonth()&&ie!==new Date().getMonth()&&y===$.calendarMonth.date.getFullYear()&&$.calendarMonth.date.getFullYear()!==new Date().getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black"),children:[Pn(new Date(0,ie),"MMM"),new Date().getMonth()===ie&&new Date().getFullYear()===y&&XT()]},ie))}),!p&&!g&&T.jsx(_,{weekdays:H})]})}const _=({weekdays:$})=>T.jsx("div",{className:"flex justify-between",children:$.map((N,B)=>T.jsx("button",{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",children:N},B))}),C=({day:$,modifiers:N,onSelect:B})=>{const{selected:L,today:F,disabled:W,outside:z,range_middle:H,range_start:U,range_end:K}=N,Y=U||K||H,te=()=>!W&&B($.date),ne=new Date,ie=r==null?void 0:r.to,ce=Pn($.displayMonth,"yyyy-MM")===Pn(ne,"yyyy-MM"),ae=ie&&Pn(ie,"yyyy-MM")===Pn($.date,"yyyy-MM"),le=Vx(ne,1),re=Pn($.date,"yyyy-MM")===Pn(le,"yyyy-MM"),Q=ce||ae||Y,fe=!o&&z,X=G("h-10 w-10 flex items-center justify-center transition text-text-secondary relative","border-none rounded",(L||Y)&&(!z||re)?"bg-background-brand text-text-on-color":"bg-transparent hover:bg-button-tertiary-hover",H&&Q&&(!z||Y)?"bg-brand-background-50 text-text-secondary rounded-none":"",W?"opacity-50 cursor-not-allowed text-text-disabled":"cursor-pointer",z&&!Y||!Q&&z||z&&!re?"bg-transperant opacity-50 text-text-disabled cursor-auto":"");return T.jsxs("button",{onClick:te,className:X,disabled:W||z,"aria-label":Pn($.date,"EEEE, MMMM do, yyyy"),children:[(!fe||Y&&Q)&&Pn($.date,"d"),F&&T.jsx("span",{className:"absolute h-1 w-1 bg-background-brand rounded-full bottom-1"})]})},E=$=>{const{day:N,modifiers:B,className:L,onSelect:F}=$;return T.jsx("td",{className:L,children:T.jsx(C,{day:N,modifiers:B,onSelect:F})})},k=({monthGridProps:$,onSelect:N})=>T.jsx("div",{className:"flex flex-col",children:$.children[1].props.children.map((B,L)=>T.jsx("div",{className:"flex flex-row justify-between",children:B.props.children[1].map((F,W)=>T.jsx("div",{className:"flex gap-1",children:T.jsx(C,{...F.props,onSelect:N})},W))},L))}),M=$=>{a==="range"?!(r!=null&&r.from)||r!=null&&r.from&&(r!=null&&r.to)?i({from:$,to:null}):i({from:r.from,to:$}):a==="multiple"?r.some(N=>Pn(N,"yyyy-MM-dd")===Pn($,"yyyy-MM-dd"))?i(r.filter(N=>Pn(N,"yyyy-MM-dd")!==Pn($,"yyyy-MM-dd"))):i([...r,$]):a==="single"&&i([$])},D=G("relative bg-background-primary shadow-datepicker-wrapper",e,l==="vertical"?"flex flex-col":"flex flex-row gap-3",s==="normal"?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"",s==="presets"?"rounded-tr-md border border-solid border-border-subtle":"",s==="dualdate"?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"",d?"rounded-b-none":"rounded-bl-md rounded-br-md");return T.jsx(T.Fragment,{children:T.jsx(Xte,{mode:a,selected:r,onSelect:M,hideNavigation:!0,captionLayout:"label",className:G(t),formatters:{formatWeekdayName:ZT},classNames:{months:D,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",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",...n},numberOfMonths:u,components:{MonthCaption:P,Day:$=>{const N={selected:$.modifiers.selected||!1,today:$.modifiers.today||!1,disabled:$.modifiers.disabled||!1,outside:$.modifiers.outside||!1,range_middle:$.modifiers.range_middle||!1,range_start:$.modifiers.range_start||!1,range_end:$.modifiers.range_end||!1};return T.jsx(E,{...$,modifiers:N,onSelect:M})},Weekdays:()=>T.jsx(T.Fragment,{}),Months:$=>{var N;return T.jsx(T.Fragment,{children:T.jsx("div",{className:D,children:(N=$==null?void 0:$.children)==null?void 0:N.map((B,L)=>B?T.jsx(O.Fragment,{children:B.map((F,W)=>T.jsxs(O.Fragment,{children:[W>0&&T.jsx("div",{className:"border border-solid border-border-subtle border-l-0"}),F]},W))},L):null)})})},MonthGrid:$=>!p&&!g?T.jsx(k,{monthGridProps:$,onSelect:M}):T.jsx(T.Fragment,{})},...a==="range"?{required:!0}:{},...f})})},Jte=({selectionType:e="single",variant:t="normal",presets:n=[],onCancel:r,onApply:i,onDateSelect:o,applyButtonText:a="Apply",cancelButtonText:s="Cancel",showOutsideDays:l=!0,isFooter:u=!0,...f})=>{const[d,p]=O.useState(()=>e==="multiple"?[]:e==="range"?{from:null,to:null}:null),m=S=>{p(S),o&&o(S)},g=[{label:"Today",range:{from:VT(),to:VT()}},{label:"Yesterday",range:{from:UT(),to:UT()}},{label:"This Week",range:{from:Oa(new Date,{weekStartsOn:1}),to:Ap(new Date,{weekStartsOn:1})}},{label:"Last Week",range:{from:Oa(KT(new Date,1),{weekStartsOn:1}),to:Ap(KT(new Date,1),{weekStartsOn:1})}},{label:"This Month",range:{from:zx(new Date),to:Wx(new Date)}},{label:"Last Month",range:{from:zx(Vx(new Date,1)),to:Wx(Vx(new Date,1))}}],v=n.length>0?n:g,y=S=>{p(S)},x=()=>{p(e==="multiple"?[]:{from:null,to:null}),r&&r()},w=()=>{i&&i(d)};if(t==="normal")return T.jsx(ob,{...f,mode:e,variant:t,width:"w-[18.5rem]",selectedDates:d,showOutsideDays:l,setSelectedDates:m,footer:u&&T.jsxs("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",children:[T.jsx(Wn,{variant:"outline",onClick:x,children:s}),T.jsx(Wn,{onClick:w,children:a})]})});if(t==="dualdate")return T.jsx(ob,{mode:e,numberOfMonths:2,alignment:"horizontal",selectedDates:d,setSelectedDates:m,showOutsideDays:l,variant:t,width:"w-auto",footer:T.jsxs("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",children:[T.jsx(Wn,{variant:"outline",onClick:x,children:s}),T.jsx(Wn,{onClick:w,children:a})]}),...f});if(t==="presets")return T.jsxs("div",{className:"flex flex-row shadow-datepicker-wrapper",children:[T.jsx("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",children:v.map((S,P)=>T.jsx(Wn,{onClick:()=>y(S.range),variant:"ghost",className:"font-medium text-sm",children:S.label},P))}),T.jsx(ob,{...f,mode:e,selectedDates:d,setSelectedDates:m,variant:t,showOutsideDays:l,width:"w-auto",numberOfMonths:2,footer:T.jsxs("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",children:[T.jsx(Wn,{variant:"outline",onClick:x,children:s}),T.jsx(Wn,{onClick:w,children:a})]})})]})},L2=({type:e="simple",defaultValue:t=[],autoClose:n=!1,disabled:r=!1,children:i,className:o})=>{const[a,s]=O.useState(Array.isArray(t)?t:[t]),l=f=>{s(d=>n?d.includes(f)?[]:[f]:d.includes(f)?d.filter(p=>p!==f):[...d,f])},u=e==="boxed"?"space-y-3":"";return T.jsx("div",{className:G(u,o),children:O.Children.map(i,f=>O.isValidElement(f)&&"value"in f.props?O.cloneElement(f,{isOpen:a.includes(f.props.value),onToggle:()=>l(f.props.value),type:e,disabled:r||f.props.disabled}):f)})};L2.displayName="Accordion";const B2=({isOpen:e,onToggle:t,type:n="simple",disabled:r=!1,children:i,className:o})=>{const a={simple:"border-0",separator:"border-0 border-b border-solid border-border-subtle",boxed:"border border-solid border-border-subtle rounded-md"}[n];return T.jsx("div",{className:G(a,o),children:O.Children.map(i,s=>O.isValidElement(s)?O.cloneElement(s,{isOpen:e,onToggle:t,type:n,disabled:r}):s)})};B2.displayName="Accordion.Item";const F2=({onToggle:e,isOpen:t,iconType:n="arrow",disabled:r=!1,tag:i="h3",type:o="simple",children:a,className:s,...l})=>{const u={simple:"px-2 py-3",separator:"px-2 py-4",boxed:"px-3 py-4"}[o],f=()=>n==="arrow"?T.jsx(Cw,{className:G("flex-shrink-0 text-icon-secondary size-5 transition-transform duration-300 ease-in-out",t?"rotate-180":"rotate-0")}):n==="plus-minus"?T.jsx(hi.span,{initial:{opacity:0,rotate:t?-180:0},animate:{opacity:1,rotate:t?0:180},exit:{opacity:0},transition:{duration:.3,ease:"easeInOut"},className:"flex items-center flex-shrink-0 text-icon-secondary",children:t?T.jsx(wN,{}):T.jsx(_N,{})},t?"minus":"plus"):null,d=i;return T.jsx(d,{className:"flex m-0 hover:bg-background-secondary transition duration-150 ease-in-out",children:T.jsxs("button",{className:G("flex w-full items-center justify-between text-sm font-medium transition-all appearance-none bg-transparent border-0 cursor-pointer gap-3",u,r&&"cursor-not-allowed opacity-40",s),onClick:r?()=>{}:e,"aria-expanded":t,disabled:r,...l,children:[T.jsx("div",{className:"flex items-center gap-2 text-text-primary font-semibold text-left",children:a}),f()]})})};F2.displayName="Accordion.Trigger";const W2=({isOpen:e,disabled:t=!1,type:n="simple",children:r,className:i})=>{const o={open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},a={simple:"px-2 pb-3",separator:"px-2 pb-4",boxed:"px-3 pb-4"}[n];return T.jsx(Es,{initial:!1,children:e&&T.jsx(hi.div,{variants:o,initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:G("overflow-hidden text-text-secondary w-full text-sm transition-[height, opacity, transform] ease-in box-border",t&&"opacity-40",i),"aria-hidden":!e,children:T.jsx("div",{className:G(a),children:r})},"content")})};W2.displayName="Accordion.Content";const Qte=Object.assign(L2,{Item:B2,Trigger:F2,Content:W2});var ene=Array.isArray,dr=ene,tne=typeof Qe.commonjsGlobal=="object"&&Qe.commonjsGlobal&&Qe.commonjsGlobal.Object===Object&&Qe.commonjsGlobal,z2=tne,nne=z2,rne=typeof self=="object"&&self&&self.Object===Object&&self,ine=nne||rne||Function("return this")(),Ui=ine,one=Ui,ane=one.Symbol,sd=ane,JT=sd,V2=Object.prototype,sne=V2.hasOwnProperty,lne=V2.toString,sc=JT?JT.toStringTag:void 0;function une(e){var t=sne.call(e,sc),n=e[sc];try{e[sc]=void 0;var r=!0}catch{}var i=lne.call(e);return r&&(t?e[sc]=n:delete e[sc]),i}var cne=une,fne=Object.prototype,dne=fne.toString;function hne(e){return dne.call(e)}var pne=hne,QT=sd,mne=cne,gne=pne,yne="[object Null]",vne="[object Undefined]",eE=QT?QT.toStringTag:void 0;function bne(e){return e==null?e===void 0?vne:yne:eE&&eE in Object(e)?mne(e):gne(e)}var Io=bne;function xne(e){return e!=null&&typeof e=="object"}var Ro=xne,wne=Io,_ne=Ro,Sne="[object Symbol]";function One(e){return typeof e=="symbol"||_ne(e)&&wne(e)==Sne}var _u=One,Cne=dr,Pne=_u,Ane=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tne=/^\w*$/;function Ene(e,t){if(Cne(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Pne(e)?!0:Tne.test(e)||!Ane.test(e)||t!=null&&e in Object(t)}var o_=Ene;function kne(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ea=kne;const Su=Qe.getDefaultExportFromCjs(Ea);var Mne=Io,jne=Ea,Nne="[object AsyncFunction]",$ne="[object Function]",Dne="[object GeneratorFunction]",Ine="[object Proxy]";function Rne(e){if(!jne(e))return!1;var t=Mne(e);return t==$ne||t==Dne||t==Nne||t==Ine}var a_=Rne;const Be=Qe.getDefaultExportFromCjs(a_);var Lne=Ui,Bne=Lne["__core-js_shared__"],Fne=Bne,ab=Fne,tE=function(){var e=/[^.]+$/.exec(ab&&ab.keys&&ab.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Wne(e){return!!tE&&tE in e}var zne=Wne,Vne=Function.prototype,Une=Vne.toString;function Kne(e){if(e!=null){try{return Une.call(e)}catch{}try{return e+""}catch{}}return""}var U2=Kne,Hne=a_,Gne=zne,Yne=Ea,qne=U2,Xne=/[\\^$.*+?()[\]{}|]/g,Zne=/^\[object .+?Constructor\]$/,Jne=Function.prototype,Qne=Object.prototype,ere=Jne.toString,tre=Qne.hasOwnProperty,nre=RegExp("^"+ere.call(tre).replace(Xne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rre(e){if(!Yne(e)||Gne(e))return!1;var t=Hne(e)?nre:Zne;return t.test(qne(e))}var ire=rre;function ore(e,t){return e==null?void 0:e[t]}var are=ore,sre=ire,lre=are;function ure(e,t){var n=lre(e,t);return sre(n)?n:void 0}var Ds=ure,cre=Ds,fre=cre(Object,"create"),Cg=fre,nE=Cg;function dre(){this.__data__=nE?nE(null):{},this.size=0}var hre=dre;function pre(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var mre=pre,gre=Cg,yre="__lodash_hash_undefined__",vre=Object.prototype,bre=vre.hasOwnProperty;function xre(e){var t=this.__data__;if(gre){var n=t[e];return n===yre?void 0:n}return bre.call(t,e)?t[e]:void 0}var wre=xre,_re=Cg,Sre=Object.prototype,Ore=Sre.hasOwnProperty;function Cre(e){var t=this.__data__;return _re?t[e]!==void 0:Ore.call(t,e)}var Pre=Cre,Are=Cg,Tre="__lodash_hash_undefined__";function Ere(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Are&&t===void 0?Tre:t,this}var kre=Ere,Mre=hre,jre=mre,Nre=wre,$re=Pre,Dre=kre;function Ou(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var Jre=Zre,Qre=Pg;function eie(e,t){var n=this.__data__,r=Qre(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var tie=eie,nie=Lre,rie=Hre,iie=qre,oie=Jre,aie=tie;function Cu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},os=function(t){return ld(t)&&t.indexOf("%")===t.length-1},ve=function(t){return Toe(t)&&!Au(t)},fn=function(t){return ve(t)||ld(t)},joe=0,Is=function(t){var n=++joe;return"".concat(t||"").concat(n)},Jn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ve(t)&&!ld(t))return r;var o;if(os(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Au(o)&&(o=r),i&&o>n&&(o=n),o},oa=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Noe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Boe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Yx(e){"@babel/helpers - typeof";return Yx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yx(e)}var fE={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},xo=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},dE=null,lb=null,p_=function e(t){if(t===dE&&Array.isArray(lb))return lb;var n=[];return O.Children.forEach(t,function(r){Fe(r)||(Soe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),lb=n,dE=t,n};function Er(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return xo(i)}):r=[xo(t)],p_(e).forEach(function(i){var o=Tr(i,"type.displayName")||Tr(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Sr(e,t){var n=Er(e,t);return n&&n[0]}var hE=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!ve(r)||r<=0||!ve(i)||i<=0)},Foe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Woe=function(t){return t&&t.type&&ld(t.type)&&Foe.indexOf(t.type)>=0},J2=function(t){return t&&Yx(t)==="object"&&"clipDot"in t},zoe=function(t,n,r,i){var o,a=(o=sb==null?void 0:sb[i])!==null&&o!==void 0?o:[];return!Be(t)&&(i&&a.includes(n)||Doe.includes(n))||r&&h_.includes(n)},Te=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(O.isValidElement(t)&&(i=t.props),!Su(i))return null;var o={};return Object.keys(i).forEach(function(a){var s;zoe((s=i)===null||s===void 0?void 0:s[a],a,n,r)&&(o[a]=i[a])}),o},qx=function e(t,n){if(t===n)return!0;var r=O.Children.count(t);if(r!==O.Children.count(n))return!1;if(r===0)return!0;if(r===1)return pE(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Goe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Zx(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,l=e.desc,u=Hoe(e,Koe),f=i||{width:n,height:r,x:0,y:0},d=Ue("recharts-surface",o);return O.createElement("svg",Xx({},Te(u,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),O.createElement("title",null,s),O.createElement("desc",null,l),t)}var Yoe=["children","className"];function Jx(){return Jx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xoe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var et=O.forwardRef(function(e,t){var n=e.children,r=e.className,i=qoe(e,Yoe),o=Ue("recharts-layer",r);return O.createElement("g",Jx({className:o},Te(i,!0),{ref:t}),n)}),Zoe=process.env.NODE_ENV!=="production",mi=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:eae(e,t,n)}var nae=tae,rae="\\ud800-\\udfff",iae="\\u0300-\\u036f",oae="\\ufe20-\\ufe2f",aae="\\u20d0-\\u20ff",sae=iae+oae+aae,lae="\\ufe0e\\ufe0f",uae="\\u200d",cae=RegExp("["+uae+rae+sae+lae+"]");function fae(e){return cae.test(e)}var Q2=fae;function dae(e){return e.split("")}var hae=dae,eL="\\ud800-\\udfff",pae="\\u0300-\\u036f",mae="\\ufe20-\\ufe2f",gae="\\u20d0-\\u20ff",yae=pae+mae+gae,vae="\\ufe0e\\ufe0f",bae="["+eL+"]",Qx="["+yae+"]",e0="\\ud83c[\\udffb-\\udfff]",xae="(?:"+Qx+"|"+e0+")",tL="[^"+eL+"]",nL="(?:\\ud83c[\\udde6-\\uddff]){2}",rL="[\\ud800-\\udbff][\\udc00-\\udfff]",wae="\\u200d",iL=xae+"?",oL="["+vae+"]?",_ae="(?:"+wae+"(?:"+[tL,nL,rL].join("|")+")"+oL+iL+")*",Sae=oL+iL+_ae,Oae="(?:"+[tL+Qx+"?",Qx,nL,rL,bae].join("|")+")",Cae=RegExp(e0+"(?="+e0+")|"+Oae+Sae,"g");function Pae(e){return e.match(Cae)||[]}var Aae=Pae,Tae=hae,Eae=Q2,kae=Aae;function Mae(e){return Eae(e)?kae(e):Tae(e)}var jae=Mae,Nae=nae,$ae=Q2,Dae=jae,Iae=Y2;function Rae(e){return function(t){t=Iae(t);var n=$ae(t)?Dae(t):void 0,r=n?n[0]:t.charAt(0),i=n?Nae(n,1).join(""):t.slice(1);return r[e]()+i}}var Lae=Rae,Bae=Lae,Fae=Bae("toUpperCase"),Wae=Fae;const kg=Qe.getDefaultExportFromCjs(Wae);function Ct(e){return function(){return e}}const aL=Math.cos,kp=Math.sin,bi=Math.sqrt,Mp=Math.PI,Mg=2*Mp,t0=Math.PI,n0=2*t0,Qa=1e-6,zae=n0-Qa;function sL(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return sL;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;iQa)if(!(Math.abs(d*l-u*f)>Qa)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-a,g=i-s,v=l*l+u*u,y=m*m+g*g,x=Math.sqrt(v),w=Math.sqrt(p),S=o*Math.tan((t0-Math.acos((v+p-y)/(2*x*w)))/2),P=S/w,_=S/x;Math.abs(P-1)>Qa&&this._append`L${t+P*f},${n+P*d}`,this._append`A${o},${o},0,0,${+(d*m>f*g)},${this._x1=t+_*l},${this._y1=n+_*u}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),u=t+s,f=n+l,d=1^a,p=a?i-o:o-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Qa||Math.abs(this._y1-f)>Qa)&&this._append`L${u},${f}`,r&&(p<0&&(p=p%n0+n0),p>zae?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:p>Qa&&this._append`A${r},${r},0,${+(p>=t0)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function m_(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Uae(t)}function g_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function lL(e){this._context=e}lL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function jg(e){return new lL(e)}function uL(e){return e[0]}function cL(e){return e[1]}function fL(e,t){var n=Ct(!0),r=null,i=jg,o=null,a=m_(s);e=typeof e=="function"?e:e===void 0?uL:Ct(e),t=typeof t=="function"?t:t===void 0?cL:Ct(t);function s(l){var u,f=(l=g_(l)).length,d,p=!1,m;for(r==null&&(o=i(m=a())),u=0;u<=f;++u)!(u=m;--g)s.point(S[g],P[g]);s.lineEnd(),s.areaEnd()}x&&(S[p]=+e(y,p,d),P[p]=+t(y,p,d),s.point(r?+r(y,p,d):S[p],n?+n(y,p,d):P[p]))}if(w)return s=null,w+""||null}function f(){return fL().defined(i).curve(a).context(o)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:Ct(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Ct(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Ct(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:Ct(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Ct(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Ct(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(n)},u.lineX1=function(){return f().x(r).y(t)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:Ct(!!d),u):i},u.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),u):a},u.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),u):o},u}class dL{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Kae(e){return new dL(e,!0)}function Hae(e){return new dL(e,!1)}const y_={draw(e,t){const n=bi(t/Mp);e.moveTo(n,0),e.arc(0,0,n,0,Mg)}},Gae={draw(e,t){const n=bi(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},hL=bi(1/3),Yae=hL*2,qae={draw(e,t){const n=bi(t/Yae),r=n*hL;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Xae={draw(e,t){const n=bi(t),r=-n/2;e.rect(r,r,n,n)}},Zae=.8908130915292852,pL=kp(Mp/10)/kp(7*Mp/10),Jae=kp(Mg/10)*pL,Qae=-aL(Mg/10)*pL,ese={draw(e,t){const n=bi(t*Zae),r=Jae*n,i=Qae*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=Mg*o/5,s=aL(a),l=kp(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},ub=bi(3),tse={draw(e,t){const n=-bi(t/(ub*3));e.moveTo(0,n*2),e.lineTo(-ub*n,-n),e.lineTo(ub*n,-n),e.closePath()}},Kr=-.5,Hr=bi(3)/2,r0=1/bi(12),nse=(r0/2+1)*3,rse={draw(e,t){const n=bi(t/nse),r=n/2,i=n*r0,o=r,a=n*r0+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Kr*r-Hr*i,Hr*r+Kr*i),e.lineTo(Kr*o-Hr*a,Hr*o+Kr*a),e.lineTo(Kr*s-Hr*l,Hr*s+Kr*l),e.lineTo(Kr*r+Hr*i,Kr*i-Hr*r),e.lineTo(Kr*o+Hr*a,Kr*a-Hr*o),e.lineTo(Kr*s+Hr*l,Kr*l-Hr*s),e.closePath()}};function ise(e,t){let n=null,r=m_(i);e=typeof e=="function"?e:Ct(e||y_),t=typeof t=="function"?t:Ct(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Ct(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Ct(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function jp(){}function Np(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function mL(e){this._context=e}mL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Np(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Np(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ose(e){return new mL(e)}function gL(e){this._context=e}gL.prototype={areaStart:jp,areaEnd:jp,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Np(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ase(e){return new gL(e)}function yL(e){this._context=e}yL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Np(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sse(e){return new yL(e)}function vL(e){this._context=e}vL.prototype={areaStart:jp,areaEnd:jp,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function lse(e){return new vL(e)}function gE(e){return e<0?-1:1}function yE(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(gE(o)+gE(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function vE(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function cb(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function $p(e){this._context=e}$p.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:cb(this,this._t0,vE(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,cb(this,vE(this,n=yE(this,e,t)),n);break;default:cb(this,this._t0,n=yE(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function bL(e){this._context=new xL(e)}(bL.prototype=Object.create($p.prototype)).point=function(e,t){$p.prototype.point.call(this,t,e)};function xL(e){this._context=e}xL.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function use(e){return new $p(e)}function cse(e){return new bL(e)}function wL(e){this._context=e}wL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=bE(e),i=bE(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function dse(e){return new Ng(e,.5)}function hse(e){return new Ng(e,0)}function pse(e){return new Ng(e,1)}function Bl(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n=0;)n[t]=t;return n}function mse(e,t){return e[t]}function gse(e){const t=[];return t.key=e,t}function yse(){var e=Ct([]),t=i0,n=Bl,r=mse;function i(o){var a=Array.from(e.apply(this,arguments),gse),s,l=a.length,u=-1,f;for(const d of o)for(s=0,++u;s0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pse(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var _L={symbolCircle:y_,symbolCross:Gae,symbolDiamond:qae,symbolSquare:Xae,symbolStar:ese,symbolTriangle:tse,symbolWye:rse},Ase=Math.PI/180,Tse=function(t){var n="symbol".concat(kg(t));return _L[n]||y_},Ese=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*Ase;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},kse=function(t,n){_L["symbol".concat(kg(t))]=n},v_=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,s=a===void 0?"area":a,l=Cse(t,wse),u=wE(wE({},l),{},{type:r,size:o,sizeType:s}),f=function(){var y=Tse(r),x=ise().type(y).size(Ese(o,s,r));return x()},d=u.className,p=u.cx,m=u.cy,g=Te(u,!0);return p===+p&&m===+m&&o===+o?O.createElement("path",o0({},g,{className:Ue("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(m,")"),d:f()})):null};v_.registerSymbol=kse;function Fl(e){"@babel/helpers - typeof";return Fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(e)}function a0(){return a0=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var w=m.inactive?u:m.color;return O.createElement("li",a0({className:y,style:d,key:"legend-item-".concat(g)},Ss(r.props,m,g)),O.createElement(Zx,{width:a,height:a,viewBox:f,style:p},r.renderIcon(m)),O.createElement("span",{className:"recharts-legend-item-text",style:{color:w}},v?v(x,m,g):x))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return O.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(O.PureComponent);sf(b_,"displayName","Legend");sf(b_,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Fse=Ag;function Wse(){this.__data__=new Fse,this.size=0}var zse=Wse;function Vse(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Use=Vse;function Kse(e){return this.__data__.get(e)}var Hse=Kse;function Gse(e){return this.__data__.has(e)}var Yse=Gse,qse=Ag,Xse=l_,Zse=u_,Jse=200;function Qse(e,t){var n=this.__data__;if(n instanceof qse){var r=n.__data__;if(!Xse||r.lengths))return!1;var u=o.get(e),f=o.get(t);if(u&&f)return u==t&&f==e;var d=-1,p=!0,m=n&wle?new yle:void 0;for(o.set(e,t),o.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=Cue}var S_=Pue,Aue=Io,Tue=S_,Eue=Ro,kue="[object Arguments]",Mue="[object Array]",jue="[object Boolean]",Nue="[object Date]",$ue="[object Error]",Due="[object Function]",Iue="[object Map]",Rue="[object Number]",Lue="[object Object]",Bue="[object RegExp]",Fue="[object Set]",Wue="[object String]",zue="[object WeakMap]",Vue="[object ArrayBuffer]",Uue="[object DataView]",Kue="[object Float32Array]",Hue="[object Float64Array]",Gue="[object Int8Array]",Yue="[object Int16Array]",que="[object Int32Array]",Xue="[object Uint8Array]",Zue="[object Uint8ClampedArray]",Jue="[object Uint16Array]",Que="[object Uint32Array]",Mt={};Mt[Kue]=Mt[Hue]=Mt[Gue]=Mt[Yue]=Mt[que]=Mt[Xue]=Mt[Zue]=Mt[Jue]=Mt[Que]=!0;Mt[kue]=Mt[Mue]=Mt[Vue]=Mt[jue]=Mt[Uue]=Mt[Nue]=Mt[$ue]=Mt[Due]=Mt[Iue]=Mt[Rue]=Mt[Lue]=Mt[Bue]=Mt[Fue]=Mt[Wue]=Mt[zue]=!1;function ece(e){return Eue(e)&&Tue(e.length)&&!!Mt[Aue(e)]}var tce=ece;function nce(e){return function(t){return e(t)}}var NL=nce,Lp={exports:{}};Lp.exports;(function(e,t){var n=z2,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(Lp,Lp.exports);var rce=Lp.exports,ice=tce,oce=NL,TE=rce,EE=TE&&TE.isTypedArray,ace=EE?oce(EE):ice,$L=ace,sce=cue,lce=w_,uce=dr,cce=jL,fce=__,dce=$L,hce=Object.prototype,pce=hce.hasOwnProperty;function mce(e,t){var n=uce(e),r=!n&&lce(e),i=!n&&!r&&cce(e),o=!n&&!r&&!i&&dce(e),a=n||r||i||o,s=a?sce(e.length,String):[],l=s.length;for(var u in e)(t||pce.call(e,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||fce(u,l)))&&s.push(u);return s}var gce=mce,yce=Object.prototype;function vce(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||yce;return e===n}var bce=vce;function xce(e,t){return function(n){return e(t(n))}}var DL=xce,wce=DL,_ce=wce(Object.keys,Object),Sce=_ce,Oce=bce,Cce=Sce,Pce=Object.prototype,Ace=Pce.hasOwnProperty;function Tce(e){if(!Oce(e))return Cce(e);var t=[];for(var n in Object(e))Ace.call(e,n)&&n!="constructor"&&t.push(n);return t}var Ece=Tce,kce=a_,Mce=S_;function jce(e){return e!=null&&Mce(e.length)&&!kce(e)}var ud=jce,Nce=gce,$ce=Ece,Dce=ud;function Ice(e){return Dce(e)?Nce(e):$ce(e)}var $g=Ice,Rce=Jle,Lce=lue,Bce=$g;function Fce(e){return Rce(e,Bce,Lce)}var Wce=Fce,kE=Wce,zce=1,Vce=Object.prototype,Uce=Vce.hasOwnProperty;function Kce(e,t,n,r,i,o){var a=n&zce,s=kE(e),l=s.length,u=kE(t),f=u.length;if(l!=f&&!a)return!1;for(var d=l;d--;){var p=s[d];if(!(a?p in t:Uce.call(t,p)))return!1}var m=o.get(e),g=o.get(t);if(m&&g)return m==t&&g==e;var v=!0;o.set(e,t),o.set(t,e);for(var y=a;++d-1}var Vde=zde;function Ude(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=ohe){var u=t?null:rhe(e);if(u)return ihe(u);a=!1,i=nhe,l=new Qde}else l=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function whe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function _he(e){return e.value}function She(e,t){if(O.isValidElement(e))return O.cloneElement(e,t);if(typeof e=="function")return O.createElement(e,t);t.ref;var n=xhe(t,dhe);return O.createElement(b_,n)}var HE=1,wo=function(e){function t(){var n;hhe(this,t);for(var r=arguments.length,i=new Array(r),o=0;oHE||Math.abs(i.height-this.lastBoundingBox.height)>HE)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?io({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,s=i.verticalAlign,l=i.margin,u=i.chartWidth,f=i.chartHeight,d,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var m=this.getBBoxSnapshot();d={left:((u||0)-m.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var g=this.getBBoxSnapshot();p={top:((f||0)-g.height)/2}}else p=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return io(io({},d),p)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,s=i.height,l=i.wrapperStyle,u=i.payloadUniqBy,f=i.payload,d=io(io({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return O.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(m){r.wrapperNode=m}},She(o,io(io({},this.props),{},{payload:zL(f,u,_he)})))}}],[{key:"getWithHeight",value:function(r,i){var o=io(io({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&ve(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(O.PureComponent);Dg(wo,"displayName","Legend");Dg(wo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var GE=sd,Ohe=w_,Che=dr,YE=GE?GE.isConcatSpreadable:void 0;function Phe(e){return Che(e)||Ohe(e)||!!(YE&&e&&e[YE])}var Ahe=Phe,The=kL,Ehe=Ahe;function KL(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=Ehe),i||(i=[]);++o0&&n(s)?t>1?KL(s,t-1,n,r,i):The(i,s):r||(i[i.length]=s)}return i}var HL=KL;function khe(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++i];if(n(o[l],l,o)===!1)break}return t}}var Mhe=khe,jhe=Mhe,Nhe=jhe(),$he=Nhe,Dhe=$he,Ihe=$g;function Rhe(e,t){return e&&Dhe(e,t,Ihe)}var GL=Rhe,Lhe=ud;function Bhe(e,t){return function(n,r){if(n==null)return n;if(!Lhe(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&e=s)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return e.index-t.index}var Qhe=Jhe,pb=f_,epe=d_,tpe=Ki,npe=YL,rpe=Yhe,ipe=NL,ope=Qhe,ape=ku,spe=dr;function lpe(e,t,n){t.length?t=pb(t,function(o){return spe(o)?function(a){return epe(a,o.length===1?o[0]:o)}:o}):t=[ape];var r=-1;t=pb(t,ipe(tpe));var i=npe(e,function(o,a,s){var l=pb(t,function(u){return u(o)});return{criteria:l,index:++r,value:o}});return rpe(i,function(o,a){return ope(o,a,n)})}var upe=lpe;function cpe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var fpe=cpe,dpe=fpe,XE=Math.max;function hpe(e,t,n){return t=XE(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=XE(r.length-t,0),a=Array(o);++i0){if(++t>=Spe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Ape=Ppe,Tpe=_pe,Epe=Ape,kpe=Epe(Tpe),Mpe=kpe,jpe=ku,Npe=ppe,$pe=Mpe;function Dpe(e,t){return $pe(Npe(e,t,jpe),e+"")}var Ipe=Dpe,Rpe=s_,Lpe=ud,Bpe=__,Fpe=Ea;function Wpe(e,t,n){if(!Fpe(n))return!1;var r=typeof t;return(r=="number"?Lpe(n)&&Bpe(t,n.length):r=="string"&&t in n)?Rpe(n[t],e):!1}var Ig=Wpe,zpe=HL,Vpe=upe,Upe=Ipe,JE=Ig,Kpe=Upe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&JE(e,t[0],t[1])?t=[]:n>2&&JE(t[0],t[1],t[2])&&(t=[t[0]]),Vpe(e,zpe(t,1),[])}),Hpe=Kpe;const P_=Qe.getDefaultExportFromCjs(Hpe);function lf(e){"@babel/helpers - typeof";return lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lf(e)}function p0(){return p0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(lc,"-left"),ve(n)&&t&&ve(t.x)&&n=t.y),"".concat(lc,"-top"),ve(r)&&t&&ve(t.y)&&rv?Math.max(f,l[r]):Math.max(d,l[r])}function sme(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function lme(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,u,f,d;return a.height>0&&a.width>0&&n?(f=tk({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=tk({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),u=sme({translateX:f,translateY:d,useTranslate3d:s})):u=ome,{cssProperties:u,cssClasses:ame({translateX:f,translateY:d,coordinate:n})}}function zl(e){"@babel/helpers - typeof";return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zl(e)}function nk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rk(e){for(var t=1;tik||Math.abs(r.height-this.state.lastBoundingBox.height)>ik)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,u=i.children,f=i.coordinate,d=i.hasPayload,p=i.isAnimationActive,m=i.offset,g=i.position,v=i.reverseDirection,y=i.useTranslate3d,x=i.viewBox,w=i.wrapperStyle,S=lme({allowEscapeViewBox:a,coordinate:f,offsetTopLeft:m,position:g,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:x}),P=S.cssClasses,_=S.cssProperties,C=rk(rk({transition:p&&o?"transform ".concat(s,"ms ").concat(l):void 0},_),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&d?"visible":"hidden",position:"absolute",top:0,left:0},w);return O.createElement("div",{tabIndex:-1,className:P,style:C,ref:function(k){r.wrapperNode=k}},u)}}])}(O.PureComponent),vme=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},gi={isSsr:vme(),get:function(t){return gi[t]},set:function(t,n){if(typeof t=="string")gi[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){gi[i]=t[i]})}}};function Vl(e){"@babel/helpers - typeof";return Vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vl(e)}function ok(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ak(e){for(var t=1;t0;return O.createElement(yme,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:p,active:o,coordinate:f,hasPayload:C,offset:m,position:y,reverseDirection:x,useTranslate3d:w,viewBox:S,wrapperStyle:P},Tme(u,ak(ak({},this.props),{},{payload:_})))}}])}(O.PureComponent);A_(Or,"displayName","Tooltip");A_(Or,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!gi.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Eme=Ui,kme=function(){return Eme.Date.now()},Mme=kme,jme=/\s/;function Nme(e){for(var t=e.length;t--&&jme.test(e.charAt(t)););return t}var $me=Nme,Dme=$me,Ime=/^\s+/;function Rme(e){return e&&e.slice(0,Dme(e)+1).replace(Ime,"")}var Lme=Rme,Bme=Lme,sk=Ea,Fme=_u,lk=NaN,Wme=/^[-+]0x[0-9a-f]+$/i,zme=/^0b[01]+$/i,Vme=/^0o[0-7]+$/i,Ume=parseInt;function Kme(e){if(typeof e=="number")return e;if(Fme(e))return lk;if(sk(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=sk(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Bme(e);var n=zme.test(e);return n||Vme.test(e)?Ume(e.slice(2),n?2:8):Wme.test(e)?lk:+e}var eB=Kme,Hme=Ea,gb=Mme,uk=eB,Gme="Expected a function",Yme=Math.max,qme=Math.min;function Xme(e,t,n){var r,i,o,a,s,l,u=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(Gme);t=uk(t)||0,Hme(n)&&(f=!!n.leading,d="maxWait"in n,o=d?Yme(uk(n.maxWait)||0,t):o,p="trailing"in n?!!n.trailing:p);function m(C){var E=r,k=i;return r=i=void 0,u=C,a=e.apply(k,E),a}function g(C){return u=C,s=setTimeout(x,t),f?m(C):a}function v(C){var E=C-l,k=C-u,M=t-E;return d?qme(M,o-k):M}function y(C){var E=C-l,k=C-u;return l===void 0||E>=t||E<0||d&&k>=o}function x(){var C=gb();if(y(C))return w(C);s=setTimeout(x,v(C))}function w(C){return s=void 0,p&&r?m(C):(r=i=void 0,a)}function S(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function P(){return s===void 0?a:w(gb())}function _(){var C=gb(),E=y(C);if(r=arguments,i=this,l=C,E){if(s===void 0)return g(l);if(d)return clearTimeout(s),s=setTimeout(x,t),m(l)}return s===void 0&&(s=setTimeout(x,t)),a}return _.cancel=S,_.flush=P,_}var Zme=Xme,Jme=Zme,Qme=Ea,ege="Expected a function";function tge(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(ege);return Qme(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Jme(e,t,{leading:r,maxWait:t,trailing:i})}var nge=tge;const tB=Qe.getDefaultExportFromCjs(nge);function cf(e){"@babel/helpers - typeof";return cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cf(e)}function ck(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ph(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(B=tB(B,v,{trailing:!0,leading:!1}));var L=new ResizeObserver(B),F=_.current.getBoundingClientRect(),W=F.width,z=F.height;return $(W,z),L.observe(_.current),function(){L.disconnect()}},[$,v]);var N=O.useMemo(function(){var B=M.containerWidth,L=M.containerHeight;if(B<0||L<0)return null;mi(os(a)||os(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,a,l),mi(!n||n>0,"The aspect(%s) must be greater than zero.",n);var F=os(a)?B:a,W=os(l)?L:l;n&&n>0&&(F?W=F/n:W&&(F=W*n),p&&W>p&&(W=p)),mi(F>0||W>0,`The width(%s) and height(%s) of chart should be greater than 0, + please check the style of container, or the props width(%s) and height(%s), + or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the + height and width.`,F,W,a,l,f,d,n);var z=!Array.isArray(m)&&xo(m.type).endsWith("Chart");return O.Children.map(m,function(H){return O.isValidElement(H)?O.cloneElement(H,Ph({width:F,height:W},z?{style:Ph({height:"100%",width:"100%",maxHeight:W,maxWidth:F},H.props.style)}:{})):H})},[n,m,l,p,d,f,M,a]);return O.createElement("div",{id:y?"".concat(y):void 0,className:Ue("recharts-responsive-container",x),style:Ph(Ph({},P),{},{width:a,height:l,minWidth:f,minHeight:d,maxHeight:p}),ref:_},N)}),T_=function(t){return null};T_.displayName="Cell";function ff(e){"@babel/helpers - typeof";return ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ff(e)}function dk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function v0(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||gi.isSsr)return{width:0,height:0};var r=gge(n),i=JSON.stringify({text:t,copyStyle:r});if(rl.widthCache[i])return rl.widthCache[i];try{var o=document.getElementById(hk);o||(o=document.createElement("span"),o.setAttribute("id",hk),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=v0(v0({},mge),r);Object.assign(o.style,a),o.textContent="".concat(t);var s=o.getBoundingClientRect(),l={width:s.width,height:s.height};return rl.widthCache[i]=l,++rl.cacheCount>pge&&(rl.cacheCount=0,rl.widthCache={}),l}catch{return{width:0,height:0}}},yge=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function df(e){"@babel/helpers - typeof";return df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(e)}function zp(e,t){return wge(e)||xge(e,t)||bge(e,t)||vge()}function vge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bge(e,t){if(e){if(typeof e=="string")return pk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pk(e,t)}}function pk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dge(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function xk(e,t){return Bge(e)||Lge(e,t)||Rge(e,t)||Ige()}function Ige(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rge(e,t){if(e){if(typeof e=="string")return wk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return wk(e,t)}}function wk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return F.reduce(function(W,z){var H=z.word,U=z.width,K=W[W.length-1];if(K&&(i==null||o||K.width+U+rz.width?W:z})};if(!f)return m;for(var v="…",y=function(F){var W=d.slice(0,F),z=aB({breakAll:u,style:l,children:W+v}).wordsWithComputedWidth,H=p(z),U=H.length>a||g(H).width>Number(i);return[U,H]},x=0,w=d.length-1,S=0,P;x<=w&&S<=d.length-1;){var _=Math.floor((x+w)/2),C=_-1,E=y(C),k=xk(E,2),M=k[0],D=k[1],$=y(_),N=xk($,1),B=N[0];if(!M&&!B&&(x=_+1),M&&B&&(w=_-1),!M&&B){P=D;break}S++}return P||m},_k=function(t){var n=Fe(t)?[]:t.toString().split(oB);return[{words:n}]},Wge=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!gi.isSsr){var l,u,f=aB({breakAll:a,children:i,style:o});if(f){var d=f.wordsWithComputedWidth,p=f.spaceWidth;l=d,u=p}else return _k(i);return Fge({breakAll:a,children:i,maxLines:s,style:o},l,u,n,r)}return _k(i)},Sk="#808080",Os=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,u=l===void 0?"0.71em":l,f=t.scaleToFit,d=f===void 0?!1:f,p=t.textAnchor,m=p===void 0?"start":p,g=t.verticalAnchor,v=g===void 0?"end":g,y=t.fill,x=y===void 0?Sk:y,w=bk(t,Nge),S=O.useMemo(function(){return Wge({breakAll:w.breakAll,children:w.children,maxLines:w.maxLines,scaleToFit:d,style:w.style,width:w.width})},[w.breakAll,w.children,w.maxLines,d,w.style,w.width]),P=w.dx,_=w.dy,C=w.angle,E=w.className,k=w.breakAll,M=bk(w,$ge);if(!fn(r)||!fn(o))return null;var D=r+(ve(P)?P:0),$=o+(ve(_)?_:0),N;switch(v){case"start":N=yb("calc(".concat(u,")"));break;case"middle":N=yb("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(u," / 2))"));break;default:N=yb("calc(".concat(S.length-1," * -").concat(s,")"));break}var B=[];if(d){var L=S[0].width,F=w.width;B.push("scale(".concat((ve(F)?F/L:1)/L,")"))}return C&&B.push("rotate(".concat(C,", ").concat(D,", ").concat($,")")),B.length&&(M.transform=B.join(" ")),O.createElement("text",b0({},Te(M,!0),{x:D,y:$,className:Ue("recharts-text",E),textAnchor:m,fill:x.includes("url")?Sk:x}),S.map(function(W,z){var H=W.words.join(k?"":" ");return O.createElement("tspan",{x:D,dy:z===0?N:s,key:"".concat(H,"-").concat(z)},H)}))};function pa(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function zge(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function E_(e){let t,n,r;e.length!==2?(t=pa,n=(s,l)=>pa(e(s),l),r=(s,l)=>e(s)-l):(t=e===pa||e===zge?e:Vge,n=e,r=e);function i(s,l,u=0,f=s.length){if(u>>1;n(s[d],l)<0?u=d+1:f=d}while(u>>1;n(s[d],l)<=0?u=d+1:f=d}while(uu&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function Vge(){return 0}function sB(e){return e===null?NaN:+e}function*Uge(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Kge=E_(pa),cd=Kge.right;E_(sB).center;class Ok extends Map{constructor(t,n=Yge){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(Ck(this,t))}has(t){return super.has(Ck(this,t))}set(t,n){return super.set(Hge(this,t),n)}delete(t){return super.delete(Gge(this,t))}}function Ck({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Hge({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Gge({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Yge(e){return e!==null&&typeof e=="object"?e.valueOf():e}function qge(e=pa){if(e===pa)return lB;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function lB(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Xge=Math.sqrt(50),Zge=Math.sqrt(10),Jge=Math.sqrt(2);function Vp(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=Xge?10:o>=Zge?5:o>=Jge?2:1;let s,l,u;return i<0?(u=Math.pow(10,-i)/a,s=Math.round(e*u),l=Math.round(t*u),s/ut&&--l,u=-u):(u=Math.pow(10,i)*a,s=Math.round(e/u),l=Math.round(t/u),s*ut&&--l),l0))return[];if(e===t)return[e];const r=t=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let u=0;u=r)&&(n=r);return n}function Ak(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function uB(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?lB:qge(i);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,f=Math.log(l),d=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*d*(l-d)/l)*(u-l/2<0?-1:1),m=Math.max(n,Math.floor(t-u*d/l+p)),g=Math.min(r,Math.floor(t+(l-u)*d/l+p));uB(e,t,m,g,i)}const o=e[t];let a=n,s=r;for(uc(e,n,t),i(e[r],o)>0&&uc(e,n,r);a0;)--s}i(e[n],o)===0?uc(e,n,s):(++s,uc(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function uc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Qge(e,t,n){if(e=Float64Array.from(Uge(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return Ak(e);if(t>=1)return Pk(e);var r,i=(r-1)*t,o=Math.floor(i),a=Pk(uB(e,o).subarray(0,o+1)),s=Ak(e.subarray(o+1));return a+(s-a)*(i-o)}}function eye(e,t,n=sB){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function tye(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Th(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Th(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=rye.exec(e))?new lr(t[1],t[2],t[3],1):(t=iye.exec(e))?new lr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=oye.exec(e))?Th(t[1],t[2],t[3],t[4]):(t=aye.exec(e))?Th(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=sye.exec(e))?$k(t[1],t[2]/100,t[3]/100,1):(t=lye.exec(e))?$k(t[1],t[2]/100,t[3]/100,t[4]):Tk.hasOwnProperty(e)?Mk(Tk[e]):e==="transparent"?new lr(NaN,NaN,NaN,0):null}function Mk(e){return new lr(e>>16&255,e>>8&255,e&255,1)}function Th(e,t,n,r){return r<=0&&(e=t=n=NaN),new lr(e,t,n,r)}function fye(e){return e instanceof fd||(e=gf(e)),e?(e=e.rgb(),new lr(e.r,e.g,e.b,e.opacity)):new lr}function O0(e,t,n,r){return arguments.length===1?fye(e):new lr(e,t,n,r??1)}function lr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}M_(lr,O0,fB(fd,{brighter(e){return e=e==null?Up:Math.pow(Up,e),new lr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pf:Math.pow(pf,e),new lr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new lr(ps(this.r),ps(this.g),ps(this.b),Kp(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:jk,formatHex:jk,formatHex8:dye,formatRgb:Nk,toString:Nk}));function jk(){return`#${as(this.r)}${as(this.g)}${as(this.b)}`}function dye(){return`#${as(this.r)}${as(this.g)}${as(this.b)}${as((isNaN(this.opacity)?1:this.opacity)*255)}`}function Nk(){const e=Kp(this.opacity);return`${e===1?"rgb(":"rgba("}${ps(this.r)}, ${ps(this.g)}, ${ps(this.b)}${e===1?")":`, ${e})`}`}function Kp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ps(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function as(e){return e=ps(e),(e<16?"0":"")+e.toString(16)}function $k(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new fi(e,t,n,r)}function dB(e){if(e instanceof fi)return new fi(e.h,e.s,e.l,e.opacity);if(e instanceof fd||(e=gf(e)),!e)return new fi;if(e instanceof fi)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&l<1?0:a,new fi(a,s,l,e.opacity)}function hye(e,t,n,r){return arguments.length===1?dB(e):new fi(e,t,n,r??1)}function fi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}M_(fi,hye,fB(fd,{brighter(e){return e=e==null?Up:Math.pow(Up,e),new fi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pf:Math.pow(pf,e),new fi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new lr(vb(e>=240?e-240:e+120,i,r),vb(e,i,r),vb(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new fi(Dk(this.h),Eh(this.s),Eh(this.l),Kp(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Kp(this.opacity);return`${e===1?"hsl(":"hsla("}${Dk(this.h)}, ${Eh(this.s)*100}%, ${Eh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Dk(e){return e=(e||0)%360,e<0?e+360:e}function Eh(e){return Math.max(0,Math.min(1,e||0))}function vb(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const j_=e=>()=>e;function pye(e,t){return function(n){return e+n*t}}function mye(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function gye(e){return(e=+e)==1?hB:function(t,n){return n-t?mye(t,n,e):j_(isNaN(t)?n:t)}}function hB(e,t){var n=t-e;return n?pye(e,n):j_(isNaN(e)?t:e)}const Ik=function e(t){var n=gye(t);function r(i,o){var a=n((i=O0(i)).r,(o=O0(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=hB(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=l(f),i.opacity=u(f),i+""}}return r.gamma=e,r}(1);function yye(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Hp(r,i)})),n=bb.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Tye(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?Eye:Tye,l=u=null,d}function d(p){return p==null||isNaN(p=+p)?o:(l||(l=s(e.map(r),t,n)))(r(a(p)))}return d.invert=function(p){return a(i((u||(u=s(t,e.map(r),Hp)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,Gp),f()):e.slice()},d.range=function(p){return arguments.length?(t=Array.from(p),f()):t.slice()},d.rangeRound=function(p){return t=Array.from(p),n=N_,f()},d.clamp=function(p){return arguments.length?(a=p?!0:Qn,f()):a!==Qn},d.interpolate=function(p){return arguments.length?(n=p,f()):n},d.unknown=function(p){return arguments.length?(o=p,d):o},function(p,m){return r=p,i=m,f()}}function $_(){return Rg()(Qn,Qn)}function kye(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Yp(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ul(e){return e=Yp(Math.abs(e)),e?e[1]:NaN}function Mye(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function jye(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Nye=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function yf(e){if(!(t=Nye.exec(e)))throw new Error("invalid format: "+e);var t;return new D_({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}yf.prototype=D_.prototype;function D_(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}D_.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function $ye(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var pB;function Dye(e,t){var n=Yp(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(pB=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Yp(e,Math.max(0,t+o-1))[0]}function Lk(e,t){var n=Yp(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Bk={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:kye,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Lk(e*100,t),r:Lk,s:Dye,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Fk(e){return e}var Wk=Array.prototype.map,zk=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Iye(e){var t=e.grouping===void 0||e.thousands===void 0?Fk:Mye(Wk.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Fk:jye(Wk.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d){d=yf(d);var p=d.fill,m=d.align,g=d.sign,v=d.symbol,y=d.zero,x=d.width,w=d.comma,S=d.precision,P=d.trim,_=d.type;_==="n"?(w=!0,_="g"):Bk[_]||(S===void 0&&(S=12),P=!0,_="g"),(y||p==="0"&&m==="=")&&(y=!0,p="0",m="=");var C=v==="$"?n:v==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",E=v==="$"?r:/[%p]/.test(_)?a:"",k=Bk[_],M=/[defgprs%]/.test(_);S=S===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function D($){var N=C,B=E,L,F,W;if(_==="c")B=k($)+B,$="";else{$=+$;var z=$<0||1/$<0;if($=isNaN($)?l:k(Math.abs($),S),P&&($=$ye($)),z&&+$==0&&g!=="+"&&(z=!1),N=(z?g==="("?g:s:g==="-"||g==="("?"":g)+N,B=(_==="s"?zk[8+pB/3]:"")+B+(z&&g==="("?")":""),M){for(L=-1,F=$.length;++LW||W>57){B=(W===46?i+$.slice(L+1):$.slice(L))+B,$=$.slice(0,L);break}}}w&&!y&&($=t($,1/0));var H=N.length+$.length+B.length,U=H>1)+N+$+B+U.slice(H);break;default:$=U+N+$+B;break}return o($)}return D.toString=function(){return d+""},D}function f(d,p){var m=u((d=yf(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Ul(p)/3)))*3,v=Math.pow(10,-g),y=zk[8+g/3];return function(x){return m(v*x)+y}}return{format:u,formatPrefix:f}}var kh,I_,mB;Rye({thousands:",",grouping:[3],currency:["$",""]});function Rye(e){return kh=Iye(e),I_=kh.format,mB=kh.formatPrefix,kh}function Lye(e){return Math.max(0,-Ul(Math.abs(e)))}function Bye(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ul(t)/3)))*3-Ul(Math.abs(e)))}function Fye(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ul(t)-Ul(e))+1}function gB(e,t,n,r){var i=_0(e,t,n),o;switch(r=yf(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=Bye(i,a))&&(r.precision=o),mB(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Fye(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Lye(i))&&(r.precision=o-(r.type==="%")*2);break}}return I_(r)}function ka(e){var t=e.domain;return e.ticks=function(n){var r=t();return x0(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return gB(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l,u,f=10;for(s0;){if(u=w0(a,s,n),u===l)return r[i]=a,r[o]=s,t(r);if(u>0)a=Math.floor(a/u)*u,s=Math.ceil(s/u)*u;else if(u<0)a=Math.ceil(a*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function qp(){var e=$_();return e.copy=function(){return dd(e,qp())},Jr.apply(e,arguments),ka(e)}function yB(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Gp),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return yB(e).unknown(t)},e=arguments.length?Array.from(e,Gp):[0,1],ka(n)}function vB(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function Kye(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Kk(e){return(t,n)=>-e(-t,n)}function R_(e){const t=e(Vk,Uk),n=t.domain;let r=10,i,o;function a(){return i=Kye(r),o=Uye(r),n()[0]<0?(i=Kk(i),o=Kk(o),e(Wye,zye)):e(Vk,Uk),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let u=l[0],f=l[l.length-1];const d=f0){for(;p<=m;++p)for(g=1;gf)break;x.push(v)}}else for(;p<=m;++p)for(g=r-1;g>=1;--g)if(v=p>0?g/o(-p):g*o(p),!(vf)break;x.push(v)}x.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=yf(l)).precision==null&&(l.trim=!0),l=I_(l)),s===1/0)return l;const u=Math.max(1,r*s/t.ticks().length);return f=>{let d=f/o(Math.round(i(f)));return d*rn(vB(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function bB(){const e=R_(Rg()).domain([1,10]);return e.copy=()=>dd(e,bB()).base(e.base()),Jr.apply(e,arguments),e}function Hk(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Gk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function L_(e){var t=1,n=e(Hk(t),Gk(t));return n.constant=function(r){return arguments.length?e(Hk(t=+r),Gk(t)):t},ka(n)}function xB(){var e=L_(Rg());return e.copy=function(){return dd(e,xB()).constant(e.constant())},Jr.apply(e,arguments)}function Yk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Hye(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Gye(e){return e<0?-e*e:e*e}function B_(e){var t=e(Qn,Qn),n=1;function r(){return n===1?e(Qn,Qn):n===.5?e(Hye,Gye):e(Yk(n),Yk(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ka(t)}function F_(){var e=B_(Rg());return e.copy=function(){return dd(e,F_()).exponent(e.exponent())},Jr.apply(e,arguments),e}function Yye(){return F_.apply(null,arguments).exponent(.5)}function qk(e){return Math.sign(e)*e*e}function qye(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function wB(){var e=$_(),t=[0,1],n=!1,r;function i(o){var a=qye(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(qk(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Gp)).map(qk)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return wB(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Jr.apply(i,arguments),ka(i)}function _B(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[u-1],r[u]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return SB().domain([e,t]).range(i).unknown(o)},Jr.apply(ka(a),arguments)}function OB(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[cd(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return OB().domain(e).range(t).unknown(n)},Jr.apply(i,arguments)}const xb=new Date,wb=new Date;function hn(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o0))return l;let u;do l.push(u=new Date(+o)),t(o,s),e(o);while(uhn(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(xb.setTime(+o),wb.setTime(+a),e(xb),e(wb),Math.floor(n(xb,wb))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Xp=hn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Xp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?hn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Xp);Xp.range;const fo=1e3,Xr=fo*60,ho=Xr*60,To=ho*24,W_=To*7,Xk=To*30,_b=To*365,ss=hn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*fo)},(e,t)=>(t-e)/fo,e=>e.getUTCSeconds());ss.range;const z_=hn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*fo)},(e,t)=>{e.setTime(+e+t*Xr)},(e,t)=>(t-e)/Xr,e=>e.getMinutes());z_.range;const V_=hn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Xr)},(e,t)=>(t-e)/Xr,e=>e.getUTCMinutes());V_.range;const U_=hn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*fo-e.getMinutes()*Xr)},(e,t)=>{e.setTime(+e+t*ho)},(e,t)=>(t-e)/ho,e=>e.getHours());U_.range;const K_=hn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ho)},(e,t)=>(t-e)/ho,e=>e.getUTCHours());K_.range;const hd=hn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Xr)/To,e=>e.getDate()-1);hd.range;const Lg=hn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/To,e=>e.getUTCDate()-1);Lg.range;const CB=hn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/To,e=>Math.floor(e/To));CB.range;function Rs(e){return hn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Xr)/W_)}const Bg=Rs(0),Zp=Rs(1),Xye=Rs(2),Zye=Rs(3),Kl=Rs(4),Jye=Rs(5),Qye=Rs(6);Bg.range;Zp.range;Xye.range;Zye.range;Kl.range;Jye.range;Qye.range;function Ls(e){return hn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/W_)}const Fg=Ls(0),Jp=Ls(1),eve=Ls(2),tve=Ls(3),Hl=Ls(4),nve=Ls(5),rve=Ls(6);Fg.range;Jp.range;eve.range;tve.range;Hl.range;nve.range;rve.range;const H_=hn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());H_.range;const G_=hn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());G_.range;const Eo=hn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Eo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:hn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Eo.range;const ko=hn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ko.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:hn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ko.range;function PB(e,t,n,r,i,o){const a=[[ss,1,fo],[ss,5,5*fo],[ss,15,15*fo],[ss,30,30*fo],[o,1,Xr],[o,5,5*Xr],[o,15,15*Xr],[o,30,30*Xr],[i,1,ho],[i,3,3*ho],[i,6,6*ho],[i,12,12*ho],[r,1,To],[r,2,2*To],[n,1,W_],[t,1,Xk],[t,3,3*Xk],[e,1,_b]];function s(u,f,d){const p=fy).right(a,p);if(m===a.length)return e.every(_0(u/_b,f/_b,d));if(m===0)return Xp.every(Math.max(_0(u,f,d),1));const[g,v]=a[p/a[m-1][2]53)return null;"w"in X||(X.w=1),"Z"in X?(pe=Ob(cc(X.y,0,1)),Ie=pe.getUTCDay(),pe=Ie>4||Ie===0?Jp.ceil(pe):Jp(pe),pe=Lg.offset(pe,(X.V-1)*7),X.y=pe.getUTCFullYear(),X.m=pe.getUTCMonth(),X.d=pe.getUTCDate()+(X.w+6)%7):(pe=Sb(cc(X.y,0,1)),Ie=pe.getDay(),pe=Ie>4||Ie===0?Zp.ceil(pe):Zp(pe),pe=hd.offset(pe,(X.V-1)*7),X.y=pe.getFullYear(),X.m=pe.getMonth(),X.d=pe.getDate()+(X.w+6)%7)}else("W"in X||"U"in X)&&("w"in X||(X.w="u"in X?X.u%7:"W"in X?1:0),Ie="Z"in X?Ob(cc(X.y,0,1)).getUTCDay():Sb(cc(X.y,0,1)).getDay(),X.m=0,X.d="W"in X?(X.w+6)%7+X.W*7-(Ie+5)%7:X.w+X.U*7-(Ie+6)%7);return"Z"in X?(X.H+=X.Z/100|0,X.M+=X.Z%100,Ob(X)):Sb(X)}}function k(Q,fe,ye,X){for(var Re=0,pe=fe.length,Ie=ye.length,Ze,tt;Re=Ie)return-1;if(Ze=fe.charCodeAt(Re++),Ze===37){if(Ze=fe.charAt(Re++),tt=_[Ze in Zk?fe.charAt(Re++):Ze],!tt||(X=tt(Q,ye,X))<0)return-1}else if(Ze!=ye.charCodeAt(X++))return-1}return X}function M(Q,fe,ye){var X=u.exec(fe.slice(ye));return X?(Q.p=f.get(X[0].toLowerCase()),ye+X[0].length):-1}function D(Q,fe,ye){var X=m.exec(fe.slice(ye));return X?(Q.w=g.get(X[0].toLowerCase()),ye+X[0].length):-1}function $(Q,fe,ye){var X=d.exec(fe.slice(ye));return X?(Q.w=p.get(X[0].toLowerCase()),ye+X[0].length):-1}function N(Q,fe,ye){var X=x.exec(fe.slice(ye));return X?(Q.m=w.get(X[0].toLowerCase()),ye+X[0].length):-1}function B(Q,fe,ye){var X=v.exec(fe.slice(ye));return X?(Q.m=y.get(X[0].toLowerCase()),ye+X[0].length):-1}function L(Q,fe,ye){return k(Q,t,fe,ye)}function F(Q,fe,ye){return k(Q,n,fe,ye)}function W(Q,fe,ye){return k(Q,r,fe,ye)}function z(Q){return a[Q.getDay()]}function H(Q){return o[Q.getDay()]}function U(Q){return l[Q.getMonth()]}function K(Q){return s[Q.getMonth()]}function Y(Q){return i[+(Q.getHours()>=12)]}function te(Q){return 1+~~(Q.getMonth()/3)}function ne(Q){return a[Q.getUTCDay()]}function ie(Q){return o[Q.getUTCDay()]}function ce(Q){return l[Q.getUTCMonth()]}function ae(Q){return s[Q.getUTCMonth()]}function le(Q){return i[+(Q.getUTCHours()>=12)]}function re(Q){return 1+~~(Q.getUTCMonth()/3)}return{format:function(Q){var fe=C(Q+="",S);return fe.toString=function(){return Q},fe},parse:function(Q){var fe=E(Q+="",!1);return fe.toString=function(){return Q},fe},utcFormat:function(Q){var fe=C(Q+="",P);return fe.toString=function(){return Q},fe},utcParse:function(Q){var fe=E(Q+="",!0);return fe.toString=function(){return Q},fe}}}var Zk={"-":"",_:" ",0:"0"},_n=/^\s*\d+/,uve=/^%/,cve=/[\\^$*+?|[\]().{}]/g;function ot(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function dve(e,t,n){var r=_n.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function hve(e,t,n){var r=_n.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function pve(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function mve(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function gve(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Jk(e,t,n){var r=_n.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Qk(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function yve(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function vve(e,t,n){var r=_n.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function bve(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function eM(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function xve(e,t,n){var r=_n.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function tM(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function wve(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function _ve(e,t,n){var r=_n.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Sve(e,t,n){var r=_n.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Ove(e,t,n){var r=_n.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Cve(e,t,n){var r=uve.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Pve(e,t,n){var r=_n.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ave(e,t,n){var r=_n.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function nM(e,t){return ot(e.getDate(),t,2)}function Tve(e,t){return ot(e.getHours(),t,2)}function Eve(e,t){return ot(e.getHours()%12||12,t,2)}function kve(e,t){return ot(1+hd.count(Eo(e),e),t,3)}function AB(e,t){return ot(e.getMilliseconds(),t,3)}function Mve(e,t){return AB(e,t)+"000"}function jve(e,t){return ot(e.getMonth()+1,t,2)}function Nve(e,t){return ot(e.getMinutes(),t,2)}function $ve(e,t){return ot(e.getSeconds(),t,2)}function Dve(e){var t=e.getDay();return t===0?7:t}function Ive(e,t){return ot(Bg.count(Eo(e)-1,e),t,2)}function TB(e){var t=e.getDay();return t>=4||t===0?Kl(e):Kl.ceil(e)}function Rve(e,t){return e=TB(e),ot(Kl.count(Eo(e),e)+(Eo(e).getDay()===4),t,2)}function Lve(e){return e.getDay()}function Bve(e,t){return ot(Zp.count(Eo(e)-1,e),t,2)}function Fve(e,t){return ot(e.getFullYear()%100,t,2)}function Wve(e,t){return e=TB(e),ot(e.getFullYear()%100,t,2)}function zve(e,t){return ot(e.getFullYear()%1e4,t,4)}function Vve(e,t){var n=e.getDay();return e=n>=4||n===0?Kl(e):Kl.ceil(e),ot(e.getFullYear()%1e4,t,4)}function Uve(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ot(t/60|0,"0",2)+ot(t%60,"0",2)}function rM(e,t){return ot(e.getUTCDate(),t,2)}function Kve(e,t){return ot(e.getUTCHours(),t,2)}function Hve(e,t){return ot(e.getUTCHours()%12||12,t,2)}function Gve(e,t){return ot(1+Lg.count(ko(e),e),t,3)}function EB(e,t){return ot(e.getUTCMilliseconds(),t,3)}function Yve(e,t){return EB(e,t)+"000"}function qve(e,t){return ot(e.getUTCMonth()+1,t,2)}function Xve(e,t){return ot(e.getUTCMinutes(),t,2)}function Zve(e,t){return ot(e.getUTCSeconds(),t,2)}function Jve(e){var t=e.getUTCDay();return t===0?7:t}function Qve(e,t){return ot(Fg.count(ko(e)-1,e),t,2)}function kB(e){var t=e.getUTCDay();return t>=4||t===0?Hl(e):Hl.ceil(e)}function ebe(e,t){return e=kB(e),ot(Hl.count(ko(e),e)+(ko(e).getUTCDay()===4),t,2)}function tbe(e){return e.getUTCDay()}function nbe(e,t){return ot(Jp.count(ko(e)-1,e),t,2)}function rbe(e,t){return ot(e.getUTCFullYear()%100,t,2)}function ibe(e,t){return e=kB(e),ot(e.getUTCFullYear()%100,t,2)}function obe(e,t){return ot(e.getUTCFullYear()%1e4,t,4)}function abe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Hl(e):Hl.ceil(e),ot(e.getUTCFullYear()%1e4,t,4)}function sbe(){return"+0000"}function iM(){return"%"}function oM(e){return+e}function aM(e){return Math.floor(+e/1e3)}var il,MB,jB;lbe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function lbe(e){return il=lve(e),MB=il.format,il.parse,jB=il.utcFormat,il.utcParse,il}function ube(e){return new Date(e)}function cbe(e){return e instanceof Date?+e:+new Date(+e)}function Y_(e,t,n,r,i,o,a,s,l,u){var f=$_(),d=f.invert,p=f.domain,m=u(".%L"),g=u(":%S"),v=u("%I:%M"),y=u("%I %p"),x=u("%a %d"),w=u("%b %d"),S=u("%B"),P=u("%Y");function _(C){return(l(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>Qge(e,o/r))},n.copy=function(){return IB(t).domain(e)},Lo.apply(n,arguments)}function zg(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,u=Qn,f,d=!1,p;function m(v){return isNaN(v=+v)?p:(v=.5+((v=+f(v))-o)*(r*vt}var FB=ybe,vbe=Vg,bbe=FB,xbe=ku;function wbe(e){return e&&e.length?vbe(e,xbe,bbe):void 0}var _be=wbe;const la=Qe.getDefaultExportFromCjs(_be);function Sbe(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};Pe.decimalPlaces=Pe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*jt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Pe.dividedBy=Pe.div=function(e){return _o(this,new this.constructor(e))};Pe.dividedToIntegerBy=Pe.idiv=function(e){var t=this,n=t.constructor;return _t(_o(t,new n(e),0,1),n.precision)};Pe.equals=Pe.eq=function(e){return!this.cmp(e)};Pe.exponent=function(){return nn(this)};Pe.greaterThan=Pe.gt=function(e){return this.cmp(e)>0};Pe.greaterThanOrEqualTo=Pe.gte=function(e){return this.cmp(e)>=0};Pe.isInteger=Pe.isint=function(){return this.e>this.d.length-2};Pe.isNegative=Pe.isneg=function(){return this.s<0};Pe.isPositive=Pe.ispos=function(){return this.s>0};Pe.isZero=function(){return this.s===0};Pe.lessThan=Pe.lt=function(e){return this.cmp(e)<0};Pe.lessThanOrEqualTo=Pe.lte=function(e){return this.cmp(e)<1};Pe.logarithm=Pe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Ar))throw Error(Zr+"NaN");if(n.s<1)throw Error(Zr+(n.s?"NaN":"-Infinity"));return n.eq(Ar)?new r(0):(Rt=!1,t=_o(vf(n,o),vf(e,o),o),Rt=!0,_t(t,i))};Pe.minus=Pe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?KB(t,e):VB(t,(e.s=-e.s,e))};Pe.modulo=Pe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Zr+"NaN");return n.s?(Rt=!1,t=_o(n,e,0,1).times(e),Rt=!0,n.minus(t)):_t(new r(n),i)};Pe.naturalExponential=Pe.exp=function(){return UB(this)};Pe.naturalLogarithm=Pe.ln=function(){return vf(this)};Pe.negated=Pe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Pe.plus=Pe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?VB(t,e):KB(t,(e.s=-e.s,e))};Pe.precision=Pe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ms+e);if(t=nn(i)+1,r=i.d.length-1,n=r*jt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Pe.squareRoot=Pe.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Zr+"NaN")}for(e=nn(s),Rt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Ai(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Nu((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(o=r,r=o.plus(_o(s,o,a+2)).times(.5),Ai(o.d).slice(0,a)===(t=Ai(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(_t(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return Rt=!0,_t(r,n)};Pe.times=Pe.mul=function(e){var t,n,r,i,o,a,s,l,u,f=this,d=f.constructor,p=f.d,m=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,l=p.length,u=m.length,l=0;){for(t=0,i=l+r;i>r;)s=o[i]+m[r]*p[i-r-1]+t,o[i--]=s%yn|0,t=s/yn|0;o[i]=(o[i]+t)%yn|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Rt?_t(e,d.precision):e};Pe.toDecimalPlaces=Pe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Bi(e,0,ju),t===void 0?t=r.rounding:Bi(t,0,8),_t(n,e+nn(n)+1,t))};Pe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Ps(r,!0):(Bi(e,0,ju),t===void 0?t=i.rounding:Bi(t,0,8),r=_t(new i(r),e+1,t),n=Ps(r,!0,e+1)),n};Pe.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Ps(i):(Bi(e,0,ju),t===void 0?t=o.rounding:Bi(t,0,8),r=_t(new o(i),e+nn(i)+1,t),n=Ps(r.abs(),!1,e+nn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Pe.toInteger=Pe.toint=function(){var e=this,t=e.constructor;return _t(new t(e),nn(e)+1,t.rounding)};Pe.toNumber=function(){return+this};Pe.toPower=Pe.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,u=12,f=+(e=new l(e));if(!e.s)return new l(Ar);if(s=new l(s),!s.s){if(e.s<1)throw Error(Zr+"Infinity");return s}if(s.eq(Ar))return s;if(r=l.precision,e.eq(Ar))return _t(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=f<0?-f:f)<=zB){for(i=new l(Ar),t=Math.ceil(r/jt+4),Rt=!1;n%2&&(i=i.times(s),uM(i.d,t)),n=Nu(n/2),n!==0;)s=s.times(s),uM(s.d,t);return Rt=!0,e.s<0?new l(Ar).div(i):_t(i,r)}}else if(o<0)throw Error(Zr+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Rt=!1,i=e.times(vf(s,r+u)),Rt=!0,i=UB(i),i.s=o,i};Pe.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=nn(i),r=Ps(i,n<=o.toExpNeg||n>=o.toExpPos)):(Bi(e,1,ju),t===void 0?t=o.rounding:Bi(t,0,8),i=_t(new o(i),e,t),n=nn(i),r=Ps(i,e<=n||n<=o.toExpNeg,e)),r};Pe.toSignificantDigits=Pe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Bi(e,1,ju),t===void 0?t=r.rounding:Bi(t,0,8)),_t(new r(n),e,t)};Pe.toString=Pe.valueOf=Pe.val=Pe.toJSON=Pe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=nn(e),n=e.constructor;return Ps(e,t<=n.toExpNeg||t>=n.toExpPos)};function VB(e,t){var n,r,i,o,a,s,l,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),Rt?_t(t,d):t;if(l=e.d,u=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,s=u.length):(r=u,i=a,s=l.length),a=Math.ceil(d/jt),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=u.length,s-o<0&&(o=s,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/yn|0,l[o]%=yn;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Rt?_t(t,d):t}function Bi(e,t,n){if(e!==~~e||en)throw Error(ms+e)}function Ai(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var s,l,u,f,d,p,m,g,v,y,x,w,S,P,_,C,E,k,M=r.constructor,D=r.s==i.s?1:-1,$=r.d,N=i.d;if(!r.s)return new M(r);if(!i.s)throw Error(Zr+"Division by zero");for(l=r.e-i.e,E=N.length,_=$.length,m=new M(D),g=m.d=[],u=0;N[u]==($[u]||0);)++u;if(N[u]>($[u]||0)&&--l,o==null?w=o=M.precision:a?w=o+(nn(r)-nn(i))+1:w=o,w<0)return new M(0);if(w=w/jt+2|0,u=0,E==1)for(f=0,N=N[0],w++;(u<_||f)&&w--;u++)S=f*yn+($[u]||0),g[u]=S/N|0,f=S%N|0;else{for(f=yn/(N[0]+1)|0,f>1&&(N=e(N,f),$=e($,f),E=N.length,_=$.length),P=E,v=$.slice(0,E),y=v.length;y=yn/2&&++C;do f=0,s=t(N,v,E,y),s<0?(x=v[0],E!=y&&(x=x*yn+(v[1]||0)),f=x/C|0,f>1?(f>=yn&&(f=yn-1),d=e(N,f),p=d.length,y=v.length,s=t(d,v,p,y),s==1&&(f--,n(d,E16)throw Error(Z_+nn(e));if(!e.s)return new f(Ar);for(t==null?(Rt=!1,s=d):s=t,a=new f(.03125);e.abs().gte(.1);)e=e.times(a),u+=5;for(r=Math.log(ts(2,u))/Math.LN10*2+5|0,s+=r,n=i=o=new f(Ar),f.precision=s;;){if(i=_t(i.times(e),s),n=n.times(++l),a=o.plus(_o(i,n,s)),Ai(a.d).slice(0,s)===Ai(o.d).slice(0,s)){for(;u--;)o=_t(o.times(o),s);return f.precision=d,t==null?(Rt=!0,_t(o,d)):o}o=a}}function nn(e){for(var t=e.e*jt,n=e.d[0];n>=10;n/=10)t++;return t}function Cb(e,t,n){if(t>e.LN10.sd())throw Rt=!0,n&&(e.precision=n),Error(Zr+"LN10 precision limit exceeded");return _t(new e(e.LN10),t)}function ia(e){for(var t="";e--;)t+="0";return t}function vf(e,t){var n,r,i,o,a,s,l,u,f,d=1,p=10,m=e,g=m.d,v=m.constructor,y=v.precision;if(m.s<1)throw Error(Zr+(m.s?"NaN":"-Infinity"));if(m.eq(Ar))return new v(0);if(t==null?(Rt=!1,u=y):u=t,m.eq(10))return t==null&&(Rt=!0),Cb(v,u);if(u+=p,v.precision=u,n=Ai(g),r=n.charAt(0),o=nn(m),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=Ai(m.d),r=n.charAt(0),d++;o=nn(m),r>1?(m=new v("0."+n),o++):m=new v(r+"."+n.slice(1))}else return l=Cb(v,u+2,y).times(o+""),m=vf(new v(r+"."+n.slice(1)),u-p).plus(l),v.precision=y,t==null?(Rt=!0,_t(m,y)):m;for(s=a=m=_o(m.minus(Ar),m.plus(Ar),u),f=_t(m.times(m),u),i=3;;){if(a=_t(a.times(f),u),l=s.plus(_o(a,new v(i),u)),Ai(l.d).slice(0,u)===Ai(s.d).slice(0,u))return s=s.times(2),o!==0&&(s=s.plus(Cb(v,u+2,y).times(o+""))),s=_o(s,new v(d),u),v.precision=y,t==null?(Rt=!0,_t(s,y)):s;s=l,i+=2}}function lM(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Nu(n/jt),e.d=[],r=(n+1)%jt,n<0&&(r+=jt),rQp||e.e<-Qp))throw Error(Z_+n)}else e.s=0,e.e=0,e.d=[0];return e}function _t(e,t,n){var r,i,o,a,s,l,u,f,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=jt,i=t,u=d[f=0];else{if(f=Math.ceil((r+1)/jt),o=d.length,f>=o)return e;for(u=o=d[f],a=1;o>=10;o/=10)a++;r%=jt,i=r-jt+a}if(n!==void 0&&(o=ts(10,a-i-1),s=u/o%10|0,l=t<0||d[f+1]!==void 0||u%o,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?u/ts(10,a-i):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=nn(e),d.length=1,t=t-o-1,d[0]=ts(10,(jt-t%jt)%jt),e.e=Nu(-t/jt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,o=1,f--):(d.length=f+1,o=ts(10,jt-r),d[f]=i>0?(u/ts(10,a-i)%ts(10,i)|0)*o:0),l)for(;;)if(f==0){(d[0]+=o)==yn&&(d[0]=1,++e.e);break}else{if(d[f]+=o,d[f]!=yn)break;d[f--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(Rt&&(e.e>Qp||e.e<-Qp))throw Error(Z_+nn(e));return e}function KB(e,t){var n,r,i,o,a,s,l,u,f,d,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),Rt?_t(t,m):t;if(l=e.d,d=t.d,r=t.e,u=e.e,l=l.slice(),a=u-r,a){for(f=a<0,f?(n=l,a=-a,s=d.length):(n=d,r=u,s=l.length),i=Math.max(Math.ceil(m/jt),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,f=i0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]0?o=o.charAt(0)+"."+o.slice(1)+ia(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+ia(-i-1)+o,n&&(r=n-a)>0&&(o+=ia(r))):i>=a?(o+=ia(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+ia(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=ia(r))),e.s<0?"-"+o:o}function uM(e,t){if(e.length>t)return e.length=t,!0}function HB(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(ms+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return lM(a,o.toString())}else if(typeof o!="string")throw Error(ms+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,Ube.test(o))lM(a,o);else throw Error(ms+o)}if(i.prototype=Pe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=HB,i.config=i.set=Kbe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(ms+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(ms+n+": "+r);return this}var J_=HB(Vbe);Ar=new J_(1);const yt=J_;function Hbe(e){return Xbe(e)||qbe(e)||Ybe(e)||Gbe()}function Gbe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ybe(e,t){if(e){if(typeof e=="string")return A0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A0(e,t)}}function qbe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Xbe(e){if(Array.isArray(e))return A0(e)}function A0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-a,cM(function(){for(var s=arguments.length,l=new Array(s),u=0;ue.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,o=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function fxe(e){if(Array.isArray(e))return e}function ZB(e){var t=bf(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function JB(e,t,n){if(e.lte(0))return new yt(0);var r=Hg.getDigitCount(e.toNumber()),i=new yt(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new yt(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=s.mul(i);return t?l:new yt(Math.ceil(l))}function dxe(e,t,n){var r=1,i=new yt(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new yt(10).pow(Hg.getDigitCount(e)-1),i=new yt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new yt(Math.floor(e)))}else e===0?i=new yt(Math.floor((t-1)/2)):n||(i=new yt(Math.floor(e)));var a=Math.floor((t-1)/2),s=exe(Qbe(function(l){return i.add(new yt(l-a).mul(r)).toNumber()}),T0);return s(0,t)}function QB(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new yt(0),tickMin:new yt(0),tickMax:new yt(0)};var o=JB(new yt(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new yt(0):(a=new yt(e).add(t).div(2),a=a.sub(new yt(a).mod(o)));var s=Math.ceil(a.sub(e).div(o).toNumber()),l=Math.ceil(new yt(t).sub(a).div(o).toNumber()),u=s+l+1;return u>n?QB(e,t,n,r,i+1):(u0?l+(n-u):l,s=t>0?s:s+(n-u)),{step:o,tickMin:a.sub(new yt(s).mul(o)),tickMax:a.add(new yt(l).mul(o))})}function hxe(e){var t=bf(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),s=ZB([n,r]),l=bf(s,2),u=l[0],f=l[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(k0(T0(0,i-1).map(function(){return 1/0}))):[].concat(k0(T0(0,i-1).map(function(){return-1/0})),[f]);return n>r?E0(d):d}if(u===f)return dxe(u,i,o);var p=QB(u,f,a,o),m=p.step,g=p.tickMin,v=p.tickMax,y=Hg.rangeStep(g,v.add(new yt(.1).mul(m)),m);return n>r?E0(y):y}function pxe(e,t){var n=bf(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=ZB([r,i]),s=bf(a,2),l=s[0],u=s[1];if(l===-1/0||u===1/0)return[r,i];if(l===u)return[l];var f=Math.max(t,2),d=JB(new yt(u).sub(l).div(f-1),o,0),p=[].concat(k0(Hg.rangeStep(new yt(l),new yt(u).sub(new yt(.99).mul(d)),d)),[u]);return r>i?E0(p):p}var mxe=qB(hxe),gxe=qB(pxe),yxe=process.env.NODE_ENV==="production",Pb="Invariant failed";function ur(e,t){if(yxe)throw new Error(Pb);var n=typeof t=="function"?t():t,r=n?"".concat(Pb,": ").concat(n):Pb;throw new Error(r)}var vxe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Gl(e){"@babel/helpers - typeof";return Gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gl(e)}function em(){return em=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cxe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Pxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Axe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var l=o.range,u=0;u0?i[u-1].coordinate:i[s-1].coordinate,d=i[u].coordinate,p=u>=s-1?i[0].coordinate:i[u+1].coordinate,m=void 0;if(Zn(d-f)!==Zn(p-d)){var g=[];if(Zn(p-d)===Zn(l[1]-l[0])){m=p;var v=d+l[1]-l[0];g[0]=Math.min(v,(v+f)/2),g[1]=Math.max(v,(v+f)/2)}else{m=f;var y=p+l[1]-l[0];g[0]=Math.min(d,(y+d)/2),g[1]=Math.max(d,(y+d)/2)}var x=[Math.min(d,(m+d)/2),Math.max(d,(m+d)/2)];if(t>x[0]&&t<=x[1]||t>=g[0]&&t<=g[1]){a=i[u].index;break}}else{var w=Math.min(f,p),S=Math.max(f,p);if(t>(w+d)/2&&t<=(S+d)/2){a=i[u].index;break}}}else for(var P=0;P0&&P(r[P].coordinate+r[P-1].coordinate)/2&&t<=(r[P].coordinate+r[P+1].coordinate)/2||P===s-1&&t>(r[P].coordinate+r[P-1].coordinate)/2){a=r[P].index;break}return a},Q_=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Ut(Ut({},t.type.defaultProps),t.props):t.props,a=o.stroke,s=o.fill,l;switch(i){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:s;break;default:l=s;break}return l},Uxe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},s=Object.keys(o),l=0,u=s.length;l=0});if(x&&x.length){var w=x[0].type.defaultProps,S=w!==void 0?Ut(Ut({},w),x[0].props):x[0].props,P=S.barSize,_=S[y];a[_]||(a[_]=[]);var C=Fe(P)?n:P;a[_].push({item:x[0],stackList:x.slice(1),barSize:Fe(C)?void 0:Jn(C,r,0)})}}return a},Kxe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,s=t.maxBarSize,l=a.length;if(l<1)return null;var u=Jn(n,i,0,!0),f,d=[];if(a[0].barSize===+a[0].barSize){var p=!1,m=i/l,g=a.reduce(function(P,_){return P+_.barSize||0},0);g+=(l-1)*u,g>=i&&(g-=(l-1)*u,u=0),g>=i&&m>0&&(p=!0,m*=.9,g=l*m);var v=(i-g)/2>>0,y={offset:v-u,size:0};f=a.reduce(function(P,_){var C={item:_.item,position:{offset:y.offset+y.size+u,size:p?m:_.barSize}},E=[].concat(hM(P),[C]);return y=E[E.length-1].position,_.stackList&&_.stackList.length&&_.stackList.forEach(function(k){E.push({item:k,position:y})}),E},d)}else{var x=Jn(r,i,0,!0);i-2*x-(l-1)*u<=0&&(u=0);var w=(i-2*x-(l-1)*u)/l;w>1&&(w>>=0);var S=s===+s?Math.min(w,s):w;f=a.reduce(function(P,_,C){var E=[].concat(hM(P),[{item:_.item,position:{offset:x+(w+u)*C+(w-S)/2,size:S}}]);return _.stackList&&_.stackList.length&&_.stackList.forEach(function(k){E.push({item:k,position:E[E.length-1].position})}),E},d)}return f},Hxe=function(t,n,r,i){var o=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),u=rF({children:o,legendWidth:l});if(u){var f=i||{},d=f.width,p=f.height,m=u.align,g=u.verticalAlign,v=u.layout;if((v==="vertical"||v==="horizontal"&&g==="middle")&&m!=="center"&&ve(t[m]))return Ut(Ut({},t),{},El({},m,t[m]+(d||0)));if((v==="horizontal"||v==="vertical"&&m==="center")&&g!=="middle"&&ve(t[g]))return Ut(Ut({},t),{},El({},g,t[g]+(p||0)))}return t},Gxe=function(t,n,r){return Fe(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},iF=function(t,n,r,i,o){var a=n.props.children,s=Er(a,pd).filter(function(u){return Gxe(i,o,u.props.direction)});if(s&&s.length){var l=s.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=qt(f,r);if(Fe(d))return u;var p=Array.isArray(d)?[Ug(d),la(d)]:[d,d],m=l.reduce(function(g,v){var y=qt(f,v,0),x=p[0]-Math.abs(Array.isArray(y)?y[0]:y),w=p[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(x,g[0]),Math.max(w,g[1])]},[1/0,-1/0]);return[Math.min(m[0],u[0]),Math.max(m[1],u[1])]},[1/0,-1/0])}return null},Yxe=function(t,n,r,i,o){var a=n.map(function(s){return iF(t,s,r,o,i)}).filter(function(s){return!Fe(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},oF=function(t,n,r,i,o){var a=n.map(function(l){var u=l.props.dataKey;return r==="number"&&u&&iF(t,l,u,i)||Rc(t,u,r,o)});if(r==="number")return a.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,u){for(var f=0,d=u.length;f=2?Zn(s[0]-s[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var p=o?o.indexOf(d):d;return{coordinate:i(p)+u,value:d,offset:u}});return f.filter(function(d){return!Au(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,p){return{coordinate:i(d)+u,value:d,index:p,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+u,value:d,offset:u}}):i.domain().map(function(d,p){return{coordinate:i(d)+u,value:o?o[d]:d,index:p,offset:u}})},Ab=new WeakMap,Mh=function(t,n){if(typeof n!="function")return t;Ab.has(t)||Ab.set(t,new WeakMap);var r=Ab.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},lF=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,s=t.axisType;if(i==="auto")return a==="radial"&&s==="radiusAxis"?{scale:hf(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:qp(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Ic(),realScaleType:"point"}:o==="category"?{scale:hf(),realScaleType:"band"}:{scale:qp(),realScaleType:"linear"};if(ld(i)){var l="scale".concat(kg(i));return{scale:(sM[l]||Ic)(),realScaleType:sM[l]?l:"point"}}return Be(i)?{scale:i}:{scale:Ic(),realScaleType:"point"}},mM=1e-4,uF=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-mM,a=Math.max(i[0],i[1])+mM,s=t(n[0]),l=t(n[r-1]);(sa||la)&&t.domain([n[0],n[r-1]])}},qxe=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[s][r][0]=o,t[s][r][1]=o+l,o=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1])}},Jxe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[a][r][0]=o,t[a][r][1]=o+s,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},Qxe={sign:Zxe,expand:vse,none:Bl,silhouette:bse,wiggle:xse,positive:Jxe},e0e=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),o=Qxe[r],a=yse().keys(i).value(function(s,l){return+qt(s,l,0)}).order(i0).offset(o);return a(t)},t0e=function(t,n,r,i,o,a){if(!t)return null;var s=a?n.reverse():n,l={},u=s.reduce(function(d,p){var m,g=(m=p.type)!==null&&m!==void 0&&m.defaultProps?Ut(Ut({},p.type.defaultProps),p.props):p.props,v=g.stackId,y=g.hide;if(y)return d;var x=g[r],w=d[x]||{hasStack:!1,stackGroups:{}};if(fn(v)){var S=w.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(p),w.hasStack=!0,w.stackGroups[v]=S}else w.stackGroups[Is("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[p]};return Ut(Ut({},d),{},El({},x,w))},l),f={};return Object.keys(u).reduce(function(d,p){var m=u[p];if(m.hasStack){var g={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(v,y){var x=m.stackGroups[y];return Ut(Ut({},v),{},El({},y,{numericAxisId:r,cateAxisId:i,items:x.items,stackedData:e0e(t,x.items,o)}))},g)}return Ut(Ut({},d),{},El({},p,m))},f)},cF=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=mxe(u,o,s);return t.domain([Ug(f),la(f)]),{niceTicks:f}}if(o&&i==="number"){var d=t.domain(),p=gxe(d,o,s);return{niceTicks:p}}return null};function nm(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Fe(i[t.dataKey])){var s=Tp(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=qt(i,Fe(a)?t.dataKey:a);return Fe(l)?null:t.scale(l)}var gM=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var l=qt(a,n.dataKey,n.domain[s]);return Fe(l)?null:n.scale(l)-o/2+i},n0e=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},r0e=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Ut(Ut({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(fn(o)){var a=n[o];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},i0e=function(t){return t.reduce(function(n,r){return[Ug(r.concat([n[0]]).filter(ve)),la(r.concat([n[1]]).filter(ve))]},[1/0,-1/0])},fF=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],s=a.stackedData,l=s.reduce(function(u,f){var d=i0e(f.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},yM=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,vM=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,$0=function(t,n,r){if(Be(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(ve(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(yM.test(t[0])){var o=+yM.exec(t[0])[1];i[0]=n[0]-o}else Be(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(ve(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(vM.test(t[1])){var a=+vM.exec(t[1])[1];i[1]=n[1]+a}else Be(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},rm=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=P_(n,function(d){return d.coordinate}),a=1/0,s=1,l=o.length;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},h0e=function(t,n,r,i,o){var a=t.width,s=t.height,l=t.startAngle,u=t.endAngle,f=Jn(t.cx,a,a/2),d=Jn(t.cy,s,s/2),p=pF(a,s,r),m=Jn(t.innerRadius,p,0),g=Jn(t.outerRadius,p,p*.8),v=Object.keys(n);return v.reduce(function(y,x){var w=n[x],S=w.domain,P=w.reversed,_;if(Fe(w.range))i==="angleAxis"?_=[l,u]:i==="radiusAxis"&&(_=[m,g]),P&&(_=[_[1],_[0]]);else{_=w.range;var C=_,E=s0e(C,2);l=E[0],u=E[1]}var k=lF(w,o),M=k.realScaleType,D=k.scale;D.domain(S).range(_),uF(D);var $=cF(D,oo(oo({},w),{},{realScaleType:M})),N=oo(oo(oo({},w),$),{},{range:_,radius:g,realScaleType:M,scale:D,cx:f,cy:d,innerRadius:m,outerRadius:g,startAngle:l,endAngle:u});return oo(oo({},y),{},hF({},x,N))},{})},p0e=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(i-a,2))},m0e=function(t,n){var r=t.x,i=t.y,o=n.cx,a=n.cy,s=p0e({x:r,y:i},{x:o,y:a});if(s<=0)return{radius:s};var l=(r-o)/s,u=Math.acos(l);return i>a&&(u=2*Math.PI-u),{radius:s,angle:d0e(u),angleInRadian:u}},g0e=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},y0e=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),s=Math.min(o,a);return t+s*360},_M=function(t,n){var r=t.x,i=t.y,o=m0e({x:r,y:i},n),a=o.radius,s=o.angle,l=n.innerRadius,u=n.outerRadius;if(au)return!1;if(a===0)return!0;var f=g0e(n),d=f.startAngle,p=f.endAngle,m=s,g;if(d<=p){for(;m>p;)m-=360;for(;m=d&&m<=p}else{for(;m>d;)m-=360;for(;m=p&&m<=d}return g?oo(oo({},n),{},{radius:a,angle:y0e(m,n)}):null},mF=function(t){return!O.isValidElement(t)&&!Be(t)&&typeof t!="boolean"?t.className:""};function Sf(e){"@babel/helpers - typeof";return Sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sf(e)}var v0e=["offset"];function b0e(e){return S0e(e)||_0e(e)||w0e(e)||x0e()}function x0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w0e(e,t){if(e){if(typeof e=="string")return D0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return D0(e,t)}}function _0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function S0e(e){if(Array.isArray(e))return D0(e)}function D0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function C0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function SM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sn(e){for(var t=1;t=0?1:-1,S,P;i==="insideStart"?(S=m+w*a,P=v):i==="insideEnd"?(S=g-w*a,P=!v):i==="end"&&(S=g+w*a,P=v),P=x<=0?P:!P;var _=At(u,f,y,S),C=At(u,f,y,S+(P?1:-1)*359),E="M".concat(_.x,",").concat(_.y,` + A`).concat(y,",").concat(y,",0,1,").concat(P?0:1,`, + `).concat(C.x,",").concat(C.y),k=Fe(t.id)?Is("recharts-radial-line-"):t.id;return O.createElement("text",Of({},r,{dominantBaseline:"central",className:Ue("recharts-radial-bar-label",s)}),O.createElement("defs",null,O.createElement("path",{id:k,d:E})),O.createElement("textPath",{xlinkHref:"#".concat(k)},n))},j0e=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,a=o.cx,s=o.cy,l=o.innerRadius,u=o.outerRadius,f=o.startAngle,d=o.endAngle,p=(f+d)/2;if(i==="outside"){var m=At(a,s,u+r,p),g=m.x,v=m.y;return{x:g,y:v,textAnchor:g>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(l+u)/2,x=At(a,s,y,p),w=x.x,S=x.y;return{x:w,y:S,textAnchor:"middle",verticalAnchor:"middle"}},N0e=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,s=a.x,l=a.y,u=a.width,f=a.height,d=f>=0?1:-1,p=d*i,m=d>0?"end":"start",g=d>0?"start":"end",v=u>=0?1:-1,y=v*i,x=v>0?"end":"start",w=v>0?"start":"end";if(o==="top"){var S={x:s+u/2,y:l-d*i,textAnchor:"middle",verticalAnchor:m};return sn(sn({},S),r?{height:Math.max(l-r.y,0),width:u}:{})}if(o==="bottom"){var P={x:s+u/2,y:l+f+p,textAnchor:"middle",verticalAnchor:g};return sn(sn({},P),r?{height:Math.max(r.y+r.height-(l+f),0),width:u}:{})}if(o==="left"){var _={x:s-y,y:l+f/2,textAnchor:x,verticalAnchor:"middle"};return sn(sn({},_),r?{width:Math.max(_.x-r.x,0),height:f}:{})}if(o==="right"){var C={x:s+u+y,y:l+f/2,textAnchor:w,verticalAnchor:"middle"};return sn(sn({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:f}:{})}var E=r?{width:u,height:f}:{};return o==="insideLeft"?sn({x:s+y,y:l+f/2,textAnchor:w,verticalAnchor:"middle"},E):o==="insideRight"?sn({x:s+u-y,y:l+f/2,textAnchor:x,verticalAnchor:"middle"},E):o==="insideTop"?sn({x:s+u/2,y:l+p,textAnchor:"middle",verticalAnchor:g},E):o==="insideBottom"?sn({x:s+u/2,y:l+f-p,textAnchor:"middle",verticalAnchor:m},E):o==="insideTopLeft"?sn({x:s+y,y:l+p,textAnchor:w,verticalAnchor:g},E):o==="insideTopRight"?sn({x:s+u-y,y:l+p,textAnchor:x,verticalAnchor:g},E):o==="insideBottomLeft"?sn({x:s+y,y:l+f-p,textAnchor:w,verticalAnchor:m},E):o==="insideBottomRight"?sn({x:s+u-y,y:l+f-p,textAnchor:x,verticalAnchor:m},E):Su(o)&&(ve(o.x)||os(o.x))&&(ve(o.y)||os(o.y))?sn({x:s+Jn(o.x,u),y:l+Jn(o.y,f),textAnchor:"end",verticalAnchor:"end"},E):sn({x:s+u/2,y:l+f/2,textAnchor:"middle",verticalAnchor:"middle"},E)},$0e=function(t){return"cx"in t&&ve(t.cx)};function cn(e){var t=e.offset,n=t===void 0?5:t,r=O0e(e,v0e),i=sn({offset:n},r),o=i.viewBox,a=i.position,s=i.value,l=i.children,u=i.content,f=i.className,d=f===void 0?"":f,p=i.textBreakAll;if(!o||Fe(s)&&Fe(l)&&!O.isValidElement(u)&&!Be(u))return null;if(O.isValidElement(u))return O.cloneElement(u,i);var m;if(Be(u)){if(m=O.createElement(u,i),O.isValidElement(m))return m}else m=E0e(i);var g=$0e(o),v=Te(i,!0);if(g&&(a==="insideStart"||a==="insideEnd"||a==="end"))return M0e(i,m,v);var y=g?j0e(i):N0e(i);return O.createElement(Os,Of({className:Ue("recharts-label",d)},v,y,{breakAll:p}),m)}cn.displayName="Label";var gF=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,p=t.y,m=t.top,g=t.left,v=t.width,y=t.height,x=t.clockWise,w=t.labelViewBox;if(w)return w;if(ve(v)&&ve(y)){if(ve(d)&&ve(p))return{x:d,y:p,width:v,height:y};if(ve(m)&&ve(g))return{x:m,y:g,width:v,height:y}}return ve(d)&&ve(p)?{x:d,y:p,width:0,height:0}:ve(n)&&ve(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:u||0,outerRadius:f||l||s||0,clockWise:x}:t.viewBox?t.viewBox:{}},D0e=function(t,n){return t?t===!0?O.createElement(cn,{key:"label-implicit",viewBox:n}):fn(t)?O.createElement(cn,{key:"label-implicit",viewBox:n,value:t}):O.isValidElement(t)?t.type===cn?O.cloneElement(t,{key:"label-implicit",viewBox:n}):O.createElement(cn,{key:"label-implicit",content:t,viewBox:n}):Be(t)?O.createElement(cn,{key:"label-implicit",content:t,viewBox:n}):Su(t)?O.createElement(cn,Of({viewBox:n},t,{key:"label-implicit"})):null:null},I0e=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=gF(t),a=Er(i,cn).map(function(l,u){return O.cloneElement(l,{viewBox:n||o,key:"label-".concat(u)})});if(!r)return a;var s=D0e(t.label,n||o);return[s].concat(b0e(a))};cn.parseViewBox=gF;cn.renderCallByParent=I0e;function R0e(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var L0e=R0e;const B0e=Qe.getDefaultExportFromCjs(L0e);function Cf(e){"@babel/helpers - typeof";return Cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cf(e)}var F0e=["valueAccessor"],W0e=["data","dataKey","clockWise","id","textBreakAll"];function z0e(e){return H0e(e)||K0e(e)||U0e(e)||V0e()}function V0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U0e(e,t){if(e){if(typeof e=="string")return I0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return I0(e,t)}}function K0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function H0e(e){if(Array.isArray(e))return I0(e)}function I0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function X0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Z0e=function(t){return Array.isArray(t.value)?B0e(t.value):t.value};function Di(e){var t=e.valueAccessor,n=t===void 0?Z0e:t,r=PM(e,F0e),i=r.data,o=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,u=PM(r,W0e);return!i||!i.length?null:O.createElement(et,{className:"recharts-label-list"},i.map(function(f,d){var p=Fe(o)?n(f,d):qt(f&&f.payload,o),m=Fe(s)?{}:{id:"".concat(s,"-").concat(d)};return O.createElement(cn,om({},Te(f,!0),u,m,{parentViewBox:f.parentViewBox,value:p,textBreakAll:l,viewBox:cn.parseViewBox(Fe(a)?f:CM(CM({},f),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Di.displayName="LabelList";function J0e(e,t){return e?e===!0?O.createElement(Di,{key:"labelList-implicit",data:t}):O.isValidElement(e)||Be(e)?O.createElement(Di,{key:"labelList-implicit",data:t,content:e}):Su(e)?O.createElement(Di,om({data:t},e,{key:"labelList-implicit"})):null:null}function Q0e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=Er(r,Di).map(function(a,s){return O.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var o=J0e(e.label,t);return[o].concat(z0e(i))}Di.renderCallByParent=Q0e;function Pf(e){"@babel/helpers - typeof";return Pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pf(e)}function R0(){return R0=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>u),`, + `).concat(d.x,",").concat(d.y,` + `);if(i>0){var m=At(n,r,i,a),g=At(n,r,i,u);p+="L ".concat(g.x,",").concat(g.y,` + A `).concat(i,",").concat(i,`,0, + `).concat(+(Math.abs(l)>180),",").concat(+(a<=u),`, + `).concat(m.x,",").concat(m.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},iwe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=Zn(f-u),p=jh({cx:n,cy:r,radius:o,angle:u,sign:d,cornerRadius:a,cornerIsExternal:l}),m=p.circleTangency,g=p.lineTangency,v=p.theta,y=jh({cx:n,cy:r,radius:o,angle:f,sign:-d,cornerRadius:a,cornerIsExternal:l}),x=y.circleTangency,w=y.lineTangency,S=y.theta,P=l?Math.abs(u-f):Math.abs(u-f)-v-S;if(P<0)return s?"M ".concat(g.x,",").concat(g.y,` + a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 + a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 + `):yF({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:u,endAngle:f});var _="M ".concat(g.x,",").concat(g.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(m.x,",").concat(m.y,` + A`).concat(o,",").concat(o,",0,").concat(+(P>180),",").concat(+(d<0),",").concat(x.x,",").concat(x.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(w.x,",").concat(w.y,` + `);if(i>0){var C=jh({cx:n,cy:r,radius:i,angle:u,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),E=C.circleTangency,k=C.lineTangency,M=C.theta,D=jh({cx:n,cy:r,radius:i,angle:f,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),$=D.circleTangency,N=D.lineTangency,B=D.theta,L=l?Math.abs(u-f):Math.abs(u-f)-M-B;if(L<0&&a===0)return"".concat(_,"L").concat(n,",").concat(r,"Z");_+="L".concat(N.x,",").concat(N.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat($.x,",").concat($.y,` + A`).concat(i,",").concat(i,",0,").concat(+(L>180),",").concat(+(d>0),",").concat(E.x,",").concat(E.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(k.x,",").concat(k.y,"Z")}else _+="L".concat(n,",").concat(r,"Z");return _},owe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},vF=function(t){var n=TM(TM({},owe),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,u=n.cornerIsExternal,f=n.startAngle,d=n.endAngle,p=n.className;if(a0&&Math.abs(f-d)<360?y=iwe({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(v,g/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:f,endAngle:d}):y=yF({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:f,endAngle:d}),O.createElement("path",R0({},Te(n,!0),{className:m,d:y,role:"img"}))};function Af(e){"@babel/helpers - typeof";return Af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Af(e)}function L0(){return L0=Object.assign?Object.assign.bind():function(e){for(var t=1;t1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function Y(te,ne,ie,ce,ae){for(var le=te[ne],re=0;re0?", expected one of type ["+Q.join(", ")+"]":"";return new v("Invalid "+le+" `"+re+"` supplied to "+("`"+ae+"`"+Re+"."))}return y(ne)}function D(){function K(Y,te,ne,ie,ce){return L(Y[te])?null:new v("Invalid "+ie+" `"+ce+"` supplied to "+("`"+ne+"`, expected a ReactNode."))}return y(K)}function $(K,Y,te,ne,ie){return new v((K||"React class")+": "+Y+" type `"+te+"."+ne+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+ie+"`.")}function N(K){function Y(te,ne,ie,ce,ae){var le=te[ne],re=W(le);if(re!=="object")return new v("Invalid "+ce+" `"+ae+"` of type `"+re+"` "+("supplied to `"+ie+"`, expected `object`."));for(var Q in K){var fe=K[Q];if(typeof fe!="function")return $(ie,ce,ae,Q,z(fe));var ye=fe(le,Q,ie,ce,ae+"."+Q,n);if(ye)return ye}return null}return y(Y)}function B(K){function Y(te,ne,ie,ce,ae){var le=te[ne],re=W(le);if(re!=="object")return new v("Invalid "+ce+" `"+ae+"` of type `"+re+"` "+("supplied to `"+ie+"`, expected `object`."));var Q=t({},te[ne],K);for(var fe in Q){var ye=K[fe];if(r(K,fe)&&typeof ye!="function")return $(ie,ce,ae,fe,z(ye));if(!ye)return new v("Invalid "+ce+" `"+ae+"` key `"+fe+"` supplied to `"+ie+"`.\nBad object: "+JSON.stringify(te[ne],null," ")+` +Valid keys: `+JSON.stringify(Object.keys(K),null," "));var X=ye(le,fe,ie,ce,ae+"."+fe,n);if(X)return X}return null}return y(Y)}function L(K){switch(typeof K){case"number":case"string":case"undefined":return!0;case"boolean":return!K;case"object":if(Array.isArray(K))return K.every(L);if(K===null||s(K))return!0;var Y=d(K);if(Y){var te=Y.call(K),ne;if(Y!==K.entries){for(;!(ne=te.next()).done;)if(!L(ne.value))return!1}else for(;!(ne=te.next()).done;){var ie=ne.value;if(ie&&!L(ie[1]))return!1}}else return!1;return!0;default:return!1}}function F(K,Y){return K==="symbol"?!0:Y?Y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Y instanceof Symbol:!1}function W(K){var Y=typeof K;return Array.isArray(K)?"array":K instanceof RegExp?"object":F(Y,K)?"symbol":Y}function z(K){if(typeof K>"u"||K===null)return""+K;var Y=W(K);if(Y==="object"){if(K instanceof Date)return"date";if(K instanceof RegExp)return"regexp"}return Y}function H(K){var Y=z(K);switch(Y){case"array":case"object":return"an "+Y;case"boolean":case"date":case"regexp":return"a "+Y;default:return Y}}function U(K){return!K.constructor||!K.constructor.name?p:K.constructor.name}return m.checkPropTypes=i,m.resetWarningCache=i.resetWarningCache,m.PropTypes=m,m},jb}var Nb,FM;function gwe(){if(FM)return Nb;FM=1;var e=eS();function t(){}function n(){}return n.resetWarningCache=t,Nb=function(){function r(a,s,l,u,f,d){if(d!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Nb}if(process.env.NODE_ENV!=="production"){var ywe=bF(),vwe=!0;B0.exports=mwe()(ywe.isElement,vwe)}else B0.exports=gwe()();var bwe=B0.exports;const Ge=Qe.getDefaultExportFromCjs(bwe);var xwe=Object.getOwnPropertyNames,wwe=Object.getOwnPropertySymbols,_we=Object.prototype.hasOwnProperty;function WM(e,t){return function(r,i,o){return e(r,i,o)&&t(r,i,o)}}function Dh(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);var o=i.cache,a=o.get(n),s=o.get(r);if(a&&s)return a===r&&s===n;o.set(n,r),o.set(r,n);var l=e(n,r,i);return o.delete(n),o.delete(r),l}}function zM(e){return xwe(e).concat(wwe(e))}var wF=Object.hasOwn||function(e,t){return _we.call(e,t)};function $u(e,t){return e||t?e===t:e===t||e!==e&&t!==t}var _F="_owner",VM=Object.getOwnPropertyDescriptor,UM=Object.keys;function Swe(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Owe(e,t){return $u(e.getTime(),t.getTime())}function KM(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,s;(a=i.next())&&!a.done;){for(var l=t.entries(),u=!1,f=0;(s=l.next())&&!s.done;){var d=a.value,p=d[0],m=d[1],g=s.value,v=g[0],y=g[1];!u&&!r[f]&&(u=n.equals(p,v,o,f,e,t,n)&&n.equals(m,y,p,v,e,t,n))&&(r[f]=!0),f++}if(!u)return!1;o++}return!0}function Cwe(e,t,n){var r=UM(e),i=r.length;if(UM(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===_F&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!wF(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function mc(e,t,n){var r=zM(e),i=r.length;if(zM(t).length!==i)return!1;for(var o,a,s;i-- >0;)if(o=r[i],o===_F&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!wF(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=VM(e,o),s=VM(t,o),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function Pwe(e,t){return $u(e.valueOf(),t.valueOf())}function Awe(e,t){return e.source===t.source&&e.flags===t.flags}function HM(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var s=t.values(),l=!1,u=0;(a=s.next())&&!a.done;)!l&&!r[u]&&(l=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[u]=!0),u++;if(!l)return!1}return!0}function Twe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var Ewe="[object Arguments]",kwe="[object Boolean]",Mwe="[object Date]",jwe="[object Map]",Nwe="[object Number]",$we="[object Object]",Dwe="[object RegExp]",Iwe="[object Set]",Rwe="[object String]",Lwe=Array.isArray,GM=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,YM=Object.assign,Bwe=Object.prototype.toString.call.bind(Object.prototype.toString);function Fwe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(f,d,p){if(f===d)return!0;if(f==null||d==null||typeof f!="object"||typeof d!="object")return f!==f&&d!==d;var m=f.constructor;if(m!==d.constructor)return!1;if(m===Object)return i(f,d,p);if(Lwe(f))return t(f,d,p);if(GM!=null&&GM(f))return l(f,d,p);if(m===Date)return n(f,d,p);if(m===RegExp)return a(f,d,p);if(m===Map)return r(f,d,p);if(m===Set)return s(f,d,p);var g=Bwe(f);return g===Mwe?n(f,d,p):g===Dwe?a(f,d,p):g===jwe?r(f,d,p):g===Iwe?s(f,d,p):g===$we?typeof f.then!="function"&&typeof d.then!="function"&&i(f,d,p):g===Ewe?i(f,d,p):g===kwe||g===Nwe||g===Rwe?o(f,d,p):!1}}function Wwe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?mc:Swe,areDatesEqual:Owe,areMapsEqual:r?WM(KM,mc):KM,areObjectsEqual:r?mc:Cwe,arePrimitiveWrappersEqual:Pwe,areRegExpsEqual:Awe,areSetsEqual:r?WM(HM,mc):HM,areTypedArraysEqual:r?mc:Twe};if(n&&(i=YM({},i,n(i))),t){var o=Dh(i.areArraysEqual),a=Dh(i.areMapsEqual),s=Dh(i.areObjectsEqual),l=Dh(i.areSetsEqual);i=YM({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return i}function zwe(e){return function(t,n,r,i,o,a,s){return e(t,n,s)}}function Vwe(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(l,u){var f=r(),d=f.cache,p=d===void 0?t?new WeakMap:void 0:d,m=f.meta;return n(l,u,{cache:p,equals:i,meta:m,strict:o})};if(t)return function(l,u){return n(l,u,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(l,u){return n(l,u,a)}}var Uwe=ja();ja({strict:!0});ja({circular:!0});ja({circular:!0,strict:!0});ja({createInternalComparator:function(){return $u}});ja({strict:!0,createInternalComparator:function(){return $u}});ja({circular:!0,createInternalComparator:function(){return $u}});ja({circular:!0,createInternalComparator:function(){return $u},strict:!0});function ja(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,s=Wwe(e),l=Fwe(s),u=r?r(l):zwe(l);return Vwe({circular:n,comparator:l,createState:i,equals:u,strict:a})}function Kwe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function qM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):Kwe(i)};requestAnimationFrame(r)}function F0(e){"@babel/helpers - typeof";return F0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F0(e)}function Hwe(e){return Xwe(e)||qwe(e)||Ywe(e)||Gwe()}function Gwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ywe(e,t){if(e){if(typeof e=="string")return XM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XM(e,t)}}function XM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0&&y<=1}),"[configBezier]: arguments should be x1, y1, x2, y2 of [0, 1] instead received %s",n);var d=ej(i,a),p=ej(o,s),m=d1e(i,a),g=function(x){return x>1?1:x<0?0:x},v=function(x){for(var w=x>1?1:x,S=w,P=0;P<8;++P){var _=d(S)-w,C=m(S);if(Math.abs(_-w)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,a=t.dt,s=a===void 0?17:a,l=function(f,d,p){var m=-(f-d)*r,g=p*o,v=p+(m-g)*s/1e3,y=p*s/1e3+f;return Math.abs(y-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function T1e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function $b(e){return j1e(e)||M1e(e)||k1e(e)||E1e()}function E1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k1e(e,t){if(e){if(typeof e=="string")return K0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K0(e,t)}}function M1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function j1e(e){if(Array.isArray(e))return K0(e)}function K0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function um(e){return um=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},um(e)}var yi=function(e){R1e(n,e);var t=L1e(n);function n(r,i){var o;N1e(this,n),o=t.call(this,r,i);var a=o.props,s=a.isActive,l=a.attributeName,u=a.from,f=a.to,d=a.steps,p=a.children,m=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(Y0(o)),o.changeStyle=o.changeStyle.bind(Y0(o)),!s||m<=0)return o.state={style:{}},typeof p=="function"&&(o.state={style:f}),G0(o);if(d&&d.length)o.state={style:d[0].style};else if(u){if(typeof p=="function")return o.state={style:u},G0(o);o.state={style:l?Sc({},l,u):u}}else o.state={style:{}};return o}return D1e(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,s=o.canBegin,l=o.attributeName,u=o.shouldReAnimate,f=o.to,d=o.from,p=this.state.style;if(s){if(!a){var m={style:l?Sc({},l,f):f};this.state&&p&&(l&&p[l]!==f||!l&&p!==f)&&this.setState(m);return}if(!(Uwe(i.to,f)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=g||u?d:i.to;if(this.state&&p){var y={style:l?Sc({},l,v):v};(l&&p[l]!==v||!l&&p!==v)&&this.setState(y)}this.runAnimation(ri(ri({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,a=i.from,s=i.to,l=i.duration,u=i.easing,f=i.begin,d=i.onAnimationEnd,p=i.onAnimationStart,m=C1e(a,s,p1e(u),l,this.changeStyle),g=function(){o.stopJSAnimation=m()};this.manager.start([p,f,g,l,d])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,s=i.begin,l=i.onAnimationStart,u=a[0],f=u.style,d=u.duration,p=d===void 0?0:d,m=function(v,y,x){if(x===0)return v;var w=y.duration,S=y.easing,P=S===void 0?"ease":S,_=y.style,C=y.properties,E=y.onAnimationEnd,k=x>0?a[x-1]:y,M=C||Object.keys(_);if(typeof P=="function"||P==="spring")return[].concat($b(v),[o.runJSAnimation.bind(o,{from:k.style,to:_,duration:w,easing:P}),w]);var D=QM(M,w,P),$=ri(ri(ri({},k.style),_),{},{transition:D});return[].concat($b(v),[$,w,E]).filter(t1e)};return this.manager.start([l].concat($b(a.reduce(m,[f,Math.max(p,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Zwe());var o=i.begin,a=i.duration,s=i.attributeName,l=i.to,u=i.easing,f=i.onAnimationStart,d=i.onAnimationEnd,p=i.steps,m=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof u=="function"||typeof m=="function"||u==="spring"){this.runJSAnimation(i);return}if(p.length>1){this.runStepAnimation(i);return}var v=s?Sc({},s,l):l,y=QM(Object.keys(v),a,u);g.start([f,o,ri(ri({},v),{},{transition:y}),a,d])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=A1e(i,P1e),u=O.Children.count(o),f=this.state.style;if(typeof o=="function")return o(f);if(!s||u===0||a<=0)return o;var d=function(m){var g=m.props,v=g.style,y=v===void 0?{}:v,x=g.className,w=O.cloneElement(m,ri(ri({},l),{},{style:ri(ri({},y),f),className:x}));return w};return u===1?d(O.Children.only(o)):O.createElement("div",null,O.Children.map(o,function(p){return d(p)}))}}]),n}(O.PureComponent);yi.displayName="Animate";yi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};yi.propTypes={from:Ge.oneOfType([Ge.object,Ge.string]),to:Ge.oneOfType([Ge.object,Ge.string]),attributeName:Ge.string,duration:Ge.number,begin:Ge.number,easing:Ge.oneOfType([Ge.string,Ge.func]),steps:Ge.arrayOf(Ge.shape({duration:Ge.number.isRequired,style:Ge.object.isRequired,easing:Ge.oneOfType([Ge.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ge.func]),properties:Ge.arrayOf("string"),onAnimationEnd:Ge.func})),children:Ge.oneOfType([Ge.node,Ge.func]),isActive:Ge.bool,canBegin:Ge.bool,onAnimationEnd:Ge.func,shouldReAnimate:Ge.bool,onAnimationStart:Ge.func,onAnimationReStart:Ge.func};Ge.object,Ge.object,Ge.object,Ge.element;Ge.object,Ge.object,Ge.object,Ge.oneOfType([Ge.array,Ge.element]),Ge.any;function kf(e){"@babel/helpers - typeof";return kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kf(e)}function cm(){return cm=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,f;if(a>0&&o instanceof Array){for(var d=[0,0,0,0],p=0,m=4;pa?a:o[p];f="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+l*d[0],",").concat(n)),f+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`, + `).concat(t+r,",").concat(n+s*d[1])),f+="L ".concat(t+r,",").concat(n+i-s*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`, + `).concat(t+r-l*d[2],",").concat(n+i)),f+="L ".concat(t+l*d[3],",").concat(n+i),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`, + `).concat(t,",").concat(n+i-s*d[3])),f+="Z"}else if(a>0&&o===+o&&o>0){var g=Math.min(a,o);f="M ".concat(t,",").concat(n+s*g,` + A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+l*g,",").concat(n,` + L `).concat(t+r-l*g,",").concat(n,` + A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+r,",").concat(n+s*g,` + L `).concat(t+r,",").concat(n+i-s*g,` + A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+r-l*g,",").concat(n+i,` + L `).concat(t+l*g,",").concat(n+i,` + A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t,",").concat(n+i-s*g," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return f},Y1e=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,a=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var u=Math.min(o,o+s),f=Math.max(o,o+s),d=Math.min(a,a+l),p=Math.max(a,a+l);return r>=u&&r<=f&&i>=d&&i<=p}return!1},q1e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},tS=function(t){var n=sj(sj({},q1e),t),r=O.useRef(),i=O.useState(-1),o=F1e(i,2),a=o[0],s=o[1];O.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var P=r.current.getTotalLength();P&&s(P)}catch{}},[]);var l=n.x,u=n.y,f=n.width,d=n.height,p=n.radius,m=n.className,g=n.animationEasing,v=n.animationDuration,y=n.animationBegin,x=n.isAnimationActive,w=n.isUpdateAnimationActive;if(l!==+l||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var S=Ue("recharts-rectangle",m);return w?O.createElement(yi,{canBegin:a>0,from:{width:f,height:d,x:l,y:u},to:{width:f,height:d,x:l,y:u},duration:v,animationEasing:g,isActive:w},function(P){var _=P.width,C=P.height,E=P.x,k=P.y;return O.createElement(yi,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,isActive:x,easing:g},O.createElement("path",cm({},Te(n,!0),{className:S,d:lj(E,k,_,C,p),ref:r})))}):O.createElement("path",cm({},Te(n,!0),{className:S,d:lj(l,u,f,d,p)}))},X1e=["points","className","baseLinePoints","connectNulls"];function vl(){return vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function J1e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function uj(e){return n_e(e)||t_e(e)||e_e(e)||Q1e()}function Q1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e_e(e,t){if(e){if(typeof e=="string")return q0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return q0(e,t)}}function t_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function n_e(e){if(Array.isArray(e))return q0(e)}function q0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){cj(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),cj(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Bc=function(t,n){var r=r_e(t);n&&(r=[r.reduce(function(o,a){return[].concat(uj(o),uj(a))},[])]);var i=r.map(function(o){return o.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},i_e=function(t,n,r){var i=Bc(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Bc(n.reverse(),r).slice(1))},o_e=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,o=t.connectNulls,a=Z1e(t,X1e);if(!n||!n.length)return null;var s=Ue("recharts-polygon",r);if(i&&i.length){var l=a.stroke&&a.stroke!=="none",u=i_e(n,i,o);return O.createElement("g",{className:s},O.createElement("path",vl({},Te(a,!0),{fill:u.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:u})),l?O.createElement("path",vl({},Te(a,!0),{fill:"none",d:Bc(n,o)})):null,l?O.createElement("path",vl({},Te(a,!0),{fill:"none",d:Bc(i,o)})):null)}var f=Bc(n,o);return O.createElement("path",vl({},Te(a,!0),{fill:f.slice(-1)==="Z"?a.fill:"none",className:s,d:f}))};function X0(){return X0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function d_e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var h_e=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},p_e=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,s=a===void 0?0:a,l=t.left,u=l===void 0?0:l,f=t.width,d=f===void 0?0:f,p=t.height,m=p===void 0?0:p,g=t.className,v=f_e(t,a_e),y=s_e({x:r,y:o,top:s,left:u,width:d,height:m},v);return!ve(r)||!ve(o)||!ve(d)||!ve(m)||!ve(s)||!ve(u)?null:O.createElement("path",Z0({},Te(y,!0),{className:Ue("recharts-cross",g),d:h_e(r,o,d,m,s,u)}))},m_e=Vg,g_e=FB,y_e=Ki;function v_e(e,t){return e&&e.length?m_e(e,y_e(t),g_e):void 0}var b_e=v_e;const x_e=Qe.getDefaultExportFromCjs(b_e);var w_e=Vg,__e=Ki,S_e=WB;function O_e(e,t){return e&&e.length?w_e(e,__e(t),S_e):void 0}var C_e=O_e;const P_e=Qe.getDefaultExportFromCjs(C_e);var A_e=["cx","cy","angle","ticks","axisLine"],T_e=["ticks","tick","angle","tickFormatter","stroke"];function ql(e){"@babel/helpers - typeof";return ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ql(e)}function Fc(){return Fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function E_e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function k_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pj(e,t){for(var n=0;nyj?a=i==="outer"?"start":"end":o<-yj?a=i==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,o=r.cy,a=r.radius,s=r.axisLine,l=r.axisLineType,u=Ya(Ya({},Te(this.props,!1)),{},{fill:"none"},Te(s,!1));if(l==="circle")return O.createElement(md,ns({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:o,r:a}));var f=this.props.ticks,d=f.map(function(p){return At(i,o,a,p.coordinate)});return O.createElement(o_e,ns({className:"recharts-polar-angle-axis-line"},u,{points:d}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,o=i.ticks,a=i.tick,s=i.tickLine,l=i.tickFormatter,u=i.stroke,f=Te(this.props,!1),d=Te(a,!1),p=Ya(Ya({},f),{},{fill:"none"},Te(s,!1)),m=o.map(function(g,v){var y=r.getTickLineCoord(g),x=r.getTickTextAnchor(g),w=Ya(Ya(Ya({textAnchor:x},f),{},{stroke:"none",fill:u},d),{},{index:v,payload:g,x:y.x2,y:y.y2});return O.createElement(et,ns({className:Ue("recharts-polar-angle-axis-tick",mF(a)),key:"tick-".concat(g.coordinate)},Ss(r.props,g,v)),s&&O.createElement("line",ns({className:"recharts-polar-angle-axis-tick-line"},p,y)),a&&t.renderTickItem(a,w,l?l(g.value,v):g.value))});return O.createElement(et,{className:"recharts-polar-angle-axis-ticks"},m)}},{key:"render",value:function(){var r=this.props,i=r.ticks,o=r.radius,a=r.axisLine;return o<=0||!i||!i.length?null:O.createElement(et,{className:Ue("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,o){var a;return O.isValidElement(r)?a=O.cloneElement(r,i):Be(r)?a=r(i):a=O.createElement(Os,ns({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),a}}])}(O.PureComponent);qg(Xg,"displayName","PolarAngleAxis");qg(Xg,"axisType","angleAxis");qg(Xg,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var K_e=DL,H_e=K_e(Object.getPrototypeOf,Object),G_e=H_e,Y_e=Io,q_e=G_e,X_e=Ro,Z_e="[object Object]",J_e=Function.prototype,Q_e=Object.prototype,NF=J_e.toString,eSe=Q_e.hasOwnProperty,tSe=NF.call(Object);function nSe(e){if(!X_e(e)||Y_e(e)!=Z_e)return!1;var t=q_e(e);if(t===null)return!0;var n=eSe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&NF.call(n)==tSe}var rSe=nSe;const iSe=Qe.getDefaultExportFromCjs(rSe);var oSe=Io,aSe=Ro,sSe="[object Boolean]";function lSe(e){return e===!0||e===!1||aSe(e)&&oSe(e)==sSe}var uSe=lSe;const cSe=Qe.getDefaultExportFromCjs(uSe);function jf(e){"@babel/helpers - typeof";return jf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jf(e)}function hm(){return hm=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:p,x:l,y:u},to:{upperWidth:f,lowerWidth:d,height:p,x:l,y:u},duration:v,animationEasing:g,isActive:x},function(S){var P=S.upperWidth,_=S.lowerWidth,C=S.height,E=S.x,k=S.y;return O.createElement(yi,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,easing:g},O.createElement("path",hm({},Te(n,!0),{className:w,d:wj(E,k,P,_,C),ref:r})))}):O.createElement("g",null,O.createElement("path",hm({},Te(n,!0),{className:w,d:wj(l,u,f,d,p)})))},wSe=["option","shapeType","propTransformer","activeClassName","isActive"];function Nf(e){"@babel/helpers - typeof";return Nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nf(e)}function _Se(e,t){if(e==null)return{};var n=SSe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SSe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function _j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pm(e){for(var t=1;t0?Tr(S,"paddingAngle",0):0;if(_){var E=un(_.endAngle-_.startAngle,S.endAngle-S.startAngle),k=Ot(Ot({},S),{},{startAngle:w+C,endAngle:w+E(v)+C});y.push(k),w=k.endAngle}else{var M=S.endAngle,D=S.startAngle,$=un(0,M-D),N=$(v),B=Ot(Ot({},S),{},{startAngle:w+C,endAngle:w+N+C});y.push(B),w=B.endAngle}}),O.createElement(et,null,r.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var a=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[a].focus(),i.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,o=r.isAnimationActive,a=this.state.prevSectors;return o&&i&&i.length&&(!a||!Cs(a,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,o=i.hide,a=i.sectors,s=i.className,l=i.label,u=i.cx,f=i.cy,d=i.innerRadius,p=i.outerRadius,m=i.isAnimationActive,g=this.state.isAnimationFinished;if(o||!a||!a.length||!ve(u)||!ve(f)||!ve(d)||!ve(p))return null;var v=Ue("recharts-pie",s);return O.createElement(et,{tabIndex:this.props.rootTabIndex,className:v,ref:function(x){r.pieRef=x}},this.renderSectors(),l&&this.renderLabels(a),cn.renderCallByParent(this.props,null,!1),(!m||g)&&Di.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r=360?w:w-1)*l,P=y-w*m-S,_=i.reduce(function(k,M){var D=qt(M,x,0);return k+(ve(D)?D:0)},0),C;if(_>0){var E;C=i.map(function(k,M){var D=qt(k,x,0),$=qt(k,f,M),N=(ve(D)?D:0)/_,B;M?B=E.endAngle+Zn(v)*l*(D!==0?1:0):B=a;var L=B+Zn(v)*((D!==0?m:0)+N*P),F=(B+L)/2,W=(g.innerRadius+g.outerRadius)/2,z=[{name:$,value:D,payload:k,dataKey:x,type:p}],H=At(g.cx,g.cy,W,F);return E=Ot(Ot(Ot({percent:N,cornerRadius:o,name:$,tooltipPayload:z,midAngle:F,middleRadius:W,tooltipPosition:H},k),g),{},{value:qt(k,x),startAngle:B,endAngle:L,payload:k,paddingAngle:Zn(v)*l}),E})}return Ot(Ot({},g),{},{sectors:C,data:i})});var USe=Math.ceil,KSe=Math.max;function HSe(e,t,n,r){for(var i=-1,o=KSe(USe((t-e)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=e,e+=n;return a}var GSe=HSe,YSe=eB,Pj=1/0,qSe=17976931348623157e292;function XSe(e){if(!e)return e===0?e:0;if(e=YSe(e),e===Pj||e===-Pj){var t=e<0?-1:1;return t*qSe}return e===e?e:0}var RF=XSe,ZSe=GSe,JSe=Ig,Db=RF;function QSe(e){return function(t,n,r){return r&&typeof r!="number"&&JSe(t,n,r)&&(n=r=void 0),t=Db(t),n===void 0?(n=t,t=0):n=Db(n),r=r===void 0?t0&&r.handleDrag(i.changedTouches[0])}),_r(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,s=i.startIndex;a==null||a({endIndex:o,startIndex:s})}),r.detachDragEndListener()}),_r(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),_r(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),_r(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),_r(r,"handleSlideDragStart",function(i){var o=Mj(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return hOe(t,e),uOe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,u=s.data,f=u.length-1,d=Math.min(i,o),p=Math.max(i,o),m=t.getIndexInRange(a,d),g=t.getIndexInRange(a,p);return{startIndex:m-m%l,endIndex:g===f?f:g-g%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,s=i.dataKey,l=qt(o[r],s,r);return Be(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,s=i.endX,l=this.props,u=l.x,f=l.width,d=l.travellerWidth,p=l.startIndex,m=l.endIndex,g=l.onChange,v=r.pageX-o;v>0?v=Math.min(v,u+f-d-s,u+f-d-a):v<0&&(v=Math.max(v,u-a,u-s));var y=this.getIndex({startX:a+v,endX:s+v});(y.startIndex!==p||y.endIndex!==m)&&g&&g(y),this.setState({startX:a+v,endX:s+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=Mj(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,s=i.endX,l=i.startX,u=this.state[a],f=this.props,d=f.x,p=f.width,m=f.travellerWidth,g=f.onChange,v=f.gap,y=f.data,x={startX:this.state.startX,endX:this.state.endX},w=r.pageX-o;w>0?w=Math.min(w,d+p-m-u):w<0&&(w=Math.max(w,d-u)),x[a]=u+w;var S=this.getIndex(x),P=S.startIndex,_=S.endIndex,C=function(){var k=y.length-1;return a==="startX"&&(s>l?P%v===0:_%v===0)||sl?_%v===0:P%v===0)||s>l&&_===k};this.setState(_r(_r({},a,u+w),"brushMoveStartX",r.pageX),function(){g&&C()&&g(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,s=a.scaleValues,l=a.startX,u=a.endX,f=this.state[i],d=s.indexOf(f);if(d!==-1){var p=d+r;if(!(p===-1||p>=s.length)){var m=s[p];i==="startX"&&m>=u||i==="endX"&&m<=l||this.setState(_r({},i,m),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,l=r.fill,u=r.stroke;return O.createElement("rect",{stroke:u,fill:l,x:i,y:o,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,l=r.data,u=r.children,f=r.padding,d=O.Children.only(u);return d?O.cloneElement(d,{x:i,y:o,width:a,height:s,margin:f,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,s=this,l=this.props,u=l.y,f=l.travellerWidth,d=l.height,p=l.traveller,m=l.ariaLabel,g=l.data,v=l.startIndex,y=l.endIndex,x=Math.max(r,this.props.x),w=Ib(Ib({},Te(this.props,!1)),{},{x,y:u,width:f,height:d}),S=m||"Min value: ".concat((o=g[v])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=g[y])===null||a===void 0?void 0:a.name);return O.createElement(et,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(_){["ArrowLeft","ArrowRight"].includes(_.key)&&(_.preventDefault(),_.stopPropagation(),s.handleTravellerMoveKeyboard(_.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,w))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,s=o.height,l=o.stroke,u=o.travellerWidth,f=Math.min(r,i)+u,d=Math.max(Math.abs(i-r)-u,0);return O.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:f,y:a,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,u=r.stroke,f=this.state,d=f.startX,p=f.endX,m=5,g={pointerEvents:"none",fill:u};return O.createElement(et,{className:"recharts-brush-texts"},O.createElement(Os,ym({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-m,y:a+s/2},g),this.getTextOfTick(i)),O.createElement(Os,ym({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+l+m,y:a+s/2},g),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,s=r.x,l=r.y,u=r.width,f=r.height,d=r.alwaysShowText,p=this.state,m=p.startX,g=p.endX,v=p.isTextActive,y=p.isSlideMoving,x=p.isTravellerMoving,w=p.isTravellerFocused;if(!i||!i.length||!ve(s)||!ve(l)||!ve(u)||!ve(f)||u<=0||f<=0)return null;var S=Ue("recharts-brush",o),P=O.Children.count(a)===1,_=sOe("userSelect","none");return O.createElement(et,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:_},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(m,g),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(g,"endX"),(v||y||x||w||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,s=r.height,l=r.stroke,u=Math.floor(o+s/2)-1;return O.createElement(O.Fragment,null,O.createElement("rect",{x:i,y:o,width:a,height:s,fill:l,stroke:"none"}),O.createElement("line",{x1:i+1,y1:u,x2:i+a-1,y2:u,fill:"none",stroke:"#fff"}),O.createElement("line",{x1:i+1,y1:u+2,x2:i+a-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return O.isValidElement(r)?o=O.cloneElement(r,i):Be(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,s=r.x,l=r.travellerWidth,u=r.updateId,f=r.startIndex,d=r.endIndex;if(o!==i.prevData||u!==i.prevUpdateId)return Ib({prevData:o,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:a},o&&o.length?mOe({data:o,width:a,x:s,travellerWidth:l,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+a-l]);var p=i.scale.domain().map(function(m){return i.scale(m)});return{prevData:o,prevTravellerWidth:l,prevUpdateId:u,prevX:s,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,s=o-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>i?s=l:a=l}return i>=r[s]?s:a}}])}(O.PureComponent);_r(Ql,"displayName","Brush");_r(Ql,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var gOe=C_;function yOe(e,t){var n;return gOe(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var vOe=yOe,bOe=AL,xOe=Ki,wOe=vOe,_Oe=dr,SOe=Ig;function OOe(e,t,n){var r=_Oe(e)?bOe:wOe;return n&&SOe(e,t,n)&&(t=void 0),r(e,xOe(t))}var COe=OOe;const POe=Qe.getDefaultExportFromCjs(COe);var Ii=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},jj=qL;function AOe(e,t,n){t=="__proto__"&&jj?jj(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var TOe=AOe,EOe=TOe,kOe=GL,MOe=Ki;function jOe(e,t){var n={};return t=MOe(t),kOe(e,function(r,i,o){EOe(n,i,t(r,i,o))}),n}var NOe=jOe;const $Oe=Qe.getDefaultExportFromCjs(NOe);function DOe(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JOe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function QOe(e,t){var n=e.x,r=e.y,i=ZOe(e,GOe),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),u="".concat(t.height||i.height),f=parseInt(u,10),d="".concat(t.width||i.width),p=parseInt(d,10);return gc(gc(gc(gc(gc({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:f,width:p,name:t.name,radius:t.radius})}function $j(e){return O.createElement($F,nw({shapeType:"rectangle",propTransformer:QOe,activeClassName:"recharts-active-bar"},e))}var eCe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||(process.env.NODE_ENV!=="production"?ur(!1,"minPointSize callback function received a value with type of ".concat(eu(r),". Currently only numbers are supported.")):ur()),n)}},tCe=["value","background"],zF;function tu(e){"@babel/helpers - typeof";return tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tu(e)}function nCe(e,t){if(e==null)return{};var n=rCe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rCe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function bm(){return bm=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(F)0&&Math.abs(L)0&&(B=Math.min((ie||0)-(L[ce-1]||0),B))}),Number.isFinite(B)){var F=B/N,W=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(E=F*W/2),v.padding==="no-gap"){var z=Jn(t.barCategoryGap,F*W),H=F*W/2;E=H-z-(H-z)/W*z}}}i==="xAxis"?k=[r.left+(S.left||0)+(E||0),r.left+r.width-(S.right||0)-(E||0)]:i==="yAxis"?k=l==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(E||0),r.top+r.height-(S.bottom||0)-(E||0)]:k=v.range,_&&(k=[k[1],k[0]]);var U=lF(v,o,p),K=U.scale,Y=U.realScaleType;K.domain(x).range(k),uF(K);var te=cF(K,si(si({},v),{},{realScaleType:Y}));i==="xAxis"?($=y==="top"&&!P||y==="bottom"&&P,M=r.left,D=d[C]-$*v.height):i==="yAxis"&&($=y==="left"&&!P||y==="right"&&P,M=d[C]-$*v.width,D=r.top);var ne=si(si(si({},v),te),{},{realScaleType:Y,x:M,y:D,scale:K,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return ne.bandSize=rm(ne,te),!v.hide&&i==="xAxis"?d[C]+=($?-1:1)*ne.height:v.hide||(d[C]+=($?-1:1)*ne.width),si(si({},m),{},Qg({},g,ne))},{})},HF=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},pCe=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return HF({x:n,y:r},{x:i,y:o})},GF=function(){function e(t){fCe(this,e),this.scale=t}return dCe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();Qg(GF,"EPS",1e-4);var rS=function(t){var n=Object.keys(t).reduce(function(r,i){return si(si({},r),{},Qg({},i,GF.create(t[i])))},{});return si(si({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,s=o.position;return $Oe(i,function(l,u){return n[u].apply(l,{bandAware:a,position:s})})},isInRange:function(i){return WF(i,function(o,a){return n[a].isInRange(o)})}})};function mCe(e){return(e%180+180)%180}var gCe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=mCe(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a-1?i[o?t[a]:a]:void 0}}var wCe=xCe,_Ce=RF;function SCe(e){var t=_Ce(e),n=t%1;return t===t?n?t-n:t:0}var OCe=SCe,CCe=WL,PCe=Ki,ACe=OCe,TCe=Math.max;function ECe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:ACe(n);return i<0&&(i=TCe(r+i,0)),CCe(e,PCe(t),i)}var kCe=ECe,MCe=wCe,jCe=kCe,NCe=MCe(jCe),$Ce=NCe;const DCe=Qe.getDefaultExportFromCjs($Ce);var ICe=Iie(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")});function wm(e){"@babel/helpers - typeof";return wm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wm(e)}var iS=O.createContext(void 0),oS=O.createContext(void 0),YF=O.createContext(void 0),qF=O.createContext({}),XF=O.createContext(void 0),ZF=O.createContext(0),JF=O.createContext(0),Bj=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,s=t.children,l=t.width,u=t.height,f=ICe(o);return O.createElement(iS.Provider,{value:r},O.createElement(oS.Provider,{value:i},O.createElement(qF.Provider,{value:o},O.createElement(YF.Provider,{value:f},O.createElement(XF.Provider,{value:a},O.createElement(ZF.Provider,{value:u},O.createElement(JF.Provider,{value:l},s)))))))},RCe=function(){return O.useContext(XF)};function QF(e){var t=Object.keys(e);return t.length===0?"There are no available ids.":"Available ids are: ".concat(t,".")}var eW=function(t){var n=O.useContext(iS);n==null&&(process.env.NODE_ENV!=="production"?ur(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ur());var r=n[t];return r==null&&(process.env.NODE_ENV!=="production"?ur(!1,'Could not find xAxis by id "'.concat(t,'" [').concat(wm(t),"]. ").concat(QF(n))):ur()),r},LCe=function(){var t=O.useContext(iS);return oa(t)},BCe=function(){var t=O.useContext(oS),n=DCe(t,function(r){return WF(r.domain,Number.isFinite)});return n||oa(t)},tW=function(t){var n=O.useContext(oS);n==null&&(process.env.NODE_ENV!=="production"?ur(!1,"Could not find Recharts context; are you sure this is rendered inside a Recharts wrapper component?"):ur());var r=n[t];return r==null&&(process.env.NODE_ENV!=="production"?ur(!1,'Could not find yAxis by id "'.concat(t,'" [').concat(wm(t),"]. ").concat(QF(n))):ur()),r},FCe=function(){var t=O.useContext(YF);return t},WCe=function(){return O.useContext(qF)},aS=function(){return O.useContext(JF)},sS=function(){return O.useContext(ZF)};function nu(e){"@babel/helpers - typeof";return nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nu(e)}function zCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VCe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function OPe(e,t){return lW(e,t+1)}function CPe(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,s=t.end,l=0,u=1,f=a,d=function(){var g=r==null?void 0:r[l];if(g===void 0)return{v:lW(r,u)};var v=l,y,x=function(){return y===void 0&&(y=n(g,v)),y},w=g.coordinate,S=l===0||Cm(e,w,x,f,s);S||(l=0,f=a,u+=1),S&&(f=w+e*(x()/2+i),l+=u)},p;u<=o.length;)if(p=d(),p)return p.v;return[]}function Rf(e){"@babel/helpers - typeof";return Rf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rf(e)}function Gj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Fn(e){for(var t=1;t0?m.coordinate-y*e:m.coordinate})}else o[p]=m=Fn(Fn({},m),{},{tickCoord:m.coordinate});var x=Cm(e,m.tickCoord,v,s,l);x&&(l=m.tickCoord-e*(v()/2+i),o[p]=Fn(Fn({},m),{},{isShow:!0}))},f=a-1;f>=0;f--)u(f);return o}function kPe(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,l=t.start,u=t.end;if(o){var f=r[s-1],d=n(f,s-1),p=e*(f.coordinate+e*d/2-u);a[s-1]=f=Fn(Fn({},f),{},{tickCoord:p>0?f.coordinate-p*e:f.coordinate});var m=Cm(e,f.tickCoord,function(){return d},l,u);m&&(u=f.tickCoord-e*(d/2+i),a[s-1]=Fn(Fn({},f),{},{isShow:!0}))}for(var g=o?s-1:s,v=function(w){var S=a[w],P,_=function(){return P===void 0&&(P=n(S,w)),P};if(w===0){var C=e*(S.coordinate-e*_()/2-l);a[w]=S=Fn(Fn({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else a[w]=S=Fn(Fn({},S),{},{tickCoord:S.coordinate});var E=Cm(e,S.tickCoord,_,l,u);E&&(l=S.tickCoord+e*(_()/2+i),a[w]=Fn(Fn({},S),{},{isShow:!0}))},y=0;y=2?Zn(i[1].coordinate-i[0].coordinate):1,x=SPe(o,y,m);return l==="equidistantPreserveStart"?CPe(y,x,v,i,a):(l==="preserveStart"||l==="preserveStartEnd"?p=kPe(y,x,v,i,a,l==="preserveStartEnd"):p=EPe(y,x,v,i,a),p.filter(function(w){return w.isShow}))}var MPe=["viewBox"],jPe=["viewBox"],NPe=["ticks"];function ou(e){"@babel/helpers - typeof";return ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ou(e)}function xl(){return xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $Pe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function DPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qj(e,t){for(var n=0;n0?l(this.props):l(m)),a<=0||s<=0||!g||!g.length?null:O.createElement(et,{className:Ue("recharts-cartesian-axis",u),ref:function(y){r.layerReference=y}},o&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),cn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return O.isValidElement(r)?a=O.cloneElement(r,i):Be(r)?a=r(i):a=O.createElement(Os,xl({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(O.Component);fS(Du,"displayName","CartesianAxis");fS(Du,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var zPe=["x1","y1","x2","y2","key"],VPe=["offset"];function As(e){"@babel/helpers - typeof";return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},As(e)}function Xj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zn(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GPe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var YPe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,s=t.height,l=t.ry;return O.createElement("rect",{x:i,y:o,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function fW(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(Be(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,l=Zj(t,zPe),u=Te(l,!1);u.offset;var f=Zj(u,VPe);n=O.createElement("line",ls({},f,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function qPe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var u=zn(zn({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return fW(i,u)});return O.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function XPe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,l){var u=zn(zn({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return fW(i,u)});return O.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function ZPe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var f=s.map(function(p){return Math.round(p+i-i)}).sort(function(p,m){return p-m});i!==f[0]&&f.unshift(0);var d=f.map(function(p,m){var g=!f[m+1],v=g?i+a-p:f[m+1]-p;if(v<=0)return null;var y=m%t.length;return O.createElement("rect",{key:"react-".concat(m),y:p,x:r,height:v,width:o,stroke:"none",fill:t[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function JPe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,l=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var f=u.map(function(p){return Math.round(p+o-o)}).sort(function(p,m){return p-m});o!==f[0]&&f.unshift(0);var d=f.map(function(p,m){var g=!f[m+1],v=g?o+s-p:f[m+1]-p;if(v<=0)return null;var y=m%r.length;return O.createElement("rect",{key:"react-".concat(m),x:p,y:a,width:v,height:l,stroke:"none",fill:r[y],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var QPe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return sF(cS(zn(zn(zn({},Du.defaultProps),r),{},{ticks:po(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},eAe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return sF(cS(zn(zn(zn({},Du.defaultProps),r),{},{ticks:po(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},ol={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function iy(e){var t,n,r,i,o,a,s=aS(),l=sS(),u=WCe(),f=zn(zn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:ol.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:ol.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:ol.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:ol.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:ol.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:ol.verticalFill,x:ve(e.x)?e.x:u.left,y:ve(e.y)?e.y:u.top,width:ve(e.width)?e.width:u.width,height:ve(e.height)?e.height:u.height}),d=f.x,p=f.y,m=f.width,g=f.height,v=f.syncWithTicks,y=f.horizontalValues,x=f.verticalValues,w=LCe(),S=BCe();if(!ve(m)||m<=0||!ve(g)||g<=0||!ve(d)||d!==+d||!ve(p)||p!==+p)return null;var P=f.verticalCoordinatesGenerator||QPe,_=f.horizontalCoordinatesGenerator||eAe,C=f.horizontalPoints,E=f.verticalPoints;if((!C||!C.length)&&Be(_)){var k=y&&y.length,M=_({yAxis:S?zn(zn({},S),{},{ticks:k?y:S.ticks}):void 0,width:s,height:l,offset:u},k?!0:v);mi(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(As(M),"]")),Array.isArray(M)&&(C=M)}if((!E||!E.length)&&Be(P)){var D=x&&x.length,$=P({xAxis:w?zn(zn({},w),{},{ticks:D?x:w.ticks}):void 0,width:s,height:l,offset:u},D?!0:v);mi(Array.isArray($),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(As($),"]")),Array.isArray($)&&(E=$)}return O.createElement("g",{className:"recharts-cartesian-grid"},O.createElement(YPe,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),O.createElement(qPe,ls({},f,{offset:u,horizontalPoints:C,xAxis:w,yAxis:S})),O.createElement(XPe,ls({},f,{offset:u,verticalPoints:E,xAxis:w,yAxis:S})),O.createElement(ZPe,ls({},f,{horizontalPoints:C})),O.createElement(JPe,ls({},f,{verticalPoints:E})))}iy.displayName="CartesianGrid";var tAe=["type","layout","connectNulls","ref"],nAe=["key"];function au(e){"@babel/helpers - typeof";return au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},au(e)}function Jj(e,t){if(e==null)return{};var n=rAe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Wc(){return Wc=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){m=[].concat(al(l.slice(0,g)),[d-v]);break}var y=m.length%2===0?[0,p]:[p];return[].concat(al(t.repeat(l,f)),al(m),y).map(function(x){return"".concat(x,"px")}).join(", ")}),li(n,"id",Is("recharts-line-")),li(n,"pathRef",function(a){n.mainCurve=a}),li(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),li(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return hAe(t,e),uAe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,s=o.xAxis,l=o.yAxis,u=o.layout,f=o.children,d=Er(f,pd);if(!d)return null;var p=function(v,y){return{x:v.x,y:v.y,value:v.value,errorVal:qt(v.payload,y)}},m={clipPath:r?"url(#clipPath-".concat(i,")"):null};return O.createElement(et,m,d.map(function(g){return O.cloneElement(g,{key:"bar-".concat(g.props.dataKey),data:a,xAxis:s,yAxis:l,layout:u,dataPointFormatter:p})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,u=s.points,f=s.dataKey,d=Te(this.props,!1),p=Te(l,!0),m=u.map(function(v,y){var x=wr(wr(wr({key:"dot-".concat(y),r:3},d),p),{},{value:v.value,dataKey:f,cx:v.x,cy:v.y,index:y,payload:v.payload});return t.renderDotItem(l,x)}),g={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return O.createElement(et,Wc({className:"recharts-line-dots",key:"dots"},g),m)}},{key:"renderCurveStatically",value:function(r,i,o,a){var s=this.props,l=s.type,u=s.layout,f=s.connectNulls;s.ref;var d=Jj(s,tAe),p=wr(wr(wr({},Te(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:l,layout:u,connectNulls:f});return O.createElement(gs,Wc({},p,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,s=a.points,l=a.strokeDasharray,u=a.isAnimationActive,f=a.animationBegin,d=a.animationDuration,p=a.animationEasing,m=a.animationId,g=a.animateNewValues,v=a.width,y=a.height,x=this.state,w=x.prevPoints,S=x.totalLength;return O.createElement(yi,{begin:f,duration:d,isActive:u,easing:p,from:{t:0},to:{t:1},key:"line-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(P){var _=P.t;if(w){var C=w.length/s.length,E=s.map(function(N,B){var L=Math.floor(B*C);if(w[L]){var F=w[L],W=un(F.x,N.x),z=un(F.y,N.y);return wr(wr({},N),{},{x:W(_),y:z(_)})}if(g){var H=un(v*2,N.x),U=un(y/2,N.y);return wr(wr({},N),{},{x:H(_),y:U(_)})}return wr(wr({},N),{},{x:N.x,y:N.y})});return o.renderCurveStatically(E,r,i)}var k=un(0,S),M=k(_),D;if(l){var $="".concat(l).split(/[,\s]+/gim).map(function(N){return parseFloat(N)});D=o.getStrokeDasharray(M,S,$)}else D=o.generateSimpleStrokeDasharray(S,M);return o.renderCurveStatically(s,r,i,{strokeDasharray:D})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,s=o.isAnimationActive,l=this.state,u=l.prevPoints,f=l.totalLength;return s&&a&&a.length&&(!u&&f>0||!Cs(u,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,l=i.className,u=i.xAxis,f=i.yAxis,d=i.top,p=i.left,m=i.width,g=i.height,v=i.isAnimationActive,y=i.id;if(o||!s||!s.length)return null;var x=this.state.isAnimationFinished,w=s.length===1,S=Ue("recharts-line",l),P=u&&u.allowDataOverflow,_=f&&f.allowDataOverflow,C=P||_,E=Fe(y)?this.id:y,k=(r=Te(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},M=k.r,D=M===void 0?3:M,$=k.strokeWidth,N=$===void 0?2:$,B=J2(a)?a:{},L=B.clipDot,F=L===void 0?!0:L,W=D*2+N;return O.createElement(et,{className:S},P||_?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(E)},O.createElement("rect",{x:P?p:p-m/2,y:_?d:d-g/2,width:P?m:m*2,height:_?g:g*2})),!F&&O.createElement("clipPath",{id:"clipPath-dots-".concat(E)},O.createElement("rect",{x:p-W/2,y:d-W/2,width:m+W,height:g+W}))):null,!w&&this.renderCurve(C,E),this.renderErrorBar(C,E),(w||a)&&this.renderDots(C,F,E),(!v||x)&&Di.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(al(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function us(){return us=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Cs(f,a)||!Cs(d,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,s,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,l=i.className,u=i.top,f=i.left,d=i.xAxis,p=i.yAxis,m=i.width,g=i.height,v=i.isAnimationActive,y=i.id;if(o||!s||!s.length)return null;var x=this.state.isAnimationFinished,w=s.length===1,S=Ue("recharts-area",l),P=d&&d.allowDataOverflow,_=p&&p.allowDataOverflow,C=P||_,E=Fe(y)?this.id:y,k=(r=Te(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},M=k.r,D=M===void 0?3:M,$=k.strokeWidth,N=$===void 0?2:$,B=J2(a)?a:{},L=B.clipDot,F=L===void 0?!0:L,W=D*2+N;return O.createElement(et,{className:S},P||_?O.createElement("defs",null,O.createElement("clipPath",{id:"clipPath-".concat(E)},O.createElement("rect",{x:P?f:f-m/2,y:_?u:u-g/2,width:P?m:m*2,height:_?g:g*2})),!F&&O.createElement("clipPath",{id:"clipPath-dots-".concat(E)},O.createElement("rect",{x:f-W/2,y:u-W/2,width:m+W,height:g+W}))):null,w?null:this.renderArea(C,E),(a||w)&&this.renderDots(C,F,E),(!v||x)&&Di.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(O.PureComponent);pW=Na;Ti(Na,"displayName","Area");Ti(Na,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!gi.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ti(Na,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,s=a??o;if(ve(s)&&typeof s=="number")return s;var l=i==="horizontal"?r:n,u=l.scale.domain();if(l.type==="number"){var f=Math.max(u[0],u[1]),d=Math.min(u[0],u[1]);return s==="dataMin"?d:s==="dataMax"||f<0?f:Math.max(Math.min(u[0],u[1]),0)}return s==="dataMin"?u[0]:s==="dataMax"?u[1]:u[0]});Ti(Na,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,m=t.layout,g=u&&u.length,v=pW.getBaseValue(t,n,r,i),y=m==="horizontal",x=!1,w=d.map(function(P,_){var C;g?C=u[f+_]:(C=qt(P,l),Array.isArray(C)?x=!0:C=[v,C]);var E=C[1]==null||g&&qt(P,l)==null;return y?{x:nm({axis:r,ticks:o,bandSize:s,entry:P,index:_}),y:E?null:i.scale(C[1]),value:C,payload:P}:{x:E?null:r.scale(C[1]),y:nm({axis:i,ticks:a,bandSize:s,entry:P,index:_}),value:C,payload:P}}),S;return g||x?S=w.map(function(P){var _=Array.isArray(P.value)?P.value[0]:null;return y?{x:P.x,y:_!=null&&P.y!=null?i.scale(_):null}:{x:_!=null?r.scale(_):null,y:P.y}}):S=y?i.scale(v):r.scale(v),ta({points:w,baseLine:S,layout:m,isRange:x},p)});Ti(Na,"renderDotItem",function(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(Be(e))n=e(t);else{var r=Ue("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=mW(t,gAe);n=O.createElement(md,us({},o,{key:i,className:r}))}return n});function lu(e){"@babel/helpers - typeof";return lu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lu(e)}function CAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PAe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dTe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function hTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pTe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&ve(i)&&ve(o)?t.slice(i,o+1):[]};function MW(e){return e==="number"?[0,"auto"]:void 0}var _w=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,s=oy(n,t);return r<0||!o||!o.length||r>=s.length?null:o.reduce(function(l,u){var f,d=(f=u.props.data)!==null&&f!==void 0?f:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(a.dataKey&&!a.allowDuplicatedCategory){var m=d===void 0?s:d;p=Tp(m,a.dataKey,i)}else p=d&&d[r]||s[r];return p?[].concat(fu(l),[dF(u,p)]):l},[])},lN=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=PTe(o,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,f=Vxe(a,s,u,l);if(f>=0&&u){var d=u[f]&&u[f].value,p=_w(t,n,f,d),m=ATe(r,s,f,o);return{activeTooltipIndex:f,activeLabel:d,activePayload:p,activeCoordinate:m}}return null},TTe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,p=t.stackOffset,m=aF(f,o);return r.reduce(function(g,v){var y,x=v.type.defaultProps!==void 0?se(se({},v.type.defaultProps),v.props):v.props,w=x.type,S=x.dataKey,P=x.allowDataOverflow,_=x.allowDuplicatedCategory,C=x.scale,E=x.ticks,k=x.includeHidden,M=x[a];if(g[M])return g;var D=oy(t.data,{graphicalItems:i.filter(function(te){var ne,ie=a in te.props?te.props[a]:(ne=te.type.defaultProps)===null||ne===void 0?void 0:ne[a];return ie===M}),dataStartIndex:l,dataEndIndex:u}),$=D.length,N,B,L;eTe(x.domain,P,w)&&(N=$0(x.domain,null,P),m&&(w==="number"||C!=="auto")&&(L=Rc(D,S,"category")));var F=MW(w);if(!N||N.length===0){var W,z=(W=x.domain)!==null&&W!==void 0?W:F;if(S){if(N=Rc(D,S,w),w==="category"&&m){var H=Noe(N);_&&H?(B=N,N=gm(0,$)):_||(N=bM(z,N,v).reduce(function(te,ne){return te.indexOf(ne)>=0?te:[].concat(fu(te),[ne])},[]))}else if(w==="category")_?N=N.filter(function(te){return te!==""&&!Fe(te)}):N=bM(z,N,v).reduce(function(te,ne){return te.indexOf(ne)>=0||ne===""||Fe(ne)?te:[].concat(fu(te),[ne])},[]);else if(w==="number"){var U=Yxe(D,i.filter(function(te){var ne,ie,ce=a in te.props?te.props[a]:(ne=te.type.defaultProps)===null||ne===void 0?void 0:ne[a],ae="hide"in te.props?te.props.hide:(ie=te.type.defaultProps)===null||ie===void 0?void 0:ie.hide;return ce===M&&(k||!ae)}),S,o,f);U&&(N=U)}m&&(w==="number"||C!=="auto")&&(L=Rc(D,S,"category"))}else m?N=gm(0,$):s&&s[M]&&s[M].hasStack&&w==="number"?N=p==="expand"?[0,1]:fF(s[M].stackGroups,l,u):N=oF(D,i.filter(function(te){var ne=a in te.props?te.props[a]:te.type.defaultProps[a],ie="hide"in te.props?te.props.hide:te.type.defaultProps.hide;return ne===M&&(k||!ie)}),w,f,!0);if(w==="number")N=bw(d,N,M,o,E),z&&(N=$0(z,N,P));else if(w==="category"&&z){var K=z,Y=N.every(function(te){return K.indexOf(te)>=0});Y&&(N=K)}}return se(se({},g),{},Le({},M,se(se({},x),{},{axisType:o,domain:N,categoricalDomain:L,duplicateDomain:B,originalDomain:(y=x.domain)!==null&&y!==void 0?y:F,isCategorical:m,layout:f})))},{})},ETe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,p=oy(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:u}),m=p.length,g=aF(f,o),v=-1;return r.reduce(function(y,x){var w=x.type.defaultProps!==void 0?se(se({},x.type.defaultProps),x.props):x.props,S=w[a],P=MW("number");if(!y[S]){v++;var _;return g?_=gm(0,m):s&&s[S]&&s[S].hasStack?(_=fF(s[S].stackGroups,l,u),_=bw(d,_,S,o)):(_=$0(P,oF(p,r.filter(function(C){var E,k,M=a in C.props?C.props[a]:(E=C.type.defaultProps)===null||E===void 0?void 0:E[a],D="hide"in C.props?C.props.hide:(k=C.type.defaultProps)===null||k===void 0?void 0:k.hide;return M===S&&!D}),"number",f),i.defaultProps.allowDataOverflow),_=bw(d,_,S,o)),se(se({},y),{},Le({},S,se(se({axisType:o},i.defaultProps),{},{hide:!0,orientation:Tr(OTe,"".concat(o,".").concat(v%2),null),domain:_,originalDomain:P,isCategorical:g,layout:f})))}return y},{})},kTe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,u=n.dataEndIndex,f=t.children,d="".concat(i,"Id"),p=Er(f,o),m={};return p&&p.length?m=TTe(t,{axes:p,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u}):a&&a.length&&(m=ETe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:u})),m},MTe=function(t){var n=oa(t),r=po(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:P_(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:rm(n,r)}},uN=function(t){var n=t.children,r=t.defaultShowTooltip,i=Sr(n,Ql),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},jTe=function(t){return!t||!t.length?!1:t.some(function(n){var r=xo(n&&n.type);return r&&r.indexOf("Bar")>=0})},cN=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},NTe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,s=t.yAxisMap,l=s===void 0?{}:s,u=r.width,f=r.height,d=r.children,p=r.margin||{},m=Sr(d,Ql),g=Sr(d,wo),v=Object.keys(l).reduce(function(_,C){var E=l[C],k=E.orientation;return!E.mirror&&!E.hide?se(se({},_),{},Le({},k,_[k]+E.width)):_},{left:p.left||0,right:p.right||0}),y=Object.keys(a).reduce(function(_,C){var E=a[C],k=E.orientation;return!E.mirror&&!E.hide?se(se({},_),{},Le({},k,Tr(_,"".concat(k))+E.height)):_},{top:p.top||0,bottom:p.bottom||0}),x=se(se({},y),v),w=x.bottom;m&&(x.bottom+=m.props.height||Ql.defaultProps.height),g&&n&&(x=Hxe(x,i,r,n));var S=u-x.left-x.right,P=f-x.top-x.bottom;return se(se({brushBottom:w},x),{},{width:Math.max(S,0),height:Math.max(P,0)})},$Te=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},ay=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,p=function(x,w){var S=w.graphicalItems,P=w.stackGroups,_=w.offset,C=w.updateId,E=w.dataStartIndex,k=w.dataEndIndex,M=x.barSize,D=x.layout,$=x.barGap,N=x.barCategoryGap,B=x.maxBarSize,L=cN(D),F=L.numericAxisName,W=L.cateAxisName,z=jTe(S),H=[];return S.forEach(function(U,K){var Y=oy(x.data,{graphicalItems:[U],dataStartIndex:E,dataEndIndex:k}),te=U.type.defaultProps!==void 0?se(se({},U.type.defaultProps),U.props):U.props,ne=te.dataKey,ie=te.maxBarSize,ce=te["".concat(F,"Id")],ae=te["".concat(W,"Id")],le={},re=l.reduce(function(Se,ze){var Lt,at,Wt=w["".concat(ze.axisType,"Map")],Nr=te["".concat(ze.axisType,"Id")];Wt&&Wt[Nr]||ze.axisType==="zAxis"||(process.env.NODE_ENV!=="production"?ur(!1,"Specifying a(n) ".concat(ze.axisType,"Id requires a corresponding ").concat(ze.axisType,"Id on the targeted graphical component ").concat((Lt=U==null||(at=U.type)===null||at===void 0?void 0:at.displayName)!==null&&Lt!==void 0?Lt:"")):ur());var pn=Wt[Nr];return se(se({},Se),{},Le(Le({},ze.axisType,pn),"".concat(ze.axisType,"Ticks"),po(pn)))},le),Q=re[W],fe=re["".concat(W,"Ticks")],ye=P&&P[ce]&&P[ce].hasStack&&r0e(U,P[ce].stackGroups),X=xo(U.type).indexOf("Bar")>=0,Re=rm(Q,fe),pe=[],Ie=z&&Uxe({barSize:M,stackGroups:P,totalSize:$Te(re,W)});if(X){var Ze,tt,Dn=Fe(ie)?B:ie,Me=(Ze=(tt=rm(Q,fe,!0))!==null&&tt!==void 0?tt:Dn)!==null&&Ze!==void 0?Ze:0;pe=Kxe({barGap:$,barCategoryGap:N,bandSize:Me!==Re?Me:Re,sizeList:Ie[ae],maxBarSize:Dn}),Me!==Re&&(pe=pe.map(function(Se){return se(se({},Se),{},{position:se(se({},Se.position),{},{offset:Se.position.offset-Me/2})})}))}var nt=U&&U.type&&U.type.getComposedData;nt&&H.push({props:se(se({},nt(se(se({},re),{},{displayedData:Y,props:x,dataKey:ne,item:U,bandSize:Re,barPosition:pe,offset:_,stackedData:ye,layout:D,dataStartIndex:E,dataEndIndex:k}))),{},Le(Le(Le({key:U.key||"item-".concat(K)},F,re[F]),W,re[W]),"animationId",C)),childIndex:Uoe(U,x.children),item:U})}),H},m=function(x,w){var S=x.props,P=x.dataStartIndex,_=x.dataEndIndex,C=x.updateId;if(!hE({props:S}))return null;var E=S.children,k=S.layout,M=S.stackOffset,D=S.data,$=S.reverseStackOrder,N=cN(k),B=N.numericAxisName,L=N.cateAxisName,F=Er(E,r),W=t0e(D,F,"".concat(B,"Id"),"".concat(L,"Id"),M,$),z=l.reduce(function(te,ne){var ie="".concat(ne.axisType,"Map");return se(se({},te),{},Le({},ie,kTe(S,se(se({},ne),{},{graphicalItems:F,stackGroups:ne.axisType===B&&W,dataStartIndex:P,dataEndIndex:_}))))},{}),H=NTe(se(se({},z),{},{props:S,graphicalItems:F}),w==null?void 0:w.legendBBox);Object.keys(z).forEach(function(te){z[te]=f(S,z[te],H,te.replace("Map",""),n)});var U=z["".concat(L,"Map")],K=MTe(U),Y=p(S,se(se({},z),{},{dataStartIndex:P,dataEndIndex:_,updateId:C,graphicalItems:F,stackGroups:W,offset:H}));return se(se({formattedGraphicalItems:Y,graphicalItems:F,offset:H,stackGroups:W},K),z)},g=function(y){function x(w){var S,P,_;return hTe(this,x),_=gTe(this,x,[w]),Le(_,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Le(_,"accessibilityManager",new QAe),Le(_,"handleLegendBBoxUpdate",function(C){if(C){var E=_.state,k=E.dataStartIndex,M=E.dataEndIndex,D=E.updateId;_.setState(se({legendBBox:C},m({props:_.props,dataStartIndex:k,dataEndIndex:M,updateId:D},se(se({},_.state),{},{legendBBox:C}))))}}),Le(_,"handleReceiveSyncEvent",function(C,E,k){if(_.props.syncId===C){if(k===_.eventEmitterSymbol&&typeof _.props.syncMethod!="function")return;_.applySyncEvent(E)}}),Le(_,"handleBrushChange",function(C){var E=C.startIndex,k=C.endIndex;if(E!==_.state.dataStartIndex||k!==_.state.dataEndIndex){var M=_.state.updateId;_.setState(function(){return se({dataStartIndex:E,dataEndIndex:k},m({props:_.props,dataStartIndex:E,dataEndIndex:k,updateId:M},_.state))}),_.triggerSyncEvent({dataStartIndex:E,dataEndIndex:k})}}),Le(_,"handleMouseEnter",function(C){var E=_.getMouseInfo(C);if(E){var k=se(se({},E),{},{isTooltipActive:!0});_.setState(k),_.triggerSyncEvent(k);var M=_.props.onMouseEnter;Be(M)&&M(k,C)}}),Le(_,"triggeredAfterMouseMove",function(C){var E=_.getMouseInfo(C),k=E?se(se({},E),{},{isTooltipActive:!0}):{isTooltipActive:!1};_.setState(k),_.triggerSyncEvent(k);var M=_.props.onMouseMove;Be(M)&&M(k,C)}),Le(_,"handleItemMouseEnter",function(C){_.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),Le(_,"handleItemMouseLeave",function(){_.setState(function(){return{isTooltipActive:!1}})}),Le(_,"handleMouseMove",function(C){C.persist(),_.throttleTriggeredAfterMouseMove(C)}),Le(_,"handleMouseLeave",function(C){_.throttleTriggeredAfterMouseMove.cancel();var E={isTooltipActive:!1};_.setState(E),_.triggerSyncEvent(E);var k=_.props.onMouseLeave;Be(k)&&k(E,C)}),Le(_,"handleOuterEvent",function(C){var E=Voe(C),k=Tr(_.props,"".concat(E));if(E&&Be(k)){var M,D;/.*touch.*/i.test(E)?D=_.getMouseInfo(C.changedTouches[0]):D=_.getMouseInfo(C),k((M=D)!==null&&M!==void 0?M:{},C)}}),Le(_,"handleClick",function(C){var E=_.getMouseInfo(C);if(E){var k=se(se({},E),{},{isTooltipActive:!0});_.setState(k),_.triggerSyncEvent(k);var M=_.props.onClick;Be(M)&&M(k,C)}}),Le(_,"handleMouseDown",function(C){var E=_.props.onMouseDown;if(Be(E)){var k=_.getMouseInfo(C);E(k,C)}}),Le(_,"handleMouseUp",function(C){var E=_.props.onMouseUp;if(Be(E)){var k=_.getMouseInfo(C);E(k,C)}}),Le(_,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&_.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),Le(_,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&_.handleMouseDown(C.changedTouches[0])}),Le(_,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&_.handleMouseUp(C.changedTouches[0])}),Le(_,"triggerSyncEvent",function(C){_.props.syncId!==void 0&&Lb.emit(Bb,_.props.syncId,C,_.eventEmitterSymbol)}),Le(_,"applySyncEvent",function(C){var E=_.props,k=E.layout,M=E.syncMethod,D=_.state.updateId,$=C.dataStartIndex,N=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)_.setState(se({dataStartIndex:$,dataEndIndex:N},m({props:_.props,dataStartIndex:$,dataEndIndex:N,updateId:D},_.state)));else if(C.activeTooltipIndex!==void 0){var B=C.chartX,L=C.chartY,F=C.activeTooltipIndex,W=_.state,z=W.offset,H=W.tooltipTicks;if(!z)return;if(typeof M=="function")F=M(H,C);else if(M==="value"){F=-1;for(var U=0;U=0){var ye,X;if(B.dataKey&&!B.allowDuplicatedCategory){var Re=typeof B.dataKey=="function"?fe:"payload.".concat(B.dataKey.toString());ye=Tp(U,Re,F),X=K&&Y&&Tp(Y,Re,F)}else ye=U==null?void 0:U[L],X=K&&Y&&Y[L];if(ae||ce){var pe=C.props.activeIndex!==void 0?C.props.activeIndex:L;return[O.cloneElement(C,se(se(se({},M.props),re),{},{activeIndex:pe})),null,null]}if(!Fe(ye))return[Q].concat(fu(_.renderActivePoints({item:M,activePoint:ye,basePoint:X,childIndex:L,isRange:K})))}else{var Ie,Ze=(Ie=_.getItemByXY(_.state.activeCoordinate))!==null&&Ie!==void 0?Ie:{graphicalItem:Q},tt=Ze.graphicalItem,Dn=tt.item,Me=Dn===void 0?C:Dn,nt=tt.childIndex,Se=se(se(se({},M.props),re),{},{activeIndex:nt});return[O.cloneElement(Me,Se),null,null]}return K?[Q,null,null]:[Q,null]}),Le(_,"renderCustomized",function(C,E,k){return O.cloneElement(C,se(se({key:"recharts-customized-".concat(k)},_.props),_.state))}),Le(_,"renderMap",{CartesianGrid:{handler:Rh,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:Rh},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:Rh},YAxis:{handler:Rh},Brush:{handler:_.renderBrush,once:!0},Bar:{handler:_.renderGraphicChild},Line:{handler:_.renderGraphicChild},Area:{handler:_.renderGraphicChild},Radar:{handler:_.renderGraphicChild},RadialBar:{handler:_.renderGraphicChild},Scatter:{handler:_.renderGraphicChild},Pie:{handler:_.renderGraphicChild},Funnel:{handler:_.renderGraphicChild},Tooltip:{handler:_.renderCursor,once:!0},PolarGrid:{handler:_.renderPolarGrid,once:!0},PolarAngleAxis:{handler:_.renderPolarAxis},PolarRadiusAxis:{handler:_.renderPolarAxis},Customized:{handler:_.renderCustomized}}),_.clipPathId="".concat((S=w.id)!==null&&S!==void 0?S:Is("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=tB(_.triggeredAfterMouseMove,(P=w.throttleDelay)!==null&&P!==void 0?P:1e3/60),_.state={},_}return bTe(x,y),mTe(x,[{key:"componentDidMount",value:function(){var S,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,P=S.children,_=S.data,C=S.height,E=S.layout,k=Sr(P,Or);if(k){var M=k.props.defaultIndex;if(!(typeof M!="number"||M<0||M>this.state.tooltipTicks.length-1)){var D=this.state.tooltipTicks[M]&&this.state.tooltipTicks[M].value,$=_w(this.state,_,M,D),N=this.state.tooltipTicks[M].coordinate,B=(this.state.offset.top+C)/2,L=E==="horizontal",F=L?{x:N,y:B}:{y:N,x:B},W=this.state.formattedGraphicalItems.find(function(H){var U=H.item;return U.type.name==="Scatter"});W&&(F=se(se({},F),W.props.points[M].tooltipPosition),$=W.props.points[M].tooltipPayload);var z={activeTooltipIndex:M,isTooltipActive:!0,activeLabel:D,activePayload:$,activeCoordinate:F};this.setState(z),this.renderCursor(k),this.accessibilityManager.setIndex(M)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var _,C;this.accessibilityManager.setDetails({offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(S){qx([Sr(S.children,Or)],[Sr(this.props.children,Or)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=Sr(this.props.children,Or);if(S&&typeof S.props.shared=="boolean"){var P=S.props.shared?"axis":"item";return s.indexOf(P)>=0?P:o}return o}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var P=this.container,_=P.getBoundingClientRect(),C=yge(_),E={chartX:Math.round(S.pageX-C.left),chartY:Math.round(S.pageY-C.top)},k=_.width/P.offsetWidth||1,M=this.inRange(E.chartX,E.chartY,k);if(!M)return null;var D=this.state,$=D.xAxisMap,N=D.yAxisMap,B=this.getTooltipEventType();if(B!=="axis"&&$&&N){var L=oa($).scale,F=oa(N).scale,W=L&&L.invert?L.invert(E.chartX):null,z=F&&F.invert?F.invert(E.chartY):null;return se(se({},E),{},{xValue:W,yValue:z})}var H=lN(this.state,this.props.data,this.props.layout,M);return H?se(se({},E),H):null}},{key:"inRange",value:function(S,P){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,E=S/_,k=P/_;if(C==="horizontal"||C==="vertical"){var M=this.state.offset,D=E>=M.left&&E<=M.left+M.width&&k>=M.top&&k<=M.top+M.height;return D?{x:E,y:k}:null}var $=this.state,N=$.angleAxisMap,B=$.radiusAxisMap;if(N&&B){var L=oa(N);return _M({x:E,y:k},L)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,P=this.getTooltipEventType(),_=Sr(S,Or),C={};_&&P==="axis"&&(_.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var E=Ep(this.props,this.handleOuterEvent);return se(se({},E),C)}},{key:"addListener",value:function(){Lb.on(Bb,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Lb.removeListener(Bb,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,P,_){for(var C=this.state.formattedGraphicalItems,E=0,k=C.length;En.length?T.jsx("div",{ref:a,className:G("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(s=>T.jsxs("div",{className:"flex items-center gap-1.5",children:[!t&&T.jsx("div",{className:"size-2 shrink-0 rounded-sm",style:{backgroundColor:s.color}}),T.jsx("span",{className:"capitalize",style:{fontSize:o},children:s[i]})]},s.value))}):null);jW.displayName="ChartLegendContent";const NW=O.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:o=!1,label:a,labelFormatter:s,labelClassName:l,formatter:u,color:f,nameKey:d="name",labelKey:p},m)=>{const g=()=>{if(i||!(t!=null&&t.length))return null;const[y]=t,x=s?s(a||""):y[p]||a;return x?T.jsx("div",{className:G("font-medium",l),children:x}):null};if(!e||!(t!=null&&t.length))return null;const v=t.length===1&&r!=="dot";return T.jsxs("div",{ref:m,className:G("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[v?null:g(),T.jsx("div",{className:"grid gap-1.5",children:t.map((y,x)=>{const w=f||y.color||"#000";return T.jsxs("div",{className:G("flex w-full items-stretch gap-2",r==="dot"&&"items-center"),children:[!o&&T.jsx("div",{className:G({"size-2.5":r==="dot","w-1 h-full":r==="line","w-0 border-[0.5px] border-dashed":r==="dashed"}),style:{backgroundColor:r==="dot"||r==="line"?w:"",borderColor:r==="dashed"?w:""}}),T.jsxs("div",{className:"flex-1 flex justify-between items-center",children:[T.jsx("span",{children:y[d]||y.dataKey}),T.jsx("span",{className:"font-mono font-medium",children:u?u(y.value??""):y.value??""})]})]},y.dataKey||x)})})]})});NW.displayName="ChartTooltipContent";const BTe=({data:e,dataKeys:t=[],colors:n=[],layout:r="horizontal",stacked:i=!1,showXAxis:o=!0,showYAxis:a=!0,showTooltip:s=!0,tooltipIndicator:l="dot",tooltipLabelKey:u,showLegend:f=!1,showCartesianGrid:d=!0,tickFormatter:p,xAxisDataKey:m,yAxisDataKey:g,xAxisFontSize:v="sm",xAxisFontColor:y="#6B7280",yAxisFontColor:x="#6B7280",chartWidth:w=350,chartHeight:S=200,borderRadius:P=8,xAxisProps:_,yAxisProps:C,tooltipProps:E,activeBar:k})=>{const M=[{fill:"#7DD3FC"},{fill:"#2563EB"}],D=n.length>0?n:M,$={sm:"12px",md:"14px",lg:"16px"},N=$[v]||$.sm;return!e||e.length===0?T.jsx(Hf,{size:"sm",variant:"help",children:"No data available"}):T.jsx(nB,{width:w,height:S,children:T.jsxs(ITe,{data:e,margin:{left:14,right:14},layout:r,children:[d&&T.jsx(iy,{vertical:!1}),r==="horizontal"&&o&&T.jsx(Mo,{..._,dataKey:m,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:p,tick:{fontSize:N,fill:y}}),r==="horizontal"&&a&&T.jsx(Ri,{...C,dataKey:g,tickLine:!1,tickMargin:10,axisLine:!1,tick:{fontSize:N,fill:x}}),r==="vertical"&&T.jsxs(T.Fragment,{children:[T.jsx(Mo,{..._,type:"number",dataKey:m,hide:!0}),T.jsx(Ri,{...C,dataKey:g,type:"category",tickLine:!1,tickMargin:10,axisLine:!1,tickFormatter:p,tick:{fontSize:N,fill:x}})]}),a&&T.jsx(Ri,{dataKey:g}),s&&T.jsx(Or,{...E,content:T.jsx(NW,{indicator:l,labelKey:u})}),f&&T.jsx(wo,{content:T.jsx(jW,{fontSizeVariant:N})}),t.map((B,L)=>{var W;let F;return i?L===0?F=[0,0,4,4]:L===t.length-1?F=[4,4,0,0]:F=0:F=P,T.jsx(Bs,{dataKey:B,fill:(W=D[L])==null?void 0:W.fill,radius:F,stackId:i?"a":void 0,activeBar:k},B)})]})})},$W=O.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:o=!1,label:a,labelFormatter:s,labelClassName:l,formatter:u,color:f,nameKey:d="name",labelKey:p},m)=>{const g=()=>{if(i||!(t!=null&&t.length))return null;const[y]=t,x=s?s(a||""):y[p]||a;return x?T.jsx("div",{className:G("font-medium",l),children:x}):null};if(!e||!(t!=null&&t.length))return null;const v=t.length===1&&r!=="dot";return T.jsxs("div",{ref:m,className:G("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[v?null:g(),T.jsx("div",{className:"grid gap-1.5",children:t.map((y,x)=>{const w=f||y.color||"#000";return T.jsxs("div",{className:G("flex w-full items-stretch gap-2",r==="dot"&&"items-center"),children:[!o&&T.jsx("div",{className:G({"size-2.5 ":r==="dot","w-1 h-full":r==="line","w-0 border-[0.5px] border-dashed":r==="dashed"}),style:{backgroundColor:r==="dot"||r==="line"?w:"",borderColor:r==="dashed"?w:""}}),T.jsxs("div",{className:"flex-1 flex justify-between items-center",children:[T.jsx("span",{children:y[d]||y.dataKey}),T.jsx("span",{className:"font-mono font-medium",children:u?u(y.value??""):y.value??""})]})]},y.dataKey||x)})})]})});$W.displayName="ChartTooltipContent";const FTe=({data:e,dataKeys:t=[],colors:n=[],showXAxis:r=!0,showYAxis:i=!0,showTooltip:o=!0,tooltipIndicator:a="dot",tooltipLabelKey:s,showCartesianGrid:l=!0,tickFormatter:u,xAxisDataKey:f,yAxisDataKey:d,xAxisFontSize:p="sm",xAxisFontColor:m="#6B7280",yAxisFontColor:g="#6B7280",chartWidth:v=350,chartHeight:y=200,withDots:x=!1})=>{const w=[{stroke:"#2563EB"},{stroke:"#38BDF8"}],S=n.length>0?n:w,P={sm:"12px",md:"14px",lg:"16px"},_=P[p]||P.sm;return!e||e.length===0?T.jsx(Hf,{size:"sm",variant:"help",children:"No data available"}):T.jsxs(DTe,{width:v,height:y,data:e,margin:{left:14,right:14},children:[l&&T.jsx(iy,{vertical:!1}),r&&T.jsx(Mo,{dataKey:f,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:u,tick:{fontSize:_,fill:m}}),i&&T.jsx(Ri,{dataKey:d,tickLine:!1,axisLine:!1,tickMargin:8,tick:{fontSize:_,fill:g}}),o&&T.jsx(Or,{content:T.jsx($W,{indicator:a,labelKey:s})}),t.map((C,E)=>T.jsx(gd,{type:"natural",dataKey:C,stroke:S[E].stroke,fill:S[E].stroke,strokeWidth:2,dot:x},C))]})},DW=O.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:o=!1,label:a,labelFormatter:s,labelClassName:l,formatter:u,color:f,nameKey:d="name",labelKey:p},m)=>{const g=()=>{if(i||!(t!=null&&t.length))return null;const[y]=t,x=s?s(a||""):y[p]||a;return x?T.jsx("div",{className:G("font-medium",l),children:x}):null};if(!e||!(t!=null&&t.length))return null;const v=t.length===1&&r!=="dot";return T.jsxs("div",{ref:m,className:G("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[v?null:g(),T.jsx("div",{className:"grid gap-1.5",children:t.map((y,x)=>{var S;const w=y.color||((S=y.payload)==null?void 0:S.fill)||f||"#000";return T.jsxs("div",{className:G("flex w-full items-stretch gap-2",r==="dot"&&"items-center"),children:[!o&&T.jsx("div",{className:G({"h-2.5 w-2.5 ":r==="dot","w-1 h-full":r==="line","w-0 border-[0.5px] border-dashed":r==="dashed"}),style:{backgroundColor:r==="dot"||r==="line"?w:"",borderColor:r==="dashed"?w:""}}),T.jsxs("div",{className:"flex-1 flex justify-between items-center",children:[T.jsx("span",{children:y[d]||y.dataKey}),T.jsx("span",{className:"font-mono font-medium",children:u?u(y.value??""):y.value??""})]})]},y.dataKey||x)})})]})});DW.displayName="ChartTooltipContent";const IW=O.forwardRef(({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:i="value"},o)=>n.length?T.jsx("div",{ref:o,className:G("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(a=>T.jsxs("div",{className:"flex items-center gap-1.5",children:[!t&&T.jsx("div",{className:"h-2 w-2 shrink-0 rounded-sm",style:{backgroundColor:a.color}}),T.jsx("span",{className:"capitalize",children:a[i]})]},a.value))}):null);IW.displayName="ChartLegendContent";const WTe=({data:e,dataKey:t,type:n="simple",showTooltip:r=!0,tooltipIndicator:i="dot",tooltipLabelKey:o,label:a=!1,labelName:s="",labelNameColor:l="#6B7280",labelValue:u,showLegend:f=!1,chartWidth:d=300,pieOuterRadius:p=90,pieInnerRadius:m=60})=>{const g=n==="donut",v=p,y=g?m:0;return!e||e.length===0?T.jsx(Hf,{size:"sm",variant:"help",children:"No data available"}):T.jsxs(RTe,{width:d,height:d,children:[r&&T.jsx(Or,{content:T.jsx(DW,{indicator:i,labelKey:o})}),f&&T.jsx(wo,{content:T.jsx(IW,{})}),T.jsx(Bo,{data:e,cx:"50%",cy:"50%",innerRadius:y,outerRadius:v,dataKey:t,children:g&&a&&T.jsx(cn,{content:({viewBox:x})=>{if(x&&"cx"in x&&"cy"in x)return T.jsxs("text",{x:x.cx,y:x.cy,textAnchor:"middle",dominantBaseline:"middle",className:"space-y-3",children:[T.jsx("tspan",{x:x.cx,dy:"-4",className:"fill-foreground text-xl font-bold",children:u}),T.jsx("tspan",{x:x.cx,dy:"24",className:"text-sm",style:{fill:l},children:s})]})}})})]})},RW=O.forwardRef(({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:i="value",fontSizeVariant:o},a)=>n.length?T.jsx("div",{ref:a,className:G("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(s=>T.jsxs("div",{className:"flex items-center gap-1.5",children:[!t&&T.jsx("div",{className:"size-2 shrink-0 rounded-sm",style:{backgroundColor:s.color}}),T.jsx("span",{className:"capitalize",style:{fontSize:o},children:s[i]})]},s.value))}):null);RW.displayName="ChartLegendContent";const LW=O.forwardRef(({active:e,payload:t,className:n,indicator:r,hideLabel:i=!1,hideIndicator:o=!1,label:a,labelFormatter:s,labelClassName:l,formatter:u,color:f,nameKey:d="name",labelKey:p},m)=>{const g=O.useMemo(()=>{if(i||!(t!=null&&t.length))return null;const[y]=t,x=s?s(a||""):y[p]||a;return x?T.jsx("div",{className:G("font-medium",l),children:x}):null},[a,s,t,i,l,p]);if(!e||!(t!=null&&t.length))return null;const v=t.length===1&&r!=="dot";return T.jsxs("div",{ref:m,className:G("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[v?null:g,T.jsx("div",{className:"grid gap-1.5",children:t.map((y,x)=>{const w=f||y.color||"#000";return T.jsxs("div",{className:G("flex w-full items-stretch gap-2",r==="dot"&&"items-center"),children:[!o&&T.jsx("div",{className:G({"size-2.5":r==="dot","w-1 h-full":r==="line","w-0 border-[0.5px] border-dashed":r==="dashed"}),style:{backgroundColor:r==="dot"||r==="line"?w:"",borderColor:r==="dashed"?w:""}}),T.jsxs("div",{className:"flex-1 flex justify-between items-center",children:[T.jsx("span",{children:y[d]||y.dataKey}),T.jsx("span",{className:"font-mono font-medium",children:u?u(y.value??""):y.value??""})]})]},y.dataKey||x)})})]})});LW.displayName="ChartTooltipContent";const zTe=({data:e,dataKeys:t,colors:n=[],variant:r="solid",showXAxis:i=!0,showYAxis:o=!0,showTooltip:a=!0,tooltipIndicator:s="dot",tooltipLabelKey:l,showLegend:u=!0,showCartesianGrid:f=!0,tickFormatter:d,xAxisDataKey:p,yAxisDataKey:m,xAxisFontSize:g="sm",xAxisFontColor:v="#6B7280",chartWidth:y=350,chartHeight:x=200})=>{const[w,S]=O.useState(y),[P,_]=O.useState(x),C=[{stroke:"#2563EB",fill:"#BFDBFE"},{stroke:"#38BDF8",fill:"#BAE6FD"}],E=n.length>0?n:C;O.useEffect(()=>{S(y),_(x)},[y,x]);const k={sm:"12px",md:"14px",lg:"16px"},M=k[g]||k.sm,D=()=>T.jsx("defs",{children:E.map(($,N)=>T.jsxs("linearGradient",{id:`fill${N}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[T.jsx("stop",{offset:"5%",stopColor:$.fill,stopOpacity:.8}),T.jsx("stop",{offset:"95%",stopColor:$.fill,stopOpacity:.1})]},`gradient${N}`))});return!e||e.length===0?T.jsx(Hf,{size:"sm",variant:"help",children:"No data available"}):T.jsx(nB,{width:w,height:P,children:T.jsxs(LTe,{data:e,margin:{left:14,right:14},children:[f&&T.jsx(iy,{vertical:!1}),i&&T.jsx(Mo,{dataKey:p,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:d,tick:{fontSize:M,fill:v}}),o&&T.jsx(Ri,{dataKey:m,tickLine:!1,axisLine:!1,tickMargin:8,tick:{fontSize:M,fill:v}}),a&&T.jsx(Or,{content:T.jsx(LW,{indicator:s,labelKey:l})}),u&&T.jsx(wo,{content:T.jsx(RW,{fontSizeVariant:M})}),r==="gradient"&&D(),t.map(($,N)=>T.jsx(Na,{type:"monotone",dataKey:$,stroke:E[N%E.length].stroke,fill:r==="gradient"?`url(#fill${N})`:E[N%E.length].fill,stackId:"1"},$))]})})},BW=O.createContext(null),VTe=()=>O.useContext(BW),UTe=()=>{const{file:e,removeFile:t,isLoading:n,error:r,errorText:i}=VTe(),o=O.useMemo(()=>T.jsx("span",{className:"inline-flex self-start p-0.5",children:T.jsx(aK,{className:"size-5 text-icon-primary"})}),[e]);return e?T.jsx("div",{className:G("border border-solid border-transparent flex items-start justify-between rounded mt-2 bg-field-primary-background p-3 gap-3",r&&"border-alert-border-danger bg-alert-background-danger"),children:T.jsxs("div",{className:"flex items-center gap-3 w-full",children:[n&&o,!n&&(e.type.startsWith("image/")?T.jsx("div",{className:G("size-10 rounded-sm flex items-center justify-center shrink-0",r&&"bg-gray-200 "),children:r?T.jsx(sK,{className:"size-6 text-field-helper"}):T.jsx("img",{src:URL.createObjectURL(e),alt:"Preview",className:"w-full h-10 object-contain"})}):o),T.jsxs("div",{className:"text-left flex flex-col gap-1 w-[calc(100%_-_5.5rem)]",children:[T.jsx("span",{className:"text-sm font-medium text-field-label truncate",children:n?"Loading...":e.name}),!n&&T.jsx("span",{className:G("text-xs text-field-helper",r&&"text-support-error"),children:r?i:X8(e.size)})]}),n?T.jsx("span",{className:"inline-flex ml-auto p-0.5",children:T.jsx(Fw,{className:"inline-flex"})}):T.jsx("button",{onClick:t,className:"inline-flex cursor-pointer bg-transparent border-0 p-1 my-0 ml-auto mr-0 ring-0 focus:outline-none self-start",children:T.jsx(dK,{className:"size-4 text-support-error"})})]})}):null},FW=({onFileUpload:e,inlineIcon:t=!1,label:n="Drag and drop or browse files",helpText:r="Help Text",size:i="sm",disabled:o=!1,error:a=!1,errorText:s="Upload failed, please try again."})=>{const[l,u]=O.useState(!1),[f,d]=O.useState(null),[p,m]=O.useState(!1),g=_=>{if(o)return;u(!0),_.preventDefault(),_.stopPropagation(),m(!1);const C=_.dataTransfer.files[0];C&&(d(C),e&&e(C)),u(!1)},v=_=>{o||(_.preventDefault(),m(!0))},y=()=>{o||m(!1)},x=_=>{if(o)return;u(!0);const C=_.target.files;if(!C)return;const E=C[0];E&&(d(E),e&&e(E)),u(!1)},w=()=>{d(null)},S={sm:{label:"text-sm",helpText:"text-xs",icon:"size-5",padding:t?"p-3":"p-5",gap:"gap-2.5"},md:{label:"text-sm",helpText:"text-xs",icon:"size-5",padding:t?"p-4":"p-6",gap:"gap-3"},lg:{label:"text-base",helpText:"text-sm",icon:"size-6",padding:t?"p-4":"p-6",gap:"gap-3"}},P=O.useRef(`fui-file-upload-${jo()}`);return T.jsx(BW.Provider,{value:{file:f,removeFile:w,isLoading:l,error:a,errorText:s},children:T.jsxs("div",{children:[T.jsx("label",{htmlFor:P.current,children:T.jsxs("div",{className:G("min-w-80 cursor-pointer mx-auto border-dashed border rounded-md text-center hover:border-field-dropzone-color hover:bg-field-dropzone-background-hover focus:outline-none focus:ring focus:ring-toggle-on focus:ring-offset-2 transition duration-200 ease-in-out",p?"border-field-dropzone-color bg-field-dropzone-background-hover":"border-field-border",o&&"border-field-border bg-field-background-disabled cursor-not-allowed hover:border-field-border",S[i].padding),onDragOver:v,onDragLeave:y,onDrop:g,children:[T.jsxs("div",{className:G("flex flex-col items-center justify-center",t&&`flex-row items-start ${S[i].gap}`),children:[T.jsx("div",{children:T.jsx(iK,{className:G("text-field-dropzone-color size-6",S[i].icon,o&&"text-field-color-disabled")})}),T.jsxs("div",{className:"flex flex-col",children:[T.jsx("span",{className:G("mt-1 text-center font-medium text-field-label",t&&"text-left mt-0",S[i].label,o&&"text-field-color-disabled"),children:n}),r&&T.jsx("span",{className:G("mt-1 text-center font-medium text-field-helper",t&&"text-left",S[i].helpText,o&&"text-field-color-disabled"),children:r})]})]}),T.jsx("input",{id:P.current,type:"file",className:"sr-only",onChange:x,disabled:o})]})}),T.jsx(UTe,{})]})})};FW.displayName="Dropzone";exports.Accordion=Qte;exports.Alert=bX;exports.AreaChart=zTe;exports.Avatar=xG;exports.Badge=Kf;exports.BarChart=BTe;exports.Breadcrumb=Ta;exports.Button=Wn;exports.ButtonGroup=PG;exports.Checkbox=ON;exports.Container=w1;exports.DatePicker=Jte;exports.Dialog=Wi;exports.Drawer=Vi;exports.DropdownMenu=js;exports.Dropzone=FW;exports.EditorInput=sR;exports.Input=o$;exports.Label=Hf;exports.LineChart=FTe;exports.Loader=Fw;exports.Menu=$o;exports.Pagination=Ns;exports.PieChart=WTe;exports.ProgressBar=SG;exports.ProgressSteps=lR;exports.RadioButton=vG;exports.SearchBox=zi;exports.Select=Xf;exports.Sidebar=tQ;exports.Skeleton=eQ;exports.Switch=Ow;exports.Tabs=rg;exports.TextArea=i$;exports.Title=_G;exports.Toaster=aX;exports.Tooltip=Bw;exports.Topbar=xu;exports.toast=nX; diff --git a/dist/force-ui.d.ts b/dist/force-ui.d.ts new file mode 100644 index 00000000..19d082f7 --- /dev/null +++ b/dist/force-ui.d.ts @@ -0,0 +1,2510 @@ +/// + +import { AriaAttributes } from 'react'; +import { BarProps } from 'recharts'; +import { Boundary } from '@floating-ui/react'; +import { default as default_2 } from 'react'; +import { EditorState } from 'lexical'; +import { ElementType } from 'react'; +import { FloatingPortalProps } from '@floating-ui/react'; +import { ForwardRefExoticComponent } from 'react'; +import { JSX as JSX_2 } from 'react/jsx-runtime'; +import { LexicalEditor } from 'lexical'; +import { NamedExoticComponent } from 'react'; +import { OffsetOptions } from '@floating-ui/react'; +import { ReactElement } from 'react'; +import { ReactNode } from 'react'; +import { RefAttributes } from 'react'; + +export declare const Accordion: { + ({ type, defaultValue, autoClose, disabled, children, className, }: AccordionProps): JSX_2.Element; + displayName: string; +} & { + Item: { + ({ isOpen, onToggle, type, disabled, children, className, }: AccordionItemProps): JSX_2.Element; + displayName: string; + }; + Trigger: { + ({ onToggle, isOpen, iconType, disabled, tag, type, children, className, ...props }: AccordionTriggerProps): JSX_2.Element; + displayName: string; + }; + Content: { + ({ isOpen, disabled, type, children, className, }: AccordionContentProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface AccordionContentProps extends CommonProps_4 { + /** Determines if the content is open */ + isOpen?: boolean; + /** Accordion type (same as parent) */ + type?: 'simple' | 'separator' | 'boxed'; +} + +/** + * Props for an AccordionItem component. + */ +declare interface AccordionItemProps extends CommonProps_4 { + /** Determines if the item is open */ + isOpen?: boolean; + /** Callback to toggle the item's state */ + onToggle?: () => void; + /** Accordion type (same as parent) */ + type?: 'simple' | 'separator' | 'boxed'; + /** The value associated with the accordion item */ + value?: string; +} + +declare interface AccordionProps extends CommonProps_4 { + /** Type of accordion: 'simple', 'separator', or 'boxed' */ + type?: 'simple' | 'separator' | 'boxed'; + /** Initial active item(s) */ + defaultValue?: string | string[]; + /** Automatically close other items when one is opened */ + autoClose?: boolean; +} + +declare interface AccordionTriggerProps extends CommonProps_4 { + /** Callback for toggling item state */ + onToggle?: () => void; + /** Indicates if the item is open */ + isOpen?: boolean; + /** Type of icon to display */ + iconType?: 'arrow' | 'plus-minus'; + /** Element to render trigger as */ + tag?: ElementType; + /** Accordion type (same as parent) */ + type?: 'simple' | 'separator' | 'boxed'; +} + +declare interface AdditionalProps { + /** Additional props */ + [key: string]: unknown; +} + +export declare const Alert: ({ design, theme, variant, className, title, content, icon, onClose, action, }: AlertProps) => JSX.Element; + +declare interface AlertProps { + /** Defines the style variant of the alert. */ + variant?: 'neutral' | 'info' | 'warning' | 'error' | 'success'; + /** Defines the theme of the alert. */ + theme?: 'light' | 'dark'; + /** Defines the design of the alert. */ + design?: 'inline' | 'stack'; + /** Defines the title of the alert. */ + title?: React.ReactNode; + /** Defines the content of the alert. */ + content?: React.ReactNode; + /** Defines the extra classes. */ + className?: string; + /** Callback function for close event. */ + onClose?: () => void; + /** Custom Icon for the alert. */ + icon?: React.ReactElement | null; + /** Defines the action of the alert. */ + action?: { + label: string; + onClick: (close: () => void) => void; + type: 'link' | 'button'; + }; +} + +export declare const AreaChart: ({ data, dataKeys, colors, variant, showXAxis, showYAxis, showTooltip, tooltipIndicator, tooltipLabelKey, showLegend, showCartesianGrid, tickFormatter, xAxisDataKey, yAxisDataKey, xAxisFontSize, xAxisFontColor, chartWidth, chartHeight, }: AreaChartProps) => JSX_2.Element; + +declare interface AreaChartProps { + /** An array of objects representing the source data for the chart. */ + data: DataItem_4[]; + /** An array of strings representing the keys to access data in each data object. Used for identifying different data series. */ + dataKeys: string[]; + /** An array of color strings that determine the colors for each data series in the chart. */ + colors?: Color_3[]; + /** Defines the variant of Area Chart. */ + variant?: 'solid' | 'gradient'; + /** Whether to render the `` component for the x-axis. */ + showXAxis?: boolean; + /** Whether to render the `` component for the y-axis. */ + showYAxis?: boolean; + /** Toggle the visibility of the tooltip on hover, displaying detailed information for each data point. */ + showTooltip?: boolean; + /** The tooltip indicator. It can be `dot`, `line` or `dashed`. */ + tooltipIndicator?: 'dot' | 'line' | 'dashed'; + /** An array of objects representing the source data for the chart. */ + tooltipLabelKey?: string; + /** Whether to render the `` component to identify data series. */ + showLegend?: boolean; + /** Whether to display the ``, adding horizontal and vertical grid lines. */ + showCartesianGrid?: boolean; + /** A function used to format the ticks on the axes, e.g., for formatting dates or numbers. */ + tickFormatter?: (value: string) => string; + /** The key in the data objects representing values for the x-axis. This is used to access the x-axis values from each data entry. */ + xAxisDataKey?: string; + /** The key in the data objects representing values for the y-axis. This is used to access the y-axis values from each data entry. */ + yAxisDataKey?: string; + /** Font size for the labels on the x-axis. */ + xAxisFontSize?: 'sm' | 'md' | 'lg'; + /** Font color for the labels on the x-axis. */ + xAxisFontColor?: string; + /** Width of the chart container. */ + chartWidth?: number; + /** Height of the chart container. */ + chartHeight?: number; +} + +export declare const Avatar: default_2.ForwardRefExoticComponent<{ + /** Defines the style variant of the avatar. */ + variant?: "primary" | "dark" | "gray" | "white" | "primary-light" | undefined; + /** Defines the size of the avatar. */ + size?: "xs" | "sm" | "md" | "lg" | "xxs" | undefined; + /** Defines the border of the avatar. */ + border?: "none" | "subtle" | "ring" | undefined; + /** The URL of the Avatar image */ + url?: string | undefined; + /** Defines the children of the avatar. */ + children?: ReactNode; + /** Defines the extra classes */ + className?: string | undefined; + /** The URL of the Avatar image. */ + src?: string | undefined; + /** Alt text for the avatar image. */ + alt?: string | undefined; +} & Pick, "title"> & default_2.RefAttributes>; + +export declare const Badge: ForwardRefExoticComponent>; + +declare interface BadgeProps { + /** + * Defines the Label of the badge. + */ + label?: string; + /** + * Defines the size of the badge. + */ + size?: 'xxs' | 'xs' | 'sm' | 'md' | 'lg'; + /** + * Defines the extra classes + */ + className?: string; + /** + * Defines the type of the badge. + */ + type?: 'pill' | 'rounded'; + /** + * Defines the style variant of the badge. + */ + variant?: 'neutral' | 'red' | 'yellow' | 'green' | 'blue' | 'inverse'; + /** + * Custom Icon for the badge. + */ + icon?: ReactNode; + /** + * Defines if the badge is disabled. + */ + disabled?: boolean; + /** + * Callback function for close event + */ + onClose?: (event: React.MouseEvent) => void; + /** + * Defines if the badge is closable. + */ + closable?: boolean; + /** + * Callback function for mouse down event. + */ + onMouseDown?: () => void; +} + +export declare const BarChart: ({ data, dataKeys, colors, layout, stacked, showXAxis, showYAxis, showTooltip, tooltipIndicator, tooltipLabelKey, showLegend, showCartesianGrid, tickFormatter, xAxisDataKey, yAxisDataKey, xAxisFontSize, xAxisFontColor, yAxisFontColor, chartWidth, chartHeight, borderRadius, xAxisProps, yAxisProps, tooltipProps, activeBar, }: BarChartProps) => JSX_2.Element; + +declare interface BarChartProps { + /** An array of objects representing the source data for the chart. */ + data: DataItem[]; + /** An array of strings representing the keys to access data in each data object. Used for identifying different data series. */ + dataKeys: string[]; + /** An array of color strings that determine the colors for each data series in the chart. */ + colors?: Color[]; + /** Defines the layout of Bar Chart. if you want to check how layout `vertical` works, then you need to clear the xAxisDataKey value and set showCartesianGrid to false. */ + layout?: 'horizontal' | 'vertical'; + /** Defines are the chart bars are stacked. */ + stacked?: boolean; + /** Whether to render the `` component for the x-axis. */ + showXAxis?: boolean; + /** Whether to render the `` component for the y-axis. */ + showYAxis?: boolean; + /** Toggle the visibility of the tooltip on hover, displaying detailed information for each data point. */ + showTooltip?: boolean; + /** The tooltip indicator. It can be `dot`, `line` or `dashed`. */ + tooltipIndicator?: 'dot' | 'line' | 'dashed'; + /** Present tooltip lable key. E.g. for this data element: `{ month: 'January', desktop: 186, mobile: 80 }` if set lableKye to 'month' the tooltip will display the month name (like 'January'). */ + tooltipLabelKey?: string; + /** Whether to render the `` component to identify data series. */ + showLegend?: boolean; + /** Whether to display the ``, adding horizontal and vertical grid lines. */ + showCartesianGrid?: boolean; + /** A function used to format the ticks on the axes, e.g., ```const monthFormatter = ( value: string ) => value.slice( 0, 3 );``` */ + tickFormatter?: (value: string) => string; + /** The key in the data objects representing values for the x-axis. This is used to access the x-axis values from each data entry. */ + xAxisDataKey?: string; + /** The key in the data objects representing values for the y-axis. This is used to access the y-axis values from each data entry. */ + yAxisDataKey?: string; + /** Font size for the labels on the x-axis. */ + xAxisFontSize?: 'sm' | 'md' | 'lg'; + /** Font color for the labels on the x-axis. */ + xAxisFontColor?: string; + /** Font color for the labels on the y-axis. */ + yAxisFontColor?: string; + /** Width of the chart container. */ + chartWidth?: number; + /** Height of the chart container. */ + chartHeight?: number; + /** Border radius of chart bar. */ + borderRadius?: number; + /** + * xAxis related props. + * + * @see https://recharts.org/en-US/api/XAxis + */ + xAxisProps?: Record; + /** + * yAxis related props. + * + * @see https://recharts.org/en-US/api/YAxis + */ + yAxisProps?: Record; + /** + * Tooltip related props. + * + * @see https://recharts.org/en-US/api/Tooltip + */ + tooltipProps?: Record; + /** + * Active bar index. + * + * @see https://recharts.org/en-US/api/Bar#activeBar + */ + activeBar?: BarProps['activeBar']; +} + +declare interface BaseMenuProps { + /** Additional CSS classes for the component. */ + className?: string; +} + +declare interface BaseSearchBoxProps { + /** Additional class names for styling. */ + className?: string; + /** Size of the SearchBox. */ + size?: 'sm' | 'md' | 'lg'; + /** Whether the dropdown is open. */ + open?: boolean; + /** Callback when dropdown state changes. */ + onOpenChange?: (open: boolean) => void; + /** Whether to show loading state. */ + loading?: boolean; + /** Child components to be rendered. */ + children?: ReactNode; +} + +export declare const Breadcrumb: { + ({ children, size }: BreadcrumbProps): JSX_2.Element; + displayName: string; + List: { + ({ children }: BreadcrumbCommonProps): JSX_2.Element; + displayName: string; + }; + Item: { + ({ children }: BreadcrumbCommonProps): JSX_2.Element; + displayName: string; + }; + Link: { + ({ href, children, className, as: AsElement, ...props }: BreadcrumbLinkProps): JSX_2.Element; + displayName: string; + }; + Separator: { + ({ type }: BreadcrumbSeparatorProps): JSX_2.Element; + displayName: string; + }; + Ellipsis: { + (): JSX_2.Element; + displayName: string; + }; + Page: { + ({ children }: BreadcrumbCommonProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface BreadcrumbCommonProps { + /** Defines the children of the breadcrumb. */ + children: ReactNode; +} + +declare interface BreadcrumbLinkProps extends BreadcrumbCommonProps { + /** Defines the href of the link. */ + href: string; + /** Defines the class name of the link. */ + className?: string; + /** Defines the element type of the link. */ + as?: ElementType; +} + +declare interface BreadcrumbProps extends BreadcrumbCommonProps { + /** Defines the size of the breadcrumb. */ + size?: 'sm' | 'md'; +} + +declare interface BreadcrumbSeparatorProps { + /** + * Defines the type of separator. + * + * Available options: + * - arrow + * - slash + */ + type: 'arrow' | 'slash'; +} + +export declare const Button: default_2.FunctionComponent; + +export declare const ButtonGroup: { + Group: ({ children, activeItem, onChange, className, size, iconPosition, }: ButtonGroupProps) => JSX_2.Element; + Button: default_2.ForwardRefExoticComponent>; +}; + +/** Props for the ButtonGroup component. */ +declare interface ButtonGroupProps extends CommonProps { + /** Child elements, typically Button components. */ + children: ReactNode; + /** Active item slug in the group. */ + activeItem?: string | null; + /** Callback when the active item changes. */ + onChange?: (value: ButtonValue) => void; + /** Size of the buttons in the group. */ + size?: 'xs' | 'sm' | 'md'; + /** Position of the icon inside the button. */ + iconPosition?: 'left' | 'right'; +} + +declare interface ButtonProps { + /** + * Defines the style variant of the button. + */ + variant?: 'primary' | 'secondary' | 'outline' | 'ghost' | 'link'; + /** + * Defines the size of the button. + */ + size?: 'xs' | 'sm' | 'md' | 'lg'; + /** + * Defines the type of the button. + */ + type?: 'button' | 'submit' | 'reset'; + /** + * Defines the tag of the button. + */ + tag?: ElementType; + /** + * The class name of the button + */ + className?: string; + /** + * The children of the button + */ + children?: ReactNode; + /** + * Defines if the button is disabled. + */ + disabled?: boolean; + /** + * Defines if the button is destructive. + */ + destructive?: boolean; + /** + * Custom Icon for the button. + */ + icon?: ReactNode; + /** + * Defines the position of the icon. + */ + iconPosition?: 'left' | 'right'; + /** + * Defines if the button is loading. + */ + loading?: boolean; + /** On click event. */ + onClick?: (event: default_2.MouseEvent) => void; +} + +/** Props for the Button component. */ +declare interface ButtonProps_2 extends CommonProps { + /** Unique slug identifying the button. */ + slug: string; + /** Text content of the button. */ + text: string; + /** Icon displayed inside the button. */ + icon?: ReactElement; + /** Marks the button as disabled. */ + disabled?: boolean; + /** Indicates if the button is the first child in the group. */ + isFirstChild?: boolean; + /** Indicates if the button is the last child in the group. */ + isLastChild?: boolean; +} + +/** Type for the value passed to the onChange callback. */ +declare interface ButtonValue { + event: default_2.MouseEvent; + value: { + slug: string; + text: string; + }; +} + +export declare const Checkbox: ForwardRefExoticComponent>; + +declare interface CheckboxProps { + /** Defines the content associated with the checkbox. */ + label?: { + heading?: string; + description?: string; + } | undefined; + /** ID of the checkbox input. */ + id?: string; + /** Default checked state (uncontrolled). */ + defaultChecked?: boolean; + /** Controlled checked state. */ + checked?: boolean; + /** Change event handler. */ + onChange?: (checked: boolean) => void; + /** If true, renders indeterminate state. */ + indeterminate?: boolean; + /** If true, disables the checkbox. */ + disabled?: boolean; + /** Size of the checkbox (sm or md). */ + size?: 'sm' | 'md'; + /** Custom className for the checkbox. */ + className?: string; +} + +declare interface Color { + fill: string; +} + +declare interface Color_2 { + stroke: string; +} + +declare interface Color_3 { + stroke: string; + fill: string; +} + +/** Defines the common props shared by components. */ +declare interface CommonProps { + /** Additional class names for styling. */ + className?: string; +} + +declare interface CommonProps_2 { + /** Additional class name. */ + className?: string; + /** Additional inline styles. */ + style?: React.CSSProperties; +} + +declare interface CommonProps_3 { + /** Additional class names. */ + className?: string; + /** Additional props. */ + [key: string]: unknown; +} + +declare interface CommonProps_4 { + /** Custom class names for additional styling */ + className?: string; + /** Disables the component */ + disabled?: boolean; + /** Children components */ + children: ReactNode; +} + +export declare const Container: { + ({ containerType, gap, gapX, gapY, direction, justify, align, wrap, cols, className, children, ...extraProps }: FlexContainerProps & GridContainerProps): JSX_2.Element; + Item: { + ({ grow, shrink, order, alignSelf, justifySelf, className, children, ...props }: FlexItemProps & GridItemProps): JSX_2.Element; + displayName: string; + }; + displayName: string; +}; + +declare interface ContainerCommonProps extends ContainerCoreCommonProps { + /** + * Defines the number of columns (if using a grid container). + * + * For responsive columns, use an object with screen sizes as keys and column values as values. + * Example: `{ sm: 1, md: 2, lg: 3 }` + */ + cols?: TCols; + /** + * Gap between container items. This will apply gap in both horizontal and vertical directions. + * + * For responsive gap, use an object with screen sizes as keys and gap values as values. + * Example: `{ sm: 'sm', md: 'md', lg: 'lg' }` + */ + gap?: TGap; + /** + * Horizontal gap between container items. Use when need to apply gap only in horizontal direction. + * + * For responsive horizontal gap, use an object with screen sizes as keys and gap values as values. + * Example: `{ sm: 'sm', md: 'md', lg: 'lg' }` + */ + gapX?: TGap; + /** + * Vertical gap between container items. Use when need to apply gap only in vertical direction. + * + * For responsive vertical gap, use an object with screen sizes as keys and gap values as values. + * Example: `{ sm: 'sm', md: 'md', lg: 'lg' }` + */ + gapY?: TGap; + /** + * Alignment of container items along the cross axis. + * + * For responsive alignment, use an object with screen sizes as keys and alignment values as values. + * Example: `{ sm: 'start', md: 'center', lg: 'end' }` + */ + align?: TAlign; + /** + * Justification of container items along the main axis. + * + * For responsive justification, use an object with screen sizes as keys and justification values as values. + * Example: `{ sm: 'start', md: 'center', lg: 'end' }` + */ + justify?: TJustify; +} + +declare interface ContainerCoreCommonProps { + /** Defines any additional CSS classes for the container. */ + className?: string; + /** Defines the children of the container. */ + children?: ReactNode; +} + +declare interface DataItem { + [key: string]: number | string; +} + +declare interface DataItem_2 { + [key: string]: number | string; +} + +declare interface DataItem_3 { + [key: string]: number | string; +} + +declare interface DataItem_4 { + [key: string]: number | string; +} + +export declare const DatePicker: ({ selectionType, variant, presets: customPresets, onCancel, onApply, onDateSelect, applyButtonText, cancelButtonText, showOutsideDays, isFooter, ...props }: DatePickerProps) => JSX_2.Element | undefined; + +declare interface DatePickerProps { + /** Defines the selection selectionType of the date picker: single, range, or multiple dates. */ + selectionType?: 'single' | 'range' | 'multiple'; + /** Defines the variant of the date picker: normal, dualdate, or presets. */ + variant?: 'normal' | 'dualdate' | 'presets'; + /** An array of custom presets. */ + presets?: { + label: string; + range: { + from: Date; + to: Date; + }; + }[]; + /** Callback function to be executed when the cancel button is clicked. */ + onCancel?: () => void; + /** Callback function to be executed when the apply button is clicked. */ + onApply?: (selectedDates: Date | { + from: Date; + to: Date; + } | Date[]) => void; + /** Callback function to be executed when a date is selected. */ + onDateSelect?: (date: Date | Date[] | TDateRange | null) => void; + /** Text displayed on the Apply button. */ + applyButtonText?: string; + /** Text displayed on the Cancel button. */ + cancelButtonText?: string; + /** Show or hide days outside of the current month. */ + showOutsideDays?: boolean; + /** Show or hide the footer. */ + isFooter?: boolean; +} + +export declare const Dialog: { + ({ open, setOpen, children, trigger, className, exitOnClickOutside, exitOnEsc, design, scrollLock, }: DialogProps): JSX.Element; + displayName: string; + Panel: { + ({ children, className, }: DialogPanelProps): JSX.Element; + displayName: string; + }; + Title: { + ({ children, as: Tag, className, ...props }: DialogTitleProp): JSX.Element; + displayName: string; + }; + Description: { + ({ children, as: Tag, className, ...props }: DialogDescriptionProp): JSX.Element; + displayName: string; + }; + CloseButton: { + ({ children, as: Tag, ...props }: DialogCloseButtonProps): JSX.Element | ReactNode; + displayName: string; + }; + Header: { + ({ children, className, ...props }: DialogHeaderProps): JSX.Element; + displayName: string; + }; + Body: { + ({ children, className, ...props }: DialogBodyProps): JSX.Element; + displayName: string; + }; + Footer: { + ({ children, className, }: DialogFooterProps): JSX.Element; + displayName: string; + }; + Backdrop: { + ({ className, ...props }: CommonProps_2): JSX.Element | null; + displayName: string; + }; +}; + +declare interface DialogBodyProps extends CommonProps_2 { + /** Children of the dialog body. */ + children: ReactNode; +} + +declare interface DialogCloseButtonProps extends CommonProps_2 { + /** Children of the dialog close button. */ + children?: ReactNode; + /** Additional class name for the dialog close button. */ + as?: ElementType; + /** Additional class name for the dialog close button. */ + className?: string; + /** Additional props based on the as value. */ + [key: string]: unknown; +} + +declare interface DialogDescriptionProp extends CommonProps_2 { + /** Children of the dialog description. */ + children: ReactNode; + /** Additional class name for the dialog description. */ + as?: ElementType; +} + +declare interface DialogFooterProps extends CommonProps_2 { + /** Children of the dialog footer. */ + children?: ReactNode | ((props: { + close: () => void; + }) => ReactNode); +} + +declare interface DialogHeaderProps extends CommonProps_2 { + /** Children of the dialog header. */ + children: ReactNode; +} + +declare interface DialogPanelProps extends CommonProps_2 { + /** Children of the dialog panel. */ + children: ReactNode | ((param: { + close: () => void; + }) => ReactNode); +} + +declare interface DialogProps extends CommonProps_2 { + /** Control the dialog open state. If not provided, the dialog will be controlled internally. */ + open?: boolean; + /** Control the dialog open state. If not provided, the dialog will be controlled internally. */ + setOpen?: (open: boolean) => void; + /** Children of the dialog. */ + children: ReactNode; + /** Trigger element for the dialog. */ + trigger?: ReactNode | ((props: { + onClick: () => void; + }) => React.ReactElement); + /** Close the dialog on clicking outside the dialog. */ + exitOnClickOutside?: boolean; + /** Close the dialog on pressing the escape key. */ + exitOnEsc?: boolean; + /** Design of the dialog. */ + design?: 'simple' | 'footer-divided'; + /** Lock the scroll when the dialog is open. */ + scrollLock?: boolean; +} + +declare interface DialogTitleProp extends CommonProps_2 { + /** Children of the dialog title. */ + children: ReactNode; + /** Additional class name for the dialog title. */ + as?: ElementType; +} + +export declare const Drawer: { + ({ open, setOpen, children, trigger, className, exitOnClickOutside, exitOnEsc, design, position, transitionDuration, scrollLock, }: DrawerProps): JSX_2.Element; + displayName: string; + Panel: { + ({ children, className }: DrawerPanelProps): JSX_2.Element; + displayName: string; + }; + Header: { + ({ children, className, ...props }: DrawerHeaderProps): JSX_2.Element; + displayName: string; + }; + Title: { + ({ children, as: Tag, className, ...props }: DrawerTitleProps): JSX_2.Element; + displayName: string; + }; + Description: { + ({ children, as: Tag, className, ...props }: DrawerDescriptionProps): JSX_2.Element; + displayName: string; + }; + Body: { + ({ children, className, ...props }: DrawerBodyProps): JSX_2.Element; + displayName: string; + }; + CloseButton: { + ({ children, as: Tag, ...props }: DrawerCloseButtonProps): string | number | boolean | Iterable | JSX_2.Element | null | undefined; + displayName: string; + }; + Footer: { + ({ children, className }: DrawerFooterProps): JSX_2.Element; + displayName: string; /** Trigger element to open the drawer. Required for uncontrolled component. */ + }; + Backdrop: { + ({ className, ...props }: DrawerBackdropProps): default_2.ReactPortal | null; + displayName: string; + }; +}; + +declare interface DrawerBackdropProps { + /** Additional class names. */ + className?: string; + /** Additional props. */ + [key: string]: unknown; +} + +declare interface DrawerBodyProps { + /** Body content. */ + children: ReactNode; + /** Additional class names. */ + className?: string; + /** Additional props. */ + [key: string]: unknown; +} + +declare interface DrawerCloseButtonProps extends CommonProps_3 { + /** Button content. */ + children?: ReactNode | (({ close }: { + close: () => void; + }) => ReactNode); + /** Button tag. */ + as?: ElementType; +} + +declare interface DrawerDescriptionProps { + /** Description tag. */ + as?: ElementType; + /** Description content. */ + children: ReactNode; + /** Additional class names. */ + className?: string; + /** Additional props. */ + [key: string]: unknown; +} + +declare interface DrawerFooterProps { + /** Footer content. */ + children: ReactNode | (({ close }: { + close: () => void; + }) => ReactNode); + /** Additional class names. */ + className?: string; +} + +declare interface DrawerHeaderProps { + /** Header content. */ + children: ReactNode; + /** Additional class names. */ + className?: string; + /** Additional props. */ + [key: string]: unknown; +} + +declare interface DrawerPanelProps { + /** Drawer content. */ + children: ReactNode | ((props: { + close: () => void; + }) => ReactNode); + /** Additional class names. */ + className?: string; +} + +declare interface DrawerProps { + /** Open state of the drawer. Optional for uncontrolled component. */ + open?: boolean; + /** Set open state of the drawer. Optional for uncontrolled component. */ + setOpen?: (open: boolean) => void; + /** Drawer content. */ + children: ReactNode; + /** Trigger element to open the drawer. Required for uncontrolled component. */ + trigger?: ReactNode | ((props: { + onClick: () => void; + }) => ReactNode); + /** Additional class names. */ + className?: string; + /** Close drawer when clicking outside of the drawer. */ + exitOnClickOutside?: boolean; + /** Close drawer when pressing the escape key. */ + exitOnEsc?: boolean; + /** Design of the drawer. */ + design?: 'simple' | 'footer-divided'; + /** Position of the drawer. */ + position?: 'left' | 'right'; + /** Duration of the drawer transition. */ + transitionDuration?: number; + /** Lock the scroll when the drawer is open. */ + scrollLock?: boolean; +} + +declare interface DrawerTitleProps { + /** Title content. */ + children: ReactNode; + /** HTML element to render. */ + as?: ElementType; + /** Additional class names. */ + className?: string; +} + +declare interface DropdownCommonProps { + /** Children of the component */ + children: ReactNode; + /** Additional class name */ + className?: string; +} + +export declare const DropdownMenu: { + ({ placement, offset: offsetValue, boundary, dropdownPortalRoot, dropdownPortalId, children, className, }: DropdownMenuProps): JSX_2.Element; + displayName: string; + Trigger: default_2.ForwardRefExoticComponent>; + Content: { + ({ children, className, ...props }: DropdownCommonProps & AdditionalProps): JSX_2.Element; + displayName: string; + }; + List: { + (props: DropdownMenuListProps): JSX_2.Element; + displayName: string; + }; + Item: default_2.FC; + Separator: { + (props: DropdownMenuSeparatorProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface DropdownMenuItemProps { + /** Content of the dropdown menu item. */ + children: ReactNode; + /** Tag of the dropdown menu item. Use your custom component or HTML tag if needed instead of the default `li`. */ + as?: ElementType; + /** Click handler. */ + onClick?: () => void; + /** Additional class name. */ + className?: string; +} + +declare type DropdownMenuListProps = MenuListProps; + +declare interface DropdownMenuProps extends DropdownCommonProps { + /** Defines the position of the dropdown menu. */ + placement?: 'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end'; + /** Defines the offset of the dropdown menu. */ + offset?: OffsetOptions; + /** Defines the boundary of the dropdown menu. */ + boundary?: Boundary; + /** Defines the trigger element of the dropdown menu. */ + dropdownPortalRoot?: FloatingPortalProps['root']; + /** Defines the trigger element of the dropdown menu. */ + dropdownPortalId?: FloatingPortalProps['id']; + /** Additional class name */ + className?: string; +} + +declare type DropdownMenuSeparatorProps = MenuSeparatorProps; + +export declare const Dropzone: { + ({ onFileUpload, inlineIcon, label, helpText, size, disabled, error, errorText, }: DropzoneProps): JSX_2.Element; + displayName: string; +}; + +declare interface DropzoneProps { + /** Callback function when a file is uploaded */ + onFileUpload?: (file: File) => void; + /** Determines if the icon should be inline */ + inlineIcon?: boolean; + /** Label for the dropzone */ + label?: string; + /** Help text for the dropzone */ + helpText?: string; + /** Size variant of the dropzone */ + size?: 'sm' | 'md' | 'lg'; + /** Indicates if the component is disabled */ + disabled?: boolean; + /** Indicates if the component is in error state */ + error?: boolean; + /** Error text to display */ + errorText?: string; +} + +declare const EditorCombobox: { + ({ size, className, children }: EditorComboboxProps): JSX_2.Element; + displayName: string; + Item: ForwardRefExoticComponent>; +}; + +declare interface EditorComboboxItemProps extends React.HTMLAttributes { + /** The size of the combobox item. */ + size: 'sm' | 'md' | 'lg'; + /** The class name of the combobox item. */ + className?: string; + /** The children of the combobox item. */ + children: ReactNode; + /** Whether the combobox item is selected. */ + selected?: boolean; +} + +declare interface EditorComboboxProps { + /** The size of the combobox. */ + size: 'sm' | 'md' | 'lg'; + /** The class name of the combobox. */ + className?: string; + /** The children of the combobox. */ + children: ReactNode; +} + +export declare const EditorInput: ForwardRefExoticComponent & RefAttributes>; + +declare const editorInputClassNames: { + sm: string; + md: string; + lg: string; +}; + +declare interface EditorInputProps { + /** Default value for the editor input field. */ + defaultValue?: string; + /** Placeholder text for the editor input field. */ + placeholder?: string; + /** Callback function that is called when the value of the input changes. The function receives the updated value as an argument. */ + onChange?: (editorState: EditorState, editor: LexicalEditor) => void; + /** Defines the sizes of the editor input. */ + size?: keyof typeof editorInputClassNames; + /** Defines if the editor input is focused automatically. */ + autoFocus?: boolean; + /** Array of options to be displayed in the editor input. Each option should be an object or string. */ + options: T[]; + /** The key to be used to display the label of the option in the editor input and in the editor after selecting any mention/tag option. */ + by?: T extends Record ? keyof T : string; + /** The trigger to be used to show the mention options. */ + trigger?: string; + /** The component to be used for the mention menu. */ + menuComponent?: TMenuComponent; + /** The component to be used for the mention menu items. */ + menuItemComponent?: TMenuItemComponent; + /** Additional class names to be added to the editor input. */ + className?: string; + /** Additional class names to be added to the editor input wrapper. */ + wrapperClassName?: string; + /** Defines if the editor input is disabled. */ + disabled?: boolean; + /** Defines if the editor input should add a space after selecting a mention/tag option. */ + autoSpaceAfterMention?: boolean; +} + +declare interface FlexContainerProps extends ContainerCommonProps { + /** Defines the type of the container (default: 'flex'). */ + containerType?: TContainerType; + /** + * Defines the flex direction of the container. + * + * For responsive direction, use an object with screen sizes as keys and direction values as values. + * Example: `{ sm: 'row', md: 'column', lg: 'row-reverse' }` + */ + direction?: TDirection; + /** + * Defines the wrapping behavior of child elements. + * + * For responsive wrap, use an object with screen sizes as keys and wrap values as values. + * Example: `{ sm: 'nowrap', md: 'wrap', lg: 'wrap-reverse' }` + */ + wrap?: TWrap; +} + +declare interface FlexItemProps extends ContainerCoreCommonProps { + /** + * Defines how much the item will grow relative to others. `(For Flex container only.)` + * + * For responsive grow, use an object with screen sizes as keys and grow values as values. + * Example: `{ sm: 1, md: 2, lg: 3 }` + */ + grow?: 0 | 1; + /** + * Defines how much the item will shrink relative to others. `(For Flex container only.)` + * + * For responsive shrink, use an object with screen sizes as keys and shrink values as values. + * Example: `{ sm: 1, md: 2, lg: 3 }` + */ + shrink?: 0 | 1; + /** + * Defines the order of the item in the container. `(For Flex container only.)` + * + * For responsive order, use an object with screen sizes as keys and order values as values. + * Example: `{ sm: 1, md: 2, lg: 3 }` + */ + order?: TRange | 'first' | 'last' | 'none'; + /** + * Defines the alignment of the item along the cross axis. `(For Flex container only.)` + * + * For responsive alignment, use an object with screen sizes as keys and alignment values as values. + * Example: `{ sm: 'start', md: 'center', lg: 'end' }` + */ + alignSelf?: TAlignSelf; + /** + * Defines the justification of the item along the main axis. `(For Flex container only.)` + * + * For responsive justification, use an object with screen sizes as keys and justification values as values. + * Example: `{ sm: 'start', md: 'center', lg: 'end' }` + */ + justifySelf?: TJustifySelf; +} + +declare interface GridContainerProps extends ContainerCommonProps { + /** + * CSS grid-flow property. + * + * For responsive grid flow, use an object with screen sizes as keys and flow values as values. + * Example: `{ sm: 'row', md: 'column', lg: 'row-dense' }` + */ + gridFlow?: TFlow; + /** + * Enables subgrid columns. + * + * For responsive subgrid columns, use an object with screen sizes as keys and boolean values as values. + * Example: `{ sm: true, md: false, lg: true }` + */ + colsSubGrid?: boolean; + /** + * Enables subgrid rows. + * + * For responsive subgrid rows, use an object with screen sizes as keys and boolean values as values. + * Example: `{ sm: true, md: false, lg: true }` + */ + rowsSubGrid?: boolean; + /** + * Enables auto rows. + * + * For responsive auto rows, use an object with screen sizes as keys and boolean values as values. + * Example: `{ sm: true, md: false, lg: true }` + */ + autoRows?: boolean; + /** + * Enables auto columns. + * + * For responsive auto columns, use an object with screen sizes as keys and boolean values as values. + * Example: `{ sm: true, md: false, lg: true }` + */ + autoCols?: boolean; +} + +declare interface GridItemProps extends ContainerCoreCommonProps { + /** + * Column span for the item. `(For Grid container only.)` + * + * For responsive column span, use an object with screen sizes as keys and column span values as values. + * Example: `{ sm: 1, md: 2, lg: 3 }` + */ + colSpan?: TRange; + /** + * Starting column for the item. `(For Grid container only.)` + * + * For responsive column start, use an object with screen sizes as keys and column start values as values. + * Example: `{ sm: 1, md: 2, lg: 3 }` + */ + colStart?: TRange; + /** + * Alignment along the cross axis. `(For Grid container only.)` + * + * For responsive alignment, use an object with screen sizes as keys and alignment values as values. + * Example: `{ sm: 'start', md: 'center', lg: 'end' }` + */ + alignSelf?: TAlignSelf; + /** + * Justification along the main axis. `(For Grid container only.)` + * + * For responsive justification, use an object with screen sizes as keys and justification values as values. + * Example: `{ sm: 'start', md: 'center', lg: 'end' }` + */ + justifySelf?: TJustifySelf; +} + +export declare const Input: default_2.ForwardRefExoticComponent, "size" | "prefix"> & default_2.RefAttributes>; + +declare interface InputProps { + /** Unique identifier for the input element. */ + id?: string; + /** Specifies the type of the input element (e.g., text, file). */ + type?: 'text' | 'password' | 'email' | 'file'; + /** Initial value of the input element. */ + defaultValue?: string; + /** Controlled value of the input element. */ + value?: string; + /** Defines the size of the input (e.g., 'sm', 'md', 'lg'). */ + size?: 'sm' | 'md' | 'lg'; + /** Additional custom classes for styling. */ + className?: string; + /** Disables the input element when true. */ + disabled?: boolean; + /** Function called when the input value changes. */ + onChange?: (value: string | null) => void; + /** Indicates whether the input has an error state. */ + error?: boolean; + /** Function called when the input encounters an error. */ + onError?: () => void; + /** React node displayed as a prefix inside the input. */ + prefix?: ReactNode; + /** React node displayed as a suffix inside the input. */ + suffix?: ReactNode; + /** Label displayed above the input field. */ + label?: string; + /** Placeholder text for the input field. */ + placeholder?: string; +} + +export declare const Label: default_2.ForwardRefExoticComponent>; + +declare interface LabelProps { + /** The content of the label. */ + children: ReactNode; + /** Defines the HTML tag to use for the label. */ + tag?: string | ElementType; + /** Defines the size of the label. */ + size?: 'xs' | 'sm' | 'md'; + /** Defines the extra classes. */ + className?: string; + /** Defines the style variant of the label. */ + variant?: 'neutral' | 'help' | 'error' | 'disabled'; + /** Defines if the label is required. */ + required?: boolean; +} + +export declare const LineChart: ({ data, dataKeys, colors, showXAxis, showYAxis, showTooltip, tooltipIndicator, tooltipLabelKey, showCartesianGrid, tickFormatter, xAxisDataKey, yAxisDataKey, xAxisFontSize, xAxisFontColor, yAxisFontColor, chartWidth, chartHeight, withDots, }: LineChartProps) => JSX_2.Element; + +declare interface LineChartProps { + /** An array of objects representing the source data for the chart. */ + data: DataItem_2[]; + /** An array of strings representing the keys to access data in each data object. Used for identifying different data series. */ + dataKeys: string[]; + /** An array of color objects that determine the stroke colors for each data series in the chart. */ + colors?: Color_2[]; + /** Whether to render the `` component for the x-axis. */ + showXAxis?: boolean; + /** Whether to render the `` component for the y-axis. */ + showYAxis?: boolean; + /** Toggle the visibility of the tooltip on hover, displaying detailed information for each data point. */ + showTooltip?: boolean; + /** The tooltip indicator. It can be `dot`, `line`, or `dashed`. */ + tooltipIndicator?: 'dot' | 'line' | 'dashed'; + /** The key to use for the tooltip label. */ + tooltipLabelKey?: string; + /** Whether to display the ``, adding horizontal and vertical grid lines. */ + showCartesianGrid?: boolean; + /** A function used to format the ticks on the x-axis, e.g., for formatting dates or numbers. */ + tickFormatter?: (value: string) => string; + /** The key in the data objects representing values for the x-axis. */ + xAxisDataKey?: string; + /** The key in the data objects representing values for the y-axis. */ + yAxisDataKey?: string; + /** Font size for the labels on the x-axis. */ + xAxisFontSize?: 'sm' | 'md' | 'lg'; + /** Font color for the labels on the x-axis. */ + xAxisFontColor?: string; + /** Font color for the labels on the y-axis. */ + yAxisFontColor?: string; + /** Width of the chart container. */ + chartWidth?: number; + /** Height of the chart container. */ + chartHeight?: number; + /** Determines whether dots are shown on each data point. */ + withDots?: boolean; +} + +export declare const Loader: ({ variant, size, icon, className, }: LoaderProps) => JSX_2.Element; + +declare interface LoaderProps { + /** Defines the variant of the loader. Options are 'primary' or 'secondary'. */ + variant?: 'primary' | 'secondary'; + /** Defines the size of the loader. Options are 'sm', 'md', 'lg', or 'xl'. */ + size?: 'sm' | 'md' | 'lg' | 'xl'; + /** Optional icon to display instead of the default loader icon. */ + icon?: ReactNode; + /** Additional custom classes for styling. */ + className?: string; +} + +export declare const Menu: { + ({ size, children, className }: MenuProps): JSX_2.Element; + displayName: string; + List: { + ({ heading, arrow, showArrowOnHover, open: initialOpen, onClick, children, className, }: MenuListProps): JSX_2.Element; + displayName: string; + }; + Item: { + ({ disabled, active, onClick, children, className, }: MenuItemProps): JSX_2.Element; + displayName: string; + }; + Separator: { + ({ variant, className, }: MenuSeparatorProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface MenuItemProps extends BaseMenuProps { + /** Disables the menu item if true. */ + disabled?: boolean; + /** Marks the menu item as active. */ + active?: boolean; + /** Callback function triggered when the menu item is clicked. */ + onClick?: () => void; + /** Child elements of the menu item. */ + children: ReactNode; +} + +declare interface MenuListProps extends BaseMenuProps { + /** Heading for the menu list. */ + heading?: string; + /** Displays an arrow next to the heading. */ + arrow?: boolean; + /** Controls the initial open state of the menu list. */ + open?: boolean; + /** Callback function triggered when the menu list is clicked. */ + onClick?: (isOpen: boolean) => void; + /** Child elements of the menu list. */ + children: ReactNode; + /** Shows the arrow only when hovering. */ + showArrowOnHover?: boolean; +} + +declare interface MenuProps extends BaseMenuProps { + /** Defines the size of the menu (e.g., 'sm', 'md'). */ + size?: 'sm' | 'md'; + /** Child elements of the menu. */ + children: ReactNode; +} + +declare interface MenuSeparatorProps extends BaseMenuProps { + /** Defines the style of the separator (e.g., 'solid', 'dashed'). */ + variant?: 'solid' | 'dashed' | 'dotted' | 'double' | 'hidden' | 'none'; +} + +declare type MultiTypeChildren = ReactElement | ReactNode | SelectFunctionChildren; + +declare type OnChangeValue = { + slug: string; + text: string; +}; + +export declare const Pagination: { + ({ size, disabled, children, className, ...props }: PaginationProps): JSX_2.Element; + displayName: string; + Content: ForwardRefExoticComponent>; + Item: ForwardRefExoticComponent>; + Previous: { + (props: PaginationButtonProps): JSX_2.Element; + displayName: string; + }; + Next: { + (props: PaginationButtonProps): JSX_2.Element; + displayName: string; + }; + Ellipsis: { + (props: PaginationCommonProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface PaginationButtonProps extends PaginationCommonProps { + /** The element type of the pagination button. */ + as?: ElementType; + /** Marks the button as active. */ + isActive?: boolean; + /** Disables the button. */ + disabled?: boolean; + /** Optional click handler for the button. */ + onClick?: React.MouseEventHandler; + /** The HTML tag to be rendered for the pagination button. */ + tag?: 'a' | 'button'; +} + +declare interface PaginationCommonProps { + /** Defines the children of the pagination component. */ + children?: ReactNode; + /** Additional CSS classes. */ + className?: string; +} + +declare interface PaginationItemProps extends PaginationCommonProps { + /** Marks the pagination item as active. */ + isActive?: boolean; +} + +declare interface PaginationProps extends PaginationCommonProps { + /** Defines the size of pagination items. */ + size?: 'xs' | 'sm' | 'md' | 'lg'; + /** Disables all pagination controls. */ + disabled?: boolean; +} + +export declare const PieChart: ({ data, dataKey, type, showTooltip, tooltipIndicator, tooltipLabelKey, label, labelName, labelNameColor, labelValue, showLegend, chartWidth, pieOuterRadius, pieInnerRadius, }: PieChartProps) => JSX_2.Element; + +declare interface PieChartProps { + /** An array of objects representing the source data for the chart. */ + data: DataItem_3[]; + /** A string which representing the key to access data in each data object. Used for identifying different data series. */ + dataKey: string; + /** Type of pie chart. It can be `simple` or `donut` */ + type?: 'simple' | 'donut'; + /** Toggle the visibility of the tooltip on hover, displaying detailed information for each data point. */ + showTooltip?: boolean; + /** The tooltip indicator. It can be `dot`, `line`, or `dashed`. */ + tooltipIndicator?: 'dot' | 'line' | 'dashed'; + /** The key to use for the tooltip label. */ + tooltipLabelKey?: string; + /** When is true it show the label inside `donut` pie chart */ + label?: boolean; + /** Label name which will be displayed inside donut pie chart. */ + labelName?: string; + /** Label name color which will be displayed inside donut pie chart. */ + labelNameColor?: string; + /** Label value which will be displayed inside donut pie chart. */ + labelValue?: number | string; + /** Whether to render the `` component to identify data series. */ + showLegend?: boolean; + /** Width of the chart container. */ + chartWidth?: number; + /** Outer radius of the pie chart. */ + pieOuterRadius?: number; + /** Inner radius of the pie chart. */ + pieInnerRadius?: number; +} + +export declare const ProgressBar: ({ progress, speed, className, }: ProgressBarProps) => JSX_2.Element; + +declare interface ProgressBarProps { + /** Current progress value (0 to 100). */ + progress?: number; + /** Speed of the progress transition in milliseconds. */ + speed?: number; + /** Additional custom classes for styling. */ + className?: string; +} + +declare interface ProgressCommonProps { + /** Defines the children of the progress steps. */ + children: ReactNode; + /** Defines the class name for the component. */ + className?: string; +} + +declare interface ProgressStepProps extends ProgressCommonProps { + /** Text label for the step. */ + labelText?: string; + /** Custom icon for the step. */ + icon?: ReactNode; + /** Indicates if this step is currently active. */ + isCurrent?: boolean; + /** Indicates if this step has been completed. */ + isCompleted?: boolean; + /** Defines the layout type: 'inline' or 'stack'. */ + type?: 'inline' | 'stack'; + /** Specifies the variant style: 'dot', 'number', or 'icon'. */ + variant?: 'dot' | 'number' | 'icon'; + /** Size-specific CSS classes for the step. */ + sizeClasses?: StepSizeClasses; + /** Defines the size of the step: 'sm', 'md', or 'lg'. */ + size: 'sm' | 'md' | 'lg'; + /** Indicates if this step is the last in the sequence. */ + isLast?: boolean; + /** The index of the step in the sequence. */ + index?: number; + /** Additional class names for the connecting line. */ + lineClassName?: string; +} + +export declare const ProgressSteps: { + ({ variant, size, type, currentStep, children, className, lineClassName, ...rest }: ProgressStepsProps): JSX_2.Element; + Step: { + ({ labelText, icon, isCurrent, isCompleted, className, type, variant, sizeClasses, size, isLast, index, lineClassName, ...rest }: ProgressStepProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface ProgressStepsProps extends ProgressCommonProps { + /** Defines the variant of the progress step. */ + variant?: 'dot' | 'number' | 'icon'; + /** Defines the size of the progress step. */ + size?: 'sm' | 'md' | 'lg'; + /** Defines the type of layout. */ + type?: 'inline' | 'stack'; + /** Defines the current step number. `-1` keeps all steps completed. */ + currentStep?: number; + /** Additional props for the connecting line. */ + lineClassName?: string; +} + +export declare const RadioButton: default_2.ForwardRefExoticComponent> & { + Group: { + ({ children, name, style, size, value, defaultValue, by, as: AsElement, onChange, className, disableGroup, vertical, columns, multiSelection, gapClassName, }: RadioButtonGroupProps): JSX_2.Element; + displayName: string; + }; + Button: default_2.ForwardRefExoticComponent>; +}; + +/** Common props used across the radio button components */ +declare interface RadioButtonCommonProps { + /** Custom class names for additional styling */ + className?: string; + /** HTML element or React component to render the element as */ + as?: ElementType; + /** Children components (usually RadioButton.Button instances) */ + children?: ReactNode; + /** Disables the radio button */ + disabled?: boolean; +} + +/** Props for the RadioButtonGroup component */ +declare interface RadioButtonGroupProps extends RadioButtonCommonProps { + /** Name used for form submission */ + name?: string; + /** Style of the radio button group: 'simple' or 'tile' */ + style?: 'simple' | 'tile'; + /** Size of the radio buttons: 'sm' or 'md' */ + size?: 'sm' | 'md'; + /** Controlled value of the group */ + value?: string | string[]; + /** Default value if the group is uncontrolled */ + defaultValue?: string | string[]; + /** Attribute to compare selected values, typically 'id' */ + by?: string; + /** Handler invoked on value change */ + onChange?: (value: string | string[]) => void; + /** Disables all radio buttons in the group */ + disableGroup?: boolean; + /** Arranges the radio buttons vertically */ + vertical?: boolean; + /** Number of columns for arranging the buttons */ + columns?: number; + /** Enables multi-selection mode */ + multiSelection?: boolean; + /** Gap between radio buttons */ + gapClassName?: string; +} + +/** Props for an individual RadioButton */ +declare interface RadioButtonProps extends RadioButtonCommonProps { + /** Unique identifier for the radio button */ + id?: string; + /** Label content for the radio button */ + label?: { + heading: string; + description?: string; + }; + /** Value of the radio button */ + value: string; + /** Disables the radio button */ + disabled?: boolean; + /** Custom icon to display */ + icon?: ReactNode; + /** Aligns icon inline with the label */ + inlineIcon?: boolean; + /** Hides the selection indicator */ + hideSelection?: boolean; + /** Reverses the position of icon and label */ + reversePosition?: boolean; + /** Adds a border around the button */ + borderOn?: boolean; + /** Adds a border when the button is active */ + borderOnActive?: boolean; + /** Badge element to display */ + badgeItem?: ReactNode; + /** Uses a switch for selection instead of radio input */ + useSwitch?: boolean; + /** Info object with heading and description */ + info?: { + heading: string; + description?: string; + }; + /** Ensures the button has minimum width */ + minWidth?: boolean; + /** Custom classes for the button wrapper */ + buttonWrapperClasses?: string; + /** Checked state of the radio button */ + checked?: boolean; +} + +export declare const SearchBox: SearchBoxComponent; + +declare type SearchBoxComponent = default_2.ForwardRefExoticComponent> & { + Input: typeof SearchBoxInput; + Loading: typeof SearchBoxLoading; + Separator: typeof SearchBoxSeparator; + Content: typeof SearchBoxContent; + List: typeof SearchBoxList; + Empty: typeof SearchBoxEmpty; + Group: typeof SearchBoxGroup; + Item: typeof SearchBoxItem; +}; + +declare const SearchBoxContent: { + ({ className, dropdownPortalRoot, dropdownPortalId, children, ...props }: SearchBoxContentProps): JSX_2.Element | null; + displayName: string; +}; + +declare interface SearchBoxContentProps { + /** Additional class names for styling. */ + className?: string; + /** Root element where the dropdown will be rendered. */ + dropdownPortalRoot?: HTMLElement | null; + /** Id of the dropdown portal where the dropdown will be rendered. */ + dropdownPortalId?: string; + /** Child components to be rendered inside the dropdown. */ + children: ReactNode; +} + +declare const SearchBoxEmpty: { + ({ children, }: SearchBoxEmptyProps): JSX_2.Element; + displayName: string; +}; + +declare interface SearchBoxEmptyProps { + /** Content to display when there are no results. */ + children?: ReactNode; +} + +declare const SearchBoxGroup: { + ({ heading, children }: SearchBoxGroupProps): JSX_2.Element; + displayName: string; +}; + +declare interface SearchBoxGroupProps { + /** Heading for the group. */ + heading?: string; + /** Child components to be rendered in the group. */ + children: ReactNode; +} + +declare const SearchBoxInput: default_2.ForwardRefExoticComponent>; + +declare interface SearchBoxInputProps extends BaseSearchBoxProps { + /** Type of the input (e.g., text, search). */ + type?: string; + /** Placeholder text for the input. */ + placeholder?: string; + /** Style variant of the input. */ + variant?: 'primary' | 'secondary' | 'ghost'; + /** Whether the input is disabled. */ + disabled?: boolean; + /** Callback for input changes. */ + onChange?: (value: string) => void; + /** Child components to be rendered. */ + children?: ReactNode; +} + +declare const SearchBoxItem: default_2.ForwardRefExoticComponent>; + +declare interface SearchBoxItemProps { + /** Additional class names for styling. */ + className?: string; + /** Icon to display next to the item. */ + icon?: ReactNode; + /** Child components to be rendered. */ + children: ReactNode; +} + +declare const SearchBoxList: { + ({ filter, children, }: SearchBoxListProps): JSX_2.Element; + displayName: string; +}; + +declare interface SearchBoxListProps { + /** Whether to filter children based on the search term. */ + filter?: boolean; + /** Child components to be rendered. */ + children: ReactNode; +} + +declare const SearchBoxLoading: { + ({ loadingIcon, }: SearchBoxLoadingProps): JSX_2.Element; + displayName: string; +}; + +declare interface SearchBoxLoadingProps { + /** Loading icon to display while loading. */ + loadingIcon?: ReactNode & { + size?: string; + }; +} + +declare const SearchBoxSeparator: default_2.ForwardRefExoticComponent>; + +declare interface SearchBoxSeparatorProps { + /** Additional class names for styling. */ + className?: string; +} + +export declare const Select: { + ({ id, size: sizeValue, value, defaultValue, onChange, by, children, multiple, combobox, disabled, }: SelectProps): JSX_2.Element; + Portal: typeof SelectPortal; + Button: typeof SelectButton; + Options: typeof SelectOptions; + Option: typeof SelectItem; +}; + +declare function SelectButton({ children, icon, // Icon to show in the select button. + placeholder, // Placeholder text. + optionIcon, // Icon to show in the selected option. + displayBy, // Used to display the value. Default is 'name'. + label, // Label for the select component. + className, ...props }: SelectButtonProps): JSX_2.Element; + +declare namespace SelectButton { + var displayName: string; +} + +declare interface SelectButtonProps extends AriaAttributes { + /** Expects the `Select.Button` children of the Select Component. */ + children?: MultiTypeChildren; + /** Option Icon to show at the right of the option trigger/button. By default it will show chevron down icon. */ + icon?: ReactNode | null; + /** Placeholder text when no option is selected. */ + placeholder?: string; + /** Icon to show in the selected option badge (Multi-select mode only). By default it won't show unknown icon. */ + optionIcon?: ReactNode | null; + /** Key to display selected item when the selected value is an object. Default value is `name`. */ + displayBy?: string; + /** Label for the Select component. */ + label?: string; + /** Additional class name for the Select Button. */ + className?: string; +} + +declare type SelectFunctionChildren = ({ value, onClose, }: { + value: SelectOptionValue; + onClose?: (event: React.MouseEvent) => void; +}) => React.JSX.Element; + +declare function SelectItem({ value, selected, children, className, ...props }: SelectOptionProps): JSX_2.Element; + +declare namespace SelectItem { + var displayName: string; +} + +declare type SelectOnChange = (value: SelectOptionValue | SelectOptionValue[]) => void; + +declare interface SelectOptionProps { + /** Value of the option. */ + value: SelectOptionValue; + /** Selected state of the option. */ + selected?: boolean; + /** Expects the `Select.Option` children of the Select Component. */ + children?: ReactNode; + /** Additional class name for the Select Option. */ + className?: string; + /** Additional Props */ + [key: string]: unknown; +} + +declare function SelectOptions({ children, searchBy, // Used to identify searched value using the key. Default is 'id'. + searchPlaceholder, // Placeholder text for search box. + className, }: SelectOptionsProps): JSX_2.Element; + +declare namespace SelectOptions { + var displayName: string; +} + +declare interface SelectOptionsProps { + /** Expects the `Select.Option` children of the Select.Options Component. */ + children?: ReactNode; + /** Key used to identify searched value using the key. Default is 'id'. */ + searchBy?: string; + /** Placeholder text for search box. */ + searchPlaceholder?: string; + /** Additional class name for the Select Options wrapper. */ + className?: string; +} + +declare type SelectOptionValue = string | number | Record; + +declare function SelectPortal({ children, root, id }: SelectPortalProps): JSX_2.Element; + +declare namespace SelectPortal { + var displayName: string; +} + +declare interface SelectPortalProps { + /** Expects the `Select.Options` children of the Select.Portal Component. */ + children?: ReactNode; + /** + * Root element where the `Select.Options` will be rendered. If not provided Select.Options will be rendered in the body. + */ + root?: HTMLElement; + /** + * Root element ID where the `Select.Options` will be rendered. If not provided Select.Options will be rendered in the body. + */ + id?: string; +} + +declare type SelectProps = { + /** Select Component unique ID. */ + id?: string; + /** Defines the size of the Select Component. */ + size?: SelectSizes; + /** When the value is an object, a key is required to compare the selected value. The default value is `id`. */ + by?: string; + /** Expects the `Select.Portal`/`Select.Options` and `Select.Button` children of the Select Component. */ + children?: ReactNode; + /** Combobox mode. */ + combobox?: boolean; + /** Disables the Select Component. */ + disabled?: boolean; + /** Multi select mode. */ + multiple?: boolean; + /** Defines the width of the Select Component. */ + value?: SelectOptionValue | SelectOptionValue[]; + /** onChange event to be triggered when the value of the Select Component changes. */ + onChange: SelectOnChange; + /** Defines the default value of the Select Component. */ + defaultValue?: SelectOptionValue | SelectOptionValue[]; +}; + +declare type SelectSizes = 'sm' | 'md' | 'lg'; + +export declare const Sidebar: { + ({ children, className, onCollapseChange, collapsible, screenHeight, borderOn, ...props }: SidebarProps): JSX_2.Element; + displayName: string; +} & { + Header: { + ({ children }: SidebarCommonProps): JSX_2.Element; + displayName: string; + }; + Body: { + ({ children }: SidebarCommonProps): JSX_2.Element; + displayName: string; + }; + Footer: { + ({ children }: SidebarCommonProps): JSX_2.Element; + displayName: string; + }; + Item: { + ({ children, className }: SidebarItemProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface SidebarCommonProps { + /** Content to render inside the Sidebar. Typically includes Sidebar.Header, Sidebar.Body, and Sidebar.Footer components. */ + children: ReactNode; +} + +declare interface SidebarItemProps extends SidebarCommonProps { + /** Optional custom CSS classes for styling the Sidebar item. */ + className?: string; + /** Click event handler */ + onClick?: () => void; +} + +declare interface SidebarProps extends SidebarCommonProps { + /** Optional custom CSS classes to apply to the Sidebar container for styling. */ + className?: string; + /** Callback function triggered when the Sidebar collapse state changes. */ + onCollapseChange?: (isCollapsed: boolean) => void; + /** Determines if the Sidebar can be collapsed or not. If true, a collapse button is shown. */ + collapsible?: boolean; + /** Determines whether the Sidebar should occupy the full screen height. */ + screenHeight?: boolean; + /** Controls whether a border should appear on the right of the Sidebar. */ + borderOn?: boolean; +} + +declare const sizeClassnames: { + sm: { + dot: string; + ring: string; + numberIcon: string; + icon: string; + label: string; + }; + md: { + dot: string; + ring: string; + numberIcon: string; + icon: string; + label: string; + }; + lg: { + dot: string; + ring: string; + numberIcon: string; + icon: string; + label: string; + }; +}; + +export declare const Skeleton: ({ variant, className, ...props }: SkeletonProps) => JSX.Element; + +declare interface SkeletonProps { + /** Defines the style variant of the skeleton. */ + variant?: 'rectangular' | 'circular'; + /** Allows you to pass custom classes to control the size and styles. */ + className?: string; +} + +declare type StepSizeClasses = typeof sizeClassnames; + +export declare const Switch: ForwardRefExoticComponent>; + +declare interface SwitchProps { + /** Unique identifier for the switch component. */ + id?: string; + /** Callback function triggered when the switch value changes. */ + onChange?: (checked: boolean) => void; + /** Controlled value of the switch (checked or unchecked). */ + value?: boolean; + /** Initial value of the switch (checked or unchecked) when used as an uncontrolled component. */ + defaultValue?: boolean; + /** Defines the size of the switch (e.g., 'sm', 'md', 'lg'). */ + size?: 'sm' | 'md' | 'lg'; + /** Disables the switch if true. */ + disabled?: boolean; + /** Defines the label for the switch, can include heading and description. */ + label?: { + /** Heading for the label. */ + heading?: string; + /** Description for the label. */ + description?: string; + }; + /** Name attribute for the switch input. */ + name?: string; + /** Additional CSS classes for the switch component. */ + className?: string; +} + +declare interface TabPanelProps { + /** Unique identifier for the tab panel that is used for the tab. */ + slug: string; + /** Content to display in the tab panel. */ + children: ReactNode; +} + +declare interface TabProps { + /** Unique identifier for the tab. */ + slug: string; + /** Text to display in the tab. */ + text: string; + /** Icon to display in the tab. */ + icon?: ReactNode; + /** Additional class names for styling. */ + className?: string; + /** Disables the tab. */ + disabled?: boolean; + /** Badge to display in the tab. */ + badge?: ReactNode; +} + +export declare const Tabs: { + ({ activeItem, children }: TabsProps): JSX_2.Element; + Group: { + ({ children, activeItem: activeTabSlug, onChange, className, size, orientation, variant, iconPosition, width, }: TabsGroupProps): JSX_2.Element; + displayName: string; + }; + Tab: default_2.ForwardRefExoticComponent>; + Panel: { + ({ slug, children }: TabPanelProps): JSX_2.Element | null; + displayName: string; + }; +}; + +declare interface TabsGroupProps { + /** Controls the active tab. */ + activeItem?: string | null; + /** Callback when the active item changes. */ + onChange?: ({ event, value, }: { + event: default_2.MouseEvent; + value: OnChangeValue; + }) => void; + /** Additional class names for styling. */ + className?: string; + /** Defines the size of the tabs. */ + size?: 'xs' | 'sm' | 'md' | 'lg'; + /** Defines the orientation of the tabs. */ + orientation?: 'horizontal' | 'vertical'; + /** Defines the style variant of the tabs. */ + variant?: 'pill' | 'rounded' | 'underline'; + /** Defines the position of the icon. */ + iconPosition?: 'left' | 'right'; + /** Defines the width of the tabs. */ + width?: 'auto' | 'full'; + /** Tabs to display in the group. */ + children: ReactNode; +} + +declare interface TabsProps { + /** The active tab value to identify active tab. */ + activeItem: string | null; + /** Tabs and their content to display. */ + children: ReactNode; +} + +declare type TAlign = 'start' | 'center' | 'end' | 'stretch'; + +declare type TAlignSelf = 'start' | 'center' | 'end' | 'baseline' | 'stretch'; + +declare type TCols = TRange; + +declare type TContainerType = 'grid' | 'flex'; + +declare type TDateRange = { + from: Date | null; + to: Date | null; +}; + +declare type TDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse'; + +export declare const TextArea: ForwardRefExoticComponent>; + +declare interface TextAreaProps { + /** ID of the textarea element. */ + id?: string; + /** Default value when used in uncontrolled mode. */ + defaultValue?: string; + /** Value when used in controlled mode. */ + value?: string; + /** Size of the textarea (sm, md, lg). */ + size?: 'sm' | 'md' | 'lg'; + /** Additional class names for the textarea. */ + className?: string; + /** Disables the textarea if true. */ + disabled?: boolean; + /** Handles changes in the textarea value. */ + onChange?: (value: string) => void; + /** Marks the field with an error state. */ + error?: boolean; + /** Callback triggered when the field is invalid. */ + onError?: () => void; +} + +declare type TFlow = 'row' | 'column' | 'row-dense' | 'column-dense'; + +declare type TGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; + +export declare const Title: ({ title, description, icon, iconPosition, tag, size, className, }: TitleProps) => JSX_2.Element | null; + +/** + * Title component. + */ +/** + * Props for the Title component. + */ +declare interface TitleProps { + /** The main title text to render. */ + title?: string; + /** Optional description text to display below the title. */ + description?: string; + /** Icon element to display alongside the title. */ + icon?: ReactNode; + /** Determines the position of the icon relative to the title. */ + iconPosition?: 'left' | 'right'; + /** HTML tag to use for the title (e.g., h1, h2, h3). */ + tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; + /** Size variant of the title (affects both title and description styles) - xs, sm, md, lg. */ + size?: 'xs' | 'sm' | 'md' | 'lg'; + /** Additional class names to apply to the root element. */ + className?: string; +} + +declare type TJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly' | 'stretch'; + +declare type TJustifySelf = 'auto' | 'start' | 'center' | 'end' | 'baseline' | 'stretch'; + +declare type TMenuComponent = default_2.ComponentType>; + +declare type TMenuItemComponent = default_2.ComponentType>; + +export declare const toast: ((message: string | default_2.ReactElement, options: ToastType) => number | undefined) & { + success: (message?: string | default_2.ReactElement, options?: Partial) => number | undefined; + error: (message?: string | default_2.ReactElement, options?: Partial) => number | undefined; + warning: (message?: string | default_2.ReactElement, options?: Partial) => number | undefined; + info: (message?: string | default_2.ReactElement, options?: Partial) => number | undefined; + custom: (jsx: ToastType['jsx'], options?: Partial) => number | undefined; + dismiss: (id: number) => number; + update: (id: number, data: Partial) => void; +} & { + getHistory: () => ToastType[]; +}; + +declare type ToastAction = { + label: string; + onClick: (callback?: (toast: ToastType) => void) => void; + type?: 'button' | 'link'; +}; + +declare type ToastDesign = 'stack' | 'inline'; + +export declare const Toaster: NamedExoticComponent; + +declare type ToastTheme = 'light' | 'dark'; + +declare interface ToastType { + id?: number; + title?: string | React.ReactElement; + description?: string | React.ReactElement; + type?: ToastVariant; + jsx?: ({ close, action, }: { + close: () => void; + action?: ToastAction | null; + }) => JSX.Element; + render?: string | (() => JSX.Element); + autoDismiss?: boolean; + dismissAfter?: number; + theme?: ToastTheme; + design?: ToastDesign; + dismiss?: boolean; + icon?: React.ReactElement; + action?: ToastAction; +} + +declare type ToastVariant = 'neutral' | 'success' | 'error' | 'warning' | 'info' | 'custom'; + +export declare const Tooltip: ({ variant, placement, title, content, arrow, open, setOpen, children, className, tooltipPortalRoot, tooltipPortalId, boundary, strategy, offset: offsetValue, triggers, interactive, }: TooltipProps) => JSX_2.Element; + +declare interface TooltipProps { + /** Defines the visual variant of the tooltip. */ + variant?: 'light' | 'dark'; + /** Specifies the position of the tooltip relative to its target. */ + placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end'; + /** The title displayed at the top of the tooltip. */ + title?: string; + /** The main content to be displayed within the tooltip. */ + content?: ReactNode; + /** Indicates whether to show an arrow pointing to the target element. */ + arrow?: boolean; + /** Controls the visibility of the tooltip in a controlled manner. */ + open?: boolean; + /** Function to set the visibility state of the tooltip. */ + setOpen?: (isOpen: boolean) => void; + /** The child element to which the tooltip is attached. */ + children: ReactNode; + /** Additional CSS classes to apply to the tooltip for custom styling. */ + className?: string; + /** The root element where the tooltip will be rendered. */ + tooltipPortalRoot?: HTMLElement | null; + /** The ID of the tooltip portal. */ + tooltipPortalId?: string; + /** Specifies the positioning strategy for the tooltip. */ + strategy?: 'fixed' | 'absolute'; + /** Offset distance (in pixels) from the target element to the tooltip. */ + offset?: number; + /** Events that trigger the tooltip. */ + triggers?: ('click' | 'hover' | 'focus')[]; + /** Indicates whether the tooltip content is interactive. Keeps the tooltip open while the user interacts with its content. */ + interactive?: boolean; + /** Defines the boundary for positioning the tooltip, accepting 'viewport', 'clippingAncestors', or an HTML element reference. */ + boundary?: 'viewport' | 'clippingAncestors' | HTMLElement | null; +} + +export declare const Topbar: { + ({ children, gap, className, ...props }: TopbarProps): JSX_2.Element; + displayName: string; + Left: { + ({ gap, children, className }: TopbarProps): JSX_2.Element; + displayName: string; + }; + Middle: { + ({ gap, children, align, className, }: TopbarMiddleProps): JSX_2.Element; + displayName: string; + }; + Right: { + ({ gap, children, className }: TopbarProps): JSX_2.Element; + displayName: string; + }; + Item: { + ({ children, className }: TopbarCommonProps): JSX_2.Element; + displayName: string; + }; +}; + +declare interface TopbarCommonProps { + /** Children to be rendered inside the Topbar. */ + children?: ReactNode; + /** Additional classes to be added to the Topbar. */ + className?: string; +} + +declare interface TopbarMiddleProps extends TopbarProps { + /** Defines how the content inside the Middle section is aligned. */ + align?: 'left' | 'center' | 'right'; +} + +declare interface TopbarProps extends TopbarCommonProps { + /** Defines the gap between items. */ + gap?: '0' | 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; +} + +declare type TOptionItem = Record | string; + +declare type TRange = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12; + +declare type TWrap = 'nowrap' | 'wrap' | 'wrap-reverse'; + +export { } + + +declare namespace defaultTheme { + let content: string[]; + namespace theme { + namespace extend { + let colors: { + 'brand-background-50': string; + 'brand-background-hover-100': string; + 'brand-200': string; + 'brand-border-300': string; + 'brand-400': string; + 'brand-500': string; + 'brand-primary-600': string; + 'brand-hover-700': string; + 'brand-800': string; + 'brand-900': string; + 'brand-text-950': string; + 'background-primary': string; + 'background-secondary': string; + 'background-inverse': string; + 'background-brand': string; + 'background-important': string; + 'field-primary-background': string; + 'field-secondary-background': string; + 'field-primary-hover': string; + 'field-secondary-hover': string; + 'field-dropzone-background': string; + 'field-border': string; + 'field-dropzone-background-hover': string; + 'field-dropzone-color': string; + 'field-label': string; + 'field-input': string; + 'field-helper': string; + 'field-background-disabled': string; + 'field-color-disabled': string; + 'field-placeholder': string; + 'field-border-disabled': string; + 'field-color-error': string; + 'field-border-error': string; + 'field-background-error': string; + 'field-required': string; + 'border-interactive': string; + 'border-subtle': string; + 'border-strong': string; + 'border-inverse': string; + 'border-disabled': string; + 'border-muted': string; + 'border-error': string; + 'border-transparent-subtle': string; + 'border-white': string; + 'text-primary': string; + 'text-secondary': string; + 'text-tertiary': string; + 'text-on-color': string; + 'text-error': string; + 'text-error-inverse': string; + 'text-inverse': string; + 'text-disabled': string; + 'text-on-button-disabled': string; + 'link-primary': string; + 'link-primary-hover': string; + 'link-inverse': string; + 'link-visited': string; + 'link-visited-inverse': string; + 'link-inverse-hover': string; + 'icon-primary': string; + 'icon-secondary': string; + 'icon-on-color': string; + 'icon-inverse': string; + 'icon-interactive': string; + 'icon-on-color-disabled': string; + 'icon-disabled': string; + 'support-error': string; + 'support-success': string; + 'support-warning': string; + 'support-info': string; + 'support-error-inverse': string; + 'support-success-inverse': string; + 'support-warning-inverse': string; + 'support-info-inverse': string; + 'button-primary': string; + 'button-primary-hover': string; + 'button-secondary': string; + 'button-secondary-hover': string; + 'button-tertiary': string; + 'button-tertiary-hover': string; + 'button-danger': string; + 'button-danger-secondary': string; + 'button-danger-hover': string; + 'button-disabled': string; + 'button-tertiary-border': string; + 'button-tertiary-color': string; + focus: string; + 'focus-inset': string; + 'focus-inverse': string; + 'focus-inverse-inset': string; + 'focus-error': string; + 'focus-border': string; + 'focus-error-border': string; + 'misc-highlight': string; + 'misc-overlay': string; + 'misc-skeleton-background': string; + 'misc-skeleton-element': string; + 'misc-popup-button-hover': string; + 'misc-tab-item-hover': string; + 'misc-dropdown-hover': string; + 'misc-loader-base': string; + 'misc-loader-color': string; + 'misc-progress-background': string; + 'badge-background-gray': string; + 'badge-color-gray': string; + 'badge-hover-gray': string; + 'badge-border-gray': string; + 'badge-background-red': string; + 'badge-color-red': string; + 'badge-hover-red': string; + 'badge-border-red': string; + 'badge-background-yellow': string; + 'badge-color-yellow': string; + 'badge-hover-yellow': string; + 'badge-border-yellow': string; + 'badge-hover-green': string; + 'badge-border-green': string; + 'badge-background-green': string; + 'badge-color-green': string; + 'badge-background-sky': string; + 'badge-color-sky': string; + 'badge-hover-sky': string; + 'badge-border-sky': string; + 'badge-background-disabled': string; + 'badge-color-disabled': string; + 'badge-hover-disabled': string; + 'badge-border-disabled': string; + 'badge-background-important': string; + 'alert-background-neutral': string; + 'alert-border-neutral': string; + 'alert-background-danger': string; + 'alert-border-danger': string; + 'alert-background-warning': string; + 'alert-border-warning': string; + 'alert-background-green': string; + 'alert-border-green': string; + 'alert-background-info': string; + 'alert-border-info': string; + 'tab-background': string; + 'tab-border': string; + 'tooltip-background-light': string; + 'tooltip-background-dark': string; + 'toggle-off': string; + 'toggle-on': string; + 'toggle-dial-background': string; + 'toggle-off-hover': string; + 'toggle-off-border': string; + 'toggle-on-hover': string; + 'toggle-on-border': string; + 'toggle-on-disabled': string; + 'toggle-off-disabled': string; + }; + let width: { + '1/7': string; + '1/8': string; + '1/9': string; + '1/10': string; + '1/11': string; + '1/12': string; + }; + let boxShadow: { + 'soft-shadow-sm': string; + 'soft-shadow': string; + 'soft-shadow-md': string; + 'soft-shadow-lg': string; + 'soft-shadow-xl': string; + 'soft-shadow-2xl': string; + 'soft-shadow-inner': string; + }; + namespace fontSize { + let tiny: string; + } + let spacing: { + 120: string; + 95: string; + 141.5: string; + 188: string; + }; + let zIndex: { + 999999: string; + }; + } + } + let plugins: never[]; + namespace corePlugins { + let preflight: boolean; + } +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let decorators: ((Story: any, parameters: any) => import("react/jsx-runtime").JSX.Element)[]; + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let decorators: ((Story: any, parameters: any) => import("react/jsx-runtime").JSX.Element)[]; + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + namespace a11y { + namespace config { + let rules: { + selector: string; + id: string; + enabled: boolean; + }[]; + } + } + } + let decorators: ((Story: any, parameters: any) => import("react/jsx-runtime").JSX.Element)[]; + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let decorators: ((Story: any, parameters: any) => import("react/jsx-runtime").JSX.Element)[]; + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let decorators: ((Story: any, parameters: any) => import("react/jsx-runtime").JSX.Element)[]; + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} + +declare namespace _default { + let title: string; + namespace parameters { + let layout: string; + } + let tags: string[]; +} diff --git a/dist/force-ui.js b/dist/force-ui.js new file mode 100644 index 00000000..b4ef2038 --- /dev/null +++ b/dist/force-ui.js @@ -0,0 +1,47610 @@ +"use client"; +var E8 = Object.defineProperty; +var tP = (e) => { + throw TypeError(e); +}; +var k8 = (e, t, n) => t in e ? E8(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; +var ua = (e, t, n) => k8(e, typeof t != "symbol" ? t + "" : t, n), nP = (e, t, n) => t.has(e) || tP("Cannot " + n); +var $r = (e, t, n) => (nP(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Rv = (e, t, n) => t.has(e) ? tP("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), os = (e, t, n, r) => (nP(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n); +import { jsxs as me, jsx as k, Fragment as Lt } from "react/jsx-runtime"; +import * as ee from "react"; +import I, { forwardRef as $t, useMemo as Be, useState as Ne, useCallback as nt, isValidElement as ut, createElement as Kl, useLayoutEffect as Ni, useEffect as Je, useRef as wt, cloneElement as xt, createContext as _t, Fragment as ka, useContext as Ke, useId as Bw, Component as Fw, useInsertionEffect as T$, Children as xr, memo as M8, Suspense as N8, PureComponent as fi, useImperativeHandle as $8 } from "react"; +import * as C$ from "react-dom"; +import { flushSync as E$, createPortal as Ww } from "react-dom"; +import { c as xo, g as Et } from "./_commonjsHelpers-DaMA6jEr.js"; +const zw = "-", D8 = (e) => { + const t = R8(e), { + conflictingClassGroups: n, + conflictingClassGroupModifiers: r + } = e; + return { + getClassGroupId: (a) => { + const s = a.split(zw); + return s[0] === "" && s.length !== 1 && s.shift(), k$(s, t) || I8(a); + }, + getConflictingClassGroupIds: (a, s) => { + const l = n[a] || []; + return s && r[a] ? [...l, ...r[a]] : l; + } + }; +}, k$ = (e, t) => { + var a; + if (e.length === 0) + return t.classGroupId; + const n = e[0], r = t.nextPart.get(n), i = r ? k$(e.slice(1), r) : void 0; + if (i) + return i; + if (t.validators.length === 0) + return; + const o = e.join(zw); + return (a = t.validators.find(({ + validator: s + }) => s(o))) == null ? void 0 : a.classGroupId; +}, rP = /^\[(.+)\]$/, I8 = (e) => { + if (rP.test(e)) { + const t = rP.exec(e)[1], n = t == null ? void 0 : t.substring(0, t.indexOf(":")); + if (n) + return "arbitrary.." + n; + } +}, R8 = (e) => { + const { + theme: t, + prefix: n + } = e, r = { + nextPart: /* @__PURE__ */ new Map(), + validators: [] + }; + return L8(Object.entries(e.classGroups), n).forEach(([o, a]) => { + r0(a, r, o, t); + }), r; +}, r0 = (e, t, n, r) => { + e.forEach((i) => { + if (typeof i == "string") { + const o = i === "" ? t : iP(t, i); + o.classGroupId = n; + return; + } + if (typeof i == "function") { + if (j8(i)) { + r0(i(r), t, n, r); + return; + } + t.validators.push({ + validator: i, + classGroupId: n + }); + return; + } + Object.entries(i).forEach(([o, a]) => { + r0(a, iP(t, o), n, r); + }); + }); +}, iP = (e, t) => { + let n = e; + return t.split(zw).forEach((r) => { + n.nextPart.has(r) || n.nextPart.set(r, { + nextPart: /* @__PURE__ */ new Map(), + validators: [] + }), n = n.nextPart.get(r); + }), n; +}, j8 = (e) => e.isThemeGetter, L8 = (e, t) => t ? e.map(([n, r]) => { + const i = r.map((o) => typeof o == "string" ? t + o : typeof o == "object" ? Object.fromEntries(Object.entries(o).map(([a, s]) => [t + a, s])) : o); + return [n, i]; +}) : e, B8 = (e) => { + if (e < 1) + return { + get: () => { + }, + set: () => { + } + }; + let t = 0, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(); + const i = (o, a) => { + n.set(o, a), t++, t > e && (t = 0, r = n, n = /* @__PURE__ */ new Map()); + }; + return { + get(o) { + let a = n.get(o); + if (a !== void 0) + return a; + if ((a = r.get(o)) !== void 0) + return i(o, a), a; + }, + set(o, a) { + n.has(o) ? n.set(o, a) : i(o, a); + } + }; +}, M$ = "!", F8 = (e) => { + const { + separator: t, + experimentalParseClassName: n + } = e, r = t.length === 1, i = t[0], o = t.length, a = (s) => { + const l = []; + let c = 0, f = 0, d; + for (let y = 0; y < s.length; y++) { + let x = s[y]; + if (c === 0) { + if (x === i && (r || s.slice(y, y + o) === t)) { + l.push(s.slice(f, y)), f = y + o; + continue; + } + if (x === "/") { + d = y; + continue; + } + } + x === "[" ? c++ : x === "]" && c--; + } + const p = l.length === 0 ? s : s.substring(f), m = p.startsWith(M$), g = m ? p.substring(1) : p, v = d && d > f ? d - f : void 0; + return { + modifiers: l, + hasImportantModifier: m, + baseClassName: g, + maybePostfixModifierPosition: v + }; + }; + return n ? (s) => n({ + className: s, + parseClassName: a + }) : a; +}, W8 = (e) => { + if (e.length <= 1) + return e; + const t = []; + let n = []; + return e.forEach((r) => { + r[0] === "[" ? (t.push(...n.sort(), r), n = []) : n.push(r); + }), t.push(...n.sort()), t; +}, z8 = (e) => ({ + cache: B8(e.cacheSize), + parseClassName: F8(e), + ...D8(e) +}), V8 = /\s+/, U8 = (e, t) => { + const { + parseClassName: n, + getClassGroupId: r, + getConflictingClassGroupIds: i + } = t, o = [], a = e.trim().split(V8); + let s = ""; + for (let l = a.length - 1; l >= 0; l -= 1) { + const c = a[l], { + modifiers: f, + hasImportantModifier: d, + baseClassName: p, + maybePostfixModifierPosition: m + } = n(c); + let g = !!m, v = r(g ? p.substring(0, m) : p); + if (!v) { + if (!g) { + s = c + (s.length > 0 ? " " + s : s); + continue; + } + if (v = r(p), !v) { + s = c + (s.length > 0 ? " " + s : s); + continue; + } + g = !1; + } + const y = W8(f).join(":"), x = d ? y + M$ : y, w = x + v; + if (o.includes(w)) + continue; + o.push(w); + const S = i(v, g); + for (let A = 0; A < S.length; ++A) { + const _ = S[A]; + o.push(x + _); + } + s = c + (s.length > 0 ? " " + s : s); + } + return s; +}; +function K8() { + let e = 0, t, n, r = ""; + for (; e < arguments.length; ) + (t = arguments[e++]) && (n = N$(t)) && (r && (r += " "), r += n); + return r; +} +const N$ = (e) => { + if (typeof e == "string") + return e; + let t, n = ""; + for (let r = 0; r < e.length; r++) + e[r] && (t = N$(e[r])) && (n && (n += " "), n += t); + return n; +}; +function H8(e, ...t) { + let n, r, i, o = a; + function a(l) { + const c = t.reduce((f, d) => d(f), e()); + return n = z8(c), r = n.cache.get, i = n.cache.set, o = s, s(l); + } + function s(l) { + const c = r(l); + if (c) + return c; + const f = U8(l, n); + return i(l, f), f; + } + return function() { + return o(K8.apply(null, arguments)); + }; +} +const zt = (e) => { + const t = (n) => n[e] || []; + return t.isThemeGetter = !0, t; +}, $$ = /^\[(?:([a-z-]+):)?(.+)\]$/i, G8 = /^\d+\/\d+$/, Y8 = /* @__PURE__ */ new Set(["px", "full", "screen"]), q8 = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, X8 = /\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$/, Z8 = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, J8 = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Q8 = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, mo = (e) => jl(e) || Y8.has(e) || G8.test(e), fa = (e) => Tc(e, "length", sK), jl = (e) => !!e && !Number.isNaN(Number(e)), jv = (e) => Tc(e, "number", jl), mu = (e) => !!e && Number.isInteger(Number(e)), eK = (e) => e.endsWith("%") && jl(e.slice(0, -1)), Xe = (e) => $$.test(e), da = (e) => q8.test(e), tK = /* @__PURE__ */ new Set(["length", "size", "percentage"]), nK = (e) => Tc(e, tK, D$), rK = (e) => Tc(e, "position", D$), iK = /* @__PURE__ */ new Set(["image", "url"]), oK = (e) => Tc(e, iK, cK), aK = (e) => Tc(e, "", lK), gu = () => !0, Tc = (e, t, n) => { + const r = $$.exec(e); + return r ? r[1] ? typeof t == "string" ? r[1] === t : t.has(r[1]) : n(r[2]) : !1; +}, sK = (e) => ( + // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths. + // For example, `hsl(0 0% 0%)` would be classified as a length without this check. + // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough. + X8.test(e) && !Z8.test(e) +), D$ = () => !1, lK = (e) => J8.test(e), cK = (e) => Q8.test(e), uK = () => { + const e = zt("colors"), t = zt("spacing"), n = zt("blur"), r = zt("brightness"), i = zt("borderColor"), o = zt("borderRadius"), a = zt("borderSpacing"), s = zt("borderWidth"), l = zt("contrast"), c = zt("grayscale"), f = zt("hueRotate"), d = zt("invert"), p = zt("gap"), m = zt("gradientColorStops"), g = zt("gradientColorStopPositions"), v = zt("inset"), y = zt("margin"), x = zt("opacity"), w = zt("padding"), S = zt("saturate"), A = zt("scale"), _ = zt("sepia"), O = zt("skew"), T = zt("space"), C = zt("translate"), E = () => ["auto", "contain", "none"], D = () => ["auto", "hidden", "clip", "visible", "scroll"], $ = () => ["auto", Xe, t], N = () => [Xe, t], B = () => ["", mo, fa], L = () => ["auto", jl, Xe], F = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], W = () => ["solid", "dashed", "dotted", "double", "none"], z = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], H = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], U = () => ["", "0", Xe], K = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], Y = () => [jl, Xe]; + return { + cacheSize: 500, + separator: ":", + theme: { + colors: [gu], + spacing: [mo, fa], + blur: ["none", "", da, Xe], + brightness: Y(), + borderColor: [e], + borderRadius: ["none", "", "full", da, Xe], + borderSpacing: N(), + borderWidth: B(), + contrast: Y(), + grayscale: U(), + hueRotate: Y(), + invert: U(), + gap: N(), + gradientColorStops: [e], + gradientColorStopPositions: [eK, fa], + inset: $(), + margin: $(), + opacity: Y(), + padding: N(), + saturate: Y(), + scale: Y(), + sepia: U(), + skew: Y(), + space: N(), + translate: N() + }, + classGroups: { + // Layout + /** + * Aspect Ratio + * @see https://tailwindcss.com/docs/aspect-ratio + */ + aspect: [{ + aspect: ["auto", "square", "video", Xe] + }], + /** + * Container + * @see https://tailwindcss.com/docs/container + */ + container: ["container"], + /** + * Columns + * @see https://tailwindcss.com/docs/columns + */ + columns: [{ + columns: [da] + }], + /** + * Break After + * @see https://tailwindcss.com/docs/break-after + */ + "break-after": [{ + "break-after": K() + }], + /** + * Break Before + * @see https://tailwindcss.com/docs/break-before + */ + "break-before": [{ + "break-before": K() + }], + /** + * Break Inside + * @see https://tailwindcss.com/docs/break-inside + */ + "break-inside": [{ + "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"] + }], + /** + * Box Decoration Break + * @see https://tailwindcss.com/docs/box-decoration-break + */ + "box-decoration": [{ + "box-decoration": ["slice", "clone"] + }], + /** + * Box Sizing + * @see https://tailwindcss.com/docs/box-sizing + */ + box: [{ + box: ["border", "content"] + }], + /** + * Display + * @see https://tailwindcss.com/docs/display + */ + 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"], + /** + * Floats + * @see https://tailwindcss.com/docs/float + */ + float: [{ + float: ["right", "left", "none", "start", "end"] + }], + /** + * Clear + * @see https://tailwindcss.com/docs/clear + */ + clear: [{ + clear: ["left", "right", "both", "none", "start", "end"] + }], + /** + * Isolation + * @see https://tailwindcss.com/docs/isolation + */ + isolation: ["isolate", "isolation-auto"], + /** + * Object Fit + * @see https://tailwindcss.com/docs/object-fit + */ + "object-fit": [{ + object: ["contain", "cover", "fill", "none", "scale-down"] + }], + /** + * Object Position + * @see https://tailwindcss.com/docs/object-position + */ + "object-position": [{ + object: [...F(), Xe] + }], + /** + * Overflow + * @see https://tailwindcss.com/docs/overflow + */ + overflow: [{ + overflow: D() + }], + /** + * Overflow X + * @see https://tailwindcss.com/docs/overflow + */ + "overflow-x": [{ + "overflow-x": D() + }], + /** + * Overflow Y + * @see https://tailwindcss.com/docs/overflow + */ + "overflow-y": [{ + "overflow-y": D() + }], + /** + * Overscroll Behavior + * @see https://tailwindcss.com/docs/overscroll-behavior + */ + overscroll: [{ + overscroll: E() + }], + /** + * Overscroll Behavior X + * @see https://tailwindcss.com/docs/overscroll-behavior + */ + "overscroll-x": [{ + "overscroll-x": E() + }], + /** + * Overscroll Behavior Y + * @see https://tailwindcss.com/docs/overscroll-behavior + */ + "overscroll-y": [{ + "overscroll-y": E() + }], + /** + * Position + * @see https://tailwindcss.com/docs/position + */ + position: ["static", "fixed", "absolute", "relative", "sticky"], + /** + * Top / Right / Bottom / Left + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + inset: [{ + inset: [v] + }], + /** + * Right / Left + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + "inset-x": [{ + "inset-x": [v] + }], + /** + * Top / Bottom + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + "inset-y": [{ + "inset-y": [v] + }], + /** + * Start + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + start: [{ + start: [v] + }], + /** + * End + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + end: [{ + end: [v] + }], + /** + * Top + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + top: [{ + top: [v] + }], + /** + * Right + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + right: [{ + right: [v] + }], + /** + * Bottom + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + bottom: [{ + bottom: [v] + }], + /** + * Left + * @see https://tailwindcss.com/docs/top-right-bottom-left + */ + left: [{ + left: [v] + }], + /** + * Visibility + * @see https://tailwindcss.com/docs/visibility + */ + visibility: ["visible", "invisible", "collapse"], + /** + * Z-Index + * @see https://tailwindcss.com/docs/z-index + */ + z: [{ + z: ["auto", mu, Xe] + }], + // Flexbox and Grid + /** + * Flex Basis + * @see https://tailwindcss.com/docs/flex-basis + */ + basis: [{ + basis: $() + }], + /** + * Flex Direction + * @see https://tailwindcss.com/docs/flex-direction + */ + "flex-direction": [{ + flex: ["row", "row-reverse", "col", "col-reverse"] + }], + /** + * Flex Wrap + * @see https://tailwindcss.com/docs/flex-wrap + */ + "flex-wrap": [{ + flex: ["wrap", "wrap-reverse", "nowrap"] + }], + /** + * Flex + * @see https://tailwindcss.com/docs/flex + */ + flex: [{ + flex: ["1", "auto", "initial", "none", Xe] + }], + /** + * Flex Grow + * @see https://tailwindcss.com/docs/flex-grow + */ + grow: [{ + grow: U() + }], + /** + * Flex Shrink + * @see https://tailwindcss.com/docs/flex-shrink + */ + shrink: [{ + shrink: U() + }], + /** + * Order + * @see https://tailwindcss.com/docs/order + */ + order: [{ + order: ["first", "last", "none", mu, Xe] + }], + /** + * Grid Template Columns + * @see https://tailwindcss.com/docs/grid-template-columns + */ + "grid-cols": [{ + "grid-cols": [gu] + }], + /** + * Grid Column Start / End + * @see https://tailwindcss.com/docs/grid-column + */ + "col-start-end": [{ + col: ["auto", { + span: ["full", mu, Xe] + }, Xe] + }], + /** + * Grid Column Start + * @see https://tailwindcss.com/docs/grid-column + */ + "col-start": [{ + "col-start": L() + }], + /** + * Grid Column End + * @see https://tailwindcss.com/docs/grid-column + */ + "col-end": [{ + "col-end": L() + }], + /** + * Grid Template Rows + * @see https://tailwindcss.com/docs/grid-template-rows + */ + "grid-rows": [{ + "grid-rows": [gu] + }], + /** + * Grid Row Start / End + * @see https://tailwindcss.com/docs/grid-row + */ + "row-start-end": [{ + row: ["auto", { + span: [mu, Xe] + }, Xe] + }], + /** + * Grid Row Start + * @see https://tailwindcss.com/docs/grid-row + */ + "row-start": [{ + "row-start": L() + }], + /** + * Grid Row End + * @see https://tailwindcss.com/docs/grid-row + */ + "row-end": [{ + "row-end": L() + }], + /** + * Grid Auto Flow + * @see https://tailwindcss.com/docs/grid-auto-flow + */ + "grid-flow": [{ + "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"] + }], + /** + * Grid Auto Columns + * @see https://tailwindcss.com/docs/grid-auto-columns + */ + "auto-cols": [{ + "auto-cols": ["auto", "min", "max", "fr", Xe] + }], + /** + * Grid Auto Rows + * @see https://tailwindcss.com/docs/grid-auto-rows + */ + "auto-rows": [{ + "auto-rows": ["auto", "min", "max", "fr", Xe] + }], + /** + * Gap + * @see https://tailwindcss.com/docs/gap + */ + gap: [{ + gap: [p] + }], + /** + * Gap X + * @see https://tailwindcss.com/docs/gap + */ + "gap-x": [{ + "gap-x": [p] + }], + /** + * Gap Y + * @see https://tailwindcss.com/docs/gap + */ + "gap-y": [{ + "gap-y": [p] + }], + /** + * Justify Content + * @see https://tailwindcss.com/docs/justify-content + */ + "justify-content": [{ + justify: ["normal", ...H()] + }], + /** + * Justify Items + * @see https://tailwindcss.com/docs/justify-items + */ + "justify-items": [{ + "justify-items": ["start", "end", "center", "stretch"] + }], + /** + * Justify Self + * @see https://tailwindcss.com/docs/justify-self + */ + "justify-self": [{ + "justify-self": ["auto", "start", "end", "center", "stretch"] + }], + /** + * Align Content + * @see https://tailwindcss.com/docs/align-content + */ + "align-content": [{ + content: ["normal", ...H(), "baseline"] + }], + /** + * Align Items + * @see https://tailwindcss.com/docs/align-items + */ + "align-items": [{ + items: ["start", "end", "center", "baseline", "stretch"] + }], + /** + * Align Self + * @see https://tailwindcss.com/docs/align-self + */ + "align-self": [{ + self: ["auto", "start", "end", "center", "stretch", "baseline"] + }], + /** + * Place Content + * @see https://tailwindcss.com/docs/place-content + */ + "place-content": [{ + "place-content": [...H(), "baseline"] + }], + /** + * Place Items + * @see https://tailwindcss.com/docs/place-items + */ + "place-items": [{ + "place-items": ["start", "end", "center", "baseline", "stretch"] + }], + /** + * Place Self + * @see https://tailwindcss.com/docs/place-self + */ + "place-self": [{ + "place-self": ["auto", "start", "end", "center", "stretch"] + }], + // Spacing + /** + * Padding + * @see https://tailwindcss.com/docs/padding + */ + p: [{ + p: [w] + }], + /** + * Padding X + * @see https://tailwindcss.com/docs/padding + */ + px: [{ + px: [w] + }], + /** + * Padding Y + * @see https://tailwindcss.com/docs/padding + */ + py: [{ + py: [w] + }], + /** + * Padding Start + * @see https://tailwindcss.com/docs/padding + */ + ps: [{ + ps: [w] + }], + /** + * Padding End + * @see https://tailwindcss.com/docs/padding + */ + pe: [{ + pe: [w] + }], + /** + * Padding Top + * @see https://tailwindcss.com/docs/padding + */ + pt: [{ + pt: [w] + }], + /** + * Padding Right + * @see https://tailwindcss.com/docs/padding + */ + pr: [{ + pr: [w] + }], + /** + * Padding Bottom + * @see https://tailwindcss.com/docs/padding + */ + pb: [{ + pb: [w] + }], + /** + * Padding Left + * @see https://tailwindcss.com/docs/padding + */ + pl: [{ + pl: [w] + }], + /** + * Margin + * @see https://tailwindcss.com/docs/margin + */ + m: [{ + m: [y] + }], + /** + * Margin X + * @see https://tailwindcss.com/docs/margin + */ + mx: [{ + mx: [y] + }], + /** + * Margin Y + * @see https://tailwindcss.com/docs/margin + */ + my: [{ + my: [y] + }], + /** + * Margin Start + * @see https://tailwindcss.com/docs/margin + */ + ms: [{ + ms: [y] + }], + /** + * Margin End + * @see https://tailwindcss.com/docs/margin + */ + me: [{ + me: [y] + }], + /** + * Margin Top + * @see https://tailwindcss.com/docs/margin + */ + mt: [{ + mt: [y] + }], + /** + * Margin Right + * @see https://tailwindcss.com/docs/margin + */ + mr: [{ + mr: [y] + }], + /** + * Margin Bottom + * @see https://tailwindcss.com/docs/margin + */ + mb: [{ + mb: [y] + }], + /** + * Margin Left + * @see https://tailwindcss.com/docs/margin + */ + ml: [{ + ml: [y] + }], + /** + * Space Between X + * @see https://tailwindcss.com/docs/space + */ + "space-x": [{ + "space-x": [T] + }], + /** + * Space Between X Reverse + * @see https://tailwindcss.com/docs/space + */ + "space-x-reverse": ["space-x-reverse"], + /** + * Space Between Y + * @see https://tailwindcss.com/docs/space + */ + "space-y": [{ + "space-y": [T] + }], + /** + * Space Between Y Reverse + * @see https://tailwindcss.com/docs/space + */ + "space-y-reverse": ["space-y-reverse"], + // Sizing + /** + * Width + * @see https://tailwindcss.com/docs/width + */ + w: [{ + w: ["auto", "min", "max", "fit", "svw", "lvw", "dvw", Xe, t] + }], + /** + * Min-Width + * @see https://tailwindcss.com/docs/min-width + */ + "min-w": [{ + "min-w": [Xe, t, "min", "max", "fit"] + }], + /** + * Max-Width + * @see https://tailwindcss.com/docs/max-width + */ + "max-w": [{ + "max-w": [Xe, t, "none", "full", "min", "max", "fit", "prose", { + screen: [da] + }, da] + }], + /** + * Height + * @see https://tailwindcss.com/docs/height + */ + h: [{ + h: [Xe, t, "auto", "min", "max", "fit", "svh", "lvh", "dvh"] + }], + /** + * Min-Height + * @see https://tailwindcss.com/docs/min-height + */ + "min-h": [{ + "min-h": [Xe, t, "min", "max", "fit", "svh", "lvh", "dvh"] + }], + /** + * Max-Height + * @see https://tailwindcss.com/docs/max-height + */ + "max-h": [{ + "max-h": [Xe, t, "min", "max", "fit", "svh", "lvh", "dvh"] + }], + /** + * Size + * @see https://tailwindcss.com/docs/size + */ + size: [{ + size: [Xe, t, "auto", "min", "max", "fit"] + }], + // Typography + /** + * Font Size + * @see https://tailwindcss.com/docs/font-size + */ + "font-size": [{ + text: ["base", da, fa] + }], + /** + * Font Smoothing + * @see https://tailwindcss.com/docs/font-smoothing + */ + "font-smoothing": ["antialiased", "subpixel-antialiased"], + /** + * Font Style + * @see https://tailwindcss.com/docs/font-style + */ + "font-style": ["italic", "not-italic"], + /** + * Font Weight + * @see https://tailwindcss.com/docs/font-weight + */ + "font-weight": [{ + font: ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black", jv] + }], + /** + * Font Family + * @see https://tailwindcss.com/docs/font-family + */ + "font-family": [{ + font: [gu] + }], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + "fvn-normal": ["normal-nums"], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + "fvn-ordinal": ["ordinal"], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + "fvn-slashed-zero": ["slashed-zero"], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + "fvn-figure": ["lining-nums", "oldstyle-nums"], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + "fvn-spacing": ["proportional-nums", "tabular-nums"], + /** + * Font Variant Numeric + * @see https://tailwindcss.com/docs/font-variant-numeric + */ + "fvn-fraction": ["diagonal-fractions", "stacked-fractons"], + /** + * Letter Spacing + * @see https://tailwindcss.com/docs/letter-spacing + */ + tracking: [{ + tracking: ["tighter", "tight", "normal", "wide", "wider", "widest", Xe] + }], + /** + * Line Clamp + * @see https://tailwindcss.com/docs/line-clamp + */ + "line-clamp": [{ + "line-clamp": ["none", jl, jv] + }], + /** + * Line Height + * @see https://tailwindcss.com/docs/line-height + */ + leading: [{ + leading: ["none", "tight", "snug", "normal", "relaxed", "loose", mo, Xe] + }], + /** + * List Style Image + * @see https://tailwindcss.com/docs/list-style-image + */ + "list-image": [{ + "list-image": ["none", Xe] + }], + /** + * List Style Type + * @see https://tailwindcss.com/docs/list-style-type + */ + "list-style-type": [{ + list: ["none", "disc", "decimal", Xe] + }], + /** + * List Style Position + * @see https://tailwindcss.com/docs/list-style-position + */ + "list-style-position": [{ + list: ["inside", "outside"] + }], + /** + * Placeholder Color + * @deprecated since Tailwind CSS v3.0.0 + * @see https://tailwindcss.com/docs/placeholder-color + */ + "placeholder-color": [{ + placeholder: [e] + }], + /** + * Placeholder Opacity + * @see https://tailwindcss.com/docs/placeholder-opacity + */ + "placeholder-opacity": [{ + "placeholder-opacity": [x] + }], + /** + * Text Alignment + * @see https://tailwindcss.com/docs/text-align + */ + "text-alignment": [{ + text: ["left", "center", "right", "justify", "start", "end"] + }], + /** + * Text Color + * @see https://tailwindcss.com/docs/text-color + */ + "text-color": [{ + text: [e] + }], + /** + * Text Opacity + * @see https://tailwindcss.com/docs/text-opacity + */ + "text-opacity": [{ + "text-opacity": [x] + }], + /** + * Text Decoration + * @see https://tailwindcss.com/docs/text-decoration + */ + "text-decoration": ["underline", "overline", "line-through", "no-underline"], + /** + * Text Decoration Style + * @see https://tailwindcss.com/docs/text-decoration-style + */ + "text-decoration-style": [{ + decoration: [...W(), "wavy"] + }], + /** + * Text Decoration Thickness + * @see https://tailwindcss.com/docs/text-decoration-thickness + */ + "text-decoration-thickness": [{ + decoration: ["auto", "from-font", mo, fa] + }], + /** + * Text Underline Offset + * @see https://tailwindcss.com/docs/text-underline-offset + */ + "underline-offset": [{ + "underline-offset": ["auto", mo, Xe] + }], + /** + * Text Decoration Color + * @see https://tailwindcss.com/docs/text-decoration-color + */ + "text-decoration-color": [{ + decoration: [e] + }], + /** + * Text Transform + * @see https://tailwindcss.com/docs/text-transform + */ + "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"], + /** + * Text Overflow + * @see https://tailwindcss.com/docs/text-overflow + */ + "text-overflow": ["truncate", "text-ellipsis", "text-clip"], + /** + * Text Wrap + * @see https://tailwindcss.com/docs/text-wrap + */ + "text-wrap": [{ + text: ["wrap", "nowrap", "balance", "pretty"] + }], + /** + * Text Indent + * @see https://tailwindcss.com/docs/text-indent + */ + indent: [{ + indent: N() + }], + /** + * Vertical Alignment + * @see https://tailwindcss.com/docs/vertical-align + */ + "vertical-align": [{ + align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", Xe] + }], + /** + * Whitespace + * @see https://tailwindcss.com/docs/whitespace + */ + whitespace: [{ + whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"] + }], + /** + * Word Break + * @see https://tailwindcss.com/docs/word-break + */ + break: [{ + break: ["normal", "words", "all", "keep"] + }], + /** + * Hyphens + * @see https://tailwindcss.com/docs/hyphens + */ + hyphens: [{ + hyphens: ["none", "manual", "auto"] + }], + /** + * Content + * @see https://tailwindcss.com/docs/content + */ + content: [{ + content: ["none", Xe] + }], + // Backgrounds + /** + * Background Attachment + * @see https://tailwindcss.com/docs/background-attachment + */ + "bg-attachment": [{ + bg: ["fixed", "local", "scroll"] + }], + /** + * Background Clip + * @see https://tailwindcss.com/docs/background-clip + */ + "bg-clip": [{ + "bg-clip": ["border", "padding", "content", "text"] + }], + /** + * Background Opacity + * @deprecated since Tailwind CSS v3.0.0 + * @see https://tailwindcss.com/docs/background-opacity + */ + "bg-opacity": [{ + "bg-opacity": [x] + }], + /** + * Background Origin + * @see https://tailwindcss.com/docs/background-origin + */ + "bg-origin": [{ + "bg-origin": ["border", "padding", "content"] + }], + /** + * Background Position + * @see https://tailwindcss.com/docs/background-position + */ + "bg-position": [{ + bg: [...F(), rK] + }], + /** + * Background Repeat + * @see https://tailwindcss.com/docs/background-repeat + */ + "bg-repeat": [{ + bg: ["no-repeat", { + repeat: ["", "x", "y", "round", "space"] + }] + }], + /** + * Background Size + * @see https://tailwindcss.com/docs/background-size + */ + "bg-size": [{ + bg: ["auto", "cover", "contain", nK] + }], + /** + * Background Image + * @see https://tailwindcss.com/docs/background-image + */ + "bg-image": [{ + bg: ["none", { + "gradient-to": ["t", "tr", "r", "br", "b", "bl", "l", "tl"] + }, oK] + }], + /** + * Background Color + * @see https://tailwindcss.com/docs/background-color + */ + "bg-color": [{ + bg: [e] + }], + /** + * Gradient Color Stops From Position + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + "gradient-from-pos": [{ + from: [g] + }], + /** + * Gradient Color Stops Via Position + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + "gradient-via-pos": [{ + via: [g] + }], + /** + * Gradient Color Stops To Position + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + "gradient-to-pos": [{ + to: [g] + }], + /** + * Gradient Color Stops From + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + "gradient-from": [{ + from: [m] + }], + /** + * Gradient Color Stops Via + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + "gradient-via": [{ + via: [m] + }], + /** + * Gradient Color Stops To + * @see https://tailwindcss.com/docs/gradient-color-stops + */ + "gradient-to": [{ + to: [m] + }], + // Borders + /** + * Border Radius + * @see https://tailwindcss.com/docs/border-radius + */ + rounded: [{ + rounded: [o] + }], + /** + * Border Radius Start + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-s": [{ + "rounded-s": [o] + }], + /** + * Border Radius End + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-e": [{ + "rounded-e": [o] + }], + /** + * Border Radius Top + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-t": [{ + "rounded-t": [o] + }], + /** + * Border Radius Right + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-r": [{ + "rounded-r": [o] + }], + /** + * Border Radius Bottom + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-b": [{ + "rounded-b": [o] + }], + /** + * Border Radius Left + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-l": [{ + "rounded-l": [o] + }], + /** + * Border Radius Start Start + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-ss": [{ + "rounded-ss": [o] + }], + /** + * Border Radius Start End + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-se": [{ + "rounded-se": [o] + }], + /** + * Border Radius End End + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-ee": [{ + "rounded-ee": [o] + }], + /** + * Border Radius End Start + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-es": [{ + "rounded-es": [o] + }], + /** + * Border Radius Top Left + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-tl": [{ + "rounded-tl": [o] + }], + /** + * Border Radius Top Right + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-tr": [{ + "rounded-tr": [o] + }], + /** + * Border Radius Bottom Right + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-br": [{ + "rounded-br": [o] + }], + /** + * Border Radius Bottom Left + * @see https://tailwindcss.com/docs/border-radius + */ + "rounded-bl": [{ + "rounded-bl": [o] + }], + /** + * Border Width + * @see https://tailwindcss.com/docs/border-width + */ + "border-w": [{ + border: [s] + }], + /** + * Border Width X + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-x": [{ + "border-x": [s] + }], + /** + * Border Width Y + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-y": [{ + "border-y": [s] + }], + /** + * Border Width Start + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-s": [{ + "border-s": [s] + }], + /** + * Border Width End + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-e": [{ + "border-e": [s] + }], + /** + * Border Width Top + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-t": [{ + "border-t": [s] + }], + /** + * Border Width Right + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-r": [{ + "border-r": [s] + }], + /** + * Border Width Bottom + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-b": [{ + "border-b": [s] + }], + /** + * Border Width Left + * @see https://tailwindcss.com/docs/border-width + */ + "border-w-l": [{ + "border-l": [s] + }], + /** + * Border Opacity + * @see https://tailwindcss.com/docs/border-opacity + */ + "border-opacity": [{ + "border-opacity": [x] + }], + /** + * Border Style + * @see https://tailwindcss.com/docs/border-style + */ + "border-style": [{ + border: [...W(), "hidden"] + }], + /** + * Divide Width X + * @see https://tailwindcss.com/docs/divide-width + */ + "divide-x": [{ + "divide-x": [s] + }], + /** + * Divide Width X Reverse + * @see https://tailwindcss.com/docs/divide-width + */ + "divide-x-reverse": ["divide-x-reverse"], + /** + * Divide Width Y + * @see https://tailwindcss.com/docs/divide-width + */ + "divide-y": [{ + "divide-y": [s] + }], + /** + * Divide Width Y Reverse + * @see https://tailwindcss.com/docs/divide-width + */ + "divide-y-reverse": ["divide-y-reverse"], + /** + * Divide Opacity + * @see https://tailwindcss.com/docs/divide-opacity + */ + "divide-opacity": [{ + "divide-opacity": [x] + }], + /** + * Divide Style + * @see https://tailwindcss.com/docs/divide-style + */ + "divide-style": [{ + divide: W() + }], + /** + * Border Color + * @see https://tailwindcss.com/docs/border-color + */ + "border-color": [{ + border: [i] + }], + /** + * Border Color X + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-x": [{ + "border-x": [i] + }], + /** + * Border Color Y + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-y": [{ + "border-y": [i] + }], + /** + * Border Color S + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-s": [{ + "border-s": [i] + }], + /** + * Border Color E + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-e": [{ + "border-e": [i] + }], + /** + * Border Color Top + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-t": [{ + "border-t": [i] + }], + /** + * Border Color Right + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-r": [{ + "border-r": [i] + }], + /** + * Border Color Bottom + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-b": [{ + "border-b": [i] + }], + /** + * Border Color Left + * @see https://tailwindcss.com/docs/border-color + */ + "border-color-l": [{ + "border-l": [i] + }], + /** + * Divide Color + * @see https://tailwindcss.com/docs/divide-color + */ + "divide-color": [{ + divide: [i] + }], + /** + * Outline Style + * @see https://tailwindcss.com/docs/outline-style + */ + "outline-style": [{ + outline: ["", ...W()] + }], + /** + * Outline Offset + * @see https://tailwindcss.com/docs/outline-offset + */ + "outline-offset": [{ + "outline-offset": [mo, Xe] + }], + /** + * Outline Width + * @see https://tailwindcss.com/docs/outline-width + */ + "outline-w": [{ + outline: [mo, fa] + }], + /** + * Outline Color + * @see https://tailwindcss.com/docs/outline-color + */ + "outline-color": [{ + outline: [e] + }], + /** + * Ring Width + * @see https://tailwindcss.com/docs/ring-width + */ + "ring-w": [{ + ring: B() + }], + /** + * Ring Width Inset + * @see https://tailwindcss.com/docs/ring-width + */ + "ring-w-inset": ["ring-inset"], + /** + * Ring Color + * @see https://tailwindcss.com/docs/ring-color + */ + "ring-color": [{ + ring: [e] + }], + /** + * Ring Opacity + * @see https://tailwindcss.com/docs/ring-opacity + */ + "ring-opacity": [{ + "ring-opacity": [x] + }], + /** + * Ring Offset Width + * @see https://tailwindcss.com/docs/ring-offset-width + */ + "ring-offset-w": [{ + "ring-offset": [mo, fa] + }], + /** + * Ring Offset Color + * @see https://tailwindcss.com/docs/ring-offset-color + */ + "ring-offset-color": [{ + "ring-offset": [e] + }], + // Effects + /** + * Box Shadow + * @see https://tailwindcss.com/docs/box-shadow + */ + shadow: [{ + shadow: ["", "inner", "none", da, aK] + }], + /** + * Box Shadow Color + * @see https://tailwindcss.com/docs/box-shadow-color + */ + "shadow-color": [{ + shadow: [gu] + }], + /** + * Opacity + * @see https://tailwindcss.com/docs/opacity + */ + opacity: [{ + opacity: [x] + }], + /** + * Mix Blend Mode + * @see https://tailwindcss.com/docs/mix-blend-mode + */ + "mix-blend": [{ + "mix-blend": [...z(), "plus-lighter", "plus-darker"] + }], + /** + * Background Blend Mode + * @see https://tailwindcss.com/docs/background-blend-mode + */ + "bg-blend": [{ + "bg-blend": z() + }], + // Filters + /** + * Filter + * @deprecated since Tailwind CSS v3.0.0 + * @see https://tailwindcss.com/docs/filter + */ + filter: [{ + filter: ["", "none"] + }], + /** + * Blur + * @see https://tailwindcss.com/docs/blur + */ + blur: [{ + blur: [n] + }], + /** + * Brightness + * @see https://tailwindcss.com/docs/brightness + */ + brightness: [{ + brightness: [r] + }], + /** + * Contrast + * @see https://tailwindcss.com/docs/contrast + */ + contrast: [{ + contrast: [l] + }], + /** + * Drop Shadow + * @see https://tailwindcss.com/docs/drop-shadow + */ + "drop-shadow": [{ + "drop-shadow": ["", "none", da, Xe] + }], + /** + * Grayscale + * @see https://tailwindcss.com/docs/grayscale + */ + grayscale: [{ + grayscale: [c] + }], + /** + * Hue Rotate + * @see https://tailwindcss.com/docs/hue-rotate + */ + "hue-rotate": [{ + "hue-rotate": [f] + }], + /** + * Invert + * @see https://tailwindcss.com/docs/invert + */ + invert: [{ + invert: [d] + }], + /** + * Saturate + * @see https://tailwindcss.com/docs/saturate + */ + saturate: [{ + saturate: [S] + }], + /** + * Sepia + * @see https://tailwindcss.com/docs/sepia + */ + sepia: [{ + sepia: [_] + }], + /** + * Backdrop Filter + * @deprecated since Tailwind CSS v3.0.0 + * @see https://tailwindcss.com/docs/backdrop-filter + */ + "backdrop-filter": [{ + "backdrop-filter": ["", "none"] + }], + /** + * Backdrop Blur + * @see https://tailwindcss.com/docs/backdrop-blur + */ + "backdrop-blur": [{ + "backdrop-blur": [n] + }], + /** + * Backdrop Brightness + * @see https://tailwindcss.com/docs/backdrop-brightness + */ + "backdrop-brightness": [{ + "backdrop-brightness": [r] + }], + /** + * Backdrop Contrast + * @see https://tailwindcss.com/docs/backdrop-contrast + */ + "backdrop-contrast": [{ + "backdrop-contrast": [l] + }], + /** + * Backdrop Grayscale + * @see https://tailwindcss.com/docs/backdrop-grayscale + */ + "backdrop-grayscale": [{ + "backdrop-grayscale": [c] + }], + /** + * Backdrop Hue Rotate + * @see https://tailwindcss.com/docs/backdrop-hue-rotate + */ + "backdrop-hue-rotate": [{ + "backdrop-hue-rotate": [f] + }], + /** + * Backdrop Invert + * @see https://tailwindcss.com/docs/backdrop-invert + */ + "backdrop-invert": [{ + "backdrop-invert": [d] + }], + /** + * Backdrop Opacity + * @see https://tailwindcss.com/docs/backdrop-opacity + */ + "backdrop-opacity": [{ + "backdrop-opacity": [x] + }], + /** + * Backdrop Saturate + * @see https://tailwindcss.com/docs/backdrop-saturate + */ + "backdrop-saturate": [{ + "backdrop-saturate": [S] + }], + /** + * Backdrop Sepia + * @see https://tailwindcss.com/docs/backdrop-sepia + */ + "backdrop-sepia": [{ + "backdrop-sepia": [_] + }], + // Tables + /** + * Border Collapse + * @see https://tailwindcss.com/docs/border-collapse + */ + "border-collapse": [{ + border: ["collapse", "separate"] + }], + /** + * Border Spacing + * @see https://tailwindcss.com/docs/border-spacing + */ + "border-spacing": [{ + "border-spacing": [a] + }], + /** + * Border Spacing X + * @see https://tailwindcss.com/docs/border-spacing + */ + "border-spacing-x": [{ + "border-spacing-x": [a] + }], + /** + * Border Spacing Y + * @see https://tailwindcss.com/docs/border-spacing + */ + "border-spacing-y": [{ + "border-spacing-y": [a] + }], + /** + * Table Layout + * @see https://tailwindcss.com/docs/table-layout + */ + "table-layout": [{ + table: ["auto", "fixed"] + }], + /** + * Caption Side + * @see https://tailwindcss.com/docs/caption-side + */ + caption: [{ + caption: ["top", "bottom"] + }], + // Transitions and Animation + /** + * Tranisition Property + * @see https://tailwindcss.com/docs/transition-property + */ + transition: [{ + transition: ["none", "all", "", "colors", "opacity", "shadow", "transform", Xe] + }], + /** + * Transition Duration + * @see https://tailwindcss.com/docs/transition-duration + */ + duration: [{ + duration: Y() + }], + /** + * Transition Timing Function + * @see https://tailwindcss.com/docs/transition-timing-function + */ + ease: [{ + ease: ["linear", "in", "out", "in-out", Xe] + }], + /** + * Transition Delay + * @see https://tailwindcss.com/docs/transition-delay + */ + delay: [{ + delay: Y() + }], + /** + * Animation + * @see https://tailwindcss.com/docs/animation + */ + animate: [{ + animate: ["none", "spin", "ping", "pulse", "bounce", Xe] + }], + // Transforms + /** + * Transform + * @see https://tailwindcss.com/docs/transform + */ + transform: [{ + transform: ["", "gpu", "none"] + }], + /** + * Scale + * @see https://tailwindcss.com/docs/scale + */ + scale: [{ + scale: [A] + }], + /** + * Scale X + * @see https://tailwindcss.com/docs/scale + */ + "scale-x": [{ + "scale-x": [A] + }], + /** + * Scale Y + * @see https://tailwindcss.com/docs/scale + */ + "scale-y": [{ + "scale-y": [A] + }], + /** + * Rotate + * @see https://tailwindcss.com/docs/rotate + */ + rotate: [{ + rotate: [mu, Xe] + }], + /** + * Translate X + * @see https://tailwindcss.com/docs/translate + */ + "translate-x": [{ + "translate-x": [C] + }], + /** + * Translate Y + * @see https://tailwindcss.com/docs/translate + */ + "translate-y": [{ + "translate-y": [C] + }], + /** + * Skew X + * @see https://tailwindcss.com/docs/skew + */ + "skew-x": [{ + "skew-x": [O] + }], + /** + * Skew Y + * @see https://tailwindcss.com/docs/skew + */ + "skew-y": [{ + "skew-y": [O] + }], + /** + * Transform Origin + * @see https://tailwindcss.com/docs/transform-origin + */ + "transform-origin": [{ + origin: ["center", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left", Xe] + }], + // Interactivity + /** + * Accent Color + * @see https://tailwindcss.com/docs/accent-color + */ + accent: [{ + accent: ["auto", e] + }], + /** + * Appearance + * @see https://tailwindcss.com/docs/appearance + */ + appearance: [{ + appearance: ["none", "auto"] + }], + /** + * Cursor + * @see https://tailwindcss.com/docs/cursor + */ + 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", Xe] + }], + /** + * Caret Color + * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities + */ + "caret-color": [{ + caret: [e] + }], + /** + * Pointer Events + * @see https://tailwindcss.com/docs/pointer-events + */ + "pointer-events": [{ + "pointer-events": ["none", "auto"] + }], + /** + * Resize + * @see https://tailwindcss.com/docs/resize + */ + resize: [{ + resize: ["none", "y", "x", ""] + }], + /** + * Scroll Behavior + * @see https://tailwindcss.com/docs/scroll-behavior + */ + "scroll-behavior": [{ + scroll: ["auto", "smooth"] + }], + /** + * Scroll Margin + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-m": [{ + "scroll-m": N() + }], + /** + * Scroll Margin X + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-mx": [{ + "scroll-mx": N() + }], + /** + * Scroll Margin Y + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-my": [{ + "scroll-my": N() + }], + /** + * Scroll Margin Start + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-ms": [{ + "scroll-ms": N() + }], + /** + * Scroll Margin End + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-me": [{ + "scroll-me": N() + }], + /** + * Scroll Margin Top + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-mt": [{ + "scroll-mt": N() + }], + /** + * Scroll Margin Right + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-mr": [{ + "scroll-mr": N() + }], + /** + * Scroll Margin Bottom + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-mb": [{ + "scroll-mb": N() + }], + /** + * Scroll Margin Left + * @see https://tailwindcss.com/docs/scroll-margin + */ + "scroll-ml": [{ + "scroll-ml": N() + }], + /** + * Scroll Padding + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-p": [{ + "scroll-p": N() + }], + /** + * Scroll Padding X + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-px": [{ + "scroll-px": N() + }], + /** + * Scroll Padding Y + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-py": [{ + "scroll-py": N() + }], + /** + * Scroll Padding Start + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-ps": [{ + "scroll-ps": N() + }], + /** + * Scroll Padding End + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-pe": [{ + "scroll-pe": N() + }], + /** + * Scroll Padding Top + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-pt": [{ + "scroll-pt": N() + }], + /** + * Scroll Padding Right + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-pr": [{ + "scroll-pr": N() + }], + /** + * Scroll Padding Bottom + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-pb": [{ + "scroll-pb": N() + }], + /** + * Scroll Padding Left + * @see https://tailwindcss.com/docs/scroll-padding + */ + "scroll-pl": [{ + "scroll-pl": N() + }], + /** + * Scroll Snap Align + * @see https://tailwindcss.com/docs/scroll-snap-align + */ + "snap-align": [{ + snap: ["start", "end", "center", "align-none"] + }], + /** + * Scroll Snap Stop + * @see https://tailwindcss.com/docs/scroll-snap-stop + */ + "snap-stop": [{ + snap: ["normal", "always"] + }], + /** + * Scroll Snap Type + * @see https://tailwindcss.com/docs/scroll-snap-type + */ + "snap-type": [{ + snap: ["none", "x", "y", "both"] + }], + /** + * Scroll Snap Type Strictness + * @see https://tailwindcss.com/docs/scroll-snap-type + */ + "snap-strictness": [{ + snap: ["mandatory", "proximity"] + }], + /** + * Touch Action + * @see https://tailwindcss.com/docs/touch-action + */ + touch: [{ + touch: ["auto", "none", "manipulation"] + }], + /** + * Touch Action X + * @see https://tailwindcss.com/docs/touch-action + */ + "touch-x": [{ + "touch-pan": ["x", "left", "right"] + }], + /** + * Touch Action Y + * @see https://tailwindcss.com/docs/touch-action + */ + "touch-y": [{ + "touch-pan": ["y", "up", "down"] + }], + /** + * Touch Action Pinch Zoom + * @see https://tailwindcss.com/docs/touch-action + */ + "touch-pz": ["touch-pinch-zoom"], + /** + * User Select + * @see https://tailwindcss.com/docs/user-select + */ + select: [{ + select: ["none", "text", "all", "auto"] + }], + /** + * Will Change + * @see https://tailwindcss.com/docs/will-change + */ + "will-change": [{ + "will-change": ["auto", "scroll", "contents", "transform", Xe] + }], + // SVG + /** + * Fill + * @see https://tailwindcss.com/docs/fill + */ + fill: [{ + fill: [e, "none"] + }], + /** + * Stroke Width + * @see https://tailwindcss.com/docs/stroke-width + */ + "stroke-w": [{ + stroke: [mo, fa, jv] + }], + /** + * Stroke + * @see https://tailwindcss.com/docs/stroke + */ + stroke: [{ + stroke: [e, "none"] + }], + // Accessibility + /** + * Screen Readers + * @see https://tailwindcss.com/docs/screen-readers + */ + sr: ["sr-only", "not-sr-only"], + /** + * Forced Color Adjust + * @see https://tailwindcss.com/docs/forced-color-adjust + */ + "forced-color-adjust": [{ + "forced-color-adjust": ["auto", "none"] + }] + }, + conflictingClassGroups: { + overflow: ["overflow-x", "overflow-y"], + overscroll: ["overscroll-x", "overscroll-y"], + inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"], + "inset-x": ["right", "left"], + "inset-y": ["top", "bottom"], + flex: ["basis", "grow", "shrink"], + gap: ["gap-x", "gap-y"], + p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"], + px: ["pr", "pl"], + py: ["pt", "pb"], + m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"], + mx: ["mr", "ml"], + my: ["mt", "mb"], + size: ["w", "h"], + "font-size": ["leading"], + "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"], + "fvn-ordinal": ["fvn-normal"], + "fvn-slashed-zero": ["fvn-normal"], + "fvn-figure": ["fvn-normal"], + "fvn-spacing": ["fvn-normal"], + "fvn-fraction": ["fvn-normal"], + "line-clamp": ["display", "overflow"], + rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"], + "rounded-s": ["rounded-ss", "rounded-es"], + "rounded-e": ["rounded-se", "rounded-ee"], + "rounded-t": ["rounded-tl", "rounded-tr"], + "rounded-r": ["rounded-tr", "rounded-br"], + "rounded-b": ["rounded-br", "rounded-bl"], + "rounded-l": ["rounded-tl", "rounded-bl"], + "border-spacing": ["border-spacing-x", "border-spacing-y"], + "border-w": ["border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"], + "border-w-x": ["border-w-r", "border-w-l"], + "border-w-y": ["border-w-t", "border-w-b"], + "border-color": ["border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"], + "border-color-x": ["border-color-r", "border-color-l"], + "border-color-y": ["border-color-t", "border-color-b"], + "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"], + "scroll-mx": ["scroll-mr", "scroll-ml"], + "scroll-my": ["scroll-mt", "scroll-mb"], + "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"], + "scroll-px": ["scroll-pr", "scroll-pl"], + "scroll-py": ["scroll-pt", "scroll-pb"], + touch: ["touch-x", "touch-y", "touch-pz"], + "touch-x": ["touch"], + "touch-y": ["touch"], + "touch-pz": ["touch"] + }, + conflictingClassGroupModifiers: { + "font-size": ["leading"] + } + }; +}, fK = /* @__PURE__ */ H8(uK); +function I$(e) { + var t, n, r = ""; + if (typeof e == "string" || typeof e == "number") r += e; + else if (typeof e == "object") if (Array.isArray(e)) { + var i = e.length; + for (t = 0; t < i; t++) e[t] && (n = I$(e[t])) && (r && (r += " "), r += n); + } else for (n in e) e[n] && (r && (r += " "), r += n); + return r; +} +function Ye() { + for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = I$(e)) && (r && (r += " "), r += t); + return r; +} +const G = (...e) => fK(Ye(...e)), of = (...e) => (...t) => e.forEach((n) => n == null ? void 0 : n(...t)), Hm = (e) => { + const 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; +}, dK = { + 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" +}, hK = () => { + var i, o; + const e = ((o = (i = window.navigator) == null ? void 0 : i.userAgentData) == null ? void 0 : o.platform) || window.navigator.platform, t = [ + "macOS", + "Macintosh", + "MacIntel", + "MacPPC", + "Mac68K" + ], n = ["Win32", "Win64", "Windows", "WinCE"]; + let r = "null"; + return t.includes(e) ? r = "Mac OS" : n.includes(e) && (r = "Windows"), r; +}, pK = (e) => e < 1024 ? `${e} bytes` : e < 1024 * 1024 ? `${(e / 1024).toFixed(2)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(2)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`, $u = { + set: (e, t) => { + if (!(typeof window > "u")) + try { + localStorage.setItem(e, JSON.stringify(t)); + } catch (n) { + console.error(n); + } + }, + get: (e) => { + if (typeof window > "u") + return null; + try { + const t = localStorage.getItem(e); + return t ? JSON.parse(t) : null; + } catch (t) { + return console.error(t), null; + } + }, + remove: (e) => { + if (!(typeof window > "u")) + try { + localStorage.removeItem(e); + } catch (t) { + console.error(t); + } + } +}, ar = $t( + (e, t) => { + const { + variant: n = "primary", + // primary, secondary, outline, ghost, link + size: r = "md", + // xs, sm, md, lg + type: i = "button", + tag: o = "button", + className: a, + children: s, + disabled: l = !1, + destructive: c = !1, + // true, false + icon: f = null, + // icon component + iconPosition: d = "left", + // left, right, + loading: p = !1, + ...m + } = e, g = "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", v = p ? "opacity-50 disabled:cursor-not-allowed" : "", y = { + 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" + }[n], x = c && !l ? { + primary: "bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover", + secondary: "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" + }[n] : "", w = { + 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" + }[r]; + let S, A = null, _ = ""; + return f && (_ = "flex items-center justify-center", d === "left" ? S = f : A = f), /* @__PURE__ */ me( + o, + { + ref: t, + type: i, + className: G( + _, + g, + w, + y, + x, + v, + { + "cursor-default": l + }, + a + ), + disabled: l, + ...m, + children: [ + S, + s ? /* @__PURE__ */ k("span", { className: "px-1", children: s }) : null, + A + ] + } + ); + } +), mK = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; +let Ko = (e = 21) => { + let t = "", n = crypto.getRandomValues(new Uint8Array(e)); + for (; e--; ) + t += mK[n[e] & 63]; + return t; +}; +const gK = ({ + label: e, + switchId: t, + disabled: n = !1, + children: r, + size: i +}) => { + const o = { + sm: "text-sm leading-4 font-medium", + md: "text-base leading-5 font-medium", + lg: "text-lg leading-6 font-medium" + }; + if (ut(e)) + return /* @__PURE__ */ me( + "div", + { + className: G("inline-flex items-center gap-3", "items-start"), + children: [ + r, + e + ] + } + ); + const s = () => { + const { heading: f = "", description: d = "" } = e || {}; + return /* @__PURE__ */ me("div", { className: "space-y-1.5", children: [ + f && /* @__PURE__ */ k( + "p", + { + className: G( + "text-text-primary m-0", + // text-base font-medium leading-4 + o[i], + n && "text-text-disabled" + ), + children: f + } + ), + d && /* @__PURE__ */ k( + "p", + { + className: G( + "text-text-secondary text-sm font-normal leading-5 m-0", + n && "text-text-disabled" + ), + children: d + } + ) + ] }); + }, l = !(e != null && e.heading) && !(e != null && e.description), c = !(e != null && e.heading) || !(e != null && e.description) ? "items-center" : "items-start"; + return l ? r : /* @__PURE__ */ me("div", { className: G("inline-flex", c, "gap-3"), children: [ + r, + /* @__PURE__ */ k( + "label", + { + htmlFor: t, + className: G(!n && "cursor-pointer"), + children: s() + } + ) + ] }); +}, yK = ({ + id: e, + onChange: t, + value: n, + defaultValue: r = !1, + size: i = "lg", + disabled: o = !1, + label: a = { heading: "", description: "" }, + name: s, + className: l, + ...c +}, f) => { + const d = Be(() => typeof n < "u", [n]), p = Be(() => e || `switch-${Ko()}`, []), [m, g] = Ne(r), v = "primary", y = nt( + () => d ? n : m, + [d, n, m] + ), x = (_) => { + if (o) + return; + const O = _.target.checked; + d || g(O), typeof t == "function" && t(O); + }, w = { + 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" + } + }, S = { + 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" + } + }, A = { + input: "bg-toggle-off-disabled disabled:border-transparent shadow-none disabled:cursor-not-allowed checked:disabled:bg-toggle-on-disabled", + toggleDial: "peer-disabled:cursor-not-allowed" + }; + return /* @__PURE__ */ k( + gK, + { + label: a, + switchId: p, + disabled: o, + size: i, + children: /* @__PURE__ */ me( + "div", + { + className: G( + "relative inline-block cursor-pointer rounded-full shrink-0", + S[i].container, + l + ), + children: [ + /* @__PURE__ */ k( + "input", + { + ref: f, + id: p, + type: "checkbox", + className: G( + "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]", + w[v].input, + o && A.input + ), + checked: y(), + onChange: x, + disabled: o, + name: s, + ...c + } + ), + /* @__PURE__ */ k( + "label", + { + htmlFor: p, + className: G( + "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", + S[i].toggleDial, + w[v].toggleDial, + o && A.toggleDial + ) + } + ) + ] + } + ) + } + ); +}, R$ = $t(yK); +R$.displayName = "Switch"; +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const vK = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), j$ = (...e) => e.filter((t, n, r) => !!t && r.indexOf(t) === n).join(" "); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +var bK = { + 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" +}; +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const xK = $t( + ({ + color: e = "currentColor", + size: t = 24, + strokeWidth: n = 2, + absoluteStrokeWidth: r, + className: i = "", + children: o, + iconNode: a, + ...s + }, l) => Kl( + "svg", + { + ref: l, + ...bK, + width: t, + height: t, + stroke: e, + strokeWidth: r ? Number(n) * 24 / Number(t) : n, + className: j$("lucide", i), + ...s + }, + [ + ...a.map(([c, f]) => Kl(c, f)), + ...Array.isArray(o) ? o : [o] + ] + ) +); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const rn = (e, t) => { + const n = $t( + ({ className: r, ...i }, o) => Kl(xK, { + ref: o, + iconNode: t, + className: j$(`lucide-${vK(e)}`, r), + ...i + }) + ); + return n.displayName = `${e}`, n; +}; +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const nd = rn("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const Vw = rn("ChevronDown", [ + ["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const L$ = rn("ChevronLeft", [ + ["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const Uw = rn("ChevronRight", [ + ["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const wK = rn("ChevronsUpDown", [ + ["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }], + ["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const _K = rn("CloudUpload", [ + ["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242", key: "1pljnt" }], + ["path", { d: "M12 12v9", key: "192myk" }], + ["path", { d: "m16 16-4-4-4 4", key: "119tzi" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const SK = rn("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" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const OK = rn("File", [ + ["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" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const AK = rn("ImageOff", [ + ["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }], + ["path", { d: "M10.41 10.41a2 2 0 1 1-2.83-2.83", key: "1bzlo9" }], + ["line", { x1: "13.5", x2: "6", y1: "13.5", y2: "21", key: "1q0aeu" }], + ["line", { x1: "18", x2: "21", y1: "12", y2: "15", key: "5mozeu" }], + [ + "path", + { + d: "M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59", + key: "mmje98" + } + ], + ["path", { d: "M21 15V5a2 2 0 0 0-2-2H9", key: "43el77" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const i0 = rn("Info", [ + ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }], + ["path", { d: "M12 16v-4", key: "1dtifu" }], + ["path", { d: "M12 8h.01", key: "e9boi3" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const PK = rn("LoaderCircle", [ + ["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const B$ = rn("Minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const TK = rn("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" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const CK = rn("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" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const F$ = rn("Plus", [ + ["path", { d: "M5 12h14", key: "1ays0h" }], + ["path", { d: "M12 5v14", key: "s699le" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const W$ = rn("Search", [ + ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }], + ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const EK = rn("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" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const kK = rn("Trash", [ + ["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" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const MK = rn("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" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const oP = rn("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" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const NK = rn("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" }] +]); +/** + * @license lucide-react v0.417.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */ +const Ma = rn("X", [ + ["path", { d: "M18 6 6 18", key: "1bl5f8" }], + ["path", { d: "m6 6 12 12", key: "d8bk6v" }] +]), $K = ({ + id: e, + label: t, + defaultChecked: n = !1, + checked: r, + onChange: i, + indeterminate: o, + disabled: a, + size: s = "md", + className: l, + ...c +}, f) => { + var O, T; + const d = Be(() => e || `checkbox-${Ko()}`, [e]), p = Be( + () => typeof r < "u", + [r] + ), [m, g] = Ne(n || !1), v = "primary", y = { + sm: { + checkbox: "size-4 rounded gap-1", + icon: "size-3", + text: "text-sm", + // text class for sm + description: "text-xs", + gap: "gap-0.5" + }, + md: { + checkbox: "size-5 rounded gap-1", + icon: "size-4", + text: "text-base", + // text class for md + description: "text-sm", + gap: "gap-1" + } + }, x = { + 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" + } + }, w = { + checkbox: "cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled", + icon: "cursor-not-allowed peer-disabled:text-border-disabled" + }, S = nt( + () => p ? r : m, + [p, r, m] + ), A = (C) => { + if (a) + return; + const E = C.target.checked; + p || g(E), typeof i == "function" && i(E); + }, _ = nt(() => ut(t) ? t : !(t != null && t.heading) && !(t != null && t.description) ? null : /* @__PURE__ */ me("div", { className: y[s].gap, children: [ + (t == null ? void 0 : t.heading) && /* @__PURE__ */ k( + "p", + { + className: G( + "text-text-primary font-medium leading-4 m-0", + y[s].text, + y[s].gap, + a && "text-text-disabled" + ), + children: t == null ? void 0 : t.heading + } + ), + (t == null ? void 0 : t.description) && /* @__PURE__ */ k( + "p", + { + className: G( + "text-text-secondary font-normal leading-5 m-0", + y[s].description, + a && "text-text-disabled" + ), + children: t == null ? void 0 : t.description + } + ) + ] }), [t, s, a]); + return /* @__PURE__ */ me( + "div", + { + className: G( + "inline-flex items-center gap-2", + !!t && "items-start", + a && "cursor-not-allowed" + ), + children: [ + /* @__PURE__ */ me( + "label", + { + className: G( + "relative flex items-center rounded-full p-0.5", + !a && "cursor-pointer" + ), + htmlFor: d, + children: [ + /* @__PURE__ */ k( + "input", + { + ref: f, + id: d, + type: "checkbox", + className: G( + "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", + x[v].checkbox, + y[s].checkbox, + a && w.checkbox, + l + ), + checked: S(), + onChange: A, + disabled: a, + ...c + } + ), + /* @__PURE__ */ k( + "span", + { + className: G( + "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", + x[v].icon, + a && w.icon + ), + children: o ? /* @__PURE__ */ k(B$, { className: G((O = y[s]) == null ? void 0 : O.icon) }) : /* @__PURE__ */ k(nd, { className: G((T = y[s]) == null ? void 0 : T.icon) }) + } + ) + ] + } + ), + !!t && /* @__PURE__ */ k( + "label", + { + className: G( + "cursor-pointer", + a && "cursor-not-allowed" + ), + htmlFor: d, + children: _() + } + ) + ] + } + ); +}, DK = $t($K); +DK.displayName = "Checkbox"; +const aP = { + 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" + } +}, sP = { + checkbox: "disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled cursor-not-allowed", + icon: "peer-disabled:text-border-disabled cursor-not-allowed" +}, IK = { + sm: "text-sm leading-5", + md: "text-base leading-6" +}, Lv = { + sm: { + checkbox: "size-4", + icon: "size-1.5", + info: "size-4" + }, + md: { + checkbox: "size-5", + icon: "size-2", + info: "size-5" + } +}, lP = { + sm: { + switch: "mt-1", + radio: "mt-0.5" + }, + md: { + switch: "mt-0.5", + radio: "mt-px" + } +}, RK = { + 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" +}, jK = "border-0 border-r border-border-subtle border-solid", LK = "bg-background-primary text-primary cursor-pointer flex items-center justify-center", BK = "hover:bg-button-tertiary-hover", FK = "focus:outline-none"; +function Gm() { + return typeof window < "u"; +} +function Wa(e) { + return z$(e) ? (e.nodeName || "").toLowerCase() : "#document"; +} +function Sr(e) { + var t; + return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window; +} +function to(e) { + var t; + return (t = (z$(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement; +} +function z$(e) { + return Gm() ? e instanceof Node || e instanceof Sr(e).Node : !1; +} +function Tt(e) { + return Gm() ? e instanceof Element || e instanceof Sr(e).Element : !1; +} +function hn(e) { + return Gm() ? e instanceof HTMLElement || e instanceof Sr(e).HTMLElement : !1; +} +function o0(e) { + return !Gm() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Sr(e).ShadowRoot; +} +function rd(e) { + const { + overflow: t, + overflowX: n, + overflowY: r, + display: i + } = Vr(e); + return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(i); +} +function WK(e) { + return ["table", "td", "th"].includes(Wa(e)); +} +function Ym(e) { + return [":popover-open", ":modal"].some((t) => { + try { + return e.matches(t); + } catch { + return !1; + } + }); +} +function Kw(e) { + const t = qm(), n = Tt(e) ? Vr(e) : e; + return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r)); +} +function zK(e) { + let t = Ro(e); + for (; hn(t) && !Na(t); ) { + if (Kw(t)) + return t; + if (Ym(t)) + return null; + t = Ro(t); + } + return null; +} +function qm() { + return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none"); +} +function Na(e) { + return ["html", "body", "#document"].includes(Wa(e)); +} +function Vr(e) { + return Sr(e).getComputedStyle(e); +} +function Xm(e) { + return Tt(e) ? { + scrollLeft: e.scrollLeft, + scrollTop: e.scrollTop + } : { + scrollLeft: e.scrollX, + scrollTop: e.scrollY + }; +} +function Ro(e) { + if (Wa(e) === "html") + return e; + const t = ( + // Step into the shadow DOM of the parent of a slotted node. + e.assignedSlot || // DOM Element detected. + e.parentNode || // ShadowRoot detected. + o0(e) && e.host || // Fallback. + to(e) + ); + return o0(t) ? t.host : t; +} +function V$(e) { + const t = Ro(e); + return Na(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : hn(t) && rd(t) ? t : V$(t); +} +function Aa(e, t, n) { + var r; + t === void 0 && (t = []), n === void 0 && (n = !0); + const i = V$(e), o = i === ((r = e.ownerDocument) == null ? void 0 : r.body), a = Sr(i); + if (o) { + const s = a0(a); + return t.concat(a, a.visualViewport || [], rd(i) ? i : [], s && n ? Aa(s) : []); + } + return t.concat(i, Aa(i, [], n)); +} +function a0(e) { + return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null; +} +function Si(e) { + let t = e.activeElement; + for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) { + var n; + t = t.shadowRoot.activeElement; + } + return t; +} +function dn(e, t) { + if (!e || !t) + return !1; + const n = t.getRootNode == null ? void 0 : t.getRootNode(); + if (e.contains(t)) + return !0; + if (n && o0(n)) { + let r = t; + for (; r; ) { + if (e === r) + return !0; + r = r.parentNode || r.host; + } + } + return !1; +} +function U$() { + const e = navigator.userAgentData; + return e != null && e.platform ? e.platform : navigator.platform; +} +function K$() { + const e = navigator.userAgentData; + return e && Array.isArray(e.brands) ? e.brands.map((t) => { + let { + brand: n, + version: r + } = t; + return n + "/" + r; + }).join(" ") : navigator.userAgent; +} +function H$(e) { + return e.mozInputSource === 0 && e.isTrusted ? !0 : s0() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType; +} +function Hw(e) { + return VK() ? !1 : !s0() && e.width === 0 && e.height === 0 || s0() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || // iOS VoiceOver returns 0.333• for width/height. + e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch"; +} +function Gw() { + return /apple/i.test(navigator.vendor); +} +function s0() { + const e = /android/i; + return e.test(U$()) || e.test(K$()); +} +function G$() { + return U$().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints; +} +function VK() { + return K$().includes("jsdom/"); +} +function af(e, t) { + const n = ["mouse", "pen"]; + return t || n.push("", void 0), n.includes(e); +} +function UK(e) { + return "nativeEvent" in e; +} +function KK(e) { + return e.matches("html,body"); +} +function Vn(e) { + return (e == null ? void 0 : e.ownerDocument) || document; +} +function Bv(e, t) { + if (t == null) + return !1; + if ("composedPath" in e) + return e.composedPath().includes(t); + const n = e; + return n.target != null && t.contains(n.target); +} +function wo(e) { + return "composedPath" in e ? e.composedPath()[0] : e.target; +} +const HK = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])"; +function Yw(e) { + return hn(e) && e.matches(HK); +} +function zn(e) { + e.preventDefault(), e.stopPropagation(); +} +function l0(e) { + return e ? e.getAttribute("role") === "combobox" && Yw(e) : !1; +} +const $a = Math.min, Lr = Math.max, sp = Math.round, Al = Math.floor, Ui = (e) => ({ + x: e, + y: e +}), GK = { + left: "right", + right: "left", + bottom: "top", + top: "bottom" +}, YK = { + start: "end", + end: "start" +}; +function c0(e, t, n) { + return Lr(e, $a(t, n)); +} +function Cc(e, t) { + return typeof e == "function" ? e(t) : e; +} +function Da(e) { + return e.split("-")[0]; +} +function Ec(e) { + return e.split("-")[1]; +} +function Y$(e) { + return e === "x" ? "y" : "x"; +} +function qw(e) { + return e === "y" ? "height" : "width"; +} +function $s(e) { + return ["top", "bottom"].includes(Da(e)) ? "y" : "x"; +} +function Xw(e) { + return Y$($s(e)); +} +function qK(e, t, n) { + n === void 0 && (n = !1); + const r = Ec(e), i = Xw(e), o = qw(i); + let a = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top"; + return t.reference[o] > t.floating[o] && (a = lp(a)), [a, lp(a)]; +} +function XK(e) { + const t = lp(e); + return [u0(e), t, u0(t)]; +} +function u0(e) { + return e.replace(/start|end/g, (t) => YK[t]); +} +function ZK(e, t, n) { + const r = ["left", "right"], i = ["right", "left"], o = ["top", "bottom"], a = ["bottom", "top"]; + switch (e) { + case "top": + case "bottom": + return n ? t ? i : r : t ? r : i; + case "left": + case "right": + return t ? o : a; + default: + return []; + } +} +function JK(e, t, n, r) { + const i = Ec(e); + let o = ZK(Da(e), n === "start", r); + return i && (o = o.map((a) => a + "-" + i), t && (o = o.concat(o.map(u0)))), o; +} +function lp(e) { + return e.replace(/left|right|bottom|top/g, (t) => GK[t]); +} +function QK(e) { + return { + top: 0, + right: 0, + bottom: 0, + left: 0, + ...e + }; +} +function q$(e) { + return typeof e != "number" ? QK(e) : { + top: e, + right: e, + bottom: e, + left: e + }; +} +function cp(e) { + const { + x: t, + y: n, + width: r, + height: i + } = e; + return { + width: r, + height: i, + top: n, + left: t, + right: t + r, + bottom: n + i, + x: t, + y: n + }; +} +/*! +* tabbable 6.2.0 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/ +var eH = ["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])"], up = /* @__PURE__ */ eH.join(","), X$ = typeof Element > "u", Hl = X$ ? function() { +} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, fp = !X$ && Element.prototype.getRootNode ? function(e) { + var t; + return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e); +} : function(e) { + return e == null ? void 0 : e.ownerDocument; +}, dp = function e(t, n) { + var r; + n === void 0 && (n = !0); + var i = t == null || (r = t.getAttribute) === null || r === void 0 ? void 0 : r.call(t, "inert"), o = i === "" || i === "true", a = o || n && t && e(t.parentNode); + return a; +}, tH = function(t) { + var n, r = t == null || (n = t.getAttribute) === null || n === void 0 ? void 0 : n.call(t, "contenteditable"); + return r === "" || r === "true"; +}, nH = function(t, n, r) { + if (dp(t)) + return []; + var i = Array.prototype.slice.apply(t.querySelectorAll(up)); + return n && Hl.call(t, up) && i.unshift(t), i = i.filter(r), i; +}, rH = function e(t, n, r) { + for (var i = [], o = Array.from(t); o.length; ) { + var a = o.shift(); + if (!dp(a, !1)) + if (a.tagName === "SLOT") { + var s = a.assignedElements(), l = s.length ? s : a.children, c = e(l, !0, r); + r.flatten ? i.push.apply(i, c) : i.push({ + scopeParent: a, + candidates: c + }); + } else { + var f = Hl.call(a, up); + f && r.filter(a) && (n || !t.includes(a)) && i.push(a); + var d = a.shadowRoot || // check for an undisclosed shadow + typeof r.getShadowRoot == "function" && r.getShadowRoot(a), p = !dp(d, !1) && (!r.shadowRootFilter || r.shadowRootFilter(a)); + if (d && p) { + var m = e(d === !0 ? a.children : d.children, !0, r); + r.flatten ? i.push.apply(i, m) : i.push({ + scopeParent: a, + candidates: m + }); + } else + o.unshift.apply(o, a.children); + } + } + return i; +}, Z$ = function(t) { + return !isNaN(parseInt(t.getAttribute("tabindex"), 10)); +}, J$ = function(t) { + if (!t) + throw new Error("No node provided"); + return t.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName) || tH(t)) && !Z$(t) ? 0 : t.tabIndex; +}, iH = function(t, n) { + var r = J$(t); + return r < 0 && n && !Z$(t) ? 0 : r; +}, oH = function(t, n) { + return t.tabIndex === n.tabIndex ? t.documentOrder - n.documentOrder : t.tabIndex - n.tabIndex; +}, Q$ = function(t) { + return t.tagName === "INPUT"; +}, aH = function(t) { + return Q$(t) && t.type === "hidden"; +}, sH = function(t) { + var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) { + return r.tagName === "SUMMARY"; + }); + return n; +}, lH = function(t, n) { + for (var r = 0; r < t.length; r++) + if (t[r].checked && t[r].form === n) + return t[r]; +}, cH = function(t) { + if (!t.name) + return !0; + var n = t.form || fp(t), r = function(s) { + return n.querySelectorAll('input[type="radio"][name="' + s + '"]'); + }, i; + if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function") + i = r(window.CSS.escape(t.name)); + else + try { + i = r(t.name); + } catch (a) { + 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", a.message), !1; + } + var o = lH(i, t.form); + return !o || o === t; +}, uH = function(t) { + return Q$(t) && t.type === "radio"; +}, fH = function(t) { + return uH(t) && !cH(t); +}, dH = function(t) { + var n, r = t && fp(t), i = (n = r) === null || n === void 0 ? void 0 : n.host, o = !1; + if (r && r !== t) { + var a, s, l; + for (o = !!((a = i) !== null && a !== void 0 && (s = a.ownerDocument) !== null && s !== void 0 && s.contains(i) || t != null && (l = t.ownerDocument) !== null && l !== void 0 && l.contains(t)); !o && i; ) { + var c, f, d; + r = fp(i), i = (c = r) === null || c === void 0 ? void 0 : c.host, o = !!((f = i) !== null && f !== void 0 && (d = f.ownerDocument) !== null && d !== void 0 && d.contains(i)); + } + } + return o; +}, cP = function(t) { + var n = t.getBoundingClientRect(), r = n.width, i = n.height; + return r === 0 && i === 0; +}, hH = function(t, n) { + var r = n.displayCheck, i = n.getShadowRoot; + if (getComputedStyle(t).visibility === "hidden") + return !0; + var o = Hl.call(t, "details>summary:first-of-type"), a = o ? t.parentElement : t; + if (Hl.call(a, "details:not([open]) *")) + return !0; + if (!r || r === "full" || r === "legacy-full") { + if (typeof i == "function") { + for (var s = t; t; ) { + var l = t.parentElement, c = fp(t); + if (l && !l.shadowRoot && i(l) === !0) + return cP(t); + t.assignedSlot ? t = t.assignedSlot : !l && c !== t.ownerDocument ? t = c.host : t = l; + } + t = s; + } + if (dH(t)) + return !t.getClientRects().length; + if (r !== "legacy-full") + return !0; + } else if (r === "non-zero-area") + return cP(t); + return !1; +}, pH = function(t) { + if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName)) + for (var n = t.parentElement; n; ) { + if (n.tagName === "FIELDSET" && n.disabled) { + for (var r = 0; r < n.children.length; r++) { + var i = n.children.item(r); + if (i.tagName === "LEGEND") + return Hl.call(n, "fieldset[disabled] *") ? !0 : !i.contains(t); + } + return !0; + } + n = n.parentElement; + } + return !1; +}, mH = function(t, n) { + return !(n.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor + // because we're limited in the type of selectors we can use in JSDom (see related + // note related to `candidateSelectors`) + dp(n) || aH(n) || hH(n, t) || // For a details element with a summary, the summary element gets the focus + sH(n) || pH(n)); +}, f0 = function(t, n) { + return !(fH(n) || J$(n) < 0 || !mH(t, n)); +}, gH = function(t) { + var n = parseInt(t.getAttribute("tabindex"), 10); + return !!(isNaN(n) || n >= 0); +}, yH = function e(t) { + var n = [], r = []; + return t.forEach(function(i, o) { + var a = !!i.scopeParent, s = a ? i.scopeParent : i, l = iH(s, a), c = a ? e(i.candidates) : s; + l === 0 ? a ? n.push.apply(n, c) : n.push(s) : r.push({ + documentOrder: o, + tabIndex: l, + item: i, + isScope: a, + content: c + }); + }), r.sort(oH).reduce(function(i, o) { + return o.isScope ? i.push.apply(i, o.content) : i.push(o.content), i; + }, []).concat(n); +}, Zm = function(t, n) { + n = n || {}; + var r; + return n.getShadowRoot ? r = rH([t], n.includeContainer, { + filter: f0.bind(null, n), + flatten: !1, + getShadowRoot: n.getShadowRoot, + shadowRootFilter: gH + }) : r = nH(t, n.includeContainer, f0.bind(null, n)), yH(r); +}, vH = function(t, n) { + if (n = n || {}, !t) + throw new Error("No node provided"); + return Hl.call(t, up) === !1 ? !1 : f0(n, t); +}; +function uP(e, t, n) { + let { + reference: r, + floating: i + } = e; + const o = $s(t), a = Xw(t), s = qw(a), l = Da(t), c = o === "y", f = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, p = r[s] / 2 - i[s] / 2; + let m; + switch (l) { + case "top": + m = { + x: f, + y: r.y - i.height + }; + break; + case "bottom": + m = { + x: f, + y: r.y + r.height + }; + break; + case "right": + m = { + x: r.x + r.width, + y: d + }; + break; + case "left": + m = { + x: r.x - i.width, + y: d + }; + break; + default: + m = { + x: r.x, + y: r.y + }; + } + switch (Ec(t)) { + case "start": + m[a] -= p * (n && c ? -1 : 1); + break; + case "end": + m[a] += p * (n && c ? -1 : 1); + break; + } + return m; +} +const bH = async (e, t, n) => { + const { + placement: r = "bottom", + strategy: i = "absolute", + middleware: o = [], + platform: a + } = n, s = o.filter(Boolean), l = await (a.isRTL == null ? void 0 : a.isRTL(t)); + let c = await a.getElementRects({ + reference: e, + floating: t, + strategy: i + }), { + x: f, + y: d + } = uP(c, r, l), p = r, m = {}, g = 0; + for (let v = 0; v < s.length; v++) { + const { + name: y, + fn: x + } = s[v], { + x: w, + y: S, + data: A, + reset: _ + } = await x({ + x: f, + y: d, + initialPlacement: r, + placement: p, + strategy: i, + middlewareData: m, + rects: c, + platform: a, + elements: { + reference: e, + floating: t + } + }); + f = w ?? f, d = S ?? d, m = { + ...m, + [y]: { + ...m[y], + ...A + } + }, _ && g <= 50 && (g++, typeof _ == "object" && (_.placement && (p = _.placement), _.rects && (c = _.rects === !0 ? await a.getElementRects({ + reference: e, + floating: t, + strategy: i + }) : _.rects), { + x: f, + y: d + } = uP(c, p, l)), v = -1); + } + return { + x: f, + y: d, + placement: p, + strategy: i, + middlewareData: m + }; +}; +async function Zw(e, t) { + var n; + t === void 0 && (t = {}); + const { + x: r, + y: i, + platform: o, + rects: a, + elements: s, + strategy: l + } = e, { + boundary: c = "clippingAncestors", + rootBoundary: f = "viewport", + elementContext: d = "floating", + altBoundary: p = !1, + padding: m = 0 + } = Cc(t, e), g = q$(m), y = s[p ? d === "floating" ? "reference" : "floating" : d], x = cp(await o.getClippingRect({ + element: (n = await (o.isElement == null ? void 0 : o.isElement(y))) == null || n ? y : y.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(s.floating)), + boundary: c, + rootBoundary: f, + strategy: l + })), w = d === "floating" ? { + x: r, + y: i, + width: a.floating.width, + height: a.floating.height + } : a.reference, S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(s.floating)), A = await (o.isElement == null ? void 0 : o.isElement(S)) ? await (o.getScale == null ? void 0 : o.getScale(S)) || { + x: 1, + y: 1 + } : { + x: 1, + y: 1 + }, _ = cp(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({ + elements: s, + rect: w, + offsetParent: S, + strategy: l + }) : w); + return { + top: (x.top - _.top + g.top) / A.y, + bottom: (_.bottom - x.bottom + g.bottom) / A.y, + left: (x.left - _.left + g.left) / A.x, + right: (_.right - x.right + g.right) / A.x + }; +} +const xH = (e) => ({ + name: "arrow", + options: e, + async fn(t) { + const { + x: n, + y: r, + placement: i, + rects: o, + platform: a, + elements: s, + middlewareData: l + } = t, { + element: c, + padding: f = 0 + } = Cc(e, t) || {}; + if (c == null) + return {}; + const d = q$(f), p = { + x: n, + y: r + }, m = Xw(i), g = qw(m), v = await a.getDimensions(c), y = m === "y", x = y ? "top" : "left", w = y ? "bottom" : "right", S = y ? "clientHeight" : "clientWidth", A = o.reference[g] + o.reference[m] - p[m] - o.floating[g], _ = p[m] - o.reference[m], O = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(c)); + let T = O ? O[S] : 0; + (!T || !await (a.isElement == null ? void 0 : a.isElement(O))) && (T = s.floating[S] || o.floating[g]); + const C = A / 2 - _ / 2, E = T / 2 - v[g] / 2 - 1, D = $a(d[x], E), $ = $a(d[w], E), N = D, B = T - v[g] - $, L = T / 2 - v[g] / 2 + C, F = c0(N, L, B), W = !l.arrow && Ec(i) != null && L !== F && o.reference[g] / 2 - (L < N ? D : $) - v[g] / 2 < 0, z = W ? L < N ? L - N : L - B : 0; + return { + [m]: p[m] + z, + data: { + [m]: F, + centerOffset: L - F - z, + ...W && { + alignmentOffset: z + } + }, + reset: W + }; + } +}), wH = function(e) { + return e === void 0 && (e = {}), { + name: "flip", + options: e, + async fn(t) { + var n, r; + const { + placement: i, + middlewareData: o, + rects: a, + initialPlacement: s, + platform: l, + elements: c + } = t, { + mainAxis: f = !0, + crossAxis: d = !0, + fallbackPlacements: p, + fallbackStrategy: m = "bestFit", + fallbackAxisSideDirection: g = "none", + flipAlignment: v = !0, + ...y + } = Cc(e, t); + if ((n = o.arrow) != null && n.alignmentOffset) + return {}; + const x = Da(i), w = $s(s), S = Da(s) === s, A = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), _ = p || (S || !v ? [lp(s)] : XK(s)), O = g !== "none"; + !p && O && _.push(...JK(s, v, g, A)); + const T = [s, ..._], C = await Zw(t, y), E = []; + let D = ((r = o.flip) == null ? void 0 : r.overflows) || []; + if (f && E.push(C[x]), d) { + const L = qK(i, a, A); + E.push(C[L[0]], C[L[1]]); + } + if (D = [...D, { + placement: i, + overflows: E + }], !E.every((L) => L <= 0)) { + var $, N; + const L = ((($ = o.flip) == null ? void 0 : $.index) || 0) + 1, F = T[L]; + if (F) + return { + data: { + index: L, + overflows: D + }, + reset: { + placement: F + } + }; + let W = (N = D.filter((z) => z.overflows[0] <= 0).sort((z, H) => z.overflows[1] - H.overflows[1])[0]) == null ? void 0 : N.placement; + if (!W) + switch (m) { + case "bestFit": { + var B; + const z = (B = D.filter((H) => { + if (O) { + const U = $s(H.placement); + return U === w || // Create a bias to the `y` side axis due to horizontal + // reading directions favoring greater width. + U === "y"; + } + return !0; + }).map((H) => [H.placement, H.overflows.filter((U) => U > 0).reduce((U, K) => U + K, 0)]).sort((H, U) => H[1] - U[1])[0]) == null ? void 0 : B[0]; + z && (W = z); + break; + } + case "initialPlacement": + W = s; + break; + } + if (i !== W) + return { + reset: { + placement: W + } + }; + } + return {}; + } + }; +}; +async function _H(e, t) { + const { + placement: n, + platform: r, + elements: i + } = e, o = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), a = Da(n), s = Ec(n), l = $s(n) === "y", c = ["left", "top"].includes(a) ? -1 : 1, f = o && l ? -1 : 1, d = Cc(t, e); + let { + mainAxis: p, + crossAxis: m, + alignmentAxis: g + } = typeof d == "number" ? { + mainAxis: d, + crossAxis: 0, + alignmentAxis: null + } : { + mainAxis: d.mainAxis || 0, + crossAxis: d.crossAxis || 0, + alignmentAxis: d.alignmentAxis + }; + return s && typeof g == "number" && (m = s === "end" ? g * -1 : g), l ? { + x: m * f, + y: p * c + } : { + x: p * c, + y: m * f + }; +} +const SH = function(e) { + return e === void 0 && (e = 0), { + name: "offset", + options: e, + async fn(t) { + var n, r; + const { + x: i, + y: o, + placement: a, + middlewareData: s + } = t, l = await _H(t, e); + return a === ((n = s.offset) == null ? void 0 : n.placement) && (r = s.arrow) != null && r.alignmentOffset ? {} : { + x: i + l.x, + y: o + l.y, + data: { + ...l, + placement: a + } + }; + } + }; +}, OH = function(e) { + return e === void 0 && (e = {}), { + name: "shift", + options: e, + async fn(t) { + const { + x: n, + y: r, + placement: i + } = t, { + mainAxis: o = !0, + crossAxis: a = !1, + limiter: s = { + fn: (y) => { + let { + x, + y: w + } = y; + return { + x, + y: w + }; + } + }, + ...l + } = Cc(e, t), c = { + x: n, + y: r + }, f = await Zw(t, l), d = $s(Da(i)), p = Y$(d); + let m = c[p], g = c[d]; + if (o) { + const y = p === "y" ? "top" : "left", x = p === "y" ? "bottom" : "right", w = m + f[y], S = m - f[x]; + m = c0(w, m, S); + } + if (a) { + const y = d === "y" ? "top" : "left", x = d === "y" ? "bottom" : "right", w = g + f[y], S = g - f[x]; + g = c0(w, g, S); + } + const v = s.fn({ + ...t, + [p]: m, + [d]: g + }); + return { + ...v, + data: { + x: v.x - n, + y: v.y - r, + enabled: { + [p]: o, + [d]: a + } + } + }; + } + }; +}, AH = function(e) { + return e === void 0 && (e = {}), { + name: "size", + options: e, + async fn(t) { + var n, r; + const { + placement: i, + rects: o, + platform: a, + elements: s + } = t, { + apply: l = () => { + }, + ...c + } = Cc(e, t), f = await Zw(t, c), d = Da(i), p = Ec(i), m = $s(i) === "y", { + width: g, + height: v + } = o.floating; + let y, x; + d === "top" || d === "bottom" ? (y = d, x = p === (await (a.isRTL == null ? void 0 : a.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (x = d, y = p === "end" ? "top" : "bottom"); + const w = v - f.top - f.bottom, S = g - f.left - f.right, A = $a(v - f[y], w), _ = $a(g - f[x], S), O = !t.middlewareData.shift; + let T = A, C = _; + if ((n = t.middlewareData.shift) != null && n.enabled.x && (C = S), (r = t.middlewareData.shift) != null && r.enabled.y && (T = w), O && !p) { + const D = Lr(f.left, 0), $ = Lr(f.right, 0), N = Lr(f.top, 0), B = Lr(f.bottom, 0); + m ? C = g - 2 * (D !== 0 || $ !== 0 ? D + $ : Lr(f.left, f.right)) : T = v - 2 * (N !== 0 || B !== 0 ? N + B : Lr(f.top, f.bottom)); + } + await l({ + ...t, + availableWidth: C, + availableHeight: T + }); + const E = await a.getDimensions(s.floating); + return g !== E.width || v !== E.height ? { + reset: { + rects: !0 + } + } : {}; + } + }; +}; +function eD(e) { + const t = Vr(e); + let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0; + const i = hn(e), o = i ? e.offsetWidth : n, a = i ? e.offsetHeight : r, s = sp(n) !== o || sp(r) !== a; + return s && (n = o, r = a), { + width: n, + height: r, + $: s + }; +} +function Jw(e) { + return Tt(e) ? e : e.contextElement; +} +function Ll(e) { + const t = Jw(e); + if (!hn(t)) + return Ui(1); + const n = t.getBoundingClientRect(), { + width: r, + height: i, + $: o + } = eD(t); + let a = (o ? sp(n.width) : n.width) / r, s = (o ? sp(n.height) : n.height) / i; + return (!a || !Number.isFinite(a)) && (a = 1), (!s || !Number.isFinite(s)) && (s = 1), { + x: a, + y: s + }; +} +const PH = /* @__PURE__ */ Ui(0); +function tD(e) { + const t = Sr(e); + return !qm() || !t.visualViewport ? PH : { + x: t.visualViewport.offsetLeft, + y: t.visualViewport.offsetTop + }; +} +function TH(e, t, n) { + return t === void 0 && (t = !1), !n || t && n !== Sr(e) ? !1 : t; +} +function Ds(e, t, n, r) { + t === void 0 && (t = !1), n === void 0 && (n = !1); + const i = e.getBoundingClientRect(), o = Jw(e); + let a = Ui(1); + t && (r ? Tt(r) && (a = Ll(r)) : a = Ll(e)); + const s = TH(o, n, r) ? tD(o) : Ui(0); + let l = (i.left + s.x) / a.x, c = (i.top + s.y) / a.y, f = i.width / a.x, d = i.height / a.y; + if (o) { + const p = Sr(o), m = r && Tt(r) ? Sr(r) : r; + let g = p, v = a0(g); + for (; v && r && m !== g; ) { + const y = Ll(v), x = v.getBoundingClientRect(), w = Vr(v), S = x.left + (v.clientLeft + parseFloat(w.paddingLeft)) * y.x, A = x.top + (v.clientTop + parseFloat(w.paddingTop)) * y.y; + l *= y.x, c *= y.y, f *= y.x, d *= y.y, l += S, c += A, g = Sr(v), v = a0(g); + } + } + return cp({ + width: f, + height: d, + x: l, + y: c + }); +} +function Qw(e, t) { + const n = Xm(e).scrollLeft; + return t ? t.left + n : Ds(to(e)).left + n; +} +function nD(e, t, n) { + n === void 0 && (n = !1); + const r = e.getBoundingClientRect(), i = r.left + t.scrollLeft - (n ? 0 : ( + // RTL scrollbar. + Qw(e, r) + )), o = r.top + t.scrollTop; + return { + x: i, + y: o + }; +} +function CH(e) { + let { + elements: t, + rect: n, + offsetParent: r, + strategy: i + } = e; + const o = i === "fixed", a = to(r), s = t ? Ym(t.floating) : !1; + if (r === a || s && o) + return n; + let l = { + scrollLeft: 0, + scrollTop: 0 + }, c = Ui(1); + const f = Ui(0), d = hn(r); + if ((d || !d && !o) && ((Wa(r) !== "body" || rd(a)) && (l = Xm(r)), hn(r))) { + const m = Ds(r); + c = Ll(r), f.x = m.x + r.clientLeft, f.y = m.y + r.clientTop; + } + const p = a && !d && !o ? nD(a, l, !0) : Ui(0); + return { + width: n.width * c.x, + height: n.height * c.y, + x: n.x * c.x - l.scrollLeft * c.x + f.x + p.x, + y: n.y * c.y - l.scrollTop * c.y + f.y + p.y + }; +} +function EH(e) { + return Array.from(e.getClientRects()); +} +function kH(e) { + const t = to(e), n = Xm(e), r = e.ownerDocument.body, i = Lr(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), o = Lr(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight); + let a = -n.scrollLeft + Qw(e); + const s = -n.scrollTop; + return Vr(r).direction === "rtl" && (a += Lr(t.clientWidth, r.clientWidth) - i), { + width: i, + height: o, + x: a, + y: s + }; +} +function MH(e, t) { + const n = Sr(e), r = to(e), i = n.visualViewport; + let o = r.clientWidth, a = r.clientHeight, s = 0, l = 0; + if (i) { + o = i.width, a = i.height; + const c = qm(); + (!c || c && t === "fixed") && (s = i.offsetLeft, l = i.offsetTop); + } + return { + width: o, + height: a, + x: s, + y: l + }; +} +function NH(e, t) { + const n = Ds(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, o = hn(e) ? Ll(e) : Ui(1), a = e.clientWidth * o.x, s = e.clientHeight * o.y, l = i * o.x, c = r * o.y; + return { + width: a, + height: s, + x: l, + y: c + }; +} +function fP(e, t, n) { + let r; + if (t === "viewport") + r = MH(e, n); + else if (t === "document") + r = kH(to(e)); + else if (Tt(t)) + r = NH(t, n); + else { + const i = tD(e); + r = { + x: t.x - i.x, + y: t.y - i.y, + width: t.width, + height: t.height + }; + } + return cp(r); +} +function rD(e, t) { + const n = Ro(e); + return n === t || !Tt(n) || Na(n) ? !1 : Vr(n).position === "fixed" || rD(n, t); +} +function $H(e, t) { + const n = t.get(e); + if (n) + return n; + let r = Aa(e, [], !1).filter((s) => Tt(s) && Wa(s) !== "body"), i = null; + const o = Vr(e).position === "fixed"; + let a = o ? Ro(e) : e; + for (; Tt(a) && !Na(a); ) { + const s = Vr(a), l = Kw(a); + !l && s.position === "fixed" && (i = null), (o ? !l && !i : !l && s.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || rd(a) && !l && rD(e, a)) ? r = r.filter((f) => f !== a) : i = s, a = Ro(a); + } + return t.set(e, r), r; +} +function DH(e) { + let { + element: t, + boundary: n, + rootBoundary: r, + strategy: i + } = e; + const a = [...n === "clippingAncestors" ? Ym(t) ? [] : $H(t, this._c) : [].concat(n), r], s = a[0], l = a.reduce((c, f) => { + const d = fP(t, f, i); + return c.top = Lr(d.top, c.top), c.right = $a(d.right, c.right), c.bottom = $a(d.bottom, c.bottom), c.left = Lr(d.left, c.left), c; + }, fP(t, s, i)); + return { + width: l.right - l.left, + height: l.bottom - l.top, + x: l.left, + y: l.top + }; +} +function IH(e) { + const { + width: t, + height: n + } = eD(e); + return { + width: t, + height: n + }; +} +function RH(e, t, n) { + const r = hn(t), i = to(t), o = n === "fixed", a = Ds(e, !0, o, t); + let s = { + scrollLeft: 0, + scrollTop: 0 + }; + const l = Ui(0); + if (r || !r && !o) + if ((Wa(t) !== "body" || rd(i)) && (s = Xm(t)), r) { + const p = Ds(t, !0, o, t); + l.x = p.x + t.clientLeft, l.y = p.y + t.clientTop; + } else i && (l.x = Qw(i)); + const c = i && !r && !o ? nD(i, s) : Ui(0), f = a.left + s.scrollLeft - l.x - c.x, d = a.top + s.scrollTop - l.y - c.y; + return { + x: f, + y: d, + width: a.width, + height: a.height + }; +} +function Fv(e) { + return Vr(e).position === "static"; +} +function dP(e, t) { + if (!hn(e) || Vr(e).position === "fixed") + return null; + if (t) + return t(e); + let n = e.offsetParent; + return to(e) === n && (n = n.ownerDocument.body), n; +} +function iD(e, t) { + const n = Sr(e); + if (Ym(e)) + return n; + if (!hn(e)) { + let i = Ro(e); + for (; i && !Na(i); ) { + if (Tt(i) && !Fv(i)) + return i; + i = Ro(i); + } + return n; + } + let r = dP(e, t); + for (; r && WK(r) && Fv(r); ) + r = dP(r, t); + return r && Na(r) && Fv(r) && !Kw(r) ? n : r || zK(e) || n; +} +const jH = async function(e) { + const t = this.getOffsetParent || iD, n = this.getDimensions, r = await n(e.floating); + return { + reference: RH(e.reference, await t(e.floating), e.strategy), + floating: { + x: 0, + y: 0, + width: r.width, + height: r.height + } + }; +}; +function LH(e) { + return Vr(e).direction === "rtl"; +} +const BH = { + convertOffsetParentRelativeRectToViewportRelativeRect: CH, + getDocumentElement: to, + getClippingRect: DH, + getOffsetParent: iD, + getElementRects: jH, + getClientRects: EH, + getDimensions: IH, + getScale: Ll, + isElement: Tt, + isRTL: LH +}; +function FH(e, t) { + let n = null, r; + const i = to(e); + function o() { + var s; + clearTimeout(r), (s = n) == null || s.disconnect(), n = null; + } + function a(s, l) { + s === void 0 && (s = !1), l === void 0 && (l = 1), o(); + const { + left: c, + top: f, + width: d, + height: p + } = e.getBoundingClientRect(); + if (s || t(), !d || !p) + return; + const m = Al(f), g = Al(i.clientWidth - (c + d)), v = Al(i.clientHeight - (f + p)), y = Al(c), w = { + rootMargin: -m + "px " + -g + "px " + -v + "px " + -y + "px", + threshold: Lr(0, $a(1, l)) || 1 + }; + let S = !0; + function A(_) { + const O = _[0].intersectionRatio; + if (O !== l) { + if (!S) + return a(); + O ? a(!1, O) : r = setTimeout(() => { + a(!1, 1e-7); + }, 1e3); + } + S = !1; + } + try { + n = new IntersectionObserver(A, { + ...w, + // Handle