lantern-harness 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +68 -0
- package/README.md +9 -9
- package/builtin/session/lh-nav-groups.mjs +106 -9
- package/cli/data-root.mjs +30 -0
- package/cli/lantern.mjs +34 -6
- package/cli/server.mjs +4 -0
- package/config/app.defaults.json +5 -1
- package/dist/500.html +18 -4
- package/dist/_astro/Base.CVuoZiOB.css +1 -0
- package/dist/_astro/{Base.astro_astro_type_script_index_0_lang.Cg_8YLVA.js → Base.astro_astro_type_script_index_0_lang.BY4OccDH.js} +1 -1
- package/dist/_astro/CaseExecBoard.GIKQ6ccZ.js +1 -0
- package/dist/_astro/CaseGenerateApp.CGAvw04r.js +9 -0
- package/dist/_astro/CasesLibrary.Bz6ol7zL.js +1 -0
- package/dist/_astro/ChatApp.DZtDZRst.js +273 -0
- package/dist/_astro/ConfirmDialog.CBVsDJ8f.js +1 -0
- package/dist/_astro/DashboardBoard.CiTrVBqY.js +5 -0
- package/dist/_astro/DatePicker.CMfX7F6z.js +1 -0
- package/dist/_astro/DocsFileBrowser.CBXAmRPO.js +1 -0
- package/dist/_astro/DocsPager.CPwAnvW_.js +1 -0
- package/dist/_astro/DrawerField.KANqQwFl.js +1 -0
- package/dist/_astro/KnowledgeLibrary._QhB3GHk.js +1 -0
- package/dist/_astro/NamePromptDialog.Dl5kSnQI.js +1 -0
- package/dist/_astro/NavLibraries.fxwcz0b0.js +1 -0
- package/dist/_astro/PluginsPage.BfG3nVYJ.js +1 -0
- package/dist/_astro/PluginsPage.n_0T_ww4.js +39 -0
- package/dist/_astro/PromptsLibrary.BLPVH34I.js +1 -0
- package/dist/_astro/ReportsPage.DMk4sUqZ.js +1 -0
- package/dist/_astro/RequirementsLibrary.CyYBiauz.js +1 -0
- package/dist/_astro/SearchableSelect.yFomIhKQ.js +1 -0
- package/dist/_astro/SelectDropdown.flhHcwyd.js +1 -0
- package/dist/_astro/SettingsDialog.DrVaJAbf.js +1 -0
- package/dist/_astro/SpaceSwitcher.C84a-OBd.js +7 -0
- package/dist/_astro/TagSelect.u8DTop7v.js +1 -0
- package/dist/_astro/TasksBoard.Dwva6gEQ.js +1 -0
- package/dist/_astro/TemplatesLibrary.DV_MUASP.js +1 -0
- package/dist/_astro/TestStatsBoard.Cl6mBowv.js +1 -0
- package/dist/_astro/TodosBoard.BTl5qvQt.js +1 -0
- package/dist/_astro/active-element-history.CeefGkFQ.js +1 -0
- package/dist/_astro/app-config.BAFE-Tim.js +1 -0
- package/dist/_astro/case-exec.HjGrOY_O.js +1 -0
- package/dist/_astro/dialog.DXHznyjD.js +1 -0
- package/dist/_astro/i18n.DFwWWvim.js +7 -0
- package/dist/_astro/listbox.Di-t5U37.js +1 -0
- package/dist/_astro/menu.Bkluqxic.js +1 -0
- package/dist/_astro/{open-docs-in-session.fLwnA5qh.js → open-docs-in-session.D7Hxuu0K.js} +1 -1
- package/dist/_astro/plugins.BHRarX88.js +1 -0
- package/dist/_astro/portal.Cm9XlIPf.js +5 -0
- package/dist/_astro/report-prompt.Cmw4XzfY.js +1 -0
- package/dist/_astro/{settings.CkbipdPI.js → settings.1aF-h9sh.js} +2 -2
- package/dist/_astro/tasks.hIKi1ek-.js +1 -0
- package/dist/_astro/test-stats.BIHEJz5c.js +1 -0
- package/dist/_astro/use-text-value.BuY0Cm1z.js +1 -0
- package/dist/_astro/use-tree-walker.CfTHFX43.js +1 -0
- package/dist/_astro/useListAnim.CpGB1cft.js +1 -0
- package/dist/_astro/view-prefs.DHPN5Yq6.js +1 -0
- package/dist/case-exec/index.html +267 -0
- package/dist/cases/generate/index.html +19 -5
- package/dist/cases/library/index.html +19 -5
- package/dist/cn-holidays.json +42 -0
- package/dist/dashboard/index.html +268 -0
- package/dist/docs/changelog/index.html +81 -5
- package/dist/docs/install/index.html +21 -7
- package/dist/docs/manual/index.html +124 -19
- package/dist/index.html +19 -5
- package/dist/knowledge/index.html +19 -5
- package/dist/knowledge//345/212/237/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213/347/274/226/345/206/231/350/247/204/350/214/203/index.html +18 -4
- package/dist/plugins/index.html +19 -5
- package/dist/prompts/index.html +19 -5
- package/dist/reports/index.html +267 -0
- package/dist/requirements/index.html +19 -5
- package/dist/tasks/index.html +19 -5
- package/dist/templates/index.html +19 -5
- package/dist/templates//345/212/237/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212//345/212/237/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +18 -4
- package/dist/templates//346/200/247/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212//346/200/247/350/203/275/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +18 -4
- package/dist/templates//346/200/247/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213//346/200/247/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213/346/250/241/346/235/277/index.html +18 -4
- package/dist/templates//346/216/245/345/217/243/346/265/213/350/257/225/346/212/245/345/221/212//346/216/245/345/217/243/346/265/213/350/257/225/346/212/245/345/221/212/346/250/241/346/235/277/index.html +18 -4
- package/dist/templates//350/207/252/345/212/250/345/214/226/346/265/213/350/257/225/347/224/250/344/276/213//350/207/252/345/212/250/345/214/226/346/265/213/350/257/225/347/224/250/344/276/213/346/250/241/346/235/277/index.html +18 -4
- package/dist/test-stats/index.html +267 -0
- package/dist/todos/index.html +19 -5
- package/docs//345/205/250/345/261/200/346/217/222/344/273/266.md +1 -1
- package/docs//345/256/211/350/243/205/346/211/213/345/206/214.md +3 -3
- package/docs//346/223/215/344/275/234/346/211/213/345/206/214.md +106 -34
- package/lh-plugins/lh-project-docs.mjs +1 -1
- package/lh-plugins/lh-reports.mjs +413 -0
- package/lh-plugins/lh-stats.mjs +409 -0
- package/lh-plugins/lh-tasks.mjs +7 -6
- package/lh-plugins/lh-todos.mjs +7 -9
- package/lh-plugins/lh-work-store.mjs +81 -0
- package/lh-plugins/storage-domain.mjs +54 -4
- package/package.json +3 -1
- package/config/seeds//346/217/220/347/244/272/350/257/215/347/256/241/347/220/206//345/212/237/350/203/275/346/265/213/350/257/225/347/224/250/344/276/213/346/217/220/347/244/272/350/257/215v1.0.md +0 -155
- package/dist/_astro/Base.ByB0D4ZA.css +0 -1
- package/dist/_astro/CaseGenerateApp.BlZyjWEr.js +0 -9
- package/dist/_astro/CasesLibrary.C76La3Xj.js +0 -1
- package/dist/_astro/ChatApp.gfsPLvan.js +0 -269
- package/dist/_astro/ConfirmDialog.BYz4HREM.js +0 -1
- package/dist/_astro/DatePicker.BdwFRioL.js +0 -1
- package/dist/_astro/DocsFileBrowser.BxAyrkkw.js +0 -1
- package/dist/_astro/KnowledgeLibrary.Cv488Hot.js +0 -1
- package/dist/_astro/NamePromptDialog.DGBlDH_k.js +0 -1
- package/dist/_astro/NavLibraries.ALZ9e12z.js +0 -1
- package/dist/_astro/PluginsPage.B2uxCiHL.js +0 -1
- package/dist/_astro/PluginsPage.DEkyOfQE.js +0 -39
- package/dist/_astro/PromptsLibrary.BUC1OiCH.js +0 -1
- package/dist/_astro/RequirementsLibrary.D3olQI63.js +0 -1
- package/dist/_astro/SearchableSelect.DP74JRWW.js +0 -1
- package/dist/_astro/SelectDropdown.D2i7-lQC.js +0 -1
- package/dist/_astro/SettingsDialog.CrMDjSLJ.js +0 -1
- package/dist/_astro/SlideOverDrawer.C7UVeCX1.js +0 -1
- package/dist/_astro/SpaceSwitcher.Wf8EPYUx.js +0 -7
- package/dist/_astro/TasksBoard.2j7rGT9O.js +0 -1
- package/dist/_astro/TemplatesLibrary.J0x7yIcY.js +0 -1
- package/dist/_astro/TodosBoard.BugeB7_7.js +0 -1
- package/dist/_astro/app-config.vqDkEMS3.js +0 -1
- package/dist/_astro/i18n.9qZsrs3u.js +0 -7
- package/dist/_astro/listbox.DdDDDJ5Z.js +0 -1
- package/dist/_astro/menu.CqkL87bV.js +0 -1
- package/dist/_astro/plugins.DSUPSizB.js +0 -1
- package/dist/_astro/portal.C3KrUREL.js +0 -5
- package/dist/_astro/use-text-value.C0IDspmh.js +0 -1
- package/dist/_astro/use-tree-walker.oRTnhHS-.js +0 -1
- package/dist/_astro/useListAnim.Y3N2budK.js +0 -1
- /package/dist/{apple-touch-icon.png → brand/apple-touch-icon.png} +0 -0
- /package/dist/{brand-mark.png → brand/brand-mark.png} +0 -0
- /package/dist/{favicon.png → brand/favicon.png} +0 -0
- /package/dist/{icon-192.png → brand/icon-192.png} +0 -0
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{c as e,n as t,r as n,t as r}from"./react-dom.CqAxpHMt.js";var i=e(t(),1),a=Object.defineProperty,o=(e,t,n)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,s=(e,t,n)=>(o(e,typeof t==`symbol`?t:t+``,n),n),c=new class{constructor(){s(this,`current`,this.detect()),s(this,`handoffState`,`pending`),s(this,`currentId`,0)}set(e){this.current!==e&&(this.handoffState=`pending`,this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current===`server`}get isClient(){return this.current===`client`}detect(){return typeof window>`u`||typeof document>`u`?`server`:`client`}handoff(){this.handoffState===`pending`&&(this.handoffState=`complete`)}get isHandoffComplete(){return this.handoffState===`complete`}};function l(e){return c.isServer?null:e==null?document:e?.ownerDocument??document}function u(e){return c.isServer?null:e==null?document:(e?.getRootNode)?.call(e)??document}function d(e){return u(e)?.activeElement??null}function f(e){return d(e)===e}function p(e){typeof queueMicrotask==`function`?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function m(){let e=[],t={addEventListener(e,n,r,i){return e.addEventListener(n,r,i),t.add(()=>e.removeEventListener(n,r,i))},requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...e){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...e))},setTimeout(...e){let n=setTimeout(...e);return t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return p(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=m();return e(t),this.add(()=>t.dispose())},add(t){return e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}},dispose(){for(let t of e.splice(0))t()}};return t}function h(){let[e]=(0,i.useState)(m);return(0,i.useEffect)(()=>()=>e.dispose(),[e]),e}var g=(e,t)=>{c.isServer?(0,i.useEffect)(e,t):(0,i.useLayoutEffect)(e,t)};function _(e){let t=(0,i.useRef)(e);return g(()=>{t.current=e},[e]),t}var v=function(e){let t=_(e);return i.useCallback((...e)=>t.current(...e),[t])};function ee(e){return(0,i.useMemo)(()=>e,Object.values(e))}var te=(0,i.createContext)(void 0);function ne(){return(0,i.useContext)(te)}function y(...e){return Array.from(new Set(e.flatMap(e=>typeof e==`string`?e.split(` `):[]))).filter(Boolean).join(` `)}function b(e,t,...n){if(e in t){let r=t[e];return typeof r==`function`?r(...n):r}let r=Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(`, `)}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,b),r}var re=(e=>(e[e.None=0]=`None`,e[e.RenderStrategy=1]=`RenderStrategy`,e[e.Static=2]=`Static`,e))(re||{}),ie=(e=>(e[e.Unmount=0]=`Unmount`,e[e.Hidden=1]=`Hidden`,e))(ie||{});function x(){let e=oe();return(0,i.useCallback)(t=>ae({mergeRefs:e,...t}),[e])}function ae({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:a=!0,name:o,mergeRefs:s}){s??=se;let c=C(t,e);if(a)return S(c,n,r,o,s);let l=i??0;if(l&2){let{static:e=!1,...t}=c;if(e)return S(t,n,r,o,s)}if(l&1){let{unmount:e=!0,...t}=c;return b(+!e,{0(){return null},1(){return S({...t,hidden:!0,style:{display:`none`}},n,r,o,s)}})}return S(c,n,r,o,s)}function S(e,t={},n,r,a){let{as:o=n,children:s,refName:c=`ref`,...l}=E(e,[`unmount`,`static`]),u=e.ref===void 0?{}:{[c]:e.ref},d=typeof s==`function`?s(t):s;d=ue(d),`className`in l&&l.className&&typeof l.className==`function`&&(l.className=l.className(t)),l[`aria-labelledby`]&&l[`aria-labelledby`]===l.id&&(l[`aria-labelledby`]=void 0);let f={};if(t){let e=!1,n=[];for(let[r,i]of Object.entries(t))typeof i==`boolean`&&(e=!0),i===!0&&n.push(r.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`));if(e){f[`data-headlessui-state`]=n.join(` `);for(let e of n)f[`data-${e}`]=``}}if(D(o)&&(Object.keys(T(l)).length>0||Object.keys(T(f)).length>0)){if(!(0,i.isValidElement)(d)||Array.isArray(d)&&d.length>1||de(d)){if(Object.keys(T(l)).length>0)throw Error([`Passing props on "Fragment"!`,``,`The current component <${r} /> is rendering a "Fragment".`,`However we need to passthrough the following props:`,Object.keys(T(l)).concat(Object.keys(T(f))).map(e=>` - ${e}`).join(`
|
|
2
|
-
`),``,`You can apply a few solutions:`,['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',`Render a single element as the child so that we can forward the props onto that element.`].map(e=>` - ${e}`).join(`
|
|
3
|
-
`)].join(`
|
|
4
|
-
`))}else{let e=d.props?.className,t=typeof e==`function`?(...t)=>y(e(...t),l.className):y(e,l.className),n=t?{className:t}:{},r=C(d.props,T(E(l,[`ref`])));for(let e in f)e in r&&delete f[e];return(0,i.cloneElement)(d,Object.assign({},r,f,u,{ref:a(le(d),u.ref)},n))}}return(0,i.createElement)(o,Object.assign({},E(l,[`ref`]),!D(o)&&u,!D(o)&&f),d)}function oe(){let e=(0,i.useRef)([]),t=(0,i.useCallback)(t=>{for(let n of e.current)n!=null&&(typeof n==`function`?n(t):n.current=t)},[]);return(...n)=>{if(!n.every(e=>e==null))return e.current=n,t}}function se(...e){return e.every(e=>e==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n==`function`?n(t):n.current=t)}}function C(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith(`on`)&&typeof r[e]==`function`?(n[e]??(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t[`aria-disabled`])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>(e?.preventDefault)?.call(e)]);for(let e in n)Object.assign(t,{[e](t,...r){let i=n[e];for(let e of i){if((t instanceof Event||t?.nativeEvent instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function ce(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith(`on`)&&typeof r[e]==`function`?(n[e]??(n[e]=[]),n[e].push(r[e])):t[e]=r[e];for(let e in n)Object.assign(t,{[e](...t){let r=n[e];for(let e of r)e?.(...t)}});return t}function w(e){return Object.assign((0,i.forwardRef)(e),{displayName:e.displayName??e.name})}function T(e){let t=Object.assign({},e);for(let e in t)t[e]===void 0&&delete t[e];return t}function E(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function le(e){return`19.3.0`.split(`.`)[0]>=`19`?e.props.ref:e.ref}function ue(e){if(e!=null&&e.$$typeof===Symbol.for(`react.lazy`)){let t=e._payload;if(t!=null&&t.status===`fulfilled`)return ue(t.value)}return e}function D(e){return e===i.Fragment||e===Symbol.for(`react.fragment`)}function de(e){return D(e.type)}var fe=`span`,pe=(e=>(e[e.None=1]=`None`,e[e.Focusable=2]=`Focusable`,e[e.Hidden=4]=`Hidden`,e))(pe||{});function me(e,t){let{features:n=1,...r}=e,i={ref:t,"aria-hidden":(n&2)==2?!0:r[`aria-hidden`]??void 0,hidden:(n&4)==4||void 0,style:{position:`fixed`,top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`,...(n&4)==4&&(n&2)!=2&&{display:`none`}}};return x()({ourProps:i,theirProps:r,slot:{},defaultTag:fe,name:`Hidden`})}var he=w(me);function ge(e){return typeof e!=`object`||!e?!1:`nodeType`in e}function O(e){return ge(e)&&`tagName`in e}function k(e){return O(e)&&`accessKey`in e}function A(e){return O(e)&&`tabIndex`in e}function _e(e){return O(e)&&`style`in e}function ve(e){return k(e)&&e.nodeName===`IFRAME`}function ye(e){return k(e)&&e.nodeName===`INPUT`}function be(e){return k(e)&&e.nodeName===`LABEL`}function xe(e){return k(e)&&e.nodeName===`FIELDSET`}function Se(e){return k(e)&&e.nodeName===`LEGEND`}function Ce(e){return O(e)?e.matches(`a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]`):!1}var j=Symbol();function we(e,t=!0){return Object.assign(e,{[j]:t})}function M(...e){let t=(0,i.useRef)(e);(0,i.useEffect)(()=>{t.current=e},[e]);let n=v(e=>{for(let n of t.current)n!=null&&(typeof n==`function`?n(e):n.current=e)});return e.every(e=>e==null||e?.[j])?void 0:n}var N=(0,i.createContext)(null);N.displayName=`DescriptionContext`;function Te(){let e=(0,i.useContext)(N);if(e===null){let e=Error(`You used a <Description /> component, but it is not inside a relevant parent.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,Te),e}return e}function Ee(){return(0,i.useContext)(N)?.value??void 0}function De(){let[e,t]=(0,i.useState)([]);return[e.length>0?e.join(` `):void 0,(0,i.useMemo)(()=>function(e){let n=v(e=>(t(t=>[...t,e]),()=>t(t=>{let n=t.slice(),r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}))),r=(0,i.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value}),[n,e.slot,e.name,e.props,e.value]);return i.createElement(N.Provider,{value:r},e.children)},[t])]}var Oe=`p`;function ke(e,t){let n=(0,i.useId)(),r=ne(),{id:a=`headlessui-description-${n}`,...o}=e,s=Te(),c=M(t);g(()=>s.register(a),[a,s.register]);let l=ee({...s.slot,disabled:r||!1}),u={ref:c,...s.props,id:a};return x()({ourProps:u,theirProps:o,slot:l,defaultTag:Oe,name:s.name||`Description`})}var Ae=w(ke),je=Object.assign(Ae,{}),Me=(e=>(e.Space=` `,e.Enter=`Enter`,e.Escape=`Escape`,e.Backspace=`Backspace`,e.Delete=`Delete`,e.ArrowLeft=`ArrowLeft`,e.ArrowUp=`ArrowUp`,e.ArrowRight=`ArrowRight`,e.ArrowDown=`ArrowDown`,e.Home=`Home`,e.End=`End`,e.PageUp=`PageUp`,e.PageDown=`PageDown`,e.Tab=`Tab`,e))(Me||{}),Ne=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e),this.set(e,t)),t}},Pe=Object.defineProperty,Fe=(e,t,n)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ie=(e,t,n)=>(Fe(e,typeof t==`symbol`?t:t+``,n),n),Le=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},P=(e,t,n)=>(Le(e,t,`read from private field`),n?n.call(e):t.get(e)),F=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},Re=(e,t,n,r)=>(Le(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),I,L,R,ze=class{constructor(e){F(this,I,{}),F(this,L,new Ne(()=>new Set)),F(this,R,new Set),Ie(this,`disposables`,m()),Re(this,I,e),c.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return P(this,I)}subscribe(e,t){if(c.isServer)return()=>{};let n={selector:e,callback:t,current:e(P(this,I))};return P(this,R).add(n),this.disposables.add(()=>{P(this,R).delete(n)})}on(e,t){return c.isServer?()=>{}:(P(this,L).get(e).add(t),this.disposables.add(()=>{P(this,L).get(e).delete(t)}))}send(e){let t=this.reduce(P(this,I),e);if(t!==P(this,I)){Re(this,I,t);for(let e of P(this,R)){let t=e.selector(P(this,I));Be(e.current,t)||(e.current=t,e.callback(t))}for(let t of P(this,L).get(e.type))t(P(this,I),e)}}};I=new WeakMap,L=new WeakMap,R=new WeakMap;function Be(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t?!1:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&z(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size&&z(e.entries(),t.entries()):Ve(e)&&Ve(t)?z(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()):!1}function z(e,t){do{let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}while(1)}function Ve(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||Object.getPrototypeOf(t)===null}function He(e){let[t,n]=e(),r=m();return(...e)=>{t(...e),r.dispose(),r.microTask(n)}}var Ue=Object.defineProperty,We=(e,t,n)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ge=(e,t,n)=>(We(e,typeof t==`symbol`?t:t+``,n),n),Ke=(e=>(e[e.Push=0]=`Push`,e[e.Pop=1]=`Pop`,e))(Ke||{}),qe={0(e,t){let n=t.id,r=e.stack,i=e.stack.indexOf(n);if(i!==-1){let t=e.stack.slice();return t.splice(i,1),t.push(n),r=t,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(r===-1)return e;let i=e.stack.slice();return i.splice(r,1),{...e,stack:i}}},Je=class e extends ze{constructor(){super(...arguments),Ge(this,`actions`,{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),Ge(this,`selectors`,{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}static new(){return new e({stack:[]})}reduce(e,t){return b(t.type,qe,e,t)}},Ye=new Ne(()=>Je.new()),Xe=n((e=>{var n=t();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=n.useRef,s=n.useEffect,c=n.useMemo,l=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Ze=n(((e,t)=>{t.exports=Xe()}))();function Qe(e,t,n=Be){return(0,Ze.useSyncExternalStoreWithSelector)(v(t=>e.subscribe($e,t)),v(()=>e.state),v(()=>e.state),v(t),n)}function $e(e){return e}function B(e,t){let n=(0,i.useId)(),r=Ye.get(t),[a,o]=Qe(r,(0,i.useCallback)(e=>[r.selectors.isTop(e,n),r.selectors.inStack(e,n)],[r,n]));return g(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),e?!o||a:!1}var V=new Map,H=new Map;function et(e){let t=H.get(e)??0;return H.set(e,t+1),t===0&&(V.set(e,{"aria-hidden":e.getAttribute(`aria-hidden`),inert:e.inert}),e.setAttribute(`aria-hidden`,`true`),e.inert=!0),()=>tt(e)}function tt(e){let t=H.get(e)??1;if(t===1?H.delete(e):H.set(e,t-1),t!==1)return;let n=V.get(e);n&&(n[`aria-hidden`]===null?e.removeAttribute(`aria-hidden`):e.setAttribute(`aria-hidden`,n[`aria-hidden`]),e.inert=n.inert,V.delete(e))}function nt(e,{allowed:t,disallowed:n}={}){let r=B(e,`inert-others`);g(()=>{if(!r)return;let e=m();for(let t of n?.()??[])t&&e.add(et(t));let i=t?.()??[];for(let t of i){if(!t)continue;let n=l(t);if(!n)continue;let r=t.parentElement;for(;r&&r!==n.body;){for(let t of r.children)i.some(e=>t.contains(e))||e.add(et(t));r=r.parentElement}}return e.dispose},[r,t,n])}function rt(e,t,n){let r=_(e=>{let t=e.getBoundingClientRect();t.x===0&&t.y===0&&t.width===0&&t.height===0&&n()});(0,i.useEffect)(()=>{if(!e)return;let n=t===null?null:k(t)?t:t.current;if(!n)return;let i=m();if(typeof ResizeObserver<`u`){let e=new ResizeObserver(()=>r.current(n));e.observe(n),i.add(()=>e.disconnect())}if(typeof IntersectionObserver<`u`){let e=new IntersectionObserver(()=>r.current(n));e.observe(n),i.add(()=>e.disconnect())}return()=>i.dispose()},[t,r,e])}var U=[`[contentEditable=true]`,`[tabindex]`,`a[href]`,`area[href]`,`button:not([disabled])`,`iframe`,`input:not([disabled])`,`select:not([disabled])`,`details>summary`,`textarea:not([disabled])`].map(e=>`${e}:not([tabindex='-1'])`).join(`,`),it=[`[data-autofocus]`].map(e=>`${e}:not([tabindex='-1'])`).join(`,`),at=(e=>(e[e.First=1]=`First`,e[e.Previous=2]=`Previous`,e[e.Next=4]=`Next`,e[e.Last=8]=`Last`,e[e.WrapAround=16]=`WrapAround`,e[e.NoScroll=32]=`NoScroll`,e[e.AutoFocus=64]=`AutoFocus`,e))(at||{}),ot=(e=>(e[e.Error=0]=`Error`,e[e.Overflow=1]=`Overflow`,e[e.Success=2]=`Success`,e[e.Underflow=3]=`Underflow`,e))(ot||{}),st=(e=>(e[e.Previous=-1]=`Previous`,e[e.Next=1]=`Next`,e))(st||{});function ct(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(U)).sort((e,t)=>Math.sign((e.tabIndex||2**53-1)-(t.tabIndex||2**53-1)))}function lt(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(it)).sort((e,t)=>Math.sign((e.tabIndex||2**53-1)-(t.tabIndex||2**53-1)))}var W=(e=>(e[e.Strict=0]=`Strict`,e[e.Loose=1]=`Loose`,e))(W||{});function G(e,t=0){return e!==l(e)?.body&&b(t,{0(){return e.matches(U)},1(){let t=e;for(;t!==null;){if(t.matches(U))return!0;t=t.parentElement}return!1}})}function ut(e){m().nextFrame(()=>{let t=d(e);t&&A(t)&&!G(t,0)&&ft(e)})}var dt=(e=>(e[e.Keyboard=0]=`Keyboard`,e[e.Mouse=1]=`Mouse`,e))(dt||{});typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`keydown`,e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible=``)},!0),document.addEventListener(`click`,e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible=``)},!0));function ft(e){e?.focus({preventScroll:!0})}var pt=[`textarea`,`input`].join(`,`);function mt(e){return(e?.matches)?.call(e,pt)??!1}function ht(e,t=e=>e){return e.slice().sort((e,n)=>{let r=t(e),i=t(n);if(r===null||i===null)return 0;let a=r.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function gt(e,t,n=e===null?document.body:u(e)){return _t(ct(n),t,{relativeTo:e})}function _t(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let a=Array.isArray(e)?e.length>0?u(e[0]):document:u(e),o=Array.isArray(e)?n?ht(e):e:t&64?lt(e):ct(e);i.length>0&&o.length>1&&(o=o.filter(e=>!i.some(t=>t!=null&&`current`in t?t?.current===e:t===e))),r??=a?.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw Error(`Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last`)})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw Error(`Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last`)})(),l=t&32?{preventScroll:!0}:{},f=0,p=o.length,m;do{if(f>=p||f+p<=0)return 0;let e=c+f;if(t&16)e=(e+p)%p;else{if(e<0)return 3;if(e>=p)return 1}m=o[e],m?.focus(l),f+=s}while(m!==d(m));return t&6&&mt(m)&&m.select(),2}function vt(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function yt(){return/Android/gi.test(window.navigator.userAgent)}function K(){return vt()||yt()}function q(e,t,n,r){let a=_(n);(0,i.useEffect)(()=>{if(!e)return;function n(e){a.current(e)}return document.addEventListener(t,n,r),()=>document.removeEventListener(t,n,r)},[e,t,r])}function bt(e,t,n,r){let a=_(n);(0,i.useEffect)(()=>{if(!e)return;function n(e){a.current(e)}return window.addEventListener(t,n,r),()=>window.removeEventListener(t,n,r)},[e,t,r])}var xt=30;function St(e,t,n){let r=_(n),a=(0,i.useCallback)(function(e,n){if(e.defaultPrevented)return;let i=n(e);if(i===null||!i.getRootNode().contains(i)||!i.isConnected)return;let a=function e(t){return typeof t==`function`?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of a)if(t!==null&&(t.contains(i)||e.composed&&e.composedPath().includes(t)))return;return!G(i,W.Loose)&&i.tabIndex!==-1&&e.preventDefault(),r.current(e,i)},[r,t]),o=(0,i.useRef)(null);q(e,`pointerdown`,e=>{K()||(o.current=e.composedPath?.call(e)?.[0]||e.target)},!0),q(e,`pointerup`,e=>{if(K()||!o.current)return;let t=o.current;return o.current=null,a(e,()=>t)},!0);let s=(0,i.useRef)({x:0,y:0});q(e,`touchstart`,e=>{s.current.x=e.touches[0].clientX,s.current.y=e.touches[0].clientY},!0),q(e,`touchend`,e=>{let t={x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY};if(!(Math.abs(t.x-s.current.x)>=xt||Math.abs(t.y-s.current.y)>=xt))return a(e,()=>A(e.target)?e.target:null)},!0),bt(e,`blur`,e=>a(e,()=>ve(window.document.activeElement)?window.document.activeElement:null),!0)}var Ct=e(r(),1);function wt(...e){return(0,i.useMemo)(()=>l(...e),[...e])}function Tt(e,t,n,r){let a=_(n);(0,i.useEffect)(()=>{e??=window;function n(e){a.current(e)}return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)},[e,t,r])}function Et(e){return(0,i.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}function Dt(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(e){return r.add(e),()=>r.delete(e)},dispatch(e,...i){let a=t[e].call(n,...i);a&&(n=a,r.forEach(e=>e()))}}}function Ot(){let e;return{before({doc:t}){let n=t.documentElement,r=t.defaultView??window;e=Math.max(0,r.innerWidth-n.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,i=Math.max(0,r.clientWidth-r.offsetWidth),a=Math.max(0,e-i);n.style(r,`paddingRight`,`${a}px`)}}}function kt(){return vt()?{before({doc:e,d:t,meta:n}){function r(e){for(let t of n().containers)for(let n of t())if(n.contains(e))return!0;return!1}t.microTask(()=>{if(window.getComputedStyle(e.documentElement).scrollBehavior!==`auto`){let n=m();n.style(e.documentElement,`scrollBehavior`,`auto`),t.add(()=>t.microTask(()=>n.dispose()))}let n=window.scrollY??window.pageYOffset,i=null;t.addEventListener(e,`click`,t=>{if(A(t.target))try{let n=t.target.closest(`a`);if(!n)return;let{hash:a}=new URL(n.href),o=e.querySelector(a);A(o)&&!r(o)&&(i=o)}catch{}},!0),t.group(n=>{t.addEventListener(e,`touchstart`,e=>{if(n.dispose(),A(e.target)&&_e(e.target)){if(r(e.target)){let t=e.target;for(;t.parentElement&&r(t.parentElement);)t=t.parentElement;n.style(t,`overscrollBehavior`,`contain`)}else n.style(e.target,`touchAction`,`none`)}})}),t.addEventListener(e,`touchmove`,e=>{if(A(e.target)){if(ye(e.target))return;if(r(e.target)){let t=e.target;for(;t.parentElement&&t.dataset.headlessuiPortal!==``&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;t.dataset.headlessuiPortal===``&&e.preventDefault()}else e.preventDefault()}},{passive:!1}),t.add(()=>{let e=window.scrollY??window.pageYOffset;n!==e&&window.scrollTo(0,n),i&&i.isConnected&&(i.scrollIntoView({block:`nearest`}),i=null)})})}}:{}}function At(){return{before({doc:e,d:t}){t.style(e.documentElement,`overflow`,`hidden`)}}}function jt(e){let t={};for(let n of e)Object.assign(t,n(t));return t}var J=Dt(()=>new Map,{PUSH(e,t){let n=this.get(e)??{doc:e,count:0,d:m(),meta:new Set,computedMeta:{}};return n.count++,n.meta.add(t),n.computedMeta=jt(n.meta),this.set(e,n),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=jt(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta(){return e.computedMeta}},n=[kt(),Ot(),At()];n.forEach(({before:e})=>e?.(t)),n.forEach(({after:e})=>e?.(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});J.subscribe(()=>{let e=J.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e=t.get(n.doc)===`hidden`,r=n.count!==0;(r&&!e||!r&&e)&&J.dispatch(n.count>0?`SCROLL_PREVENT`:`SCROLL_ALLOW`,n),n.count===0&&J.dispatch(`TEARDOWN`,n)}});function Mt(e,t,n=()=>({containers:[]})){let r=Et(J),i=t?r.get(t):void 0,a=i?i.count>0:!1;return g(()=>{if(t&&e)return J.dispatch(`PUSH`,t,n),()=>J.dispatch(`POP`,t,n)},[e,t]),a}function Nt(e,t,n=()=>[document.body]){Mt(B(e,`scroll-lock`),t,e=>({containers:[...e.containers??[],n]}))}function Pt(e=0){let[t,n]=(0,i.useState)(e);return{flags:t,setFlag:(0,i.useCallback)(e=>n(e),[]),addFlag:(0,i.useCallback)(e=>n(t=>t|e),[]),hasFlag:(0,i.useCallback)(e=>(t&e)===e,[t]),removeFlag:(0,i.useCallback)(e=>n(t=>t&~e),[]),toggleFlag:(0,i.useCallback)(e=>n(t=>t^e),[])}}typeof process<`u`&&typeof globalThis<`u`&&typeof Element<`u`&&(process==null?void 0:{})?.NODE_ENV===`test`&&(Element==null?void 0:Element.prototype)?.getAnimations===void 0&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.",``,`Example usage:`,"```js",`import { mockAnimationsApi } from 'jsdom-testing-mocks'`,`mockAnimationsApi()`,"```"].join(`
|
|
5
|
-
`)),[]});var Ft=(e=>(e[e.None=0]=`None`,e[e.Closed=1]=`Closed`,e[e.Enter=2]=`Enter`,e[e.Leave=4]=`Leave`,e))(Ft||{});function It(e){let t={};for(let n in e)e[n]===!0&&(t[`data-${n}`]=``);return t}function Lt(e,t,n,r){let[a,o]=(0,i.useState)(n),{hasFlag:s,addFlag:c,removeFlag:l}=Pt(e&&a?3:0),u=(0,i.useRef)(!1),d=(0,i.useRef)(!1);return g(()=>{var i;if(e){if(n&&o(!0),!t){n&&c(3);return}return(i=r?.start)==null||i.call(r,n),Rt(t,{inFlight:u,prepare(){d.current?d.current=!1:d.current=u.current,u.current=!0,!d.current&&(n?(c(3),l(4)):(c(4),l(2)))},run(){d.current?n?(l(3),c(4)):(l(4),c(3)):n?l(1):c(1)},done(){var e;d.current&&Vt(t)||(u.current=!1,l(7),n||o(!1),(e=r?.end)==null||e.call(r,n))}})}},[e,n,t,h()]),e?[a,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Rt(e,{prepare:t,run:n,done:r,inFlight:i}){let a=m();return Bt(e,{prepare:t,inFlight:i}),a.nextFrame(()=>{n(),a.requestAnimationFrame(()=>{a.add(zt(e,r))})}),a.dispose}function zt(e,t){let n=m();if(!e)return n.dispose;let r=!1;n.add(()=>{r=!0});let i=e.getAnimations?.call(e).filter(e=>e instanceof CSSTransition)??[];return i.length===0?(t(),n.dispose):(Promise.allSettled(i.map(e=>e.finished)).then(()=>{r||t()}),n.dispose)}function Bt(e,{inFlight:t,prepare:n}){if(t!=null&&t.current){n();return}let r=e.style.transition;e.style.transition=`none`,n(),e.offsetHeight,e.style.transition=r}function Vt(e){return(e.getAnimations?.call(e)??[]).some(e=>e instanceof CSSTransition&&e.playState!==`finished`)}function Ht(e,t){let n=(0,i.useRef)([]),r=v(e);(0,i.useEffect)(()=>{let e=[...n.current];for(let[i,a]of t.entries())if(n.current[i]!==a){let i=r(t,e);return n.current=t,i}},[r,...t])}var Y=(0,i.createContext)(null);Y.displayName=`OpenClosedContext`;var X=(e=>(e[e.Open=1]=`Open`,e[e.Closed=2]=`Closed`,e[e.Closing=4]=`Closing`,e[e.Opening=8]=`Opening`,e))(X||{});function Ut(){return(0,i.useContext)(Y)}function Wt({value:e,children:t}){return i.createElement(Y.Provider,{value:e},t)}function Gt({children:e}){return i.createElement(Y.Provider,{value:null},e)}function Kt(e){function t(){document.readyState!==`loading`&&(e(),document.removeEventListener(`DOMContentLoaded`,t))}typeof window<`u`&&typeof document<`u`&&(document.addEventListener(`DOMContentLoaded`,t),t())}var Z=[];Kt(()=>{function e(e){if(!A(e.target)||e.target===document.body||Z[0]===e.target)return;let t=e.target;t=t.closest(U),Z.unshift(t??e.target),Z=Z.filter(e=>e!=null&&e.isConnected),Z.splice(10)}window.addEventListener(`click`,e,{capture:!0}),window.addEventListener(`mousedown`,e,{capture:!0}),window.addEventListener(`focus`,e,{capture:!0}),document.body.addEventListener(`click`,e,{capture:!0}),document.body.addEventListener(`mousedown`,e,{capture:!0}),document.body.addEventListener(`focus`,e,{capture:!0})});function qt(e){let t=v(e),n=(0,i.useRef)(!1);(0,i.useEffect)(()=>(n.current=!1,()=>{n.current=!0,p(()=>{n.current&&t()})}),[t])}function Jt(){let e=typeof document>`u`;return`useSyncExternalStore`in i&&(e=>e.useSyncExternalStore)(i)(()=>()=>{},()=>!1,()=>!e)}function Yt(){let e=Jt(),[t,n]=i.useState(c.isHandoffComplete);return t&&c.isHandoffComplete===!1&&n(!1),i.useEffect(()=>{t!==!0&&n(!0)},[t]),i.useEffect(()=>c.handoff(),[]),!e&&t}var Xt=(0,i.createContext)(!1);function Zt(){return(0,i.useContext)(Xt)}function Qt(e){return i.createElement(Xt.Provider,{value:e.force},e.children)}function $t(e){let t=Zt(),n=(0,i.useContext)(an),[r,a]=(0,i.useState)(()=>{if(!t&&n!==null)return n.current??null;if(c.isServer)return null;let r=e?.getElementById(`headlessui-portal-root`);if(r)return r;if(e===null)return null;let i=e.createElement(`div`);return i.setAttribute(`id`,`headlessui-portal-root`),e.body.appendChild(i)});return(0,i.useEffect)(()=>{r!==null&&(e!=null&&e.body.contains(r)||e==null||e.body.appendChild(r))},[r,e]),(0,i.useEffect)(()=>{t||n!==null&&a(n.current)},[n,a,t]),r}var en=i.Fragment,tn=w(function(e,t){let{ownerDocument:n=null,...r}=e,a=(0,i.useRef)(null),o=M(we(e=>{a.current=e}),t),s=wt(a.current),c=$t(n??s),l=(0,i.useContext)(Q),u=h(),d=Yt(),f=x();return qt(()=>{var e;c&&c.childNodes.length<=0&&((e=c.parentElement)==null||e.removeChild(c))}),!c||!d?null:(0,Ct.createPortal)(i.createElement(`div`,{"data-headlessui-portal":``,ref:e=>{u.dispose(),l&&e&&u.add(l.register(e))}},f({ourProps:{ref:o},theirProps:r,slot:{},defaultTag:en,name:`Portal`})),c)});function nn(e,t){let n=M(t),{enabled:r=!0,ownerDocument:a,...o}=e,s=x();return r?i.createElement(tn,{...o,ownerDocument:a,ref:n}):s({ourProps:{ref:n},theirProps:o,slot:{},defaultTag:en,name:`Portal`})}var rn=i.Fragment,an=(0,i.createContext)(null);function on(e,t){let{target:n,...r}=e,a={ref:M(t)},o=x();return i.createElement(an.Provider,{value:n},o({ourProps:a,theirProps:r,defaultTag:rn,name:`Popover.Group`}))}var Q=(0,i.createContext)(null);function sn(){let e=(0,i.useContext)(Q),t=(0,i.useRef)([]),n=v(n=>(t.current.push(n),e&&e.register(n),()=>r(n))),r=v(n=>{let r=t.current.indexOf(n);r!==-1&&t.current.splice(r,1),e&&e.unregister(n)}),a=(0,i.useMemo)(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,(0,i.useMemo)(()=>function({children:e}){return i.createElement(Q.Provider,{value:a},e)},[a])]}var cn=w(nn),$=w(on),ln=Object.assign(cn,{Group:$});export{he as $,ft as A,De as B,ht as C,gt as D,ut as E,Ke as F,Ce as G,Ee as H,Ye as I,ye as J,xe as K,ze as L,nt as M,B as N,at as O,Qe as P,O as Q,He as R,ot as S,W as T,M as U,je as V,Se as W,k as X,be as Y,ge as Z,wt as _,m as _t,Yt as a,ce as at,q as b,l as bt,Wt as c,T as ct,Ut as d,ne as dt,pe as et,Ht as f,ee as ft,Tt as g,h as gt,Nt as h,g as ht,Qt as i,x as it,rt as j,_t as k,X as l,b as lt,It as m,_ as mt,ln as n,re as nt,qt as o,w as ot,Lt as p,v as pt,A as q,sn as r,ie as rt,Z as s,D as st,$ as t,i as tt,Gt as u,y as ut,St as v,p as vt,G as w,K as x,bt as y,f as yt,Me as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,n as t,t as n}from"./react-dom.CqAxpHMt.js";import{G as r,J as i,K as a,U as o,W as s,X as c,Y as l,Z as u,_t as d,b as f,bt as p,dt as m,ft as h,gt as g,ht as _,it as v,ot as y,pt as b,q as x,tt as S}from"./portal.C3KrUREL.js";var C=e=>ee(e)?e.document:te(e)?e:e?.ownerDocument??(typeof document<`u`?document:void 0),w=e=>C(e)?.defaultView??(typeof window<`u`?window:void 0);function T(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function ee(e){return typeof e==`object`&&!!e&&`window`in e&&e.window===e}function te(e){return T(e)&&e.nodeType===9}function ne(e){return T(e)&&e.nodeType===11&&`host`in e}var E=!1;function D(){return E}function O(e,t){if(!D())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!=null;){if(n===e)return!0;n=typeof n.assignedElements!=`function`&&n.assignedSlot?.parentNode?n.assignedSlot.parentNode:ne(n)?n.host:n.parentNode}return!1}var k=(e=document)=>{if(!D())return e.activeElement;let t=e.activeElement;for(;t&&`shadowRoot`in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function A(e){if(D()&&e.target instanceof Element&&e.target.shadowRoot){if(`composedPath`in e)return e.composedPath()[0]??null;if(`composedPath`in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function re(e){e.focus({preventScroll:!0})}var j=e(t(),1),ie=typeof document<`u`?j.useLayoutEffect:()=>{};function ae(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function oe(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function se(e){let t=(0,j.useRef)({isFocused:!1,observer:null});return ie(()=>{let e=t.current;return()=>{e.observer&&=(e.observer.disconnect(),null)}},[]),(0,j.useCallback)(n=>{let r=A(n);if(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement){t.current.isFocused=!0;let n=r;n.addEventListener(`focusout`,r=>{if(t.current.isFocused=!1,n.disabled){let t=ae(r);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&n.disabled){t.current.observer?.disconnect();let e=n===k()?null:k();n.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:e})),n.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(n,{attributes:!0,attributeFilter:[`disabled`]})}},[e])}function ce(e){if(typeof window>`u`||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function le(e){return typeof window<`u`&&window.navigator!=null&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function M(e){let t=null;return()=>(t??=e(),t)}var ue=M(function(){return le(/^Mac/i)}),de=M(function(){return le(/^iPhone/i)}),fe=M(function(){return le(/^iPad/i)||ue()&&navigator.maxTouchPoints>1}),pe=M(function(){return de()||fe()}),me=M(function(){return ce(/AppleWebKit/i)&&(pe()||!he())}),he=M(function(){return ce(/Chrome|CriOS|CrMo/i)}),ge=M(function(){return ce(/Android/i)});function _e(e){return e.pointerType===``&&e.isTrusted?!0:ge()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function N(e,t,n=!0){let{metaKey:r,ctrlKey:i,altKey:a,shiftKey:o}=t,s=me()&&ue()&&!fe()?new KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,metaKey:r,ctrlKey:i,altKey:a,shiftKey:o}):new MouseEvent(`click`,{metaKey:r,ctrlKey:i,altKey:a,shiftKey:o,detail:1,bubbles:!0,cancelable:!0});N.isOpening=n,re(e),e.dispatchEvent(s),N.isOpening=!1}N.isOpening=!1;var P=null,ve=new Set,ye=new Map,F=!1,be=!1,xe={Tab:!0,Escape:!0};function Se(e,t){for(let n of ve)n(e,t)}function Ce(e){return!(e.metaKey||!ue()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}function we(e){F=!0,!N.isOpening&&Ce(e)&&(P=`keyboard`,Se(`keyboard`,e))}function I(e){P=`pointer`,`pointerType`in e&&e.pointerType,(e.type===`mousedown`||e.type===`pointerdown`)&&(F=!0,Se(`pointer`,e))}function Te(e){!N.isOpening&&_e(e)&&(F=!0,P=`virtual`)}function Ee(e){let t=A(e),n=w(t),r=C(t);t===n?be=!0:t!==r&&e.isTrusted&&(!F&&!be&&(P=`virtual`,Se(`virtual`,e)),F=!1,be=!1)}function De(){F=!1,be=!0}function Oe(e){let t=k(C(A(e)));queueMicrotask(()=>{k(C(A(e)))!==t&&Ne(`keyboard`)})}function ke(e){if(typeof window>`u`||typeof document>`u`)return;let t=w(e),n=C(e);if(ye.get(t))return;let r=t.HTMLElement.prototype.focus;Reflect.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){F=!0,r.apply(this,arguments)}}),n.addEventListener(`keydown`,we,!0),n.addEventListener(`keyup`,we,!0),n.addEventListener(`click`,Te,!0),n.addEventListener(`invalid`,Oe,!0),t.addEventListener(`focus`,Ee,!0),t.addEventListener(`blur`,De,!1),typeof PointerEvent<`u`&&(n.addEventListener(`pointerdown`,I,!0),n.addEventListener(`pointermove`,I,!0),n.addEventListener(`pointerup`,I,!0)),t.addEventListener(`beforeunload`,()=>{Ae(e)},{once:!0}),ye.set(t,{focus:r})}var Ae=(e,t)=>{let n=w(e),r=C(e);t&&r.removeEventListener(`DOMContentLoaded`,t),ye.has(n)&&(Reflect.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:ye.get(n).focus}),r.removeEventListener(`keydown`,we,!0),r.removeEventListener(`keyup`,we,!0),r.removeEventListener(`click`,Te,!0),r.removeEventListener(`invalid`,Oe,!0),n.removeEventListener(`focus`,Ee,!0),n.removeEventListener(`blur`,De,!1),typeof PointerEvent<`u`&&(r.removeEventListener(`pointerdown`,I,!0),r.removeEventListener(`pointermove`,I,!0),r.removeEventListener(`pointerup`,I,!0)),ye.delete(n))};function je(e){let t=C(e),n;return t.readyState===`loading`?(n=()=>{ke(e)},t.addEventListener(`DOMContentLoaded`,n)):ke(e),()=>Ae(e,n)}typeof document<`u`&&je();function Me(){return P!==`pointer`}function Ne(e){P=e,Se(e,null)}var Pe=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Fe(e,t,n){let r=n?A(n):void 0,i=C(r),a=w(r),o=a===void 0?HTMLInputElement:a.HTMLInputElement,s=a===void 0?HTMLTextAreaElement:a.HTMLTextAreaElement,c=a===void 0?HTMLElement:a.HTMLElement,l=a===void 0?KeyboardEvent:a.KeyboardEvent,u=k(i);return e=e||u instanceof o&&!Pe.has(u.type)||u instanceof s||u instanceof c&&u.isContentEditable,!(e&&t===`keyboard`&&n instanceof l&&!xe[n.key])}function Ie(e,t,n){ke(),(0,j.useEffect)(()=>{if(n?.enabled===!1)return;let t=(t,r)=>{Fe(!!n?.isTextInput,t,r)&&e(Me())};return ve.add(t),()=>{ve.delete(t)}},t)}function Le(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e,a=(0,j.useCallback)(e=>{if(A(e)===e.currentTarget)return r&&r(e),i&&i(!1),!0},[r,i]),o=se(a),s=(0,j.useCallback)(e=>{let t=A(e),r=C(t),a=r?k(r):k();t===e.currentTarget&&t===a&&(n&&n(e),i&&i(!0),o(e))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?a:void 0}}}function Re(){let e=(0,j.useRef)(new Map),t=(0,j.useCallback)((t,n,r,i)=>{let a=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=(0,j.useCallback)((t,n,r,i)=>{let a=e.current.get(r)?.fn||r;t.removeEventListener(n,a,i),e.current.delete(r)},[]),r=(0,j.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,j.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function ze(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=(0,j.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=Re(),c=(0,j.useCallback)(e=>{O(e.currentTarget,A(e))&&a.current.isFocusWithin&&!O(e.currentTarget,e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(e),i&&i(!1))},[n,i,a,s]),l=se(c),u=(0,j.useCallback)(e=>{if(!O(e.currentTarget,A(e)))return;let t=A(e),n=C(t),s=k(n);if(!a.current.isFocusWithin&&s===t){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,l(e);let t=e.currentTarget;o(n,`focus`,e=>{let r=A(e);if(a.current.isFocusWithin&&!O(t,r)){let e=new n.defaultView.FocusEvent(`blur`,{relatedTarget:r});oe(e,t);let i=ae(e);c(i)}},{capture:!0})}},[r,i,l,o,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:c}}}function Be(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=(0,j.useRef)({isFocused:!1,isFocusVisible:t||Me()}),[a,o]=(0,j.useState)(!1),[s,c]=(0,j.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),l=(0,j.useCallback)(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),u=(0,j.useCallback)(e=>{i.current.isFocused=e,i.current.isFocusVisible=Me(),o(e),l()},[l]);Ie(e=>{i.current.isFocusVisible=e,l()},[n,a],{enabled:a,isTextInput:n});let{focusProps:d}=Le({isDisabled:r,onFocusChange:u}),{focusWithinProps:f}=ze({isDisabled:!r,onFocusWithinChange:u});return{isFocused:a,isFocusVisible:s,focusProps:r?f:d}}var Ve=!1,He=0;function Ue(){Ve=!0,setTimeout(()=>{Ve=!1},500)}function We(e){e.pointerType===`touch`&&Ue()}function Ge(){let e=C(null);if(e!==void 0)return He===0&&typeof PointerEvent<`u`&&e.addEventListener(`pointerup`,We),He++,()=>{He--,!(He>0)&&typeof PointerEvent<`u`&&e.removeEventListener(`pointerup`,We)}}function Ke(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=(0,j.useState)(!1),s=(0,j.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:``,target:null}).current;(0,j.useEffect)(Ge,[]);let{addGlobalListener:c,removeAllGlobalListeners:l}=Re(),{hoverProps:u,triggerHoverEnd:d}=(0,j.useMemo)(()=>{let e=(e,r)=>{if(s.pointerType=r,i||r===`touch`||s.isHovered||!O(e.currentTarget,A(e)))return;s.isHovered=!0;let l=e.currentTarget;s.target=l,c(C(A(e)),`pointerover`,e=>{s.isHovered&&s.target&&!O(s.target,A(e))&&a(e,e.pointerType)},{capture:!0}),t&&t({type:`hoverstart`,target:l,pointerType:r}),n&&n(!0),o(!0)},a=(e,t)=>{let i=s.target;s.pointerType=``,s.target=null,t!==`touch`&&s.isHovered&&i&&(s.isHovered=!1,l(),r&&r({type:`hoverend`,target:i,pointerType:t}),n&&n(!1),o(!1))},u={};return typeof PointerEvent<`u`&&(u.onPointerEnter=t=>{Ve&&t.pointerType===`mouse`||e(t,t.pointerType)},u.onPointerLeave=e=>{!i&&O(e.currentTarget,A(e))&&a(e,e.pointerType)}),{hoverProps:u,triggerHoverEnd:a}},[t,n,r,i,s,c,l]);return(0,j.useEffect)(()=>{i&&d({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:u,isHovered:a}}function qe(e){let t=e.width/2,n=e.height/2;return{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Je(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function Ye({disabled:e=!1}={}){let t=(0,j.useRef)(null),[n,r]=(0,j.useState)(!1),i=g(),a=b(()=>{t.current=null,r(!1),i.dispose()}),o=b(e=>{if(i.dispose(),t.current===null){t.current=e.currentTarget,r(!0);{let n=p(e.currentTarget);i.addEventListener(n,`pointerup`,a,!1),i.addEventListener(n,`pointermove`,e=>{if(t.current){let n=qe(e);r(Je(n,t.current.getBoundingClientRect()))}},!1),i.addEventListener(n,`pointercancel`,a,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:o,onPointerUp:a,onClick:a}}}var Xe=(0,j.createContext)(void 0);function Ze(){return(0,j.useContext)(Xe)}function Qe(e){let t=e.parentElement,n=null;for(;t&&!a(t);)s(t)&&(n=t),t=t.parentElement;let r=t?.getAttribute(`disabled`)===``;return r&&$e(n)?!1:r}function $e(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(s(t))return!1;t=t.previousElementSibling}return!0}var et=(0,j.createContext)(null);et.displayName=`LabelContext`;function tt(){let e=(0,j.useContext)(et);if(e===null){let e=Error(`You used a <Label /> component, but it is not inside a relevant parent.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,tt),e}return e}function nt(e){let t=(0,j.useContext)(et)?.value??void 0;return(e?.length??0)>0?[t,...e].filter(Boolean).join(` `):t}function rt({inherit:e=!1}={}){let t=nt(),[n,r]=(0,j.useState)([]),i=e?[t,...n].filter(Boolean):n;return[i.length>0?i.join(` `):void 0,(0,j.useMemo)(()=>function(e){let t=b(e=>(r(t=>[...t,e]),()=>r(t=>{let n=t.slice(),r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}))),n=(0,j.useMemo)(()=>({register:t,slot:e.slot,name:e.name,props:e.props,value:e.value}),[t,e.slot,e.name,e.props,e.value]);return j.createElement(et.Provider,{value:n},e.children)},[r])]}var it=`label`;function at(e,t){let n=(0,S.useId)(),a=tt(),s=Ze(),c=m(),{id:u=`headlessui-label-${n}`,htmlFor:d=s??a.props?.htmlFor,passive:f=!1,...p}=e,g=o(t);_(()=>a.register(u),[u,a.register]);let y=b(e=>{let t=e.currentTarget;if(!(e.target!==e.currentTarget&&r(e.target))&&(l(t)&&e.preventDefault(),a.props&&`onClick`in a.props&&typeof a.props.onClick==`function`&&a.props.onClick(e),l(t))){let e=document.getElementById(t.htmlFor);if(e){let t=e.getAttribute(`disabled`);if(t===`true`||t===``)return;let n=e.getAttribute(`aria-disabled`);if(n===`true`||n===``)return;(i(e)&&(e.type===`file`||e.type===`radio`||e.type===`checkbox`)||e.role===`radio`||e.role===`checkbox`||e.role===`switch`)&&e.click(),e.focus({preventScroll:!0})}}}),x=h({...a.slot,disabled:c||!1}),C={ref:g,...a.props,id:u,htmlFor:d,onClick:y};return f&&(`onClick`in C&&(delete C.htmlFor,delete C.onClick),`onClick`in p&&delete p.onClick),v()({ourProps:C,theirProps:p,slot:x,defaultTag:d?it:`div`,name:a.name||`Label`})}var ot=y(at),st=Object.assign(ot,{});function ct(e){if(e===null)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}function lt(e,t,n=!1){let[r,i]=(0,j.useState)(()=>ct(t));return _(()=>{if(!t||!e)return;let n=d();return n.requestAnimationFrame(function e(){n.requestAnimationFrame(e),i(e=>{let n=ct(t);return n.width===e.width&&n.height===e.height?e:n})}),()=>{n.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}var ut=(e=>(e[e.Left=0]=`Left`,e[e.Right=2]=`Right`,e))(ut||{});function dt(e){let t=(0,j.useRef)(null);return{onPointerDown:b(n=>{t.current=n.pointerType,!Qe(n.currentTarget)&&n.pointerType===`mouse`&&n.button===ut.Left&&(n.preventDefault(),e(n))}),onClick:b(n=>{t.current!==`mouse`&&(Qe(n.currentTarget)||e(n))})}}var ft=(e=>(e[e.Ignore=0]=`Ignore`,e[e.Select=1]=`Select`,e[e.Close=2]=`Close`,e))(ft||{}),pt={Ignore:{kind:0},Select:e=>({kind:1,target:e}),Close:{kind:2}},mt=200,ht=5;function gt(e,{trigger:t,action:n,close:r,select:i}){let a=(0,j.useRef)(null),o=(0,j.useRef)(null),s=(0,j.useRef)(null);f(e&&t!==null,`pointerdown`,e=>{u(e?.target)&&t!=null&&t.contains(e.target)&&(o.current=e.x,s.current=e.y,a.current=e.timeStamp)}),f(e&&t!==null,`pointerup`,e=>{let t=a.current;if(t===null||(a.current=null,!x(e.target))||Math.abs(e.x-(o.current??e.x))<ht&&Math.abs(e.y-(s.current??e.y))<ht)return;let c=n(e);switch(c.kind){case 0:return;case 1:e.timeStamp-t>mt&&(i(c.target),r());break;case 2:r()}},{capture:!0})}function _t(e,t){return(0,j.useMemo)(()=>{if(e.type)return e.type;let n=e.as??`button`;if(typeof n==`string`&&n.toLowerCase()===`button`||t?.tagName===`BUTTON`&&!t.hasAttribute(`type`))return`button`},[e.type,e.as,t])}function vt(e){return[e.screenX,e.screenY]}function yt(){let e=(0,j.useRef)([-1,-1]);return{wasMoved(t){let n=vt(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=vt(t)}}}function bt(){return typeof window<`u`}function L(e){return xt(e)?(e.nodeName||``).toLowerCase():`#document`}function R(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function z(e){return((xt(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function xt(e){return bt()?e instanceof Node||e instanceof R(e).Node:!1}function B(e){return bt()?e instanceof Element||e instanceof R(e).Element:!1}function V(e){return bt()?e instanceof HTMLElement||e instanceof R(e).HTMLElement:!1}function St(e){return!bt()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof R(e).ShadowRoot}function Ct(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=U(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function wt(e){return/^(table|td|th)$/.test(L(e))}function Tt(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Et=/transform|translate|scale|rotate|perspective|filter/,Dt=/paint|layout|strict|content/,H=e=>!!e&&e!==`none`,Ot;function kt(e){let t=B(e)?U(e):e;return H(t.transform)||H(t.translate)||H(t.scale)||H(t.rotate)||H(t.perspective)||!jt()&&(H(t.backdropFilter)||H(t.filter))||Et.test(t.willChange||``)||Dt.test(t.contain||``)}function At(e){let t=W(e);for(;V(t)&&!Mt(t);){if(kt(t))return t;if(Tt(t))return null;t=W(t)}return null}function jt(){return Ot??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ot}function Mt(e){return/^(html|body|#document)$/.test(L(e))}function U(e){return R(e).getComputedStyle(e)}function Nt(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function W(e){if(L(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||St(e)&&e.host||z(e);return St(t)?t.host:t}function Pt(e){let t=W(e);return Mt(t)?(e.ownerDocument||e).body:V(t)&&Ct(t)?t:Pt(t)}function Ft(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Pt(e),i=r===e.ownerDocument?.body,a=R(r);if(i){let e=It(a);return t.concat(a,a.visualViewport||[],Ct(r)?r:[],e&&n?Ft(e):[])}return t.concat(r,Ft(r,[],n))}function It(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lt(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}var G=Math.min,K=Math.max,Rt=Math.round,zt=Math.floor,q=e=>({x:e,y:e}),Bt={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Vt(e,t,n){return K(e,G(t,n))}function J(e,t){return typeof e==`function`?e(t):e}function Y(e){return e.split(`-`)[0]}function Ht(e){return e.split(`-`)[1]}function Ut(e){return e===`x`?`y`:`x`}function Wt(e){return e===`y`?`height`:`width`}function X(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Gt(e){return Ut(X(e))}function Kt(e,t,n){n===void 0&&(n=!1);let r=Ht(e),i=Gt(e),a=Wt(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=tn(o)),[o,tn(o)]}function qt(e){let t=tn(e);return[Jt(e),t,Jt(t)]}function Jt(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Yt=[`left`,`right`],Xt=[`right`,`left`],Zt=[`top`,`bottom`],Qt=[`bottom`,`top`];function $t(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Xt:Yt:t?Yt:Xt;case`left`:case`right`:return t?Zt:Qt;default:return[]}}function en(e,t,n,r){let i=Ht(e),a=$t(Y(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Jt)))),a}function tn(e){let t=Y(e);return Bt[t]+e.slice(t.length)}function nn(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function rn(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:nn(e)}function an(e){let{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}}var on=e(n(),1);function sn(e,t,n){let{reference:r,floating:i}=e,a=X(t),o=Gt(t),s=Wt(o),c=Y(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Ht(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function cn(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=J(t,e),p=rn(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=an(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=an(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ln=50,un=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:cn},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=sn(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ln&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=sn(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},dn=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=J(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Y(r),_=X(o),v=Y(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[tn(o)]:qt(o)),x=p!==`none`;!d&&x&&b.push(...en(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Kt(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===X(t)||T.every(e=>X(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=X(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},fn=new Set([`left`,`top`]);async function pn(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Y(n),s=Ht(n),c=X(n)===`y`,l=fn.has(o)?-1:1,u=a&&c?-1:1,d=J(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var mn=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await pn(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},hn=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=J(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=X(i),p=Ut(f),m=u[p],h=u[f],g=(e,t)=>Vt(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},gn=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=J(e,t),c=await i.detectOverflow(t,s),l=Y(n),u=Ht(n),d=X(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=G(p-c[m],g),y=G(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*K(c.left,c.right):S=p-2*K(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function _n(e){let t=U(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=V(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Rt(n)!==a||Rt(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function vn(e){return B(e)?e:e.contextElement}function Z(e){let t=vn(e);if(!V(t))return q(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=_n(t),o=(a?Rt(n.width):n.width)/r,s=(a?Rt(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var yn=q(0);function bn(e){let t=R(e);return!jt()||!t.visualViewport?yn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function xn(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===R(e)}function Q(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=vn(e),o=q(1);t&&(r?B(r)&&(o=Z(r)):o=Z(e));let s=xn(a,n,r)?bn(a):q(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=R(a),t=B(r)?R(r):r,n=e,i=It(n);for(;i&&t!==n;){let e=Z(i),t=i.getBoundingClientRect(),r=U(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=R(i),i=It(n)}}return an({width:u,height:d,x:c,y:l})}function Sn(e,t){let n=Nt(e).scrollLeft;return t?t.left+n:Q(z(e)).left+n}function Cn(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Sn(e,n),y:n.top+t.scrollTop}}function wn(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=z(r),s=t?Tt(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=q(1),u=q(0),d=V(r);if((d||!a)&&((L(r)!==`body`||Ct(o))&&(c=Nt(r)),d)){let e=Q(r);l=Z(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Cn(o,c):q(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Tn(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function En(e){let t=Nt(e),n=e.ownerDocument.body,r=K(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=K(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Sn(e),o=-t.scrollTop;return U(n).direction===`rtl`&&(a+=K(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Dn=25;function On(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=R(e),a=z(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!jt()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Sn(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Dn&&(s-=o)}return{width:s,height:c,x:l,y:u}}function kn(e,t){let n=Q(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Z(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function An(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=On(e,n,t);else if(t===`document`)r=En(z(e));else if(B(t))r=kn(t,n);else{let n=bn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return an(r)}function jn(e,t){let n=t.get(e);if(n)return n;let r=Ft(e,[],!1).filter(e=>B(e)&&L(e)!==`body`),i=null,a=U(e).position===`fixed`,o=a?W(e):e;for(;B(o)&&!Mt(o);){let e=U(o),t=kt(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=W(o)}return t.set(e,r),r}function Mn(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Tt(t)?[]:jn(t,this._c):[].concat(n),r],o=An(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=An(t,a[e],i);s=K(n.top,s),c=G(n.right,c),l=G(n.bottom,l),u=K(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Nn(e){let{width:t,height:n}=_n(e);return{width:t,height:n}}function Pn(e,t,n){let r=V(t),i=z(t),a=n===`fixed`,o=Q(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=q(0);if((r||!a)&&((L(t)!==`body`||Ct(i))&&(s=Nt(t)),r)){let e=Q(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Sn(i));let l=i&&!r&&!a?Cn(i,s):q(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Fn(e){return U(e).position===`static`}function In(e,t){if(!V(e)||U(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return z(e)===n&&(n=n.ownerDocument.body),n}function Ln(e,t){let n=R(e);if(Tt(e))return n;if(!V(e)){let t=W(e);for(;t&&!Mt(t);){if(B(t)&&!Fn(t))return t;t=W(t)}return n}let r=In(e,t);for(;r&&wt(r)&&Fn(r);)r=In(r,t);return r&&Mt(r)&&Fn(r)&&!kt(r)?n:r||At(e)||n}var Rn=async function(e){let t=this.getOffsetParent||Ln,n=this.getDimensions,r=await n(e.floating);return{reference:Pn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zn(e){return U(e).direction===`rtl`}var Bn={convertOffsetParentRelativeRectToViewportRelativeRect:wn,getDocumentElement:z,getClippingRect:Mn,getOffsetParent:Ln,getElementRects:Rn,getClientRects:Tn,getDimensions:Nn,getScale:Z,isElement:B,isRTL:zn};function Vn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Hn(e,t,n){let r=null,i,a=z(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=zt(d),h=zt(a.clientWidth-(u+f)),g=zt(a.clientHeight-(d+p)),_=zt(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:K(0,G(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Vn(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=R(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Un(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=vn(e),u=i||a?[...l?Ft(l):[],...t?Ft(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Hn(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Q(e):null;c&&g();function g(){let t=Q(e);h&&!Vn(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Wn=cn,Gn=mn,Kn=hn,qn=dn,Jn=gn,Yn=(e,t,n)=>{let r=new Map,i=n??{},a={...Bn,...i.platform,_c:r};return un(e,t,{...i,platform:a})},Xn=typeof document<`u`?j.useLayoutEffect:function(){};function Zn(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(!Zn(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;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Zn(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Qn(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $n(e,t){let n=Qn(e);return Math.round(t*n)/n}function er(e){let t=j.useRef(e);return Xn(()=>{t.current=e}),t}function tr(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=j.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=j.useState(r);Zn(f,r)||p(r);let[m,h]=j.useState(null),[g,_]=j.useState(null),v=j.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=j.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=j.useRef(null),C=j.useRef(null),w=j.useRef(u),T=c!=null,ee=er(c),te=er(i),ne=er(l),E=j.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};te.current&&(e.platform=te.current),Yn(S.current,C.current,e).then(e=>{let t={...e,isPositioned:ne.current!==!1};D.current&&!Zn(w.current,t)&&(w.current=t,on.flushSync(()=>{d(t)}))})},[f,t,n,te,ne]);Xn(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let D=j.useRef(!1);Xn(()=>(D.current=!0,()=>{D.current=!1}),[]),Xn(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(ee.current)return ee.current(b,x,E);E()}},[b,x,E,ee,T]);let O=j.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),k=j.useMemo(()=>({reference:b,floating:x}),[b,x]),A=j.useMemo(()=>{let e={position:n,left:0,top:0};if(!k.floating)return e;let t=$n(k.floating,u.x),r=$n(k.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Qn(k.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,k.floating,u.x,u.y]);return j.useMemo(()=>({...u,update:E,refs:O,elements:k,floatingStyles:A}),[u,E,O,k,A])}var nr=(e,t)=>{let n=Gn(e);return{name:n.name,fn:n.fn,options:[e,t]}},rr=(e,t)=>{let n=Kn(e);return{name:n.name,fn:n.fn,options:[e,t]}},ir=(e,t)=>{let n=qn(e);return{name:n.name,fn:n.fn,options:[e,t]}},ar=(e,t)=>{let n=Jn(e);return{name:n.name,fn:n.fn,options:[e,t]}},or={...j},sr=or.useInsertionEffect||(e=>e());function cr(e){let t=j.useRef(()=>{});return sr(()=>{t.current=e}),j.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var lr=`ArrowUp`,ur=`ArrowDown`,dr=`ArrowLeft`,fr=`ArrowRight`,pr=typeof document<`u`?j.useLayoutEffect:j.useEffect,mr=[dr,fr],hr=[lr,ur];[...mr,...hr];var gr=!1,_r=0,vr=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+_r++;function yr(){let[e,t]=j.useState(()=>gr?vr():void 0);return pr(()=>{e??t(vr())},[]),j.useEffect(()=>{gr=!0},[]),e}var br=or.useId||yr;function xr(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){e.set(t,e.get(t)?.filter(e=>e!==n)||[])}}}var Sr=j.createContext(null),Cr=j.createContext(null),wr=()=>j.useContext(Sr)?.id||null,Tr=()=>j.useContext(Cr),Er=`data-floating-ui-focusable`;function Dr(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=br(),a=j.useRef({}),[o]=j.useState(()=>xr()),s=wr()!=null,[c,l]=j.useState(r.reference),u=cr((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=j.useMemo(()=>({setPositionReference:l}),[]),f=j.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return j.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function Or(e){e===void 0&&(e={});let{nodeId:t}=e,n=Dr({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=j.useState(null),[s,c]=j.useState(null),l=i?.domReference||a,u=j.useRef(null),d=Tr();pr(()=>{l&&(u.current=l)},[l]);let f=tr({...e,elements:{...i,...s&&{reference:s}}}),p=j.useCallback(e=>{let t=B(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),m=j.useCallback(e=>{(B(e)||e===null)&&(u.current=e,o(e)),(B(f.refs.reference.current)||f.refs.reference.current===null||e!==null&&!B(e))&&f.refs.setReference(e)},[f.refs]),h=j.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=j.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),_=j.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return pr(()=>{r.dataRef.current.floatingContext=_;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=_)}),j.useMemo(()=>({...f,context:_,refs:h,elements:g}),[f,h,g,_])}var kr=`active`,Ar=`selected`;function jr(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[kr]:t,[Ar]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[Er]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[kr,Ar].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function Mr(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=j.useCallback(t=>jr(t,e,`reference`),t),a=j.useCallback(t=>jr(t,e,`floating`),n),o=j.useCallback(t=>jr(t,e,`item`),r);return j.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}function Nr(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}var Pr=e=>({name:`inner`,options:e,async fn(t){let{listRef:n,overflowRef:r,onFallbackChange:i,offset:a=0,index:o=0,minItemsVisible:s=4,referenceOverflowThreshold:c=0,scrollRef:l,...u}=J(e,t),{rects:d,elements:{floating:f}}=t,p=n.current[o],m=l?.current||f,h=f.clientTop||m.clientTop,g=f.clientTop!==0,_=m.clientTop!==0,v=f===m;if(!p)return{};let y={...t,...await nr(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-a).fn(t)},b=await Wn(Nr(y,m.scrollHeight+h+f.clientTop),u),x=await Wn(y,{...u,elementContext:`reference`}),S=K(0,b.top),C=y.y+S,w=(m.scrollHeight>m.clientHeight?e=>e:Rt)(K(0,m.scrollHeight+(g&&v||_?h*2:0)-S-K(0,b.bottom)));if(m.style.maxHeight=w+`px`,m.scrollTop=S,i){let e=m.offsetHeight<p.offsetHeight*G(s,n.current.length)-1||x.top>=-c||x.bottom>=-c;on.flushSync(()=>i(e))}return r&&(r.current=await Wn(Nr({...y,y:C},m.offsetHeight+h+f.clientTop),u)),{y:C}}});function Fr(e,t){let{open:n,elements:r}=e,{enabled:i=!0,overflowRef:a,scrollRef:o,onChange:s}=t,c=cr(s),l=j.useRef(!1),u=j.useRef(null),d=j.useRef(null);j.useEffect(()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||a.current==null)return;let n=e.deltaY,r=a.current.top>=-.5,i=a.current.bottom>=-.5,o=t.scrollHeight-t.clientHeight,s=n<0?-1:1,l=n<0?`max`:`min`;t.scrollHeight<=t.clientHeight||(!r&&n>0||!i&&n<0?(e.preventDefault(),on.flushSync(()=>{c(e=>e+Math[l](n,o*s))})):/firefox/i.test(Lt())&&(t.scrollTop+=n))}let t=o?.current||r.floating;if(n&&t)return t.addEventListener(`wheel`,e),requestAnimationFrame(()=>{u.current=t.scrollTop,a.current!=null&&(d.current={...a.current})}),()=>{u.current=null,d.current=null,t.removeEventListener(`wheel`,e)}},[i,n,r.floating,a,o,c]);let f=j.useMemo(()=>({onKeyDown(){l.current=!0},onWheel(){l.current=!1},onPointerMove(){l.current=!1},onScroll(){let e=o?.current||r.floating;if(a.current&&e&&l.current){if(u.current!==null){let t=e.scrollTop-u.current;(a.current.bottom<-.5&&t<-1||a.current.top<-.5&&t>1)&&on.flushSync(()=>c(e=>e+t))}requestAnimationFrame(()=>{u.current=e.scrollTop})}}}),[r.floating,c,a,o]);return j.useMemo(()=>i?{floating:f}:{},[i,f])}var $=(0,j.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});$.displayName=`FloatingContext`;var Ir=(0,j.createContext)(null);Ir.displayName=`PlacementContext`;function Lr(e){return(0,j.useMemo)(()=>e?typeof e==`string`?{to:e}:e:null,[e])}function Rr(){return(0,j.useContext)($).setReference}function zr(){return(0,j.useContext)($).getReferenceProps}function Br(){let{getFloatingProps:e,slot:t}=(0,j.useContext)($);return(0,j.useCallback)((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}function Vr(e=null){e===!1&&(e=null),typeof e==`string`&&(e={to:e});let t=(0,j.useContext)(Ir),n=(0,j.useMemo)(()=>e,[JSON.stringify(e,(e,t)=>t?.outerHTML??t)]);_(()=>{t?.(n??null)},[t,n]);let r=(0,j.useContext)($);return(0,j.useMemo)(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}var Hr=4;function Ur({children:e,enabled:t=!0}){let[n,r]=(0,j.useState)(null),[i,a]=(0,j.useState)(0),o=(0,j.useRef)(null),[s,l]=(0,j.useState)(null);Wr(s);let u=t&&n!==null&&s!==null,{to:d=`bottom`,gap:f=0,offset:p=0,padding:m=0,inner:h}=Gr(n,s),[g,v=`center`]=d.split(` `);_(()=>{u&&a(0)},[u]);let{refs:y,floatingStyles:x,context:S}=Or({open:u,placement:g===`selection`?v===`center`?`bottom`:`bottom-${v}`:v===`center`?`${g}`:`${g}-${v}`,strategy:`absolute`,transform:!1,middleware:[nr({mainAxis:g===`selection`?0:f,crossAxis:p}),rr({padding:m}),g!==`selection`&&ir({padding:m}),g===`selection`&&h?Pr({...h,padding:m,overflowRef:o,offset:i,minItemsVisible:Hr,referenceOverflowThreshold:m,onFallbackChange(e){if(!e)return;let t=S.elements.floating;if(!t)return;let n=parseFloat(getComputedStyle(t).scrollPaddingBottom)||0,r=Math.min(Hr,t.childElementCount),i=0,o=0;for(let e of S.elements.floating?.childNodes??[])if(c(e)){let a=e.offsetTop,s=a+e.clientHeight+n,c=t.scrollTop,l=c+t.clientHeight;if(a>=c&&s<=l)r--;else{o=Math.max(0,Math.min(s,l)-Math.max(a,c)),i=e.clientHeight;break}}r>=1&&a(e=>{let t=i*r-o+n;return e>=t?e:t})}}):null,ar({padding:m,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:`auto`,maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}})].filter(Boolean),whileElementsMounted:Un}),[C=g,w=v]=S.placement.split(`-`);g===`selection`&&(C=`selection`);let T=(0,j.useMemo)(()=>({anchor:[C,w].filter(Boolean).join(` `)}),[C,w]),{getReferenceProps:ee,getFloatingProps:te}=Mr([Fr(S,{overflowRef:o,onChange:a})]),ne=b(e=>{l(e),y.setFloating(e)});return j.createElement(Ir.Provider,{value:r},j.createElement($.Provider,{value:{setFloating:ne,setReference:y.setReference,styles:x,getReferenceProps:ee,getFloatingProps:te,slot:T}},e))}function Wr(e){_(()=>{if(!e)return;let t=new MutationObserver(()=>{let t=window.getComputedStyle(e).maxHeight,n=parseFloat(t);if(isNaN(n))return;let r=parseInt(t);isNaN(r)||n!==r&&(e.style.maxHeight=`${Math.ceil(n)}px`)});return t.observe(e,{attributes:!0,attributeFilter:[`style`]}),()=>{t.disconnect()}},[e])}function Gr(e,t){let n=Kr(e?.gap??`var(--anchor-gap, 0)`,t),r=Kr(e?.offset??`var(--anchor-offset, 0)`,t),i=Kr(e?.padding??`var(--anchor-padding, 0)`,t);return{...e,gap:n,offset:r,padding:i}}function Kr(e,t,n=void 0){let r=g(),i=b((e,t)=>{if(e==null)return[n,null];if(typeof e==`number`)return[e,null];if(typeof e==`string`){if(!t)return[n,null];let i=Jr(e,t);return[i,n=>{let a=qr(e);{let o=a.map(e=>window.getComputedStyle(t).getPropertyValue(e));r.requestAnimationFrame(function s(){r.nextFrame(s);let c=!1;for(let[e,n]of a.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(o[e]!==r){o[e]=r,c=!0;break}}if(!c)return;let l=Jr(e,t);i!==l&&(n(l),i=l)})}return r.dispose}]}return[n,null]}),a=(0,j.useMemo)(()=>i(e,t)[0],[e,t]),[o=a,s]=(0,j.useState)();return _(()=>{let[n,r]=i(e,t);if(s(n),r)return r(s)},[e,t]),o}function qr(e){let t=/var\((.*)\)/.exec(e);if(t){let e=t[1].indexOf(`,`);if(e===-1)return[t[1]];let n=t[1].slice(0,e).trim(),r=t[1].slice(e+1).trim();return r?[n,...qr(r)]:[n]}return[]}function Jr(e,t){let n=document.createElement(`div`);t.appendChild(n),n.style.setProperty(`margin-top`,`0px`,`important`),n.style.setProperty(`margin-top`,e,`important`);let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}function Yr(e){throw Error(`Unexpected object: `+e)}var Xr=(e=>(e[e.First=0]=`First`,e[e.Previous=1]=`Previous`,e[e.Next=2]=`Next`,e[e.Last=3]=`Last`,e[e.Specific=4]=`Specific`,e[e.Nothing=5]=`Nothing`,e))(Xr||{});function Zr(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:i===-1&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:Yr(e)}}var Qr={Idle:{kind:`Idle`},Tracked:e=>({kind:`Tracked`,position:e}),Moved:{kind:`Moved`}};function $r(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}function ei(e,t,n){let r=d();if(t.kind===`Tracked`){let i=function(){a!==$r(e)&&(r.dispose(),n())},{position:a}=t,o=new ResizeObserver(i);o.observe(e),r.add(()=>o.disconnect()),r.addEventListener(window,`scroll`,i,{passive:!0}),r.addEventListener(window,`resize`,i)}return()=>r.dispose()}var ti=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function ni(e){let t=e.innerText??``,n=e.cloneNode(!0);if(!c(n))return t;let r=!1;for(let e of n.querySelectorAll(`[hidden],[aria-hidden],[role="img"]`))e.remove(),r=!0;let i=r?n.innerText??``:t;return ti.test(i)&&(i=i.replace(ti,``)),i}function ri(e){let t=e.getAttribute(`aria-label`);if(typeof t==`string`)return t.trim();let n=e.getAttribute(`aria-labelledby`);if(n){let e=n.split(` `).map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute(`aria-label`);return typeof e==`string`?e.trim():ni(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(`, `)}return ni(e).trim()}function ii(e){let t=(0,j.useRef)(``),n=(0,j.useRef)(``);return b(()=>{let r=e.current;if(!r)return``;let i=r.innerText;if(t.current===i)return n.current;let a=ri(r).trim().toLowerCase();return t.current=i,n.current=a,a})}export{st as C,Be as D,Ke as E,rt as S,Ye as T,dt as _,Xr as a,tt as b,Rr as c,zr as d,Lr as f,pt as g,gt as h,ei as i,Vr as l,_t as m,$r as n,Zr as o,yt as p,Qr as r,Ur as s,ii as t,Br as u,ut as v,Ze as w,nt as x,lt as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,n as t}from"./react-dom.CqAxpHMt.js";import{bt as n,ht as r}from"./portal.C3KrUREL.js";var i=e(t(),1);function a(e,{container:t,accept:a,walk:o}){let s=(0,i.useRef)(a),c=(0,i.useRef)(o);(0,i.useEffect)(()=>{s.current=a,c.current=o},[a,o]),r(()=>{if(!t||!e)return;let r=n(t);if(!r)return;let i=s.current,a=c.current,o=Object.assign(e=>i(e),{acceptNode:i}),l=r.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,o,!1);for(;l.nextNode();)a(l.currentNode)},[t,e,s,c])}export{a as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,n as t}from"./react-dom.CqAxpHMt.js";import{p as n}from"./app-config.vqDkEMS3.js";import{t as r}from"./jsx-runtime.BUXbF_vF.js";import{t as i}from"./SelectDropdown.D2i7-lQC.js";var a=e(t(),1),o=[5,10,20,50],s=`tw.docs.page-size.v1`;function c(e){return typeof e==`number`&&o.includes(e)}function l(e){try{let t=localStorage.getItem(n(s)),r=t===null?NaN:Number(t);return c(r)?r:e}catch{return e}}function u(e){if(c(e))try{localStorage.setItem(n(s),String(e))}catch{}}var d=r(),f=`h-8 px-3 shrink-0 whitespace-nowrap text-sm text-stone-600 border border-stone-200 rounded-lg hover:bg-stone-50 disabled:opacity-40 disabled:cursor-not-allowed cursor-pointer`,p=o.map(e=>({value:String(e),label:String(e)}));function m(e){let[t,n]=(0,a.useState)(()=>l(e));return[t,(0,a.useCallback)(e=>{c(e)&&(u(e),n(e))},[])]}function h({page:e,totalPages:t,pageSize:n,busy:r=!1,onPage:a,onPageSize:o}){return(0,d.jsxs)(`div`,{className:`shrink-0 px-4 py-3 border-t border-stone-100 flex items-center justify-between gap-2 flex-wrap`,children:[(0,d.jsxs)(`span`,{className:`text-xs text-stone-500 flex items-center gap-1.5`,children:[(0,d.jsxs)(`span`,{children:[`第 `,e,` / `,t,` 页 ·`]}),(0,d.jsx)(i,{compact:!0,centerContent:!0,options:p,value:String(n),onChange:e=>o(Number(e)),disabled:r,ariaLabel:`每页条数`,showCheck:!1,className:`w-18`}),(0,d.jsx)(`span`,{children:`条`})]}),(0,d.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,d.jsx)(`button`,{type:`button`,disabled:r||e<=1,onClick:()=>a(1),className:f,children:`首页`}),(0,d.jsx)(`button`,{type:`button`,disabled:r||e<=1,onClick:()=>a(e-1),className:f,children:`上一页`}),(0,d.jsx)(`button`,{type:`button`,disabled:r||e>=t,onClick:()=>a(e+1),className:f,children:`下一页`}),(0,d.jsx)(`button`,{type:`button`,disabled:r||e>=t,onClick:()=>a(t),className:f,children:`末页`})]})]})}function g(){let[e,t]=(0,a.useState)(!1),n=(0,a.useCallback)(()=>t(!0),[]);return{cls:e?`tw-anim-list `:``,play:n}}export{h as n,m as r,g as t};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|