@univerjs/design 1.0.0-alpha.0 → 1.0.0-alpha.2
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/lib/cjs/index.js +60 -47
- package/lib/es/index.js +60 -47
- package/lib/index.css +34 -0
- package/lib/index.js +60 -47
- package/lib/types/components/dialog/DialogPrimitive.d.ts +1 -0
- package/lib/umd/index.js +14 -18
- package/package.json +10 -10
package/lib/umd/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("react/jsx-runtime"),require("react-dom"),require("react-dom/client")):typeof define==`function`&&define.amd?define([`exports`,`react`,`react/jsx-runtime`,`react-dom`,`react-dom/client`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverDesign={},e.React,e.React,e.ReactDOM,e.ReactDOM))})(this,function(e,t,n,r,i){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var a=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=c(t),a=0,l=i.length,d;a<l;a++)d=i[a],!u.call(e,d)&&d!==n&&o(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=s(t,d))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:a(l(e)),d(t||!e||!e.__esModule?o(n,`default`,{value:e,enumerable:!0}):n,e));let p=f(t,1);t=f(t);let m=f(r,1);r=f(r);function h({ref:e,...t}){let{icon:n,id:r,className:i,extend:a,...o}=t,s=`univerjs-icon univerjs-icon-${r} ${i||``}`.trim(),c=(0,p.useRef)(`_${y()}`);return g(n,`${r}`,{defIds:n.defIds,idSuffix:c.current},{ref:e,className:s,...o},a)}function g(e,t,n,r,i){return(0,p.createElement)(e.tag,{key:t,..._(e,n,i),...r},(v(e,n).children||[]).map((r,a)=>g(r,`${t}-${e.tag}-${a}`,n,void 0,i)))}function _(e,t,n){let r={...e.attrs};n!=null&&n.colorChannel1&&r.fill===`colorChannel1`&&(r.fill=n.colorChannel1),n!=null&&n.colorChannel1&&r.stroke===`colorChannel1`&&(r.stroke=n.colorChannel1),e.tag===`mask`&&r.id&&(r.id+=t.idSuffix),Object.entries(r).forEach(([e,n])=>{e===`mask`&&typeof n==`string`&&(r[e]=n.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))});let{defIds:i}=t;return!i||i.length===0?r:(e.tag===`use`&&r[`xlink:href`]&&(r[`xlink:href`]+=t.idSuffix),Object.entries(r).forEach(([e,n])=>{typeof n==`string`&&(r[e]=n.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))}),r)}function v(e,t){var n;let{defIds:r}=t;return!r||r.length===0?e:e.tag===`defs`&&(n=e.children)!=null&&n.length?{...e,children:e.children.map(e=>typeof e.attrs.id==`string`&&r&&r.includes(e.attrs.id)?{...e,attrs:{...e.attrs,id:e.attrs.id+t.idSuffix}}:e)}:e}function y(){return Math.random().toString(36).substring(2,8)}h.displayName=`UniverIcon`;let b={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.87598 11.8327C8.87598 11.5013 9.14461 11.2327 9.47598 11.2327H11.476C11.8073 11.2327 12.076 11.5013 12.076 11.8327C12.076 12.164 11.8073 12.4327 11.476 12.4327H9.47598C9.14461 12.4327 8.87598 12.164 8.87598 11.8327Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M4.80898 11.2327C4.47761 11.2327 4.20898 11.5013 4.20898 11.8327C4.20898 12.164 4.47761 12.4327 4.80898 12.4327H6.80898C7.14036 12.4327 7.40898 12.164 7.40898 11.8327C7.40898 11.5013 7.14036 11.2327 6.80898 11.2327H4.80898Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.87598 9.16592C8.87598 8.83455 9.14461 8.56592 9.47598 8.56592H11.476C11.8073 8.56592 12.076 8.83455 12.076 9.16592C12.076 9.49729 11.8073 9.76592 11.476 9.76592H9.47598C9.14461 9.76592 8.87598 9.49729 8.87598 9.16592Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M4.80898 8.56592C4.47761 8.56592 4.20898 8.83455 4.20898 9.16592C4.20898 9.49729 4.47761 9.76592 4.80898 9.76592H6.80898C7.14036 9.76592 7.40898 9.49729 7.40898 9.16592C7.40898 8.83455 7.14036 8.56592 6.80898 8.56592H4.80898Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M6.00615 1.69985C6.00615 1.36848 5.73752 1.09985 5.40615 1.09985C5.07478 1.09985 4.80615 1.36848 4.80615 1.69985V2.34009H3.64248C2.20654 2.34009 1.04248 3.50415 1.04248 4.94009V12.3C1.04248 13.7359 2.20654 14.9 3.64248 14.9H12.6425C14.0784 14.9 15.2425 13.7359 15.2425 12.3V4.94009C15.2425 3.50415 14.0784 2.34009 12.6425 2.34009H11.4798V1.69985C11.4798 1.36848 11.2112 1.09985 10.8798 1.09985C10.5484 1.09985 10.2798 1.36848 10.2798 1.69985V2.34009H6.00615V1.69985ZM14.0425 5.97021V4.94009C14.0425 4.16689 13.4157 3.54009 12.6425 3.54009H11.4798V4.09985C11.4798 4.43122 11.2112 4.69985 10.8798 4.69985C10.5484 4.69985 10.2798 4.43122 10.2798 4.09985V3.54009H6.00615V4.09985C6.00615 4.43122 5.73752 4.69985 5.40615 4.69985C5.07478 4.69985 4.80615 4.43122 4.80615 4.09985V3.54009H3.64248C2.86928 3.54009 2.24248 4.16689 2.24248 4.94009V5.97021H14.0425ZM2.24248 7.17021H14.0425V12.3C14.0425 13.0731 13.4157 13.7 12.6425 13.7H3.64248C2.86928 13.7 2.24248 13.0732 2.24248 12.3V7.17021Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},x=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`calendar-icon`,ref:t,icon:b}))});x.displayName=`CalendarIcon`;let S={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},C=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`check-mark-icon`,ref:t,icon:S}))});C.displayName=`CheckMarkIcon`;let w={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.24483 4.80026C8.24487 4.46889 7.97627 4.20023 7.6449 4.2002C7.31353 4.20016 7.04487 4.46876 7.04483 4.80013L7.04443 8.40306C7.04442 8.56222 7.10763 8.71486 7.22017 8.82739L9.64664 11.2539C9.88095 11.4882 10.2608 11.4882 10.4952 11.2539C10.7295 11.0195 10.7295 10.6396 10.4952 10.4053L8.24446 8.15463L8.24483 4.80026Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.14248 0.899902C4.22126 0.899902 1.04248 4.07868 1.04248 7.9999C1.04248 11.9211 4.22126 15.0999 8.14248 15.0999C12.0637 15.0999 15.2425 11.9211 15.2425 7.9999C15.2425 4.07868 12.0637 0.899902 8.14248 0.899902ZM2.24248 7.9999C2.24248 4.74142 4.884 2.0999 8.14248 2.0999C11.401 2.0999 14.0425 4.74142 14.0425 7.9999C14.0425 11.2584 11.401 13.8999 8.14248 13.8999C4.884 13.8999 2.24248 11.2584 2.24248 7.9999Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},T=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`clock-icon`,ref:t,icon:w}))});T.displayName=`ClockIcon`;let E={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M3.71274 2.86421C3.47843 2.6299 3.09853 2.6299 2.86421 2.86421C2.6299 3.09853 2.6299 3.47843 2.86421 3.71274L7.15154 8.00007L2.86421 12.2874C2.6299 12.5217 2.6299 12.9016 2.86421 13.1359C3.09853 13.3702 3.47843 13.3702 3.71274 13.1359L8.00007 8.84859L12.2874 13.1359C12.5217 13.3702 12.9016 13.3702 13.1359 13.1359C13.3702 12.9016 13.3702 12.5217 13.1359 12.2874L8.84859 8.00007L13.1359 3.71274C13.3702 3.47843 13.3702 3.09853 13.1359 2.86421C12.9016 2.6299 12.5217 2.6299 12.2874 2.86421L8.00007 7.15154L3.71274 2.86421Z`}}]},D=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`close-icon`,ref:t,icon:E}))});D.displayName=`CloseIcon`;let O={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},k=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`delete-icon`,ref:t,icon:O}))});k.displayName=`DeleteIcon`;let A={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.55935 11.7617C8.29238 12.1202 7.75558 12.1202 7.48861 11.7617L3.08649 5.84931C2.75722 5.40708 3.07292 4.77771 3.62432 4.77771H12.4236C12.975 4.77771 13.2907 5.40708 12.9614 5.84931L8.55935 11.7617Z`}}]},j=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`down-icon`,ref:t,icon:A}))});j.displayName=`DownIcon`;let M={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.85869 12.9216C8.38445 13.4708 7.61555 13.4708 7.14131 12.9216L0.358114 5.06726C-0.406895 4.18144 0.134916 2.66683 1.2168 2.66683L14.7832 2.66683C15.8651 2.66683 16.4069 4.18144 15.6419 5.06726L8.85869 12.9216Z`}}]},N=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`dropdown-icon`,ref:t,icon:M}))});N.displayName=`DropdownIcon`;let P={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM10.3097 5.69014C10.544 5.92445 10.544 6.30435 10.3097 6.53867L8.84843 7.9999L10.3099 9.46137C10.5442 9.69569 10.5442 10.0756 10.3099 10.3099C10.0756 10.5442 9.69569 10.5442 9.46137 10.3099L7.9999 8.84843L6.53842 10.3099C6.30411 10.5442 5.92421 10.5442 5.6899 10.3099C5.45558 10.0756 5.45558 9.69569 5.6899 9.46137L7.15137 7.9999L5.69014 6.53867C5.45583 6.30435 5.45583 5.92445 5.69014 5.69014C5.92445 5.45583 6.30435 5.45583 6.53867 5.69014L7.9999 7.15137L9.46113 5.69014C9.69544 5.45583 10.0753 5.45583 10.3097 5.69014Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},F=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`error-icon`,ref:t,icon:P}))});F.displayName=`ErrorIcon`;let I={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.00016 1.33203C6.68162 1.33203 5.39269 1.72302 4.29636 2.45557C3.20004 3.18811 2.34555 4.2293 1.84097 5.44747C1.33638 6.66565 1.20436 8.00609 1.4616 9.2993C1.71883 10.5925 2.35377 11.7804 3.28612 12.7127C4.21847 13.6451 5.40636 14.28 6.69956 14.5373C7.99277 14.7945 9.33321 14.6625 10.5514 14.1579C11.7696 13.6533 12.8108 12.7988 13.5433 11.7025C14.2758 10.6062 14.6668 9.31724 14.6668 7.9987C14.6649 6.23118 13.9619 4.53662 12.7121 3.2868C11.4622 2.03697 9.76768 1.33397 8.00016 1.33203ZM7.66683 3.9987C7.86461 3.9987 8.05795 4.05735 8.2224 4.16723C8.38685 4.27711 8.51502 4.43329 8.59071 4.61601C8.6664 4.79874 8.6862 4.99981 8.64762 5.19379C8.60903 5.38777 8.51379 5.56595 8.37394 5.7058C8.23409 5.84566 8.0559 5.9409 7.86192 5.97948C7.66794 6.01807 7.46687 5.99826 7.28415 5.92258C7.10142 5.84689 6.94524 5.71872 6.83536 5.55427C6.72548 5.38982 6.66683 5.19648 6.66683 4.9987C6.66683 4.73348 6.77219 4.47913 6.95972 4.29159C7.14726 4.10405 7.40162 3.9987 7.66683 3.9987ZM9.3335 11.332H6.66683C6.49002 11.332 6.32045 11.2618 6.19543 11.1368C6.0704 11.0117 6.00016 10.8422 6.00016 10.6654C6.00016 10.4886 6.0704 10.319 6.19543 10.194C6.32045 10.0689 6.49002 9.9987 6.66683 9.9987H7.3335V7.9987H6.66683C6.49002 7.9987 6.32045 7.92846 6.19543 7.80343C6.0704 7.67841 6.00016 7.50884 6.00016 7.33203C6.00016 7.15522 6.0704 6.98565 6.19543 6.86063C6.32045 6.7356 6.49002 6.66536 6.66683 6.66536H8.00016C8.17698 6.66536 8.34655 6.7356 8.47157 6.86063C8.59659 6.98565 8.66683 7.15522 8.66683 7.33203V9.9987H9.3335C9.51031 9.9987 9.67988 10.0689 9.8049 10.194C9.92993 10.319 10.0002 10.4886 10.0002 10.6654C10.0002 10.8422 9.92993 11.0117 9.8049 11.1368C9.67988 11.2618 9.51031 11.332 9.3335 11.332Z`}}]},L=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`info-icon`,ref:t,icon:I}))});L.displayName=`InfoIcon`;let R={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},z=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`more-down-icon`,ref:t,icon:R}))});z.displayName=`MoreDownIcon`;let ee={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M10.3536 12.3536C10.1583 12.5488 9.84171 12.5488 9.64645 12.3536L6.64645 9.35355C6.45118 9.15829 6.45118 8.84171 6.64645 8.64645L9.64645 5.64645C9.84171 5.45118 10.1583 5.45118 10.3536 5.64645C10.5488 5.84171 10.5488 6.15829 10.3536 6.35355L7.70711 9L10.3536 11.6464C10.5488 11.8417 10.5488 12.1583 10.3536 12.3536Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},te=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`more-left-icon`,ref:t,icon:ee}))});te.displayName=`MoreLeftIcon`;let ne={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M6.14645 4.64645C6.34171 4.45118 6.65829 4.45118 6.85355 4.64645L9.85355 7.64645C10.0488 7.84171 10.0488 8.15829 9.85355 8.35355L6.85355 11.3536C6.65829 11.5488 6.34171 11.5488 6.14645 11.3536C5.95118 11.1583 5.95118 10.8417 6.14645 10.6464L8.79289 8L6.14645 5.35355C5.95118 5.15829 5.95118 4.84171 6.14645 4.64645Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},re=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`more-right-icon`,ref:t,icon:ne}))});re.displayName=`MoreRightIcon`;let ie={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},ae=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`more-up-icon`,ref:t,icon:ie}))});ae.displayName=`MoreUpIcon`;let oe={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M5.65252 5.41446C5.86681 5.53124 6.00016 5.75579 6.00016 5.99984V9.99984C6.00016 10.368 5.70168 10.6665 5.3335 10.6665C4.96531 10.6665 4.66683 10.368 4.66683 9.99984V7.22312L4.36151 7.42005C4.05209 7.61961 3.63948 7.53056 3.43992 7.22115C3.24035 6.91173 3.3294 6.49912 3.63882 6.29956L4.97215 5.43959C5.17724 5.30731 5.43822 5.29767 5.65252 5.41446Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M12.3335 5.99984C12.3335 5.75579 12.2001 5.53124 11.9858 5.41446C11.7716 5.29767 11.5106 5.30731 11.3055 5.43959L9.97215 6.29956C9.66274 6.49912 9.57368 6.91173 9.77325 7.22115C9.97281 7.53056 10.3854 7.61961 10.6948 7.42005L11.0002 7.22312V9.99984C11.0002 10.368 11.2986 10.6665 11.6668 10.6665C12.035 10.6665 12.3335 10.368 12.3335 9.99984V5.99984Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.00008 5.99984C8.36827 5.99984 8.66675 6.29831 8.66675 6.6665V6.99984C8.66675 7.36803 8.36827 7.6665 8.00008 7.6665C7.63189 7.6665 7.33341 7.36803 7.33341 6.99984V6.6665C7.33341 6.29831 7.63189 5.99984 8.00008 5.99984Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.66675 8.99984C8.66675 8.63165 8.36827 8.33317 8.00008 8.33317C7.63189 8.33317 7.33341 8.63165 7.33341 8.99984V9.33317C7.33341 9.70136 7.63189 9.99984 8.00008 9.99984C8.36827 9.99984 8.66675 9.70136 8.66675 9.33317V8.99984Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M0.666748 2.99984C0.666748 2.26346 1.2637 1.6665 2.00008 1.6665H14.0001C14.7365 1.6665 15.3334 2.26346 15.3334 2.99984V12.9998C15.3334 13.7362 14.7365 14.3332 14.0001 14.3332H2.00008C1.26371 14.3332 0.666748 13.7362 0.666748 12.9998V2.99984ZM14.0001 2.99984H2.00008V12.9998H14.0001V2.99984Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},se=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`one-to-one-icon`,ref:t,icon:oe}))});se.displayName=`OneToOneIcon`;let ce={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.7245 6.42417C11.9588 6.18985 11.9588 5.80995 11.7245 5.57564C11.4901 5.34132 11.1102 5.34132 10.8759 5.57564L7.3002 9.15137L5.72446 7.57564C5.49014 7.34132 5.11025 7.34132 4.87593 7.57564C4.64162 7.80995 4.64162 8.18985 4.87593 8.42417L6.87593 10.4242C7.11025 10.6585 7.49014 10.6585 7.72446 10.4242L11.7245 6.42417Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},le=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`success-icon`,ref:t,icon:ce}))});le.displayName=`SuccessIcon`;let ue={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM8.00008 12.3671C8.46031 12.3671 8.83342 11.994 8.83342 11.5338C8.83342 11.0735 8.46031 10.7004 8.00008 10.7004C7.53985 10.7004 7.16675 11.0735 7.16675 11.5338C7.16675 11.994 7.53985 12.3671 8.00008 12.3671ZM8.5999 4.4335C8.5999 4.10213 8.33127 3.8335 7.9999 3.8335C7.66853 3.8335 7.3999 4.10213 7.3999 4.4335V9.36683C7.3999 9.6982 7.66853 9.96683 7.9999 9.96683C8.33127 9.96683 8.5999 9.6982 8.5999 9.36683V4.4335Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},de=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`warning-icon`,ref:t,icon:ue}))});de.displayName=`WarningIcon`;let fe={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.04883 5.38216C8.04883 5.01397 7.75035 4.71549 7.38216 4.71549C7.01397 4.71549 6.71549 5.01397 6.71549 5.38216V6.71897L5.3865 6.7207C5.01831 6.72117 4.72022 7.02004 4.7207 7.38823C4.72118 7.75642 5.02005 8.05451 5.38824 8.05403L6.71549 8.0523V9.38216C6.71549 9.75035 7.01397 10.0488 7.38216 10.0488C7.75035 10.0488 8.04883 9.75035 8.04883 9.38216V8.05056L9.38304 8.04883C9.75123 8.04835 10.0493 7.74948 10.0488 7.38129C10.0484 7.0131 9.74949 6.71502 9.3813 6.7155L8.04883 6.71723V5.38216Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M7.38216 1.04883C3.88437 1.04883 1.04883 3.88437 1.04883 7.38216C1.04883 10.88 3.88437 13.7155 7.38216 13.7155C8.89089 13.7155 10.2764 13.1879 11.3643 12.3072L13.813 14.7559C14.0733 15.0162 14.4954 15.0162 14.7558 14.7559C15.0161 14.4955 15.0161 14.0734 14.7558 13.8131L12.3071 11.3644C13.1879 10.2765 13.7155 8.89095 13.7155 7.38216C13.7155 3.88437 10.88 1.04883 7.38216 1.04883ZM2.38216 7.38216C2.38216 4.62075 4.62075 2.38216 7.38216 2.38216C10.1436 2.38216 12.3822 4.62075 12.3822 7.38216C12.3822 10.1436 10.1436 12.3822 7.38216 12.3822C4.62075 12.3822 2.38216 10.1436 2.38216 7.38216Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},pe=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`zoom-in-icon`,ref:t,icon:fe}))});pe.displayName=`ZoomInIcon`;let me={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M4.71549 7.38216C4.71549 7.01397 5.01397 6.71549 5.38216 6.71549H9.38216C9.75035 6.71549 10.0488 7.01397 10.0488 7.38216C10.0488 7.75035 9.75035 8.04883 9.38216 8.04883H5.38216C5.01397 8.04883 4.71549 7.75035 4.71549 7.38216Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M1.04883 7.38216C1.04883 3.88437 3.88437 1.04883 7.38216 1.04883C10.88 1.04883 13.7155 3.88437 13.7155 7.38216C13.7155 8.89095 13.1879 10.2765 12.3071 11.3644L14.7558 13.8131C15.0161 14.0734 15.0161 14.4955 14.7558 14.7559C14.4954 15.0162 14.0733 15.0162 13.813 14.7559L11.3643 12.3072C10.2764 13.1879 8.89089 13.7155 7.38216 13.7155C3.88437 13.7155 1.04883 10.88 1.04883 7.38216ZM7.38216 2.38216C4.62075 2.38216 2.38216 4.62075 2.38216 7.38216C2.38216 10.1436 4.62075 12.3822 7.38216 12.3822C10.1436 12.3822 12.3822 10.1436 12.3822 7.38216C12.3822 4.62075 10.1436 2.38216 7.38216 2.38216Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},he=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`zoom-out-icon`,ref:t,icon:me}))});he.displayName=`ZoomOutIcon`;let ge={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`#0B9EFB`,d:`M8.79993 14.0166C8.79993 14.4585 8.44176 14.8166 7.99993 14.8166C4.23529 14.8166 1.18345 11.7648 1.18345 8.00017C1.18345 4.23554 4.23529 1.18369 7.99993 1.1837C11.7646 1.1837 14.8164 4.23554 14.8164 8.00017C14.8164 8.442 14.4582 8.80017 14.0164 8.80017C13.5746 8.80017 13.2164 8.442 13.2164 8.00017C13.2164 5.11919 10.8809 2.7837 7.99993 2.7837C5.11895 2.7837 2.78345 5.11919 2.78345 8.00017C2.78345 10.8812 5.11895 13.2166 7.99993 13.2166C8.44176 13.2166 8.79993 13.5748 8.79993 14.0166Z`,fillOpacity:.2,fillRule:`evenodd`,clipRule:`evenodd`}},{tag:`path`,attrs:{fill:`#0B9EFB`,d:`M7.20007 1.98384C7.20007 1.54201 7.55824 1.18384 8.00007 1.18384C11.7647 1.18384 14.8165 4.23568 14.8165 8.00032C14.8165 11.765 11.7647 14.8168 8.00007 14.8168C4.23543 14.8168 1.18359 11.765 1.18359 8.00032C1.18359 7.55849 1.54177 7.20031 1.98359 7.20031C2.42542 7.20031 2.78359 7.55849 2.78359 8.00032C2.78359 10.8813 5.11909 13.2168 8.00007 13.2168C10.8811 13.2168 13.2165 10.8813 13.2165 8.00032C13.2165 5.11933 10.8811 2.78384 8.00007 2.78384C7.55824 2.78384 7.20007 2.42567 7.20007 1.98384Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},_e=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`loading-multi-icon`,ref:t,icon:ge}))});_e.displayName=`LoadingMultiIcon`;function ve(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=ve(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function B(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ve(e))&&(r&&(r+=` `),r+=t);return r}let ye=e=>{let t=Ce(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let n=e.split(`-`);return n[0]===``&&n.length!==1&&n.shift(),be(n,t)||Se(e)},getConflictingClassGroupIds:(e,t)=>{let i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},be=(e,t)=>{var n;if(e.length===0)return t.classGroupId;let r=e[0],i=t.nextPart.get(r),a=i?be(e.slice(1),i):void 0;if(a)return a;if(t.validators.length===0)return;let o=e.join(`-`);return(n=t.validators.find(({validator:e})=>e(o)))==null?void 0:n.classGroupId},xe=/^\[(.+)\]$/,Se=e=>{if(xe.test(e)){let t=xe.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(`:`));if(n)return`arbitrary..`+n}},Ce=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return De(Object.entries(e.classGroups),n).forEach(([e,n])=>{we(n,r,e,t)}),r},we=(e,t,n,r)=>{e.forEach(e=>{if(typeof e==`string`){let r=e===``?t:Te(t,e);r.classGroupId=n;return}if(typeof e==`function`){if(Ee(e)){we(e(r),t,n,r);return}t.validators.push({validator:e,classGroupId:n});return}Object.entries(e).forEach(([e,i])=>{we(i,Te(t,e),n,r)})})},Te=(e,t)=>{let n=e;return t.split(`-`).forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Ee=e=>e.isThemeGetter,De=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>typeof e==`string`?t+e:typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,Oe=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=new Map,r=new Map,i=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);if(t!==void 0)return t;if((t=r.get(e))!==void 0)return i(e,t),t},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},ke=e=>{let{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=e=>{let n=[],o=0,s=0,c;for(let l=0;l<e.length;l++){let u=e[l];if(o===0){if(u===i&&(r||e.slice(l,l+a)===t)){n.push(e.slice(s,l)),s=l+a;continue}if(u===`/`){c=l;continue}}u===`[`?o++:u===`]`&&o--}let l=n.length===0?e:e.substring(s),u=l.startsWith(`!`);return{modifiers:n,hasImportantModifier:u,baseClassName:u?l.substring(1):l,maybePostfixModifierPosition:c&&c>s?c-s:void 0}};return n?e=>n({className:e,parseClassName:o}):o},Ae=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(e=>{e[0]===`[`?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},je=e=>({cache:Oe(e.cacheSize),parseClassName:ke(e),...ye(e)}),Me=/\s+/,Ne=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(Me),s=``;for(let e=o.length-1;e>=0;--e){let t=o[e],{modifiers:c,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(t),f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?` `+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?` `+s:s);continue}f=!1}let m=Ae(c).join(`:`),h=l?m+`!`:m,g=h+p;if(a.includes(g))continue;a.push(g);let _=i(p,f);for(let e=0;e<_.length;++e){let t=_[e];a.push(h+t)}s=t+(s.length>0?` `+s:s)}return s};function Pe(){let e=0,t,n,r=``;for(;e<arguments.length;)(t=arguments[e++])&&(n=Fe(t))&&(r&&(r+=` `),r+=n);return r}let Fe=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Fe(e[r]))&&(n&&(n+=` `),n+=t);return n};function Ie(e,...t){let n,r,i,a=o;function o(o){return n=je(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)}function s(e){let t=r(e);if(t)return t;let a=Ne(e,n);return i(e,a),a}return function(){return a(Pe.apply(null,arguments))}}let V=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},Le=/^\[(?:([a-z-]+):)?(.+)\]$/i,Re=/^\d+\/\d+$/,ze=new Set([`px`,`full`,`screen`]),Be=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ve=/\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$/,He=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,We=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ge=e=>qe(e)||ze.has(e)||Re.test(e),Ke=e=>at(e,`length`,ot),qe=e=>!!e&&!Number.isNaN(Number(e)),Je=e=>at(e,`number`,qe),Ye=e=>!!e&&Number.isInteger(Number(e)),Xe=e=>e.endsWith(`%`)&&qe(e.slice(0,-1)),H=e=>Le.test(e),Ze=e=>Be.test(e),Qe=new Set([`length`,`size`,`percentage`]),$e=e=>at(e,Qe,st),et=e=>at(e,`position`,st),tt=new Set([`image`,`url`]),nt=e=>at(e,tt,lt),rt=e=>at(e,``,ct),it=()=>!0,at=(e,t,n)=>{let r=Le.exec(e);return r?r[1]?typeof t==`string`?r[1]===t:t.has(r[1]):n(r[2]):!1},ot=e=>Ve.test(e)&&!He.test(e),st=()=>!1,ct=e=>Ue.test(e),lt=e=>We.test(e),ut=Ie(()=>{let e=V(`colors`),t=V(`spacing`),n=V(`blur`),r=V(`brightness`),i=V(`borderColor`),a=V(`borderRadius`),o=V(`borderSpacing`),s=V(`borderWidth`),c=V(`contrast`),l=V(`grayscale`),u=V(`hueRotate`),d=V(`invert`),f=V(`gap`),p=V(`gradientColorStops`),m=V(`gradientColorStopPositions`),h=V(`inset`),g=V(`margin`),_=V(`opacity`),v=V(`padding`),y=V(`saturate`),b=V(`scale`),x=V(`sepia`),S=V(`skew`),C=V(`space`),w=V(`translate`),T=()=>[`auto`,`contain`,`none`],E=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],D=()=>[`auto`,H,t],O=()=>[H,t],k=()=>[``,Ge,Ke],A=()=>[`auto`,qe,H],j=()=>[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`],M=()=>[`solid`,`dashed`,`dotted`,`double`,`none`],N=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],P=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`],F=()=>[``,`0`,H],I=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],L=()=>[qe,H];return{cacheSize:500,separator:`:`,theme:{colors:[it],spacing:[Ge,Ke],blur:[`none`,``,Ze,H],brightness:L(),borderColor:[e],borderRadius:[`none`,``,`full`,Ze,H],borderSpacing:O(),borderWidth:k(),contrast:L(),grayscale:F(),hueRotate:L(),invert:F(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Xe,Ke],inset:D(),margin:D(),opacity:L(),padding:O(),saturate:L(),scale:L(),sepia:F(),skew:L(),space:O(),translate:O()},classGroups:{aspect:[{aspect:[`auto`,`square`,`video`,H]}],container:[`container`],columns:[{columns:[Ze]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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:[...j(),H]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[`auto`,Ye,H]}],basis:[{basis:D()}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`wrap`,`wrap-reverse`,`nowrap`]}],flex:[{flex:[`1`,`auto`,`initial`,`none`,H]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:[`first`,`last`,`none`,Ye,H]}],"grid-cols":[{"grid-cols":[it]}],"col-start-end":[{col:[`auto`,{span:[`full`,Ye,H]},H]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[it]}],"row-start-end":[{row:[`auto`,{span:[Ye,H]},H]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":[`auto`,`min`,`max`,`fr`,H]}],"auto-rows":[{"auto-rows":[`auto`,`min`,`max`,`fr`,H]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:[`normal`,...P()]}],"justify-items":[{"justify-items":[`start`,`end`,`center`,`stretch`]}],"justify-self":[{"justify-self":[`auto`,`start`,`end`,`center`,`stretch`]}],"align-content":[{content:[`normal`,...P(),`baseline`]}],"align-items":[{items:[`start`,`end`,`center`,`baseline`,`stretch`]}],"align-self":[{self:[`auto`,`start`,`end`,`center`,`stretch`,`baseline`]}],"place-content":[{"place-content":[...P(),`baseline`]}],"place-items":[{"place-items":[`start`,`end`,`center`,`baseline`,`stretch`]}],"place-self":[{"place-self":[`auto`,`start`,`end`,`center`,`stretch`]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[C]}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":[C]}],"space-y-reverse":[`space-y-reverse`],w:[{w:[`auto`,`min`,`max`,`fit`,`svw`,`lvw`,`dvw`,H,t]}],"min-w":[{"min-w":[H,t,`min`,`max`,`fit`]}],"max-w":[{"max-w":[H,t,`none`,`full`,`min`,`max`,`fit`,`prose`,{screen:[Ze]},Ze]}],h:[{h:[H,t,`auto`,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"min-h":[{"min-h":[H,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"max-h":[{"max-h":[H,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],size:[{size:[H,t,`auto`,`min`,`max`,`fit`]}],"font-size":[{text:[`base`,Ze,Ke]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`,Je]}],"font-family":[{font:[it]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`,H]}],"line-clamp":[{"line-clamp":[`none`,qe,Je]}],leading:[{leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`,Ge,H]}],"list-image":[{"list-image":[`none`,H]}],"list-style-type":[{list:[`none`,`disc`,`decimal`,H]}],"list-style-position":[{list:[`inside`,`outside`]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...M(),`wavy`]}],"text-decoration-thickness":[{decoration:[`auto`,`from-font`,Ge,Ke]}],"underline-offset":[{"underline-offset":[`auto`,Ge,H]}],"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:O()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,H]}],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`,H]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:[...j(),et]}],"bg-repeat":[{bg:[`no-repeat`,{repeat:[``,`x`,`y`,`round`,`space`]}]}],"bg-size":[{bg:[`auto`,`cover`,`contain`,$e]}],"bg-image":[{bg:[`none`,{"gradient-to":[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},nt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"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":[_]}],"border-style":[{border:[...M(),`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":[_]}],"divide-style":[{divide:M()}],"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:[``,...M()]}],"outline-offset":[{"outline-offset":[Ge,H]}],"outline-w":[{outline:[Ge,Ke]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Ge,Ke]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:[``,`inner`,`none`,Ze,rt]}],"shadow-color":[{shadow:[it]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...N(),`plus-lighter`,`plus-darker`]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:[``,`none`]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":[``,`none`,Ze,H]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":[``,`none`]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[`none`,`all`,``,`colors`,`opacity`,`shadow`,`transform`,H]}],duration:[{duration:L()}],ease:[{ease:[`linear`,`in`,`out`,`in-out`,H]}],delay:[{delay:L()}],animate:[{animate:[`none`,`spin`,`ping`,`pulse`,`bounce`,H]}],transform:[{transform:[``,`gpu`,`none`]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Ye,H]}],"translate-x":[{"translate-x":[w]}],"translate-y":[{"translate-y":[w]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:[`center`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`,`top-left`,H]}],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`,H]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":[`none`,`auto`]}],resize:[{resize:[`none`,`y`,`x`,``]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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`,H]}],fill:[{fill:[e,`none`]}],"stroke-w":[{stroke:[Ge,Ke,Je]}],stroke:[{stroke:[e,`none`]}],sr:[`sr-only`,`not-sr-only`],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]}}});function U(...e){return ut(B(e))}function dt(e){let{className:r,items:i}=e,[a,o]=(0,t.useState)(null),s=e=>{o(a===e?null:e)};return(0,n.jsx)(`div`,{"data-u-comp":`accordion`,className:U(`univer-divide-x-0 univer-divide-y univer-divide-solid univer-divide-gray-200 dark:!univer-divide-gray-600`,r),children:i.map((e,t)=>(0,n.jsxs)(`div`,{children:[(0,n.jsxs)(`button`,{className:`univer-box-border univer-flex univer-w-full univer-cursor-pointer univer-items-center univer-gap-1.5 univer-border-none univer-bg-transparent univer-p-4 univer-text-left univer-text-gray-700 hover:univer-text-gray-900 focus:univer-outline-none dark:!univer-text-gray-200 dark:hover:!univer-text-white`,type:`button`,onClick:()=>s(t),children:[(0,n.jsx)(j,{className:U(`univer-size-2.5 univer-flex-shrink-0 univer-transition-transform`,{"-univer-rotate-90":a!==t,"univer-rotate-0":a===t})}),(0,n.jsx)(`span`,{className:`univer-font-medium`,children:e.label})]}),(0,n.jsx)(`div`,{className:U(`univer-overflow-hidden univer-transition-[max-height,opacity] univer-duration-500 univer-ease-in-out`,{"univer-max-h-screen":a===t,"univer-max-h-0":a!==t}),children:(0,n.jsx)(`div`,{className:`univer-box-border univer-px-4 univer-py-1.5`,children:e.children})})]},t))})}let ft=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,pt=B,mt=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return pt(e,n==null?void 0:n.class,n==null?void 0:n.className);let{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(e=>{let t=n==null?void 0:n[e],r=a==null?void 0:a[e];if(t===null)return null;let o=ft(t)||ft(r);return i[e][o]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return pt(e,o,t==null||(r=t.compoundVariants)==null?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]),n==null?void 0:n.class,n==null?void 0:n.className)},ht=mt(`univer-relative univer-inline-block univer-overflow-hidden univer-whitespace-nowrap univer-bg-gray-200 univer-text-center univer-align-middle univer-text-white`,{variants:{shape:{circle:`univer-rounded-full`,square:`univer-rounded`},size:{middle:`univer-size-9 univer-leading-9`,small:`univer-size-7 univer-leading-7`}},defaultVariants:{shape:`circle`,size:`middle`}});function gt(e){let{children:t,className:r,style:i,title:a,alt:o,shape:s=`circle`,size:c=`middle`,src:l,fit:u=`fill`,onError:d,onLoad:f}=e,p=typeof c==`number`?{width:`${c}px`,height:`${c}px`,lineHeight:`${c}px`}:{},m={objectFit:u};return(0,n.jsxs)(`span`,{className:U(ht({shape:s,size:typeof c==`number`?`middle`:c}),{"univer-bg-transparent":l},r),style:{...p,...i,...l&&m},children:[l&&(0,n.jsx)(`img`,{className:`univer-block univer-size-full`,src:l,title:a,alt:o,onError:d,onLoad:f}),t]})}function _t(e){let{className:t,children:r,closable:i=!1,onClose:a}=e;return(0,n.jsxs)(`span`,{"data-u-comp":`badge`,className:U(`univer-box-border univer-inline-flex univer-items-center univer-gap-1 univer-truncate univer-rounded-md univer-border univer-border-solid univer-border-gray-100 univer-bg-gray-100 univer-px-2.5 univer-py-0.5 univer-text-xs univer-font-medium univer-text-gray-900 dark:!univer-border-gray-500 dark:!univer-bg-gray-700 dark:!univer-text-gray-300`,t),children:[(0,n.jsx)(`span`,{className:`univer-flex-1 univer-truncate`,children:r}),i&&(0,n.jsx)(`button`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-border-none univer-p-0 univer-outline-none univer-transition-opacity hover:univer-opacity-70`,type:`button`,"aria-label":`Close badge`,onClick:a,children:(0,n.jsx)(D,{className:`univer-text-current`})})]})}function vt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function yt(...e){return t=>{let n=!1,r=e.map(e=>{let r=vt(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():vt(e[t],null)}}}}function W(...e){return p.useCallback(yt(...e),e)}function bt(e){let t=p.forwardRef((t,n)=>{var r;let{children:i,...a}=t,o=null,s=!1,c=[];Ot(i)&&typeof Mt==`function`&&(i=Mt(i._payload)),p.Children.forEach(i,e=>{if(Et(e)){var t;s=!0;let n=e,r=`child`in n.props?n.props.child:n.props.children;Ot(r)&&typeof Mt==`function`&&(r=Mt(r._payload)),o=Ct(n,r),c.push(o==null||(t=o.props)==null?void 0:t.children)}else c.push(e)}),o?o=p.cloneElement(o,void 0,c):!s&&p.Children.count(i)===1&&p.isValidElement(i)&&(o=i);let l=o?Tt(o):void 0,u=W(n,l);if(!o){if(i||i===0)throw Error(s?jt(e):At(e));return i}let d=wt(a,(r=o.props)==null?{}:r);return o.type!==p.Fragment&&(d.ref=n?u:l),p.cloneElement(o,d)});return t.displayName=`${e}.Slot`,t}var xt=bt(`Slot`),St=Symbol.for(`radix.slottable`),Ct=(e,t)=>{if(`child`in e.props){let t=e.props.child;return p.isValidElement(t)?p.cloneElement(t,void 0,e.props.children(t.props.children)):null}return p.isValidElement(t)?t:null};function wt(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Tt(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,`ref`))==null?void 0:t.get,i=r&&`isReactWarning`in r&&r.isReactWarning;return i?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,`ref`))==null?void 0:n.get,i=r&&`isReactWarning`in r&&r.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}function Et(e){return p.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===St}var Dt=Symbol.for(`react.lazy`);function Ot(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Dt&&`_payload`in e&&kt(e._payload)}function kt(e){return typeof e==`object`&&!!e&&`then`in e}var At=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,jt=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Mt=p.use;let Nt=mt(`univer-box-border univer-inline-flex univer-cursor-pointer univer-select-none univer-items-center univer-justify-center univer-gap-2 univer-whitespace-nowrap univer-rounded-md univer-border univer-border-solid univer-text-sm univer-font-medium univer-transition-colors disabled:univer-pointer-events-none disabled:univer-cursor-not-allowed disabled:univer-opacity-50 [&_svg]:univer-pointer-events-none [&_svg]:univer-size-4 [&_svg]:univer-shrink-0`,{variants:{variant:{default:`univer-border-gray-200 univer-bg-white univer-text-gray-700 hover:univer-bg-gray-100 active:univer-bg-gray-200 dark:!univer-border-gray-600 dark:!univer-bg-gray-700 dark:!univer-text-white dark:hover:!univer-bg-gray-600 dark:active:!univer-bg-gray-700`,primary:`univer-border-primary-600 univer-bg-primary-600 univer-text-white hover:univer-bg-primary-500 active:univer-bg-primary-700`,danger:`univer-border-red-500 univer-bg-red-500 univer-text-white hover:univer-border-red-400 hover:univer-bg-red-400 active:univer-border-red-600 active:univer-bg-red-600`,text:`univer-border-transparent univer-bg-transparent univer-text-gray-900 hover:univer-bg-gray-100 active:univer-bg-gray-200 dark:!univer-text-white dark:hover:!univer-bg-gray-700 dark:active:!univer-bg-gray-600`,link:`univer-underline-current univer-border-transparent univer-bg-transparent univer-text-primary-600 univer-underline-offset-4 hover:univer-text-primary-500 hover:univer-underline active:univer-text-primary-700`,ghost:`univer-border-transparent univer-bg-transparent univer-text-gray-900 hover:univer-bg-gray-100 active:univer-bg-gray-200 dark:!univer-text-white dark:hover:!univer-bg-gray-700 dark:active:!univer-bg-gray-600`},size:{small:`univer-h-6 univer-rounded-md univer-px-1.5 univer-text-xs`,middle:`univer-h-8 univer-rounded-lg univer-px-2 univer-text-sm`,large:`univer-h-10 univer-rounded-lg univer-px-3 univer-text-sm`}},defaultVariants:{variant:`default`,size:`middle`}}),Pt=(0,t.forwardRef)(({className:e,variant:t,size:r,asChild:i=!1,...a},o)=>(0,n.jsx)(i?xt:`button`,{className:U(Nt({variant:t,size:r,className:e})),ref:o,"data-u-comp":`button`,...a}));Pt.displayName=`Button`;let Ft=({className:e,orientation:r=`horizontal`,children:i})=>{let a=t.Children.count(i),o=r===`horizontal`,s=r===`vertical`;return(0,n.jsx)(`div`,{className:U(`univer-grid`,{"univer-grid-flow-row":s,"univer-w-fit":s},e),children:t.Children.map(i,(e,n)=>{let r=n===0,i=n===a-1;return(0,t.cloneElement)(e,{className:U({"!univer-rounded-l-none":o&&!r,"!univer-rounded-r-none":o&&!i,"!univer-border-l-0":o&&!r,"!univer-rounded-t-none":s&&!r,"!univer-rounded-b-none":s&&!i,"!univer-border-t-0":s&&!r},e.props.className)})})})};var It=p.createContext(void 0),Lt=e=>{let{dir:t,children:r}=e;return(0,n.jsx)(It.Provider,{value:t,children:r})};function Rt(e){let t=p.useContext(It);return e||t||`ltr`}function zt(){return typeof window<`u`&&typeof document<`u`}let G=(0,t.createContext)({mountContainer:zt()?document.body:null});function Bt(e){let{children:r,locale:i,mountContainer:a,direction:o}=e,s=(0,t.useMemo)(()=>({locale:i,direction:o,mountContainer:a}),[i,o,a]);return(0,n.jsx)(G.Provider,{value:s,children:(0,n.jsx)(Lt,{dir:o==null?`ltr`:o,children:r})})}typeof window<`u`&&window.document&&window.document.createElement;function K(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function Vt(e,t){let r=p.createContext(t);r.displayName=e+`Context`;let i=e=>{let{children:t,...i}=e,a=p.useMemo(()=>i,Object.values(i));return(0,n.jsx)(r.Provider,{value:a,children:t})};i.displayName=e+`Provider`;function a(n){let i=p.useContext(r);if(i)return i;if(t!==void 0)return t;throw Error(`\`${n}\` must be used within \`${e}\``)}return[i,a]}function Ht(e,t=[]){let r=[];function i(t,i){let a=p.createContext(i);a.displayName=t+`Context`;let o=r.length;r=[...r,i];let s=t=>{var r;let{scope:i,children:s,...c}=t,l=(i==null||(r=i[e])==null?void 0:r[o])||a,u=p.useMemo(()=>c,Object.values(c));return(0,n.jsx)(l.Provider,{value:u,children:s})};s.displayName=t+`Provider`;function c(n,r){var s;let c=(r==null||(s=r[e])==null?void 0:s[o])||a,l=p.useContext(c);if(l)return l;if(i!==void 0)return i;throw Error(`\`${n}\` must be used within \`${t}\``)}return[s,c]}let a=()=>{let t=r.map(e=>p.createContext(e));return function(n){let r=(n==null?void 0:n[e])||t;return p.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return a.scopeName=e,[i,Ut(a,...t)]}function Ut(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var Wt,Gt=(Wt=globalThis)!=null&&Wt.document?p.useLayoutEffect:()=>{},Kt=p.useInsertionEffect||Gt;function qt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Jt({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=p.useRef(e!==void 0);p.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,p.useCallback(t=>{if(s){let r=Yt(t)?t(e):t;if(r!==e){var n;(n=o.current)==null||n.call(o,r)}}else a(t)},[s,e,a,o])]}function Jt({defaultProp:e,onChange:t}){let[n,r]=p.useState(e),i=p.useRef(n),a=p.useRef(t);return Kt(()=>{a.current=t},[t]),p.useEffect(()=>{if(i.current!==n){var e;(e=a.current)==null||e.call(a,n),i.current=n}},[n,i]),[n,r,a]}function Yt(e){return typeof e==`function`}var q=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let r=bt(`Primitive.${t}`),i=p.forwardRef((e,i)=>{let{asChild:a,...o}=e,s=a?r:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,n.jsx)(s,{...o,ref:i})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function Xt(e,t){e&&m.flushSync(()=>e.dispatchEvent(t))}function Zt(e){let t=e+`CollectionProvider`,[r,i]=Ht(t),[a,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:r}=e,i=p.useRef(null),o=p.useRef(new Map).current;return(0,n.jsx)(a,{scope:t,itemMap:o,collectionRef:i,children:r})};s.displayName=t;let c=e+`CollectionSlot`,l=bt(c),u=p.forwardRef((e,t)=>{let{scope:r,children:i}=e;return(0,n.jsx)(l,{ref:W(t,o(c,r).collectionRef),children:i})});u.displayName=c;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,m=bt(d),h=p.forwardRef((e,t)=>{let{scope:r,children:i,...a}=e,s=p.useRef(null),c=W(t,s),l=o(d,r);return p.useEffect(()=>(l.itemMap.set(s,{ref:s,...a}),()=>void l.itemMap.delete(s))),(0,n.jsx)(m,{[f]:``,ref:c,children:i})});h.displayName=d;function g(t){let n=o(e+`CollectionConsumer`,t);return p.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},g,i]}function Qt(e){let t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>((...e)=>{var n;return(n=t.current)==null?void 0:n.call(t,...e)}),[])}function $t(e,t=(()=>{var e;return(e=globalThis)==null?void 0:e.document})()){let n=Qt(e);p.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var en=`DismissableLayer`,tn=`dismissableLayer.update`,nn=`dismissableLayer.pointerDownOutside`,rn=`dismissableLayer.focusOutside`,an,on=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),sn=p.forwardRef((e,t)=>{var r,i;let{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:l,onDismiss:u,...d}=e,f=p.useContext(on),[m,h]=p.useState(null),g=(r=m==null?void 0:m.ownerDocument)==null?(i=globalThis)==null?void 0:i.document:r,[,_]=p.useState({}),v=W(t,e=>h(e)),y=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=y.indexOf(b),S=m?y.indexOf(m):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,w=S>=x,T=un(e=>{let t=e.target,n=[...f.branches].some(e=>e.contains(t));!w||n||(s==null||s(e),l==null||l(e),e.defaultPrevented||u==null||u())},g),E=dn(e=>{let t=e.target;[...f.branches].some(e=>e.contains(t))||(c==null||c(e),l==null||l(e),e.defaultPrevented||u==null||u())},g);return $t(e=>{S===f.layers.size-1&&(o==null||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},g),p.useEffect(()=>{if(m)return a&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(an=g.body.style.pointerEvents,g.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),fn(),()=>{a&&(f.layersWithOutsidePointerEventsDisabled.delete(m),f.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=an))}},[m,g,a,f]),p.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),fn())},[m,f]),p.useEffect(()=>{let e=()=>_({});return document.addEventListener(tn,e),()=>document.removeEventListener(tn,e)},[]),(0,n.jsx)(q.div,{...d,ref:v,style:{pointerEvents:C?w?`auto`:`none`:void 0,...e.style},onFocusCapture:K(e.onFocusCapture,E.onFocusCapture),onBlurCapture:K(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,T.onPointerDownCapture)})});sn.displayName=en;var cn=`DismissableLayerBranch`,ln=p.forwardRef((e,t)=>{let r=p.useContext(on),i=p.useRef(null),a=W(t,i);return p.useEffect(()=>{let e=i.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,n.jsx)(q.div,{...e,ref:a})});ln.displayName=cn;function un(e,t=(()=>{var e;return(e=globalThis)==null?void 0:e.document})()){let n=Qt(e),r=p.useRef(!1),i=p.useRef(()=>{});return p.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){pn(nn,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function dn(e,t=(()=>{var e;return(e=globalThis)==null?void 0:e.document})()){let n=Qt(e),r=p.useRef(!1);return p.useEffect(()=>{let e=e=>{e.target&&!r.current&&pn(rn,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function fn(){let e=new CustomEvent(tn);document.dispatchEvent(e)}function pn(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Xt(i,a):i.dispatchEvent(a)}var mn=0,hn=null;function gn(){p.useEffect(()=>{hn||(hn={start:_n(),end:_n()});let{start:e,end:t}=hn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),mn++,()=>{mn===1&&(hn==null||hn.start.remove(),hn==null||hn.end.remove(),hn=null),mn=Math.max(0,mn-1)}},[])}function _n(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var vn=`focusScope.autoFocusOnMount`,yn=`focusScope.autoFocusOnUnmount`,bn={bubbles:!1,cancelable:!0},xn=`FocusScope`,Sn=p.forwardRef((e,t)=>{let{loop:r=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=p.useState(null),u=Qt(a),d=Qt(o),f=p.useRef(null),m=W(t,e=>l(e)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(i){let e=function(e){if(h.paused||!c)return;let t=e.target;c.contains(t)?f.current=t:kn(f.current,{select:!0})},t=function(e){if(h.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||kn(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&kn(c)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[i,c,h.paused]),p.useEffect(()=>{if(c){An.add(h);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(vn,bn);c.addEventListener(vn,u),c.dispatchEvent(t),t.defaultPrevented||(Cn(Nn(Tn(c)),{select:!0}),document.activeElement===e&&kn(c))}return()=>{c.removeEventListener(vn,u),setTimeout(()=>{let t=new CustomEvent(yn,bn);c.addEventListener(yn,d),c.dispatchEvent(t),t.defaultPrevented||kn(e==null?document.body:e,{select:!0}),c.removeEventListener(yn,d),An.remove(h)},0)}}},[c,u,d,h]);let g=p.useCallback(e=>{if(!r&&!i||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[i,a]=wn(t);i&&a?!e.shiftKey&&n===a?(e.preventDefault(),r&&kn(i,{select:!0})):e.shiftKey&&n===i&&(e.preventDefault(),r&&kn(a,{select:!0})):n===t&&e.preventDefault()}},[r,i,h.paused]);return(0,n.jsx)(q.div,{tabIndex:-1,...s,ref:m,onKeyDown:g})});Sn.displayName=xn;function Cn(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(kn(r,{select:t}),document.activeElement!==n)return}function wn(e){let t=Tn(e);return[En(t,e),En(t.reverse(),e)]}function Tn(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function En(e,t){for(let n of e)if(!Dn(n,{upTo:t}))return n}function Dn(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function On(e){return e instanceof HTMLInputElement&&`select`in e}function kn(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&On(e)&&t&&e.select()}}var An=jn();function jn(){let e=[];return{add(t){let n=e[0];t!==n&&(n==null||n.pause()),e=Mn(e,t),e.unshift(t)},remove(t){var n;e=Mn(e,t),(n=e[0])==null||n.resume()}}}function Mn(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Nn(e){return e.filter(e=>e.tagName!==`A`)}var Pn=p.useId||(()=>void 0),Fn=0;function In(e){let[t,n]=p.useState(Pn());return Gt(()=>{e||n(e=>e==null?String(Fn++):e)},[e]),e||(t?`radix-${t}`:``)}let Ln=[`top`,`right`,`bottom`,`left`],Rn=Math.min,J=Math.max,zn=Math.round,Bn=Math.floor,Vn=e=>({x:e,y:e}),Hn={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Un(e,t,n){return J(e,Rn(t,n))}function Wn(e,t){return typeof e==`function`?e(t):e}function Gn(e){return e.split(`-`)[0]}function Kn(e){return e.split(`-`)[1]}function qn(e){return e===`x`?`y`:`x`}function Jn(e){return e===`y`?`height`:`width`}function Yn(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Xn(e){return qn(Yn(e))}function Zn(e,t,n){n===void 0&&(n=!1);let r=Kn(e),i=Xn(e),a=Jn(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=or(o)),[o,or(o)]}function Qn(e){let t=or(e);return[$n(e),t,$n(t)]}function $n(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}let er=[`left`,`right`],tr=[`right`,`left`],nr=[`top`,`bottom`],rr=[`bottom`,`top`];function ir(e,t,n){switch(e){case`top`:case`bottom`:return n?t?tr:er:t?er:tr;case`left`:case`right`:return t?nr:rr;default:return[]}}function ar(e,t,n,r){let i=Kn(e),a=ir(Gn(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map($n)))),a}function or(e){let t=Gn(e);return Hn[t]+e.slice(t.length)}function sr(e){return{top:0,right:0,bottom:0,left:0,...e}}function cr(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:sr(e)}function lr(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}}function ur(e,t,n){let{reference:r,floating:i}=e,a=Yn(t),o=Xn(t),s=Jn(o),c=Gn(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}}switch(Kn(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function dr(e,t){var n;t===void 0&&(t={});let{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l=`clippingAncestors`,rootBoundary:u=`viewport`,elementContext:d=`floating`,altBoundary:f=!1,padding:p=0}=Wn(t,e),m=cr(p),h=s[f?d===`floating`?`reference`:`floating`:d],g=lr(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(h)))==null||n?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),_=d===`floating`?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),y=await(a.isElement==null?void 0:a.isElement(v))&&await(a.getScale==null?void 0:a.getScale(v))||{x:1,y:1},b=lr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:v,strategy:c}):_);return{top:(g.top-b.top+m.top)/y.y,bottom:(b.bottom-g.bottom+m.bottom)/y.y,left:(g.left-b.left+m.left)/y.x,right:(b.right-g.right+m.right)/y.x}}let fr=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:dr},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ur(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==null?u:v,d=y==null?d:y,m[g]={...m[g],...b},x&&p<50&&(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}=ur(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},pr=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Wn(e,t)||{};if(l==null)return{};let d=cr(u),f={x:n,y:r},p=Xn(i),m=Jn(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Rn(d[_],T),D=Rn(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=Un(O,A,k),M=!c.arrow&&Kn(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),mr=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n,r;let{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p=`bestFit`,fallbackAxisSideDirection:m=`none`,flipAlignment:h=!0,...g}=Wn(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};let _=Gn(i),v=Yn(s),y=Gn(s)===s,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),x=f||(y||!h?[or(s)]:Qn(s)),S=m!==`none`;!f&&S&&x.push(...ar(s,h,m,b));let C=[s,...x],w=await c.detectOverflow(t,g),T=[],E=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&T.push(w[_]),d){let e=Zn(i,o,b);T.push(w[e[0]],w[e[1]])}if(E=[...E,{placement:i,overflows:T}],!T.every(e=>e<=0)){var D,O;let e=(((D=a.flip)==null?void 0:D.index)||0)+1,t=C[e];if(t&&(!(d===`alignment`&&v!==Yn(t))||E.every(e=>Yn(e.placement)===v?e.overflows[0]>0:!0)))return{data:{index:e,overflows:E},reset:{placement:t}};let n=(O=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])==null?void 0:O.placement;if(!n)switch(p){case`bestFit`:{var k;let e=(k=E.filter(e=>{if(S){let t=Yn(e.placement);return t===v||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])==null?void 0:k[0];e&&(n=e);break}case`initialPlacement`:n=s;break}if(i!==n)return{reset:{placement:n}}}return{}}}};function hr(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function gr(e){return Ln.some(t=>e[t]>=0)}let _r=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Wn(e,t);switch(i){case`referenceHidden`:{let e=hr(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:gr(e)}}}case`escaped`:{let e=hr(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:gr(e)}}}default:return{}}}}},vr=new Set([`left`,`top`]);async function yr(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Gn(n),s=Kn(n),c=Yn(n)===`y`,l=vr.has(o)?-1:1,u=a&&c?-1:1,d=Wn(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}}let br=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n,r;let{x:i,y:a,placement:o,middlewareData:s}=t,c=await yr(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},xr=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}=Wn(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Yn(Gn(i)),p=qn(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Un(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Un(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Sr=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Wn(e,t),u={x:n,y:r},d=Yn(i),f=qn(d),p=u[f],m=u[d],h=Wn(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var _,v;let e=f===`y`?`width`:`height`,t=vr.has(Gn(i)),n=a.reference[d]-a.floating[e]+(t&&((_=o.offset)==null?void 0:_[d])||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:((v=o.offset)==null?void 0:v[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Cr=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Wn(e,t),u=await o.detectOverflow(t,l),d=Gn(i),f=Kn(i),p=Yn(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Rn(h-u[g],v),x=Rn(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=J(u.left,0),t=J(u.right,0),n=J(u.top,0),r=J(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:J(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:J(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function wr(){return typeof window<`u`}function Tr(e){return Dr(e)?(e.nodeName||``).toLowerCase():`#document`}function Y(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Er(e){var t;return(t=(Dr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Dr(e){return wr()?e instanceof Node||e instanceof Y(e).Node:!1}function Or(e){return wr()?e instanceof Element||e instanceof Y(e).Element:!1}function kr(e){return wr()?e instanceof HTMLElement||e instanceof Y(e).HTMLElement:!1}function Ar(e){return!wr()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}function jr(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Hr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Mr(e){return/^(table|td|th)$/.test(Tr(e))}function Nr(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}let Pr=/transform|translate|scale|rotate|perspective|filter/,Fr=/paint|layout|strict|content/,Ir=e=>!!e&&e!==`none`,Lr;function Rr(e){let t=Or(e)?Hr(e):e;return Ir(t.transform)||Ir(t.translate)||Ir(t.scale)||Ir(t.rotate)||Ir(t.perspective)||!Br()&&(Ir(t.backdropFilter)||Ir(t.filter))||Pr.test(t.willChange||``)||Fr.test(t.contain||``)}function zr(e){let t=Wr(e);for(;kr(t)&&!Vr(t);){if(Rr(t))return t;if(Nr(t))return null;t=Wr(t)}return null}function Br(){return Lr==null&&(Lr=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`)),Lr}function Vr(e){return/^(html|body|#document)$/.test(Tr(e))}function Hr(e){return Y(e).getComputedStyle(e)}function Ur(e){return Or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wr(e){if(Tr(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ar(e)&&e.host||Er(e);return Ar(t)?t.host:t}function Gr(e){let t=Wr(e);return Vr(t)?e.ownerDocument?e.ownerDocument.body:e.body:kr(t)&&jr(t)?t:Gr(t)}function Kr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let i=Gr(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Y(i);if(a){let e=qr(o);return t.concat(o,o.visualViewport||[],jr(i)?i:[],e&&n?Kr(e):[])}else return t.concat(i,Kr(i,[],n))}function qr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Jr(e){let t=Hr(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=kr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=zn(n)!==a||zn(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Yr(e){return Or(e)?e:e.contextElement}function Xr(e){let t=Yr(e);if(!kr(t))return Vn(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Jr(t),o=(a?zn(n.width):n.width)/r,s=(a?zn(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}let Zr=Vn(0);function Qr(e){let t=Y(e);return!Br()||!t.visualViewport?Zr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $r(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Y(e)?!1:t}function ei(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Yr(e),o=Vn(1);t&&(r?Or(r)&&(o=Xr(r)):o=Xr(e));let s=$r(a,n,r)?Qr(a):Vn(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){let e=Y(a),t=r&&Or(r)?Y(r):r,n=e,i=qr(n);for(;i&&r&&t!==n;){let e=Xr(i),t=i.getBoundingClientRect(),r=Hr(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=Y(i),i=qr(n)}}return lr({width:u,height:d,x:c,y:l})}function ti(e,t){let n=Ur(e).scrollLeft;return t?t.left+n:ei(Er(e)).left+n}function ni(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ti(e,n),y:n.top+t.scrollTop}}function ri(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Er(r),s=t?Nr(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Vn(1),u=Vn(0),d=kr(r);if((d||!d&&!a)&&((Tr(r)!==`body`||jr(o))&&(c=Ur(r)),d)){let e=ei(r);l=Xr(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ni(o,c):Vn(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 ii(e){return Array.from(e.getClientRects())}function ai(e){let t=Er(e),n=Ur(e),r=e.ownerDocument.body,i=J(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=J(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ti(e),s=-n.scrollTop;return Hr(r).direction===`rtl`&&(o+=J(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function oi(e,t){let n=Y(e),r=Er(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Br();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=ti(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=25&&(a-=o)}else l<=25&&(a+=l);return{width:a,height:o,x:s,y:c}}function si(e,t){let n=ei(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=kr(e)?Xr(e):Vn(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function ci(e,t,n){let r;if(t===`viewport`)r=oi(e,n);else if(t===`document`)r=ai(Er(e));else if(Or(t))r=si(t,n);else{let n=Qr(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return lr(r)}function li(e,t){let n=Wr(e);return n===t||!Or(n)||Vr(n)?!1:Hr(n).position===`fixed`||li(n,t)}function ui(e,t){let n=t.get(e);if(n)return n;let r=Kr(e,[],!1).filter(e=>Or(e)&&Tr(e)!==`body`),i=null,a=Hr(e).position===`fixed`,o=a?Wr(e):e;for(;Or(o)&&!Vr(o);){let t=Hr(o),n=Rr(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||jr(o)&&!n&&li(e,o))?r=r.filter(e=>e!==o):i=t,o=Wr(o)}return t.set(e,r),r}function di(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Nr(t)?[]:ui(t,this._c):[].concat(n),r],o=ci(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=ci(t,a[e],i);s=J(n.top,s),c=Rn(n.right,c),l=Rn(n.bottom,l),u=J(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function fi(e){let{width:t,height:n}=Jr(e);return{width:t,height:n}}function pi(e,t,n){let r=kr(t),i=Er(t),a=n===`fixed`,o=ei(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Vn(0);function l(){c.x=ti(i)}if(r||!r&&!a)if((Tr(t)!==`body`||jr(i))&&(s=Ur(t)),r){let e=ei(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?ni(i,s):Vn(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function mi(e){return Hr(e).position===`static`}function hi(e,t){if(!kr(e)||Hr(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Er(e)===n&&(n=n.ownerDocument.body),n}function gi(e,t){let n=Y(e);if(Nr(e))return n;if(!kr(e)){let t=Wr(e);for(;t&&!Vr(t);){if(Or(t)&&!mi(t))return t;t=Wr(t)}return n}let r=hi(e,t);for(;r&&Mr(r)&&mi(r);)r=hi(r,t);return r&&Vr(r)&&mi(r)&&!Rr(r)?n:r||zr(e)||n}let _i=async function(e){let t=this.getOffsetParent||gi,n=this.getDimensions,r=await n(e.floating);return{reference:pi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vi(e){return Hr(e).direction===`rtl`}let yi={convertOffsetParentRelativeRectToViewportRelativeRect:ri,getDocumentElement:Er,getClippingRect:di,getOffsetParent:gi,getElementRects:_i,getClientRects:ii,getDimensions:fi,getScale:Xr,isElement:Or,isRTL:vi};function bi(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xi(e,t){let n=null,r,i=Er(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Bn(d),h=Bn(i.clientWidth-(u+f)),g=Bn(i.clientHeight-(d+p)),_=Bn(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:J(0,Rn(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!bi(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Si(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=Yr(e),u=i||a?[...l?Kr(l):[],...t?Kr(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?xi(l,n):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?ei(e):null;c&&g();function g(){let t=ei(e);h&&!bi(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==null||d(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}let Ci=br,wi=xr,Ti=mr,Ei=Cr,Di=_r,Oi=pr,ki=Sr,Ai=(e,t,n)=>{let r=new Map,i={platform:yi,...n},a={...i.platform,_c:r};return fr(e,t,{...i,platform:a})};var ji=typeof document<`u`?p.useLayoutEffect:function(){};function Mi(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(!Mi(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)&&!Mi(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ni(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pi(e,t){let n=Ni(e);return Math.round(t*n)/n}function Fi(e){let t=p.useRef(e);return ji(()=>{t.current=e}),t}function Ii(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]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=p.useState(r);Mi(f,r)||h(r);let[g,_]=p.useState(null),[v,y]=p.useState(null),b=p.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=p.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=o||v,w=p.useRef(null),T=p.useRef(null),E=p.useRef(u),D=c!=null,O=Fi(c),k=Fi(i),A=Fi(l),j=p.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),Ai(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Mi(E.current,t)&&(E.current=t,m.flushSync(()=>{d(t)}))})},[f,t,n,k,A]);ji(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let M=p.useRef(!1);ji(()=>(M.current=!0,()=>{M.current=!1}),[]),ji(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=p.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=p.useMemo(()=>({reference:S,floating:C}),[S,C]),F=p.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Pi(P.floating,u.x),r=Pi(P.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ni(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:j,refs:N,elements:P,floatingStyles:F}),[u,j,N,P,F])}let Li=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Oi({element:r.current,padding:i}).fn(n):r?Oi({element:r,padding:i}).fn(n):{}}}},Ri=(e,t)=>({...Ci(e),options:[e,t]}),zi=(e,t)=>({...wi(e),options:[e,t]}),Bi=(e,t)=>({...ki(e),options:[e,t]}),Vi=(e,t)=>({...Ti(e),options:[e,t]}),Hi=(e,t)=>({...Ei(e),options:[e,t]}),Ui=(e,t)=>({...Di(e),options:[e,t]}),Wi=(e,t)=>({...Li(e),options:[e,t]});var Gi=`Arrow`,Ki=p.forwardRef((e,t)=>{let{children:r,width:i=10,height:a=5,...o}=e;return(0,n.jsx)(q.svg,{...o,ref:t,width:i,height:a,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?r:(0,n.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Ki.displayName=Gi;var qi=Ki;function Ji(e){let[t,n]=p.useState(void 0);return Gt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Yi=`Popper`,[Xi,Zi]=Ht(Yi),[Qi,$i]=Xi(Yi),ea=e=>{let{__scopePopper:t,children:r}=e,[i,a]=p.useState(null),[o,s]=p.useState(void 0);return(0,n.jsx)(Qi,{scope:t,anchor:i,onAnchorChange:a,placementState:o,setPlacementState:s,children:r})};ea.displayName=Yi;var ta=`PopperAnchor`,na=p.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:i,...a}=e,o=$i(ta,r),s=p.useRef(null),c=o.onAnchorChange,l=W(t,p.useCallback(e=>{s.current=e,e&&c(e)},[c])),u=p.useRef(null);p.useEffect(()=>{if(!i)return;let e=u.current;u.current=i.current,e!==u.current&&c(u.current)});let d=o.placementState&&fa(o.placementState),f=d==null?void 0:d[0],m=d==null?void 0:d[1];return i?null:(0,n.jsx)(q.div,{"data-radix-popper-side":f,"data-radix-popper-align":m,...a,ref:l})});na.displayName=ta;var ra=`PopperContent`,[ia,aa]=Xi(ra),oa=p.forwardRef((e,t)=>{var r,i,a,o,s,c,l,u;let{__scopePopper:d,side:f=`bottom`,sideOffset:m=0,align:h=`center`,alignOffset:g=0,arrowPadding:_=0,avoidCollisions:v=!0,collisionBoundary:y,collisionPadding:b=0,sticky:x=`partial`,hideWhenDetached:S=!1,updatePositionStrategy:C=`optimized`,onPlaced:w,...T}=e,E=$i(ra,d),[D,O]=p.useState(null),k=W(t,e=>O(e)),[A,j]=p.useState(null),M=Ji(A),N=(r=M==null?void 0:M.width)==null?0:r,P=(i=M==null?void 0:M.height)==null?0:i,F=f+(h===`center`?``:`-`+h),I=typeof b==`number`?b:{top:0,right:0,bottom:0,left:0,...b},L=y?Array.isArray(y)?y:[y]:void 0,R=L!==void 0&&L.length>0,z={padding:I,boundary:L==null?void 0:L.filter(ua),altBoundary:R},{refs:ee,floatingStyles:te,placement:ne,isPositioned:re,middlewareData:ie}=Ii({strategy:`fixed`,placement:F,whileElementsMounted:(...e)=>Si(...e,{animationFrame:C===`always`}),elements:{reference:E.anchor},middleware:[Ri({mainAxis:m+P,alignmentAxis:g}),v&&zi({mainAxis:!0,crossAxis:!1,limiter:x===`partial`?Bi():void 0,...z}),v&&Vi({...z}),Hi({...z,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),A&&Wi({element:A,padding:_}),da({arrowWidth:N,arrowHeight:P}),S&&Ui({strategy:`referenceHidden`,...z})]}),ae=E.setPlacementState;Gt(()=>(ae(ne),()=>{ae(void 0)}),[ne,ae]);let[oe,se]=fa(ne),ce=Qt(w);Gt(()=>{re&&(ce==null||ce())},[re,ce]);let le=(a=ie.arrow)==null?void 0:a.x,ue=(o=ie.arrow)==null?void 0:o.y,de=((s=ie.arrow)==null?void 0:s.centerOffset)!==0,[fe,pe]=p.useState();return Gt(()=>{D&&pe(window.getComputedStyle(D).zIndex)},[D]),(0,n.jsx)(`div`,{ref:ee.setFloating,"data-radix-popper-content-wrapper":``,style:{...te,transform:re?te.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:fe,"--radix-popper-transform-origin":[(c=ie.transformOrigin)==null?void 0:c.x,(l=ie.transformOrigin)==null?void 0:l.y].join(` `),...((u=ie.hide)==null?void 0:u.referenceHidden)&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,n.jsx)(ia,{scope:d,placedSide:oe,placedAlign:se,onArrowChange:j,arrowX:le,arrowY:ue,shouldHideArrow:de,children:(0,n.jsx)(q.div,{"data-side":oe,"data-align":se,...T,ref:k,style:{...T.style,animation:re?void 0:`none`}})})})});oa.displayName=ra;var sa=`PopperArrow`,ca={top:`bottom`,right:`left`,bottom:`top`,left:`right`},la=p.forwardRef(function(e,t){let{__scopePopper:r,...i}=e,a=aa(sa,r),o=ca[a.placedSide];return(0,n.jsx)(`span`,{ref:a.onArrowChange,style:{position:`absolute`,left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[a.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[a.placedSide],visibility:a.shouldHideArrow?`hidden`:void 0},children:(0,n.jsx)(qi,{...i,ref:t,style:{...i.style,display:`block`}})})});la.displayName=sa;function ua(e){return e!==null}var da=e=>({name:`transformOrigin`,options:e,fn(t){var n,r,i,a,o;let{placement:s,rects:c,middlewareData:l}=t,u=((n=l.arrow)==null?void 0:n.centerOffset)!==0,d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,m]=fa(s),h={start:`0%`,center:`50%`,end:`100%`}[m],g=((r=(i=l.arrow)==null?void 0:i.x)==null?0:r)+d/2,_=((a=(o=l.arrow)==null?void 0:o.y)==null?0:a)+f/2,v=``,y=``;return p===`bottom`?(v=u?h:`${g}px`,y=`${-f}px`):p===`top`?(v=u?h:`${g}px`,y=`${c.floating.height+f}px`):p===`right`?(v=`${-f}px`,y=u?h:`${_}px`):p===`left`&&(v=`${c.floating.width+f}px`,y=u?h:`${_}px`),{data:{x:v,y}}}});function fa(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var pa=ea,ma=na,ha=oa,ga=la,_a=`Portal`,va=p.forwardRef((e,t)=>{var r;let{container:i,...a}=e,[o,s]=p.useState(!1);Gt(()=>s(!0),[]);let c=i||o&&((r=globalThis)==null||(r=r.document)==null?void 0:r.body);return c?m.createPortal((0,n.jsx)(q.div,{...a,ref:t}),c):null});va.displayName=_a;function ya(e,t){return p.useReducer((e,n)=>{let r=t[e][n];return r==null?e:r},e)}var X=e=>{let{present:t,children:n}=e,r=ba(t),i=typeof n==`function`?n({present:r.isPresent}):p.Children.only(n),a=Sa(r.ref,wa(i));return typeof n==`function`||r.isPresent?p.cloneElement(i,{ref:a}):null};X.displayName=`Presence`;function ba(e){let[t,n]=p.useState(),r=p.useRef(null),i=p.useRef(e),a=p.useRef(`none`),[o,s]=ya(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return p.useEffect(()=>{let e=Ca(r.current);a.current=o===`mounted`?e:`none`},[o]),Gt(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Ca(t);e?s(`MOUNT`):o===`none`||(t==null?void 0:t.display)===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Gt(()=>{if(t){var e;let n,o=(e=t.ownerDocument.defaultView)==null?window:e,c=e=>{let a=Ca(r.current).includes(CSS.escape(e.animationName));if(e.target===t&&a&&(s(`ANIMATION_END`),!i.current)){let e=t.style.animationFillMode;t.style.animationFillMode=`forwards`,n=o.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=e)})}},l=e=>{e.target===t&&(a.current=Ca(r.current))};return t.addEventListener(`animationstart`,l),t.addEventListener(`animationcancel`,c),t.addEventListener(`animationend`,c),()=>{o.clearTimeout(n),t.removeEventListener(`animationstart`,l),t.removeEventListener(`animationcancel`,c),t.removeEventListener(`animationend`,c)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:p.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function xa(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Sa(...e){let t=p.useRef(e);return t.current=e,p.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=xa(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():xa(n[e],null)}}},[])}function Ca(e){return(e==null?void 0:e.animationName)||`none`}function wa(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,`ref`))==null?void 0:t.get,i=r&&`isReactWarning`in r&&r.isReactWarning;return i?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,`ref`))==null?void 0:n.get,i=r&&`isReactWarning`in r&&r.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}var Ta=`rovingFocusGroup.onEntryFocus`,Ea={bubbles:!1,cancelable:!0},Da=`RovingFocusGroup`,[Oa,ka,Aa]=Zt(Da),[ja,Ma]=Ht(Da,[Aa]),[Na,Pa]=ja(Da),Fa=p.forwardRef((e,t)=>(0,n.jsx)(Oa.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,n.jsx)(Oa.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,n.jsx)(Ia,{...e,ref:t})})}));Fa.displayName=Da;var Ia=p.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:i,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,m=p.useRef(null),h=W(t,m),g=Rt(o),[_,v]=qt({prop:s,defaultProp:c==null?null:c,onChange:l,caller:Da}),[y,b]=p.useState(!1),x=Qt(u),S=ka(r),C=p.useRef(!1),[w,T]=p.useState(0);return p.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(Ta,x),()=>e.removeEventListener(Ta,x)},[x]),(0,n.jsx)(Na,{scope:r,orientation:i,dir:g,loop:a,currentTabStopId:_,onItemFocus:p.useCallback(e=>v(e),[v]),onItemShiftTab:p.useCallback(()=>b(!0),[]),onFocusableItemAdd:p.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:p.useCallback(()=>T(e=>e-1),[]),children:(0,n.jsx)(q.div,{tabIndex:y||w===0?-1:0,"data-orientation":i,...f,ref:h,style:{outline:`none`,...e.style},onMouseDown:K(e.onMouseDown,()=>{C.current=!0}),onFocus:K(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(Ta,Ea);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);Ha([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),d)}}C.current=!1}),onBlur:K(e.onBlur,()=>b(!1))})})}),La=`RovingFocusGroupItem`,Ra=p.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:i=!0,active:a=!1,tabStopId:o,children:s,...c}=e,l=In(),u=o||l,d=Pa(La,r),f=d.currentTabStopId===u,m=ka(r),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=d;return p.useEffect(()=>{if(i)return h(),()=>g()},[i,h,g]),(0,n.jsx)(Oa.ItemSlot,{scope:r,id:u,focusable:i,active:a,children:(0,n.jsx)(q.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:K(e.onMouseDown,e=>{i?d.onItemFocus(u):e.preventDefault()}),onFocus:K(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:K(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){d.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Va(e,d.orientation,d.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=d.loop?Ua(n,r+1):n.slice(r+1)}setTimeout(()=>Ha(n))}}),children:typeof s==`function`?s({isCurrentTabStop:f,hasTabStop:_!=null}):s})})});Ra.displayName=La;var za={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Ba(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Va(e,t,n){let r=Ba(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return za[r]}function Ha(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Ua(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Wa=Fa,Ga=Ra,Ka=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},qa=new WeakMap,Ja=new WeakMap,Ya={},Xa=0,Za=function(e){return e&&(e.host||Za(e.parentNode))},Qa=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Za(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},$a=function(e,t,n,r){var i=Qa(t,Array.isArray(e)?e:[e]);Ya[n]||(Ya[n]=new WeakMap);var a=Ya[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(qa.get(e)||0)+1,l=(a.get(e)||0)+1;qa.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Ja.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Xa++,function(){o.forEach(function(e){var t=qa.get(e)-1,i=a.get(e)-1;qa.set(e,t),a.set(e,i),t||(Ja.has(e)||e.removeAttribute(r),Ja.delete(e)),i||e.removeAttribute(n)}),Xa--,Xa||(qa=new WeakMap,qa=new WeakMap,Ja=new WeakMap,Ya={})}},eo=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ka(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),$a(r,i,n,`aria-hidden`)):function(){return null}},to=function(){return to=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},to.apply(this,arguments)};function no(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ro(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var io=`right-scroll-bar-position`,ao=`width-before-scroll-bar`,oo=`with-scroll-bars-hidden`,so=`--removed-body-scroll-bar-size`;function co(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function lo(e,n){var r=(0,t.useState)(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}})[0];return r.callback=n,r.facade}var uo=typeof window<`u`?t.useLayoutEffect:t.useEffect,fo=new WeakMap;function po(e,t){var n=lo(t||null,function(t){return e.forEach(function(e){return co(e,t)})});return uo(function(){var t=fo.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||co(e,null)}),i.forEach(function(e){r.has(e)||co(e,a)})}fo.set(n,e)},[e]),n}function mo(e){return e}function ho(e,t){t===void 0&&(t=mo);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function go(e){e===void 0&&(e={});var t=ho(null);return t.options=to({async:!0,ssr:!1},e),t}var _o=function(e){var n=e.sideCar,r=no(e,[`sideCar`]);if(!n)throw Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw Error(`Sidecar medium not found`);return t.createElement(i,to({},r))};_o.isSideCarExport=!0;function vo(e,t){return e.useMedium(t),_o}var yo=go(),bo=function(){},xo=t.forwardRef(function(e,n){var r=t.useRef(null),i=t.useState({onScrollCapture:bo,onWheelCapture:bo,onTouchMoveCapture:bo}),a=i[0],o=i[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=no(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=po([r,n]),w=to(to({},x),a);return t.createElement(t.Fragment,null,d&&t.createElement(S,{sideCar:yo,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:r,gapMode:b}),s?t.cloneElement(t.Children.only(c),to(to({},w),{ref:C})):t.createElement(y,to({},w,{className:l,ref:C}),c))});xo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},xo.classNames={fullWidth:ao,zeroRight:io};var So,Co=function(){if(So)return So;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function wo(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Co();return t&&e.setAttribute(`nonce`,t),e}function To(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Eo(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Do=function(){var e=0,t=null;return{add:function(n){e==0&&(t=wo())&&(To(t,n),Eo(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Oo=function(){var e=Do();return function(n,r){t.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},ko=function(){var e=Oo();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Ao={left:0,top:0,right:0,gap:0},jo=function(e){return parseInt(e||``,10)||0},Mo=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[jo(n),jo(r),jo(i)]},No=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Ao;var t=Mo(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Po=ko(),Fo=`data-scroll-locked`,Io=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
|
-
.${
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("react/jsx-runtime"),require("react-dom"),require("react-dom/client")):typeof define==`function`&&define.amd?define([`exports`,`react`,`react/jsx-runtime`,`react-dom`,`react-dom/client`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.UniverDesign={},e.React,e.React,e.ReactDOM,e.ReactDOM))})(this,function(e,t,n,r,i){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var a=Object.create,o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,d=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=c(t),a=0,l=i.length,d;a<l;a++)d=i[a],!u.call(e,d)&&d!==n&&o(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=s(t,d))||r.enumerable});return e},f=(e,t,n)=>(n=e==null?{}:a(l(e)),d(t||!e||!e.__esModule?o(n,`default`,{value:e,enumerable:!0}):n,e));let p=f(t,1);t=f(t);let m=f(r,1);r=f(r);function h({ref:e,...t}){let{icon:n,id:r,className:i,extend:a,...o}=t,s=`univerjs-icon univerjs-icon-${r} ${i||``}`.trim(),c=(0,p.useRef)(`_${y()}`);return g(n,`${r}`,{defIds:n.defIds,idSuffix:c.current},{ref:e,className:s,...o},a)}function g(e,t,n,r,i){return(0,p.createElement)(e.tag,{key:t,..._(e,n,i),...r},(v(e,n).children||[]).map((r,a)=>g(r,`${t}-${e.tag}-${a}`,n,void 0,i)))}function _(e,t,n){let r={...e.attrs};n!=null&&n.colorChannel1&&r.fill===`colorChannel1`&&(r.fill=n.colorChannel1),n!=null&&n.colorChannel1&&r.stroke===`colorChannel1`&&(r.stroke=n.colorChannel1),e.tag===`mask`&&r.id&&(r.id+=t.idSuffix),Object.entries(r).forEach(([e,n])=>{e===`mask`&&typeof n==`string`&&(r[e]=n.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))});let{defIds:i}=t;return!i||i.length===0?r:(e.tag===`use`&&r[`xlink:href`]&&(r[`xlink:href`]+=t.idSuffix),Object.entries(r).forEach(([e,n])=>{typeof n==`string`&&(r[e]=n.replace(/url\(#(.*)\)/,`url(#$1${t.idSuffix})`))}),r)}function v(e,t){var n;let{defIds:r}=t;return!r||r.length===0?e:e.tag===`defs`&&(n=e.children)!=null&&n.length?{...e,children:e.children.map(e=>typeof e.attrs.id==`string`&&r&&r.includes(e.attrs.id)?{...e,attrs:{...e.attrs,id:e.attrs.id+t.idSuffix}}:e)}:e}function y(){return Math.random().toString(36).substring(2,8)}h.displayName=`UniverIcon`;let b={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.87598 11.8327C8.87598 11.5013 9.14461 11.2327 9.47598 11.2327H11.476C11.8073 11.2327 12.076 11.5013 12.076 11.8327C12.076 12.164 11.8073 12.4327 11.476 12.4327H9.47598C9.14461 12.4327 8.87598 12.164 8.87598 11.8327Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M4.80898 11.2327C4.47761 11.2327 4.20898 11.5013 4.20898 11.8327C4.20898 12.164 4.47761 12.4327 4.80898 12.4327H6.80898C7.14036 12.4327 7.40898 12.164 7.40898 11.8327C7.40898 11.5013 7.14036 11.2327 6.80898 11.2327H4.80898Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.87598 9.16592C8.87598 8.83455 9.14461 8.56592 9.47598 8.56592H11.476C11.8073 8.56592 12.076 8.83455 12.076 9.16592C12.076 9.49729 11.8073 9.76592 11.476 9.76592H9.47598C9.14461 9.76592 8.87598 9.49729 8.87598 9.16592Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M4.80898 8.56592C4.47761 8.56592 4.20898 8.83455 4.20898 9.16592C4.20898 9.49729 4.47761 9.76592 4.80898 9.76592H6.80898C7.14036 9.76592 7.40898 9.49729 7.40898 9.16592C7.40898 8.83455 7.14036 8.56592 6.80898 8.56592H4.80898Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M6.00615 1.69985C6.00615 1.36848 5.73752 1.09985 5.40615 1.09985C5.07478 1.09985 4.80615 1.36848 4.80615 1.69985V2.34009H3.64248C2.20654 2.34009 1.04248 3.50415 1.04248 4.94009V12.3C1.04248 13.7359 2.20654 14.9 3.64248 14.9H12.6425C14.0784 14.9 15.2425 13.7359 15.2425 12.3V4.94009C15.2425 3.50415 14.0784 2.34009 12.6425 2.34009H11.4798V1.69985C11.4798 1.36848 11.2112 1.09985 10.8798 1.09985C10.5484 1.09985 10.2798 1.36848 10.2798 1.69985V2.34009H6.00615V1.69985ZM14.0425 5.97021V4.94009C14.0425 4.16689 13.4157 3.54009 12.6425 3.54009H11.4798V4.09985C11.4798 4.43122 11.2112 4.69985 10.8798 4.69985C10.5484 4.69985 10.2798 4.43122 10.2798 4.09985V3.54009H6.00615V4.09985C6.00615 4.43122 5.73752 4.69985 5.40615 4.69985C5.07478 4.69985 4.80615 4.43122 4.80615 4.09985V3.54009H3.64248C2.86928 3.54009 2.24248 4.16689 2.24248 4.94009V5.97021H14.0425ZM2.24248 7.17021H14.0425V12.3C14.0425 13.0731 13.4157 13.7 12.6425 13.7H3.64248C2.86928 13.7 2.24248 13.0732 2.24248 12.3V7.17021Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},x=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`calendar-icon`,ref:t,icon:b}))});x.displayName=`CalendarIcon`;let S={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},C=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`check-mark-icon`,ref:t,icon:S}))});C.displayName=`CheckMarkIcon`;let w={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.24483 4.80026C8.24487 4.46889 7.97627 4.20023 7.6449 4.2002C7.31353 4.20016 7.04487 4.46876 7.04483 4.80013L7.04443 8.40306C7.04442 8.56222 7.10763 8.71486 7.22017 8.82739L9.64664 11.2539C9.88095 11.4882 10.2608 11.4882 10.4952 11.2539C10.7295 11.0195 10.7295 10.6396 10.4952 10.4053L8.24446 8.15463L8.24483 4.80026Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.14248 0.899902C4.22126 0.899902 1.04248 4.07868 1.04248 7.9999C1.04248 11.9211 4.22126 15.0999 8.14248 15.0999C12.0637 15.0999 15.2425 11.9211 15.2425 7.9999C15.2425 4.07868 12.0637 0.899902 8.14248 0.899902ZM2.24248 7.9999C2.24248 4.74142 4.884 2.0999 8.14248 2.0999C11.401 2.0999 14.0425 4.74142 14.0425 7.9999C14.0425 11.2584 11.401 13.8999 8.14248 13.8999C4.884 13.8999 2.24248 11.2584 2.24248 7.9999Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},T=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`clock-icon`,ref:t,icon:w}))});T.displayName=`ClockIcon`;let E={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M3.71274 2.86421C3.47843 2.6299 3.09853 2.6299 2.86421 2.86421C2.6299 3.09853 2.6299 3.47843 2.86421 3.71274L7.15154 8.00007L2.86421 12.2874C2.6299 12.5217 2.6299 12.9016 2.86421 13.1359C3.09853 13.3702 3.47843 13.3702 3.71274 13.1359L8.00007 8.84859L12.2874 13.1359C12.5217 13.3702 12.9016 13.3702 13.1359 13.1359C13.3702 12.9016 13.3702 12.5217 13.1359 12.2874L8.84859 8.00007L13.1359 3.71274C13.3702 3.47843 13.3702 3.09853 13.1359 2.86421C12.9016 2.6299 12.5217 2.6299 12.2874 2.86421L8.00007 7.15154L3.71274 2.86421Z`}}]},D=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`close-icon`,ref:t,icon:E}))});D.displayName=`CloseIcon`;let O={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M5.3313 1.4667C5.3313 1.13533 5.59993 0.866699 5.9313 0.866699H10.069C10.4004 0.866699 10.669 1.13533 10.669 1.4667C10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443C14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928L9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171C10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778L9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539C9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263L6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539C5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778L6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},k=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`delete-icon`,ref:t,icon:O}))});k.displayName=`DeleteIcon`;let A={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.55935 11.7617C8.29238 12.1202 7.75558 12.1202 7.48861 11.7617L3.08649 5.84931C2.75722 5.40708 3.07292 4.77771 3.62432 4.77771H12.4236C12.975 4.77771 13.2907 5.40708 12.9614 5.84931L8.55935 11.7617Z`}}]},j=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`down-icon`,ref:t,icon:A}))});j.displayName=`DownIcon`;let M={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.85869 12.9216C8.38445 13.4708 7.61555 13.4708 7.14131 12.9216L0.358114 5.06726C-0.406895 4.18144 0.134916 2.66683 1.2168 2.66683L14.7832 2.66683C15.8651 2.66683 16.4069 4.18144 15.6419 5.06726L8.85869 12.9216Z`}}]},N=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`dropdown-icon`,ref:t,icon:M}))});N.displayName=`DropdownIcon`;let P={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM10.3097 5.69014C10.544 5.92445 10.544 6.30435 10.3097 6.53867L8.84843 7.9999L10.3099 9.46137C10.5442 9.69569 10.5442 10.0756 10.3099 10.3099C10.0756 10.5442 9.69569 10.5442 9.46137 10.3099L7.9999 8.84843L6.53842 10.3099C6.30411 10.5442 5.92421 10.5442 5.6899 10.3099C5.45558 10.0756 5.45558 9.69569 5.6899 9.46137L7.15137 7.9999L5.69014 6.53867C5.45583 6.30435 5.45583 5.92445 5.69014 5.69014C5.92445 5.45583 6.30435 5.45583 6.53867 5.69014L7.9999 7.15137L9.46113 5.69014C9.69544 5.45583 10.0753 5.45583 10.3097 5.69014Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},F=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`error-icon`,ref:t,icon:P}))});F.displayName=`ErrorIcon`;let I={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.00016 1.33203C6.68162 1.33203 5.39269 1.72302 4.29636 2.45557C3.20004 3.18811 2.34555 4.2293 1.84097 5.44747C1.33638 6.66565 1.20436 8.00609 1.4616 9.2993C1.71883 10.5925 2.35377 11.7804 3.28612 12.7127C4.21847 13.6451 5.40636 14.28 6.69956 14.5373C7.99277 14.7945 9.33321 14.6625 10.5514 14.1579C11.7696 13.6533 12.8108 12.7988 13.5433 11.7025C14.2758 10.6062 14.6668 9.31724 14.6668 7.9987C14.6649 6.23118 13.9619 4.53662 12.7121 3.2868C11.4622 2.03697 9.76768 1.33397 8.00016 1.33203ZM7.66683 3.9987C7.86461 3.9987 8.05795 4.05735 8.2224 4.16723C8.38685 4.27711 8.51502 4.43329 8.59071 4.61601C8.6664 4.79874 8.6862 4.99981 8.64762 5.19379C8.60903 5.38777 8.51379 5.56595 8.37394 5.7058C8.23409 5.84566 8.0559 5.9409 7.86192 5.97948C7.66794 6.01807 7.46687 5.99826 7.28415 5.92258C7.10142 5.84689 6.94524 5.71872 6.83536 5.55427C6.72548 5.38982 6.66683 5.19648 6.66683 4.9987C6.66683 4.73348 6.77219 4.47913 6.95972 4.29159C7.14726 4.10405 7.40162 3.9987 7.66683 3.9987ZM9.3335 11.332H6.66683C6.49002 11.332 6.32045 11.2618 6.19543 11.1368C6.0704 11.0117 6.00016 10.8422 6.00016 10.6654C6.00016 10.4886 6.0704 10.319 6.19543 10.194C6.32045 10.0689 6.49002 9.9987 6.66683 9.9987H7.3335V7.9987H6.66683C6.49002 7.9987 6.32045 7.92846 6.19543 7.80343C6.0704 7.67841 6.00016 7.50884 6.00016 7.33203C6.00016 7.15522 6.0704 6.98565 6.19543 6.86063C6.32045 6.7356 6.49002 6.66536 6.66683 6.66536H8.00016C8.17698 6.66536 8.34655 6.7356 8.47157 6.86063C8.59659 6.98565 8.66683 7.15522 8.66683 7.33203V9.9987H9.3335C9.51031 9.9987 9.67988 10.0689 9.8049 10.194C9.92993 10.319 10.0002 10.4886 10.0002 10.6654C10.0002 10.8422 9.92993 11.0117 9.8049 11.1368C9.67988 11.2618 9.51031 11.332 9.3335 11.332Z`}}]},L=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`info-icon`,ref:t,icon:I}))});L.displayName=`InfoIcon`;let R={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},z=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`more-down-icon`,ref:t,icon:R}))});z.displayName=`MoreDownIcon`;let ee={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 17 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M10.3536 12.3536C10.1583 12.5488 9.84171 12.5488 9.64645 12.3536L6.64645 9.35355C6.45118 9.15829 6.45118 8.84171 6.64645 8.64645L9.64645 5.64645C9.84171 5.45118 10.1583 5.45118 10.3536 5.64645C10.5488 5.84171 10.5488 6.15829 10.3536 6.35355L7.70711 9L10.3536 11.6464C10.5488 11.8417 10.5488 12.1583 10.3536 12.3536Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},te=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`more-left-icon`,ref:t,icon:ee}))});te.displayName=`MoreLeftIcon`;let ne={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M6.14645 4.64645C6.34171 4.45118 6.65829 4.45118 6.85355 4.64645L9.85355 7.64645C10.0488 7.84171 10.0488 8.15829 9.85355 8.35355L6.85355 11.3536C6.65829 11.5488 6.34171 11.5488 6.14645 11.3536C5.95118 11.1583 5.95118 10.8417 6.14645 10.6464L8.79289 8L6.14645 5.35355C5.95118 5.15829 5.95118 4.84171 6.14645 4.64645Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},re=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`more-right-icon`,ref:t,icon:ne}))});re.displayName=`MoreRightIcon`;let ie={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},ae=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`more-up-icon`,ref:t,icon:ie}))});ae.displayName=`MoreUpIcon`;let oe={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M5.65252 5.41446C5.86681 5.53124 6.00016 5.75579 6.00016 5.99984V9.99984C6.00016 10.368 5.70168 10.6665 5.3335 10.6665C4.96531 10.6665 4.66683 10.368 4.66683 9.99984V7.22312L4.36151 7.42005C4.05209 7.61961 3.63948 7.53056 3.43992 7.22115C3.24035 6.91173 3.3294 6.49912 3.63882 6.29956L4.97215 5.43959C5.17724 5.30731 5.43822 5.29767 5.65252 5.41446Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M12.3335 5.99984C12.3335 5.75579 12.2001 5.53124 11.9858 5.41446C11.7716 5.29767 11.5106 5.30731 11.3055 5.43959L9.97215 6.29956C9.66274 6.49912 9.57368 6.91173 9.77325 7.22115C9.97281 7.53056 10.3854 7.61961 10.6948 7.42005L11.0002 7.22312V9.99984C11.0002 10.368 11.2986 10.6665 11.6668 10.6665C12.035 10.6665 12.3335 10.368 12.3335 9.99984V5.99984Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.00008 5.99984C8.36827 5.99984 8.66675 6.29831 8.66675 6.6665V6.99984C8.66675 7.36803 8.36827 7.6665 8.00008 7.6665C7.63189 7.6665 7.33341 7.36803 7.33341 6.99984V6.6665C7.33341 6.29831 7.63189 5.99984 8.00008 5.99984Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M8.66675 8.99984C8.66675 8.63165 8.36827 8.33317 8.00008 8.33317C7.63189 8.33317 7.33341 8.63165 7.33341 8.99984V9.33317C7.33341 9.70136 7.63189 9.99984 8.00008 9.99984C8.36827 9.99984 8.66675 9.70136 8.66675 9.33317V8.99984Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M0.666748 2.99984C0.666748 2.26346 1.2637 1.6665 2.00008 1.6665H14.0001C14.7365 1.6665 15.3334 2.26346 15.3334 2.99984V12.9998C15.3334 13.7362 14.7365 14.3332 14.0001 14.3332H2.00008C1.26371 14.3332 0.666748 13.7362 0.666748 12.9998V2.99984ZM14.0001 2.99984H2.00008V12.9998H14.0001V2.99984Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},se=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`one-to-one-icon`,ref:t,icon:oe}))});se.displayName=`OneToOneIcon`;let ce={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C4.13401 1 1 4.13401 1 8C1 11.866 4.13401 15 8 15ZM11.7245 6.42417C11.9588 6.18985 11.9588 5.80995 11.7245 5.57564C11.4901 5.34132 11.1102 5.34132 10.8759 5.57564L7.3002 9.15137L5.72446 7.57564C5.49014 7.34132 5.11025 7.34132 4.87593 7.57564C4.64162 7.80995 4.64162 8.18985 4.87593 8.42417L6.87593 10.4242C7.11025 10.6585 7.49014 10.6585 7.72446 10.4242L11.7245 6.42417Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},le=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`success-icon`,ref:t,icon:ce}))});le.displayName=`SuccessIcon`;let ue={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM8.00008 12.3671C8.46031 12.3671 8.83342 11.994 8.83342 11.5338C8.83342 11.0735 8.46031 10.7004 8.00008 10.7004C7.53985 10.7004 7.16675 11.0735 7.16675 11.5338C7.16675 11.994 7.53985 12.3671 8.00008 12.3671ZM8.5999 4.4335C8.5999 4.10213 8.33127 3.8335 7.9999 3.8335C7.66853 3.8335 7.3999 4.10213 7.3999 4.4335V9.36683C7.3999 9.6982 7.66853 9.96683 7.9999 9.96683C8.33127 9.96683 8.5999 9.6982 8.5999 9.36683V4.4335Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},de=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`warning-icon`,ref:t,icon:ue}))});de.displayName=`WarningIcon`;let fe={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M8.04883 5.38216C8.04883 5.01397 7.75035 4.71549 7.38216 4.71549C7.01397 4.71549 6.71549 5.01397 6.71549 5.38216V6.71897L5.3865 6.7207C5.01831 6.72117 4.72022 7.02004 4.7207 7.38823C4.72118 7.75642 5.02005 8.05451 5.38824 8.05403L6.71549 8.0523V9.38216C6.71549 9.75035 7.01397 10.0488 7.38216 10.0488C7.75035 10.0488 8.04883 9.75035 8.04883 9.38216V8.05056L9.38304 8.04883C9.75123 8.04835 10.0493 7.74948 10.0488 7.38129C10.0484 7.0131 9.74949 6.71502 9.3813 6.7155L8.04883 6.71723V5.38216Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M7.38216 1.04883C3.88437 1.04883 1.04883 3.88437 1.04883 7.38216C1.04883 10.88 3.88437 13.7155 7.38216 13.7155C8.89089 13.7155 10.2764 13.1879 11.3643 12.3072L13.813 14.7559C14.0733 15.0162 14.4954 15.0162 14.7558 14.7559C15.0161 14.4955 15.0161 14.0734 14.7558 13.8131L12.3071 11.3644C13.1879 10.2765 13.7155 8.89095 13.7155 7.38216C13.7155 3.88437 10.88 1.04883 7.38216 1.04883ZM2.38216 7.38216C2.38216 4.62075 4.62075 2.38216 7.38216 2.38216C10.1436 2.38216 12.3822 4.62075 12.3822 7.38216C12.3822 10.1436 10.1436 12.3822 7.38216 12.3822C4.62075 12.3822 2.38216 10.1436 2.38216 7.38216Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},pe=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`zoom-in-icon`,ref:t,icon:fe}))});pe.displayName=`ZoomInIcon`;let me={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`currentColor`,d:`M4.71549 7.38216C4.71549 7.01397 5.01397 6.71549 5.38216 6.71549H9.38216C9.75035 6.71549 10.0488 7.01397 10.0488 7.38216C10.0488 7.75035 9.75035 8.04883 9.38216 8.04883H5.38216C5.01397 8.04883 4.71549 7.75035 4.71549 7.38216Z`}},{tag:`path`,attrs:{fill:`currentColor`,d:`M1.04883 7.38216C1.04883 3.88437 3.88437 1.04883 7.38216 1.04883C10.88 1.04883 13.7155 3.88437 13.7155 7.38216C13.7155 8.89095 13.1879 10.2765 12.3071 11.3644L14.7558 13.8131C15.0161 14.0734 15.0161 14.4955 14.7558 14.7559C14.4954 15.0162 14.0733 15.0162 13.813 14.7559L11.3643 12.3072C10.2764 13.1879 8.89089 13.7155 7.38216 13.7155C3.88437 13.7155 1.04883 10.88 1.04883 7.38216ZM7.38216 2.38216C4.62075 2.38216 2.38216 4.62075 2.38216 7.38216C2.38216 10.1436 4.62075 12.3822 7.38216 12.3822C10.1436 12.3822 12.3822 10.1436 12.3822 7.38216C12.3822 4.62075 10.1436 2.38216 7.38216 2.38216Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},he=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`zoom-out-icon`,ref:t,icon:me}))});he.displayName=`ZoomOutIcon`;let ge={tag:`svg`,attrs:{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,width:`1em`,height:`1em`},children:[{tag:`path`,attrs:{fill:`#0B9EFB`,d:`M8.79993 14.0166C8.79993 14.4585 8.44176 14.8166 7.99993 14.8166C4.23529 14.8166 1.18345 11.7648 1.18345 8.00017C1.18345 4.23554 4.23529 1.18369 7.99993 1.1837C11.7646 1.1837 14.8164 4.23554 14.8164 8.00017C14.8164 8.442 14.4582 8.80017 14.0164 8.80017C13.5746 8.80017 13.2164 8.442 13.2164 8.00017C13.2164 5.11919 10.8809 2.7837 7.99993 2.7837C5.11895 2.7837 2.78345 5.11919 2.78345 8.00017C2.78345 10.8812 5.11895 13.2166 7.99993 13.2166C8.44176 13.2166 8.79993 13.5748 8.79993 14.0166Z`,fillOpacity:.2,fillRule:`evenodd`,clipRule:`evenodd`}},{tag:`path`,attrs:{fill:`#0B9EFB`,d:`M7.20007 1.98384C7.20007 1.54201 7.55824 1.18384 8.00007 1.18384C11.7647 1.18384 14.8165 4.23568 14.8165 8.00032C14.8165 11.765 11.7647 14.8168 8.00007 14.8168C4.23543 14.8168 1.18359 11.765 1.18359 8.00032C1.18359 7.55849 1.54177 7.20031 1.98359 7.20031C2.42542 7.20031 2.78359 7.55849 2.78359 8.00032C2.78359 10.8813 5.11909 13.2168 8.00007 13.2168C10.8811 13.2168 13.2165 10.8813 13.2165 8.00032C13.2165 5.11933 10.8811 2.78384 8.00007 2.78384C7.55824 2.78384 7.20007 2.42567 7.20007 1.98384Z`,fillRule:`evenodd`,clipRule:`evenodd`}}]},_e=(0,p.forwardRef)(function(e,t){return(0,p.createElement)(h,Object.assign({},e,{id:`loading-multi-icon`,ref:t,icon:ge}))});_e.displayName=`LoadingMultiIcon`;function ve(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=ve(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function B(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=ve(e))&&(r&&(r+=` `),r+=t);return r}let ye=e=>{let t=Ce(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{let n=e.split(`-`);return n[0]===``&&n.length!==1&&n.shift(),be(n,t)||Se(e)},getConflictingClassGroupIds:(e,t)=>{let i=n[e]||[];return t&&r[e]?[...i,...r[e]]:i}}},be=(e,t)=>{var n;if(e.length===0)return t.classGroupId;let r=e[0],i=t.nextPart.get(r),a=i?be(e.slice(1),i):void 0;if(a)return a;if(t.validators.length===0)return;let o=e.join(`-`);return(n=t.validators.find(({validator:e})=>e(o)))==null?void 0:n.classGroupId},xe=/^\[(.+)\]$/,Se=e=>{if(xe.test(e)){let t=xe.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(`:`));if(n)return`arbitrary..`+n}},Ce=e=>{let{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return De(Object.entries(e.classGroups),n).forEach(([e,n])=>{we(n,r,e,t)}),r},we=(e,t,n,r)=>{e.forEach(e=>{if(typeof e==`string`){let r=e===``?t:Te(t,e);r.classGroupId=n;return}if(typeof e==`function`){if(Ee(e)){we(e(r),t,n,r);return}t.validators.push({validator:e,classGroupId:n});return}Object.entries(e).forEach(([e,i])=>{we(i,Te(t,e),n,r)})})},Te=(e,t)=>{let n=e;return t.split(`-`).forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Ee=e=>e.isThemeGetter,De=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>typeof e==`string`?t+e:typeof e==`object`?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,Oe=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=new Map,r=new Map,i=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);if(t!==void 0)return t;if((t=r.get(e))!==void 0)return i(e,t),t},set(e,t){n.has(e)?n.set(e,t):i(e,t)}}},ke=e=>{let{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=e=>{let n=[],o=0,s=0,c;for(let l=0;l<e.length;l++){let u=e[l];if(o===0){if(u===i&&(r||e.slice(l,l+a)===t)){n.push(e.slice(s,l)),s=l+a;continue}if(u===`/`){c=l;continue}}u===`[`?o++:u===`]`&&o--}let l=n.length===0?e:e.substring(s),u=l.startsWith(`!`);return{modifiers:n,hasImportantModifier:u,baseClassName:u?l.substring(1):l,maybePostfixModifierPosition:c&&c>s?c-s:void 0}};return n?e=>n({className:e,parseClassName:o}):o},Ae=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(e=>{e[0]===`[`?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},je=e=>({cache:Oe(e.cacheSize),parseClassName:ke(e),...ye(e)}),Me=/\s+/,Ne=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(Me),s=``;for(let e=o.length-1;e>=0;--e){let t=o[e],{modifiers:c,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=n(t),f=!!d,p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?` `+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?` `+s:s);continue}f=!1}let m=Ae(c).join(`:`),h=l?m+`!`:m,g=h+p;if(a.includes(g))continue;a.push(g);let _=i(p,f);for(let e=0;e<_.length;++e){let t=_[e];a.push(h+t)}s=t+(s.length>0?` `+s:s)}return s};function Pe(){let e=0,t,n,r=``;for(;e<arguments.length;)(t=arguments[e++])&&(n=Fe(t))&&(r&&(r+=` `),r+=n);return r}let Fe=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Fe(e[r]))&&(n&&(n+=` `),n+=t);return n};function Ie(e,...t){let n,r,i,a=o;function o(o){return n=je(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)}function s(e){let t=r(e);if(t)return t;let a=Ne(e,n);return i(e,a),a}return function(){return a(Pe.apply(null,arguments))}}let V=e=>{let t=t=>t[e]||[];return t.isThemeGetter=!0,t},Le=/^\[(?:([a-z-]+):)?(.+)\]$/i,Re=/^\d+\/\d+$/,ze=new Set([`px`,`full`,`screen`]),Be=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ve=/\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$/,He=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,We=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ge=e=>qe(e)||ze.has(e)||Re.test(e),Ke=e=>at(e,`length`,ot),qe=e=>!!e&&!Number.isNaN(Number(e)),Je=e=>at(e,`number`,qe),Ye=e=>!!e&&Number.isInteger(Number(e)),Xe=e=>e.endsWith(`%`)&&qe(e.slice(0,-1)),H=e=>Le.test(e),Ze=e=>Be.test(e),Qe=new Set([`length`,`size`,`percentage`]),$e=e=>at(e,Qe,st),et=e=>at(e,`position`,st),tt=new Set([`image`,`url`]),nt=e=>at(e,tt,lt),rt=e=>at(e,``,ct),it=()=>!0,at=(e,t,n)=>{let r=Le.exec(e);return r?r[1]?typeof t==`string`?r[1]===t:t.has(r[1]):n(r[2]):!1},ot=e=>Ve.test(e)&&!He.test(e),st=()=>!1,ct=e=>Ue.test(e),lt=e=>We.test(e),ut=Ie(()=>{let e=V(`colors`),t=V(`spacing`),n=V(`blur`),r=V(`brightness`),i=V(`borderColor`),a=V(`borderRadius`),o=V(`borderSpacing`),s=V(`borderWidth`),c=V(`contrast`),l=V(`grayscale`),u=V(`hueRotate`),d=V(`invert`),f=V(`gap`),p=V(`gradientColorStops`),m=V(`gradientColorStopPositions`),h=V(`inset`),g=V(`margin`),_=V(`opacity`),v=V(`padding`),y=V(`saturate`),b=V(`scale`),x=V(`sepia`),S=V(`skew`),C=V(`space`),w=V(`translate`),T=()=>[`auto`,`contain`,`none`],E=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],D=()=>[`auto`,H,t],O=()=>[H,t],k=()=>[``,Ge,Ke],A=()=>[`auto`,qe,H],j=()=>[`bottom`,`center`,`left`,`left-bottom`,`left-top`,`right`,`right-bottom`,`right-top`,`top`],M=()=>[`solid`,`dashed`,`dotted`,`double`,`none`],N=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],P=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`],F=()=>[``,`0`,H],I=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],L=()=>[qe,H];return{cacheSize:500,separator:`:`,theme:{colors:[it],spacing:[Ge,Ke],blur:[`none`,``,Ze,H],brightness:L(),borderColor:[e],borderRadius:[`none`,``,`full`,Ze,H],borderSpacing:O(),borderWidth:k(),contrast:L(),grayscale:F(),hueRotate:L(),invert:F(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Xe,Ke],inset:D(),margin:D(),opacity:L(),padding:O(),saturate:L(),scale:L(),sepia:F(),skew:L(),space:O(),translate:O()},classGroups:{aspect:[{aspect:[`auto`,`square`,`video`,H]}],container:[`container`],columns:[{columns:[Ze]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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:[...j(),H]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[`auto`,Ye,H]}],basis:[{basis:D()}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`wrap`,`wrap-reverse`,`nowrap`]}],flex:[{flex:[`1`,`auto`,`initial`,`none`,H]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:[`first`,`last`,`none`,Ye,H]}],"grid-cols":[{"grid-cols":[it]}],"col-start-end":[{col:[`auto`,{span:[`full`,Ye,H]},H]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[it]}],"row-start-end":[{row:[`auto`,{span:[Ye,H]},H]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":[`auto`,`min`,`max`,`fr`,H]}],"auto-rows":[{"auto-rows":[`auto`,`min`,`max`,`fr`,H]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:[`normal`,...P()]}],"justify-items":[{"justify-items":[`start`,`end`,`center`,`stretch`]}],"justify-self":[{"justify-self":[`auto`,`start`,`end`,`center`,`stretch`]}],"align-content":[{content:[`normal`,...P(),`baseline`]}],"align-items":[{items:[`start`,`end`,`center`,`baseline`,`stretch`]}],"align-self":[{self:[`auto`,`start`,`end`,`center`,`stretch`,`baseline`]}],"place-content":[{"place-content":[...P(),`baseline`]}],"place-items":[{"place-items":[`start`,`end`,`center`,`baseline`,`stretch`]}],"place-self":[{"place-self":[`auto`,`start`,`end`,`center`,`stretch`]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[C]}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":[C]}],"space-y-reverse":[`space-y-reverse`],w:[{w:[`auto`,`min`,`max`,`fit`,`svw`,`lvw`,`dvw`,H,t]}],"min-w":[{"min-w":[H,t,`min`,`max`,`fit`]}],"max-w":[{"max-w":[H,t,`none`,`full`,`min`,`max`,`fit`,`prose`,{screen:[Ze]},Ze]}],h:[{h:[H,t,`auto`,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"min-h":[{"min-h":[H,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],"max-h":[{"max-h":[H,t,`min`,`max`,`fit`,`svh`,`lvh`,`dvh`]}],size:[{size:[H,t,`auto`,`min`,`max`,`fit`]}],"font-size":[{text:[`base`,Ze,Ke]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`,Je]}],"font-family":[{font:[it]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`,H]}],"line-clamp":[{"line-clamp":[`none`,qe,Je]}],leading:[{leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`,Ge,H]}],"list-image":[{"list-image":[`none`,H]}],"list-style-type":[{list:[`none`,`disc`,`decimal`,H]}],"list-style-position":[{list:[`inside`,`outside`]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[_]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...M(),`wavy`]}],"text-decoration-thickness":[{decoration:[`auto`,`from-font`,Ge,Ke]}],"underline-offset":[{"underline-offset":[`auto`,Ge,H]}],"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:O()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,H]}],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`,H]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-opacity":[{"bg-opacity":[_]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:[...j(),et]}],"bg-repeat":[{bg:[`no-repeat`,{repeat:[``,`x`,`y`,`round`,`space`]}]}],"bg-size":[{bg:[`auto`,`cover`,`contain`,$e]}],"bg-image":[{bg:[`none`,{"gradient-to":[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},nt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"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":[_]}],"border-style":[{border:[...M(),`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":[_]}],"divide-style":[{divide:M()}],"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:[``,...M()]}],"outline-offset":[{"outline-offset":[Ge,H]}],"outline-w":[{outline:[Ge,Ke]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[Ge,Ke]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:[``,`inner`,`none`,Ze,rt]}],"shadow-color":[{shadow:[it]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...N(),`plus-lighter`,`plus-darker`]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:[``,`none`]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":[``,`none`,Ze,H]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":[``,`none`]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[_]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[`none`,`all`,``,`colors`,`opacity`,`shadow`,`transform`,H]}],duration:[{duration:L()}],ease:[{ease:[`linear`,`in`,`out`,`in-out`,H]}],delay:[{delay:L()}],animate:[{animate:[`none`,`spin`,`ping`,`pulse`,`bounce`,H]}],transform:[{transform:[``,`gpu`,`none`]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Ye,H]}],"translate-x":[{"translate-x":[w]}],"translate-y":[{"translate-y":[w]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:[`center`,`top`,`top-right`,`right`,`bottom-right`,`bottom`,`bottom-left`,`left`,`top-left`,H]}],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`,H]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":[`none`,`auto`]}],resize:[{resize:[`none`,`y`,`x`,``]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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`,H]}],fill:[{fill:[e,`none`]}],"stroke-w":[{stroke:[Ge,Ke,Je]}],stroke:[{stroke:[e,`none`]}],sr:[`sr-only`,`not-sr-only`],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-s`,`border-w-e`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-s`,`border-color-e`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]}}});function U(...e){return ut(B(e))}function dt(e){let{className:r,items:i}=e,[a,o]=(0,t.useState)(null),s=e=>{o(a===e?null:e)};return(0,n.jsx)(`div`,{"data-u-comp":`accordion`,className:U(`univer-divide-x-0 univer-divide-y univer-divide-solid univer-divide-gray-200 dark:!univer-divide-gray-600`,r),children:i.map((e,t)=>(0,n.jsxs)(`div`,{children:[(0,n.jsxs)(`button`,{className:`univer-box-border univer-flex univer-w-full univer-cursor-pointer univer-items-center univer-gap-1.5 univer-border-none univer-bg-transparent univer-p-4 univer-text-left univer-text-gray-700 hover:univer-text-gray-900 focus:univer-outline-none dark:!univer-text-gray-200 dark:hover:!univer-text-white`,type:`button`,onClick:()=>s(t),children:[(0,n.jsx)(j,{className:U(`univer-size-2.5 univer-flex-shrink-0 univer-transition-transform`,{"-univer-rotate-90":a!==t,"univer-rotate-0":a===t})}),(0,n.jsx)(`span`,{className:`univer-font-medium`,children:e.label})]}),(0,n.jsx)(`div`,{className:U(`univer-overflow-hidden univer-transition-[max-height,opacity] univer-duration-500 univer-ease-in-out`,{"univer-max-h-screen":a===t,"univer-max-h-0":a!==t}),children:(0,n.jsx)(`div`,{className:`univer-box-border univer-px-4 univer-py-1.5`,children:e.children})})]},t))})}let ft=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,pt=B,mt=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return pt(e,n==null?void 0:n.class,n==null?void 0:n.className);let{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(e=>{let t=n==null?void 0:n[e],r=a==null?void 0:a[e];if(t===null)return null;let o=ft(t)||ft(r);return i[e][o]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return pt(e,o,t==null||(r=t.compoundVariants)==null?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]),n==null?void 0:n.class,n==null?void 0:n.className)},ht=mt(`univer-relative univer-inline-block univer-overflow-hidden univer-whitespace-nowrap univer-bg-gray-200 univer-text-center univer-align-middle univer-text-white`,{variants:{shape:{circle:`univer-rounded-full`,square:`univer-rounded`},size:{middle:`univer-size-9 univer-leading-9`,small:`univer-size-7 univer-leading-7`}},defaultVariants:{shape:`circle`,size:`middle`}});function gt(e){let{children:t,className:r,style:i,title:a,alt:o,shape:s=`circle`,size:c=`middle`,src:l,fit:u=`fill`,onError:d,onLoad:f}=e,p=typeof c==`number`?{width:`${c}px`,height:`${c}px`,lineHeight:`${c}px`}:{},m={objectFit:u};return(0,n.jsxs)(`span`,{className:U(ht({shape:s,size:typeof c==`number`?`middle`:c}),{"univer-bg-transparent":l},r),style:{...p,...i,...l&&m},children:[l&&(0,n.jsx)(`img`,{className:`univer-block univer-size-full`,src:l,title:a,alt:o,onError:d,onLoad:f}),t]})}function _t(e){let{className:t,children:r,closable:i=!1,onClose:a}=e;return(0,n.jsxs)(`span`,{"data-u-comp":`badge`,className:U(`univer-box-border univer-inline-flex univer-items-center univer-gap-1 univer-truncate univer-rounded-md univer-border univer-border-solid univer-border-gray-100 univer-bg-gray-100 univer-px-2.5 univer-py-0.5 univer-text-xs univer-font-medium univer-text-gray-900 dark:!univer-border-gray-500 dark:!univer-bg-gray-700 dark:!univer-text-gray-300`,t),children:[(0,n.jsx)(`span`,{className:`univer-flex-1 univer-truncate`,children:r}),i&&(0,n.jsx)(`button`,{className:`univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-border-none univer-p-0 univer-outline-none univer-transition-opacity hover:univer-opacity-70`,type:`button`,"aria-label":`Close badge`,onClick:a,children:(0,n.jsx)(D,{className:`univer-text-current`})})]})}function vt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function yt(...e){return t=>{let n=!1,r=e.map(e=>{let r=vt(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():vt(e[t],null)}}}}function W(...e){return p.useCallback(yt(...e),e)}function bt(e){let t=p.forwardRef((t,n)=>{var r;let{children:i,...a}=t,o=null,s=!1,c=[];Ot(i)&&typeof Mt==`function`&&(i=Mt(i._payload)),p.Children.forEach(i,e=>{if(Et(e)){var t;s=!0;let n=e,r=`child`in n.props?n.props.child:n.props.children;Ot(r)&&typeof Mt==`function`&&(r=Mt(r._payload)),o=Ct(n,r),c.push(o==null||(t=o.props)==null?void 0:t.children)}else c.push(e)}),o?o=p.cloneElement(o,void 0,c):!s&&p.Children.count(i)===1&&p.isValidElement(i)&&(o=i);let l=o?Tt(o):void 0,u=W(n,l);if(!o){if(i||i===0)throw Error(s?jt(e):At(e));return i}let d=wt(a,(r=o.props)==null?{}:r);return o.type!==p.Fragment&&(d.ref=n?u:l),p.cloneElement(o,d)});return t.displayName=`${e}.Slot`,t}var xt=bt(`Slot`),St=Symbol.for(`radix.slottable`),Ct=(e,t)=>{if(`child`in e.props){let t=e.props.child;return p.isValidElement(t)?p.cloneElement(t,void 0,e.props.children(t.props.children)):null}return p.isValidElement(t)?t:null};function wt(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Tt(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,`ref`))==null?void 0:t.get,i=r&&`isReactWarning`in r&&r.isReactWarning;return i?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,`ref`))==null?void 0:n.get,i=r&&`isReactWarning`in r&&r.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}function Et(e){return p.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===St}var Dt=Symbol.for(`react.lazy`);function Ot(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Dt&&`_payload`in e&&kt(e._payload)}function kt(e){return typeof e==`object`&&!!e&&`then`in e}var At=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,jt=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Mt=p.use;let Nt=mt(`univer-box-border univer-inline-flex univer-cursor-pointer univer-select-none univer-items-center univer-justify-center univer-gap-2 univer-whitespace-nowrap univer-rounded-md univer-border univer-border-solid univer-text-sm univer-font-medium univer-transition-colors disabled:univer-pointer-events-none disabled:univer-cursor-not-allowed disabled:univer-opacity-50 [&_svg]:univer-pointer-events-none [&_svg]:univer-size-4 [&_svg]:univer-shrink-0`,{variants:{variant:{default:`univer-border-gray-200 univer-bg-white univer-text-gray-700 hover:univer-bg-gray-100 active:univer-bg-gray-200 dark:!univer-border-gray-600 dark:!univer-bg-gray-700 dark:!univer-text-white dark:hover:!univer-bg-gray-600 dark:active:!univer-bg-gray-700`,primary:`univer-border-primary-600 univer-bg-primary-600 univer-text-white hover:univer-bg-primary-500 active:univer-bg-primary-700`,danger:`univer-border-red-500 univer-bg-red-500 univer-text-white hover:univer-border-red-400 hover:univer-bg-red-400 active:univer-border-red-600 active:univer-bg-red-600`,text:`univer-border-transparent univer-bg-transparent univer-text-gray-900 hover:univer-bg-gray-100 active:univer-bg-gray-200 dark:!univer-text-white dark:hover:!univer-bg-gray-700 dark:active:!univer-bg-gray-600`,link:`univer-underline-current univer-border-transparent univer-bg-transparent univer-text-primary-600 univer-underline-offset-4 hover:univer-text-primary-500 hover:univer-underline active:univer-text-primary-700`,ghost:`univer-border-transparent univer-bg-transparent univer-text-gray-900 hover:univer-bg-gray-100 active:univer-bg-gray-200 dark:!univer-text-white dark:hover:!univer-bg-gray-700 dark:active:!univer-bg-gray-600`},size:{small:`univer-h-6 univer-rounded-md univer-px-1.5 univer-text-xs`,middle:`univer-h-8 univer-rounded-lg univer-px-2 univer-text-sm`,large:`univer-h-10 univer-rounded-lg univer-px-3 univer-text-sm`}},defaultVariants:{variant:`default`,size:`middle`}}),Pt=(0,t.forwardRef)(({className:e,variant:t,size:r,asChild:i=!1,...a},o)=>(0,n.jsx)(i?xt:`button`,{className:U(Nt({variant:t,size:r,className:e})),ref:o,"data-u-comp":`button`,...a}));Pt.displayName=`Button`;var Ft=p.createContext(void 0),It=e=>{let{dir:t,children:r}=e;return(0,n.jsx)(Ft.Provider,{value:t,children:r})};function Lt(e){let t=p.useContext(Ft);return e||t||`ltr`}function Rt(){return typeof window<`u`&&typeof document<`u`}let G=(0,t.createContext)({mountContainer:Rt()?document.body:null});function zt(e){let{children:r,locale:i,mountContainer:a,direction:o}=e,s=(0,t.useMemo)(()=>({locale:i,direction:o,mountContainer:a}),[i,o,a]);return(0,n.jsx)(G.Provider,{value:s,children:(0,n.jsx)(It,{dir:o==null?`ltr`:o,children:r})})}let Bt=({className:e,orientation:r=`horizontal`,children:i})=>{let{direction:a}=(0,t.useContext)(G),o=t.Children.count(i),s=r===`horizontal`,c=r===`vertical`,l=a===`rtl`;return(0,n.jsx)(`div`,{className:U(`univer-grid`,{"univer-grid-flow-row":c,"univer-w-fit":c},e),children:t.Children.map(i,(e,n)=>{let r=n===0,i=n===o-1;return(0,t.cloneElement)(e,{className:U({"!univer-rounded-l-none":s&&(l?!i:!r),"!univer-rounded-r-none":s&&(l?!r:!i),"!univer-border-l-0":s&&!l&&!r,"!univer-border-r-0":s&&l&&!r,"!univer-rounded-t-none":c&&!r,"!univer-rounded-b-none":c&&!i,"!univer-border-t-0":c&&!r},e.props.className)})})})};typeof window<`u`&&window.document&&window.document.createElement;function K(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function Vt(e,t=[]){let r=[];function i(t,i){let a=p.createContext(i);a.displayName=t+`Context`;let o=r.length;r=[...r,i];let s=t=>{var r;let{scope:i,children:s,...c}=t,l=(i==null||(r=i[e])==null?void 0:r[o])||a,u=p.useMemo(()=>c,Object.values(c));return(0,n.jsx)(l.Provider,{value:u,children:s})};s.displayName=t+`Provider`;function c(n,r){var s;let c=(r==null||(s=r[e])==null?void 0:s[o])||a,l=p.useContext(c);if(l)return l;if(i!==void 0)return i;throw Error(`\`${n}\` must be used within \`${t}\``)}return[s,c]}let a=()=>{let t=r.map(e=>p.createContext(e));return function(n){let r=(n==null?void 0:n[e])||t;return p.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return a.scopeName=e,[i,Ht(a,...t)]}function Ht(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var Ut,Wt=(Ut=globalThis)!=null&&Ut.document?p.useLayoutEffect:()=>{},Gt=p.useEffectEvent,Kt=p.useInsertionEffect;function qt(e){if(typeof Gt==`function`)return Gt(e);let t=p.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Kt==`function`?Kt(()=>{t.current=e}):Wt(()=>{t.current=e}),p.useMemo(()=>((...e)=>{var n;return(n=t.current)==null?void 0:n.call(t,...e)}),[])}var Jt=p.useInsertionEffect||Wt;function Yt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Xt({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=p.useRef(e!==void 0);p.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,p.useCallback(t=>{if(s){let r=Zt(t)?t(e):t;if(r!==e){var n;(n=o.current)==null||n.call(o,r)}}else a(t)},[s,e,a,o])]}function Xt({defaultProp:e,onChange:t}){let[n,r]=p.useState(e),i=p.useRef(n),a=p.useRef(t);return Jt(()=>{a.current=t},[t]),p.useEffect(()=>{if(i.current!==n){var e;(e=a.current)==null||e.call(a,n),i.current=n}},[n,i]),[n,r,a]}function Zt(e){return typeof e==`function`}var q=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let r=bt(`Primitive.${t}`),i=p.forwardRef((e,i)=>{let{asChild:a,...o}=e,s=a?r:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,n.jsx)(s,{...o,ref:i})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function Qt(e,t){e&&m.flushSync(()=>e.dispatchEvent(t))}function $t(e){let t=e+`CollectionProvider`,[r,i]=Vt(t),[a,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{let{scope:t,children:r}=e,i=p.useRef(null),o=p.useRef(new Map).current;return(0,n.jsx)(a,{scope:t,itemMap:o,collectionRef:i,children:r})};s.displayName=t;let c=e+`CollectionSlot`,l=bt(c),u=p.forwardRef((e,t)=>{let{scope:r,children:i}=e;return(0,n.jsx)(l,{ref:W(t,o(c,r).collectionRef),children:i})});u.displayName=c;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,m=bt(d),h=p.forwardRef((e,t)=>{let{scope:r,children:i,...a}=e,s=p.useRef(null),c=W(t,s),l=o(d,r);return p.useEffect(()=>(l.itemMap.set(s,{ref:s,...a}),()=>void l.itemMap.delete(s))),(0,n.jsx)(m,{[f]:``,ref:c,children:i})});h.displayName=d;function g(t){let n=o(e+`CollectionConsumer`,t);return p.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},g,i]}function en(e){let t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>((...e)=>{var n;return(n=t.current)==null?void 0:n.call(t,...e)}),[])}var tn=`DismissableLayer`,nn=`dismissableLayer.update`,rn=`dismissableLayer.pointerDownOutside`,an=`dismissableLayer.focusOutside`,on,sn=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),cn=p.forwardRef((e,t)=>{var r,i;let{disableOutsidePointerEvents:a=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...f}=e,m=p.useContext(sn),[h,g]=p.useState(null),_=(r=h==null?void 0:h.ownerDocument)==null?(i=globalThis)==null?void 0:i.document:r,[,v]=p.useState({}),y=W(t,g),b=Array.from(m.layers),[x]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),S=b.indexOf(x),C=h?b.indexOf(h):-1,w=m.layersWithOutsidePointerEventsDisabled.size>0,T=C>=S,E=p.useRef(!1),D=fn(e=>{let t=e.target;if(!(t instanceof Node))return;let n=[...m.branches].some(e=>e.contains(t));!T||n||(c==null||c(e),u==null||u(e),e.defaultPrevented||d==null||d())},{ownerDocument:_,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:E,dismissableSurfaces:m.dismissableSurfaces}),O=pn(e=>{if(o&&E.current)return;let t=e.target;[...m.branches].some(e=>e.contains(t))||(l==null||l(e),u==null||u(e),e.defaultPrevented||d==null||d())},_),k=h?C===b.length-1:!1,A=qt(e=>{e.key===`Escape`&&(s==null||s(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))});return p.useEffect(()=>{if(k)return _.addEventListener(`keydown`,A,{capture:!0}),()=>_.removeEventListener(`keydown`,A,{capture:!0})},[_,k]),p.useEffect(()=>{if(h)return a&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(on=_.body.style.pointerEvents,_.body.style.pointerEvents=`none`),m.layersWithOutsidePointerEventsDisabled.add(h)),m.layers.add(h),mn(),()=>{a&&(m.layersWithOutsidePointerEventsDisabled.delete(h),m.layersWithOutsidePointerEventsDisabled.size===0&&(_.body.style.pointerEvents=on))}},[h,_,a,m]),p.useEffect(()=>()=>{h&&(m.layers.delete(h),m.layersWithOutsidePointerEventsDisabled.delete(h),mn())},[h,m]),p.useEffect(()=>{let e=()=>v({});return document.addEventListener(nn,e),()=>document.removeEventListener(nn,e)},[]),(0,n.jsx)(q.div,{...f,ref:y,style:{pointerEvents:w?T?`auto`:`none`:void 0,...e.style},onFocusCapture:K(e.onFocusCapture,O.onFocusCapture),onBlurCapture:K(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,D.onPointerDownCapture)})});cn.displayName=tn;var ln=`DismissableLayerBranch`,un=p.forwardRef((e,t)=>{let r=p.useContext(sn),i=p.useRef(null),a=W(t,i);return p.useEffect(()=>{let e=i.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,n.jsx)(q.div,{...e,ref:a})});un.displayName=ln;function dn(){let e=p.useContext(sn),[t,n]=p.useState(null);return p.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}function fn(e,t){var n;let{ownerDocument:r=(n=globalThis)==null?void 0:n.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o}=t,s=en(e),c=p.useRef(!1),l=p.useRef(!1),u=p.useRef(new Map),d=p.useRef(()=>{});return p.useEffect(()=>{function e(){l.current=!1,a.current=!1,u.current.clear()}function t(){return Array.from(u.current.values()).some(Boolean)}function n(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...o].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}function f(e){l.current&&u.current.set(e.type,!1)}let p=n=>{if(n.target&&!c.current){let o=function(){r.removeEventListener(`click`,d.current);let n=t();e(),n||hn(rn,s,c,{discrete:!0})},c={originalEvent:n};l.current=!0,a.current=i&&n.button===0,u.current.clear(),!i||n.button!==0?o():(r.removeEventListener(`click`,d.current),d.current=o,r.addEventListener(`click`,d.current,{once:!0}))}else r.removeEventListener(`click`,d.current),e();c.current=!1},m=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of m)r.addEventListener(e,n,!0),r.addEventListener(e,f);let h=window.setTimeout(()=>{r.addEventListener(`pointerdown`,p)},0);return()=>{window.clearTimeout(h),r.removeEventListener(`pointerdown`,p),r.removeEventListener(`click`,d.current);for(let e of m)r.removeEventListener(e,n,!0),r.removeEventListener(e,f)}},[r,s,i,a,o]),{onPointerDownCapture:()=>c.current=!0}}function pn(e,t=(()=>{var e;return(e=globalThis)==null?void 0:e.document})()){let n=en(e),r=p.useRef(!1);return p.useEffect(()=>{let e=e=>{e.target&&!r.current&&hn(an,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function mn(){let e=new CustomEvent(nn);document.dispatchEvent(e)}function hn(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Qt(i,a):i.dispatchEvent(a)}var gn=0,_n=null;function vn(){p.useEffect(()=>{_n||(_n={start:yn(),end:yn()});let{start:e,end:t}=_n;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),gn++,()=>{gn===1&&(_n==null||_n.start.remove(),_n==null||_n.end.remove(),_n=null),gn=Math.max(0,gn-1)}},[])}function yn(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var bn=`focusScope.autoFocusOnMount`,xn=`focusScope.autoFocusOnUnmount`,Sn={bubbles:!1,cancelable:!0},Cn=`FocusScope`,wn=p.forwardRef((e,t)=>{let{loop:r=!1,trapped:i=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=p.useState(null),u=en(a),d=en(o),f=p.useRef(null),m=W(t,l),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(i){let e=function(e){if(h.paused||!c)return;let t=e.target;c.contains(t)?f.current=t:jn(f.current,{select:!0})},t=function(e){if(h.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||jn(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&jn(c)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[i,c,h.paused]),p.useEffect(()=>{if(c){Mn.add(h);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(bn,Sn);c.addEventListener(bn,u),c.dispatchEvent(t),t.defaultPrevented||(Tn(Fn(Dn(c)),{select:!0}),document.activeElement===e&&jn(c))}return()=>{c.removeEventListener(bn,u),setTimeout(()=>{let t=new CustomEvent(xn,Sn);c.addEventListener(xn,d),c.dispatchEvent(t),t.defaultPrevented||jn(e==null?document.body:e,{select:!0}),c.removeEventListener(xn,d),Mn.remove(h)},0)}}},[c,u,d,h]);let g=p.useCallback(e=>{if(!r&&!i||h.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[i,a]=En(t);i&&a?!e.shiftKey&&n===a?(e.preventDefault(),r&&jn(i,{select:!0})):e.shiftKey&&n===i&&(e.preventDefault(),r&&jn(a,{select:!0})):n===t&&e.preventDefault()}},[r,i,h.paused]);return(0,n.jsx)(q.div,{tabIndex:-1,...s,ref:m,onKeyDown:g})});wn.displayName=Cn;function Tn(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(jn(r,{select:t}),document.activeElement!==n)return}function En(e){let t=Dn(e);return[On(t,e),On(t.reverse(),e)]}function Dn(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function On(e,t){for(let n of e)if(!kn(n,{upTo:t}))return n}function kn(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function An(e){return e instanceof HTMLInputElement&&`select`in e}function jn(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&An(e)&&t&&e.select()}}var Mn=Nn();function Nn(){let e=[];return{add(t){let n=e[0];t!==n&&(n==null||n.pause()),e=Pn(e,t),e.unshift(t)},remove(t){var n;e=Pn(e,t),(n=e[0])==null||n.resume()}}}function Pn(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Fn(e){return e.filter(e=>e.tagName!==`A`)}var In=p.useId||(()=>void 0),Ln=0;function Rn(e){let[t,n]=p.useState(In());return Wt(()=>{e||n(e=>e==null?String(Ln++):e)},[e]),e||(t?`radix-${t}`:``)}let zn=[`top`,`right`,`bottom`,`left`],Bn=Math.min,J=Math.max,Vn=Math.round,Hn=Math.floor,Un=e=>({x:e,y:e}),Wn={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Gn(e,t,n){return J(e,Bn(t,n))}function Kn(e,t){return typeof e==`function`?e(t):e}function qn(e){return e.split(`-`)[0]}function Jn(e){return e.split(`-`)[1]}function Yn(e){return e===`x`?`y`:`x`}function Xn(e){return e===`y`?`height`:`width`}function Zn(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Qn(e){return Yn(Zn(e))}function $n(e,t,n){n===void 0&&(n=!1);let r=Jn(e),i=Qn(e),a=Xn(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=cr(o)),[o,cr(o)]}function er(e){let t=cr(e);return[tr(e),t,tr(t)]}function tr(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}let nr=[`left`,`right`],rr=[`right`,`left`],ir=[`top`,`bottom`],ar=[`bottom`,`top`];function or(e,t,n){switch(e){case`top`:case`bottom`:return n?t?rr:nr:t?nr:rr;case`left`:case`right`:return t?ir:ar;default:return[]}}function sr(e,t,n,r){let i=Jn(e),a=or(qn(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(tr)))),a}function cr(e){let t=qn(e);return Wn[t]+e.slice(t.length)}function lr(e){return{top:0,right:0,bottom:0,left:0,...e}}function ur(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:lr(e)}function dr(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}}function fr(e,t,n){let{reference:r,floating:i}=e,a=Zn(t),o=Qn(t),s=Xn(o),c=qn(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}}switch(Jn(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function pr(e,t){var n;t===void 0&&(t={});let{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:l=`clippingAncestors`,rootBoundary:u=`viewport`,elementContext:d=`floating`,altBoundary:f=!1,padding:p=0}=Kn(t,e),m=ur(p),h=s[f?d===`floating`?`reference`:`floating`:d],g=dr(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(h)))==null||n?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),_=d===`floating`?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,v=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),y=await(a.isElement==null?void 0:a.isElement(v))&&await(a.getScale==null?void 0:a.getScale(v))||{x:1,y:1},b=dr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:v,strategy:c}):_);return{top:(g.top-b.top+m.top)/y.y,bottom:(b.bottom-g.bottom+m.bottom)/y.y,left:(g.left-b.left+m.left)/y.x,right:(b.right-g.right+m.right)/y.x}}let mr=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:pr},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=fr(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==null?u:v,d=y==null?d:y,m[g]={...m[g],...b},x&&p<50&&(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}=fr(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},hr=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Kn(e,t)||{};if(l==null)return{};let d=ur(u),f={x:n,y:r},p=Qn(i),m=Xn(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Bn(d[_],T),D=Bn(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=Gn(O,A,k),M=!c.arrow&&Jn(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),gr=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n,r;let{placement:i,middlewareData:a,rects:o,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p=`bestFit`,fallbackAxisSideDirection:m=`none`,flipAlignment:h=!0,...g}=Kn(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};let _=qn(i),v=Zn(s),y=qn(s)===s,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),x=f||(y||!h?[cr(s)]:er(s)),S=m!==`none`;!f&&S&&x.push(...sr(s,h,m,b));let C=[s,...x],w=await c.detectOverflow(t,g),T=[],E=((r=a.flip)==null?void 0:r.overflows)||[];if(u&&T.push(w[_]),d){let e=$n(i,o,b);T.push(w[e[0]],w[e[1]])}if(E=[...E,{placement:i,overflows:T}],!T.every(e=>e<=0)){var D,O;let e=(((D=a.flip)==null?void 0:D.index)||0)+1,t=C[e];if(t&&(!(d===`alignment`&&v!==Zn(t))||E.every(e=>Zn(e.placement)===v?e.overflows[0]>0:!0)))return{data:{index:e,overflows:E},reset:{placement:t}};let n=(O=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])==null?void 0:O.placement;if(!n)switch(p){case`bestFit`:{var k;let e=(k=E.filter(e=>{if(S){let t=Zn(e.placement);return t===v||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])==null?void 0:k[0];e&&(n=e);break}case`initialPlacement`:n=s;break}if(i!==n)return{reset:{placement:n}}}return{}}}};function _r(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vr(e){return zn.some(t=>e[t]>=0)}let yr=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Kn(e,t);switch(i){case`referenceHidden`:{let e=_r(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:vr(e)}}}case`escaped`:{let e=_r(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:vr(e)}}}default:return{}}}}},br=new Set([`left`,`top`]);async function xr(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=qn(n),s=Jn(n),c=Zn(n)===`y`,l=br.has(o)?-1:1,u=a&&c?-1:1,d=Kn(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}}let Sr=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n,r;let{x:i,y:a,placement:o,middlewareData:s}=t,c=await xr(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},Cr=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}=Kn(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Zn(qn(i)),p=Yn(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Gn(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Gn(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},wr=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Kn(e,t),u={x:n,y:r},d=Zn(i),f=Yn(d),p=u[f],m=u[d],h=Kn(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var _,v;let e=f===`y`?`width`:`height`,t=br.has(qn(i)),n=a.reference[d]-a.floating[e]+(t&&((_=o.offset)==null?void 0:_[d])||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:((v=o.offset)==null?void 0:v[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Tr=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Kn(e,t),u=await o.detectOverflow(t,l),d=qn(i),f=Jn(i),p=Zn(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Bn(h-u[g],v),x=Bn(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=J(u.left,0),t=J(u.right,0),n=J(u.top,0),r=J(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:J(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:J(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Er(){return typeof window<`u`}function Dr(e){return kr(e)?(e.nodeName||``).toLowerCase():`#document`}function Y(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Or(e){var t;return(t=(kr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kr(e){return Er()?e instanceof Node||e instanceof Y(e).Node:!1}function Ar(e){return Er()?e instanceof Element||e instanceof Y(e).Element:!1}function jr(e){return Er()?e instanceof HTMLElement||e instanceof Y(e).HTMLElement:!1}function Mr(e){return!Er()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}function Nr(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Wr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Pr(e){return/^(table|td|th)$/.test(Dr(e))}function Fr(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}let Ir=/transform|translate|scale|rotate|perspective|filter/,Lr=/paint|layout|strict|content/,Rr=e=>!!e&&e!==`none`,zr;function Br(e){let t=Ar(e)?Wr(e):e;return Rr(t.transform)||Rr(t.translate)||Rr(t.scale)||Rr(t.rotate)||Rr(t.perspective)||!Hr()&&(Rr(t.backdropFilter)||Rr(t.filter))||Ir.test(t.willChange||``)||Lr.test(t.contain||``)}function Vr(e){let t=Kr(e);for(;jr(t)&&!Ur(t);){if(Br(t))return t;if(Fr(t))return null;t=Kr(t)}return null}function Hr(){return zr==null&&(zr=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`)),zr}function Ur(e){return/^(html|body|#document)$/.test(Dr(e))}function Wr(e){return Y(e).getComputedStyle(e)}function Gr(e){return Ar(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kr(e){if(Dr(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Mr(e)&&e.host||Or(e);return Mr(t)?t.host:t}function qr(e){let t=Kr(e);return Ur(t)?e.ownerDocument?e.ownerDocument.body:e.body:jr(t)&&Nr(t)?t:qr(t)}function Jr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let i=qr(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Y(i);if(a){let e=Yr(o);return t.concat(o,o.visualViewport||[],Nr(i)?i:[],e&&n?Jr(e):[])}else return t.concat(i,Jr(i,[],n))}function Yr(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xr(e){let t=Wr(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=jr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Vn(n)!==a||Vn(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Zr(e){return Ar(e)?e:e.contextElement}function Qr(e){let t=Zr(e);if(!jr(t))return Un(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Xr(t),o=(a?Vn(n.width):n.width)/r,s=(a?Vn(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}let $r=Un(0);function ei(e){let t=Y(e);return!Hr()||!t.visualViewport?$r:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ti(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Y(e)?!1:t}function ni(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Zr(e),o=Un(1);t&&(r?Ar(r)&&(o=Qr(r)):o=Qr(e));let s=ti(a,n,r)?ei(a):Un(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){let e=Y(a),t=r&&Ar(r)?Y(r):r,n=e,i=Yr(n);for(;i&&r&&t!==n;){let e=Qr(i),t=i.getBoundingClientRect(),r=Wr(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=Y(i),i=Yr(n)}}return dr({width:u,height:d,x:c,y:l})}function ri(e,t){let n=Gr(e).scrollLeft;return t?t.left+n:ni(Or(e)).left+n}function ii(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ri(e,n),y:n.top+t.scrollTop}}function ai(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Or(r),s=t?Fr(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Un(1),u=Un(0),d=jr(r);if((d||!d&&!a)&&((Dr(r)!==`body`||Nr(o))&&(c=Gr(r)),d)){let e=ni(r);l=Qr(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ii(o,c):Un(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 oi(e){return Array.from(e.getClientRects())}function si(e){let t=Or(e),n=Gr(e),r=e.ownerDocument.body,i=J(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=J(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+ri(e),s=-n.scrollTop;return Wr(r).direction===`rtl`&&(o+=J(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function ci(e,t){let n=Y(e),r=Or(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Hr();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=ri(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=25&&(a-=o)}else l<=25&&(a+=l);return{width:a,height:o,x:s,y:c}}function li(e,t){let n=ni(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=jr(e)?Qr(e):Un(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function ui(e,t,n){let r;if(t===`viewport`)r=ci(e,n);else if(t===`document`)r=si(Or(e));else if(Ar(t))r=li(t,n);else{let n=ei(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return dr(r)}function di(e,t){let n=Kr(e);return n===t||!Ar(n)||Ur(n)?!1:Wr(n).position===`fixed`||di(n,t)}function fi(e,t){let n=t.get(e);if(n)return n;let r=Jr(e,[],!1).filter(e=>Ar(e)&&Dr(e)!==`body`),i=null,a=Wr(e).position===`fixed`,o=a?Kr(e):e;for(;Ar(o)&&!Ur(o);){let t=Wr(o),n=Br(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Nr(o)&&!n&&di(e,o))?r=r.filter(e=>e!==o):i=t,o=Kr(o)}return t.set(e,r),r}function pi(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Fr(t)?[]:fi(t,this._c):[].concat(n),r],o=ui(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=ui(t,a[e],i);s=J(n.top,s),c=Bn(n.right,c),l=Bn(n.bottom,l),u=J(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function mi(e){let{width:t,height:n}=Xr(e);return{width:t,height:n}}function hi(e,t,n){let r=jr(t),i=Or(t),a=n===`fixed`,o=ni(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Un(0);function l(){c.x=ri(i)}if(r||!r&&!a)if((Dr(t)!==`body`||Nr(i))&&(s=Gr(t)),r){let e=ni(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?ii(i,s):Un(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function gi(e){return Wr(e).position===`static`}function _i(e,t){if(!jr(e)||Wr(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Or(e)===n&&(n=n.ownerDocument.body),n}function vi(e,t){let n=Y(e);if(Fr(e))return n;if(!jr(e)){let t=Kr(e);for(;t&&!Ur(t);){if(Ar(t)&&!gi(t))return t;t=Kr(t)}return n}let r=_i(e,t);for(;r&&Pr(r)&&gi(r);)r=_i(r,t);return r&&Ur(r)&&gi(r)&&!Br(r)?n:r||Vr(e)||n}let yi=async function(e){let t=this.getOffsetParent||vi,n=this.getDimensions,r=await n(e.floating);return{reference:hi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bi(e){return Wr(e).direction===`rtl`}let xi={convertOffsetParentRelativeRectToViewportRelativeRect:ai,getDocumentElement:Or,getClippingRect:pi,getOffsetParent:vi,getElementRects:yi,getClientRects:oi,getDimensions:mi,getScale:Qr,isElement:Ar,isRTL:bi};function Si(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ci(e,t){let n=null,r,i=Or(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Hn(d),h=Hn(i.clientWidth-(u+f)),g=Hn(i.clientHeight-(d+p)),_=Hn(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:J(0,Bn(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Si(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function wi(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=Zr(e),u=i||a?[...l?Jr(l):[],...t?Jr(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ci(l,n):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?ni(e):null;c&&g();function g(){let t=ni(e);h&&!Si(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==null||d(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}let Ti=Sr,Ei=Cr,Di=gr,Oi=Tr,ki=yr,Ai=hr,ji=wr,Mi=(e,t,n)=>{let r=new Map,i={platform:xi,...n},a={...i.platform,_c:r};return mr(e,t,{...i,platform:a})};var Ni=typeof document<`u`?p.useLayoutEffect:function(){};function Pi(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(!Pi(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)&&!Pi(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Fi(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ii(e,t){let n=Fi(e);return Math.round(t*n)/n}function Li(e){let t=p.useRef(e);return Ni(()=>{t.current=e}),t}function Ri(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]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=p.useState(r);Pi(f,r)||h(r);let[g,_]=p.useState(null),[v,y]=p.useState(null),b=p.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=p.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=o||v,w=p.useRef(null),T=p.useRef(null),E=p.useRef(u),D=c!=null,O=Li(c),k=Li(i),A=Li(l),j=p.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),Mi(w.current,T.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Pi(E.current,t)&&(E.current=t,m.flushSync(()=>{d(t)}))})},[f,t,n,k,A]);Ni(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let M=p.useRef(!1);Ni(()=>(M.current=!0,()=>{M.current=!1}),[]),Ni(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,j);j()}},[S,C,j,O,D]);let N=p.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),P=p.useMemo(()=>({reference:S,floating:C}),[S,C]),F=p.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Ii(P.floating,u.x),r=Ii(P.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Fi(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,u.x,u.y]);return p.useMemo(()=>({...u,update:j,refs:N,elements:P,floatingStyles:F}),[u,j,N,P,F])}let zi=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Ai({element:r.current,padding:i}).fn(n):r?Ai({element:r,padding:i}).fn(n):{}}}},Bi=(e,t)=>({...Ti(e),options:[e,t]}),Vi=(e,t)=>({...Ei(e),options:[e,t]}),Hi=(e,t)=>({...ji(e),options:[e,t]}),Ui=(e,t)=>({...Di(e),options:[e,t]}),Wi=(e,t)=>({...Oi(e),options:[e,t]}),Gi=(e,t)=>({...ki(e),options:[e,t]}),Ki=(e,t)=>({...zi(e),options:[e,t]});var qi=`Arrow`,Ji=p.forwardRef((e,t)=>{let{children:r,width:i=10,height:a=5,...o}=e;return(0,n.jsx)(q.svg,{...o,ref:t,width:i,height:a,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?r:(0,n.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Ji.displayName=qi;var Yi=Ji;function Xi(e){let[t,n]=p.useState(void 0);return Wt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Zi=`Popper`,[Qi,$i]=Vt(Zi),[ea,ta]=Qi(Zi),na=e=>{let{__scopePopper:t,children:r}=e,[i,a]=p.useState(null),[o,s]=p.useState(void 0);return(0,n.jsx)(ea,{scope:t,anchor:i,onAnchorChange:a,placementState:o,setPlacementState:s,children:r})};na.displayName=Zi;var ra=`PopperAnchor`,ia=p.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:i,...a}=e,o=ta(ra,r),s=p.useRef(null),c=o.onAnchorChange,l=W(t,p.useCallback(e=>{s.current=e,e&&c(e)},[c])),u=p.useRef(null);p.useEffect(()=>{if(!i)return;let e=u.current;u.current=i.current,e!==u.current&&c(u.current)});let d=o.placementState&&ma(o.placementState),f=d==null?void 0:d[0],m=d==null?void 0:d[1];return i?null:(0,n.jsx)(q.div,{"data-radix-popper-side":f,"data-radix-popper-align":m,...a,ref:l})});ia.displayName=ra;var aa=`PopperContent`,[oa,sa]=Qi(aa),ca=p.forwardRef((e,t)=>{var r,i,a,o,s,c,l,u;let{__scopePopper:d,side:f=`bottom`,sideOffset:m=0,align:h=`center`,alignOffset:g=0,arrowPadding:_=0,avoidCollisions:v=!0,collisionBoundary:y=[],collisionPadding:b=0,sticky:x=`partial`,hideWhenDetached:S=!1,updatePositionStrategy:C=`optimized`,onPlaced:w,...T}=e,E=ta(aa,d),[D,O]=p.useState(null),k=W(t,O),[A,j]=p.useState(null),M=Xi(A),N=(r=M==null?void 0:M.width)==null?0:r,P=(i=M==null?void 0:M.height)==null?0:i,F=f+(h===`center`?``:`-`+h),I=typeof b==`number`?b:{top:0,right:0,bottom:0,left:0,...b},L=Array.isArray(y)?y:[y],R=L.length>0,z={padding:I,boundary:L.filter(fa),altBoundary:R},{refs:ee,floatingStyles:te,placement:ne,isPositioned:re,middlewareData:ie}=Ri({strategy:`fixed`,placement:F,whileElementsMounted:(...e)=>wi(...e,{animationFrame:C===`always`}),elements:{reference:E.anchor},middleware:[Bi({mainAxis:m+P,alignmentAxis:g}),v&&Vi({mainAxis:!0,crossAxis:!1,limiter:x===`partial`?Hi():void 0,...z}),v&&Ui({...z}),Wi({...z,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),A&&Ki({element:A,padding:_}),pa({arrowWidth:N,arrowHeight:P}),S&&Gi({strategy:`referenceHidden`,...z,boundary:R?z.boundary:void 0})]}),ae=E.setPlacementState;Wt(()=>(ae(ne),()=>{ae(void 0)}),[ne,ae]);let[oe,se]=ma(ne),ce=en(w);Wt(()=>{re&&(ce==null||ce())},[re,ce]);let le=(a=ie.arrow)==null?void 0:a.x,ue=(o=ie.arrow)==null?void 0:o.y,de=((s=ie.arrow)==null?void 0:s.centerOffset)!==0,[fe,pe]=p.useState();return Wt(()=>{D&&pe(window.getComputedStyle(D).zIndex)},[D]),(0,n.jsx)(`div`,{ref:ee.setFloating,"data-radix-popper-content-wrapper":``,style:{...te,transform:re?te.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:fe,"--radix-popper-transform-origin":[(c=ie.transformOrigin)==null?void 0:c.x,(l=ie.transformOrigin)==null?void 0:l.y].join(` `),...((u=ie.hide)==null?void 0:u.referenceHidden)&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,n.jsx)(oa,{scope:d,placedSide:oe,placedAlign:se,onArrowChange:j,arrowX:le,arrowY:ue,shouldHideArrow:de,children:(0,n.jsx)(q.div,{"data-side":oe,"data-align":se,...T,ref:k,style:{...T.style,animation:re?void 0:`none`}})})})});ca.displayName=aa;var la=`PopperArrow`,ua={top:`bottom`,right:`left`,bottom:`top`,left:`right`},da=p.forwardRef(function(e,t){let{__scopePopper:r,...i}=e,a=sa(la,r),o=ua[a.placedSide];return(0,n.jsx)(`span`,{ref:a.onArrowChange,style:{position:`absolute`,left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[a.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[a.placedSide],visibility:a.shouldHideArrow?`hidden`:void 0},children:(0,n.jsx)(Yi,{...i,ref:t,style:{...i.style,display:`block`}})})});da.displayName=la;function fa(e){return e!==null}var pa=e=>({name:`transformOrigin`,options:e,fn(t){var n,r,i,a,o;let{placement:s,rects:c,middlewareData:l}=t,u=((n=l.arrow)==null?void 0:n.centerOffset)!==0,d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,m]=ma(s),h={start:`0%`,center:`50%`,end:`100%`}[m],g=((r=(i=l.arrow)==null?void 0:i.x)==null?0:r)+d/2,_=((a=(o=l.arrow)==null?void 0:o.y)==null?0:a)+f/2,v=``,y=``;return p===`bottom`?(v=u?h:`${g}px`,y=`${-f}px`):p===`top`?(v=u?h:`${g}px`,y=`${c.floating.height+f}px`):p===`right`?(v=`${-f}px`,y=u?h:`${_}px`):p===`left`&&(v=`${c.floating.width+f}px`,y=u?h:`${_}px`),{data:{x:v,y}}}});function ma(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var ha=na,ga=ia,_a=ca,va=da,ya=`Portal`,ba=p.forwardRef((e,t)=>{var r;let{container:i,...a}=e,[o,s]=p.useState(!1);Wt(()=>s(!0),[]);let c=i||o&&((r=globalThis)==null||(r=r.document)==null?void 0:r.body);return c?m.createPortal((0,n.jsx)(q.div,{...a,ref:t}),c):null});ba.displayName=ya;function xa(e,t){return p.useReducer((e,n)=>{let r=t[e][n];return r==null?e:r},e)}var X=e=>{let{present:t,children:n}=e,r=Sa(t),i=typeof n==`function`?n({present:r.isPresent}):p.Children.only(n),a=wa(r.ref,Ea(i));return typeof n==`function`||r.isPresent?p.cloneElement(i,{ref:a}):null};X.displayName=`Presence`;function Sa(e){let[t,n]=p.useState(),r=p.useRef(null),i=p.useRef(e),a=p.useRef(`none`),[o,s]=xa(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return p.useEffect(()=>{let e=Ta(r.current);a.current=o===`mounted`?e:`none`},[o]),Wt(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Ta(t);e?s(`MOUNT`):o===`none`||(t==null?void 0:t.display)===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Wt(()=>{if(t){var e;let n,o=(e=t.ownerDocument.defaultView)==null?window:e,c=e=>{let a=Ta(r.current).includes(CSS.escape(e.animationName));if(e.target===t&&a&&(s(`ANIMATION_END`),!i.current)){let e=t.style.animationFillMode;t.style.animationFillMode=`forwards`,n=o.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=e)})}},l=e=>{e.target===t&&(a.current=Ta(r.current))};return t.addEventListener(`animationstart`,l),t.addEventListener(`animationcancel`,c),t.addEventListener(`animationend`,c),()=>{o.clearTimeout(n),t.removeEventListener(`animationstart`,l),t.removeEventListener(`animationcancel`,c),t.removeEventListener(`animationend`,c)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:p.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Ca(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function wa(...e){let t=p.useRef(e);return t.current=e,p.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Ca(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Ca(n[e],null)}}},[])}function Ta(e){return(e==null?void 0:e.animationName)||`none`}function Ea(e){var t,n;let r=(t=Object.getOwnPropertyDescriptor(e.props,`ref`))==null?void 0:t.get,i=r&&`isReactWarning`in r&&r.isReactWarning;return i?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,`ref`))==null?void 0:n.get,i=r&&`isReactWarning`in r&&r.isReactWarning,i?e.props.ref:e.props.ref||e.ref)}var Da=`rovingFocusGroup.onEntryFocus`,Oa={bubbles:!1,cancelable:!0},ka=`RovingFocusGroup`,[Aa,ja,Ma]=$t(ka),[Na,Pa]=Vt(ka,[Ma]),[Fa,Ia]=Na(ka),La=p.forwardRef((e,t)=>(0,n.jsx)(Aa.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,n.jsx)(Aa.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,n.jsx)(Ra,{...e,ref:t})})}));La.displayName=ka;var Ra=p.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:i,loop:a=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,m=p.useRef(null),h=W(t,m),g=Lt(o),[_,v]=Yt({prop:s,defaultProp:c==null?null:c,onChange:l,caller:ka}),[y,b]=p.useState(!1),x=en(u),S=ja(r),C=p.useRef(!1),[w,T]=p.useState(0);return p.useEffect(()=>{let e=m.current;if(e)return e.addEventListener(Da,x),()=>e.removeEventListener(Da,x)},[x]),(0,n.jsx)(Fa,{scope:r,orientation:i,dir:g,loop:a,currentTabStopId:_,onItemFocus:p.useCallback(e=>v(e),[v]),onItemShiftTab:p.useCallback(()=>b(!0),[]),onFocusableItemAdd:p.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:p.useCallback(()=>T(e=>e-1),[]),children:(0,n.jsx)(q.div,{tabIndex:y||w===0?-1:0,"data-orientation":i,...f,ref:h,style:{outline:`none`,...e.style},onMouseDown:K(e.onMouseDown,()=>{C.current=!0}),onFocus:K(e.onFocus,e=>{let t=!C.current;if(e.target===e.currentTarget&&t&&!y){let t=new CustomEvent(Da,Oa);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);Wa([e.find(e=>e.active),e.find(e=>e.id===_),...e].filter(Boolean).map(e=>e.ref.current),d)}}C.current=!1}),onBlur:K(e.onBlur,()=>b(!1))})})}),za=`RovingFocusGroupItem`,Ba=p.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:i=!0,active:a=!1,tabStopId:o,children:s,...c}=e,l=Rn(),u=o||l,d=Ia(za,r),f=d.currentTabStopId===u,m=ja(r),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:_}=d;return p.useEffect(()=>{if(i)return h(),()=>g()},[i,h,g]),(0,n.jsx)(Aa.ItemSlot,{scope:r,id:u,focusable:i,active:a,children:(0,n.jsx)(q.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:K(e.onMouseDown,e=>{i?d.onItemFocus(u):e.preventDefault()}),onFocus:K(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:K(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){d.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Ua(e,d.orientation,d.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=m().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=d.loop?Ga(n,r+1):n.slice(r+1)}setTimeout(()=>Wa(n))}}),children:typeof s==`function`?s({isCurrentTabStop:f,hasTabStop:_!=null}):s})})});Ba.displayName=za;var Va={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Ha(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Ua(e,t,n){let r=Ha(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Va[r]}function Wa(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Ga(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ka=La,qa=Ba,Ja=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Ya=new WeakMap,Xa=new WeakMap,Za={},Qa=0,$a=function(e){return e&&(e.host||$a(e.parentNode))},eo=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=$a(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},to=function(e,t,n,r){var i=eo(t,Array.isArray(e)?e:[e]);Za[n]||(Za[n]=new WeakMap);var a=Za[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Ya.get(e)||0)+1,l=(a.get(e)||0)+1;Ya.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Xa.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Qa++,function(){o.forEach(function(e){var t=Ya.get(e)-1,i=a.get(e)-1;Ya.set(e,t),a.set(e,i),t||(Xa.has(e)||e.removeAttribute(r),Xa.delete(e)),i||e.removeAttribute(n)}),Qa--,Qa||(Ya=new WeakMap,Ya=new WeakMap,Xa=new WeakMap,Za={})}},no=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ja(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),to(r,i,n,`aria-hidden`)):function(){return null}},ro=function(){return ro=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},ro.apply(this,arguments)};function io(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function ao(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var oo=`right-scroll-bar-position`,so=`width-before-scroll-bar`,co=`with-scroll-bars-hidden`,lo=`--removed-body-scroll-bar-size`;function uo(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function fo(e,n){var r=(0,t.useState)(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(e){var t=r.value;t!==e&&(r.value=e,r.callback(e,t))}}}})[0];return r.callback=n,r.facade}var po=typeof window<`u`?t.useLayoutEffect:t.useEffect,mo=new WeakMap;function ho(e,t){var n=fo(t||null,function(t){return e.forEach(function(e){return uo(e,t)})});return po(function(){var t=mo.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||uo(e,null)}),i.forEach(function(e){r.has(e)||uo(e,a)})}mo.set(n,e)},[e]),n}function go(e){return e}function _o(e,t){t===void 0&&(t=go);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function vo(e){e===void 0&&(e={});var t=_o(null);return t.options=ro({async:!0,ssr:!1},e),t}var yo=function(e){var n=e.sideCar,r=io(e,[`sideCar`]);if(!n)throw Error("Sidecar: please provide `sideCar` property to import the right car");var i=n.read();if(!i)throw Error(`Sidecar medium not found`);return t.createElement(i,ro({},r))};yo.isSideCarExport=!0;function bo(e,t){return e.useMedium(t),yo}var xo=vo(),So=function(){},Co=t.forwardRef(function(e,n){var r=t.useRef(null),i=t.useState({onScrollCapture:So,onWheelCapture:So,onTouchMoveCapture:So}),a=i[0],o=i[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=io(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=ho([r,n]),w=ro(ro({},x),a);return t.createElement(t.Fragment,null,d&&t.createElement(S,{sideCar:xo,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!_,lockRef:r,gapMode:b}),s?t.cloneElement(t.Children.only(c),ro(ro({},w),{ref:C})):t.createElement(y,ro({},w,{className:l,ref:C}),c))});Co.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Co.classNames={fullWidth:so,zeroRight:oo};var wo,To=function(){if(wo)return wo;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Eo(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=To();return t&&e.setAttribute(`nonce`,t),e}function Do(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Oo(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var ko=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Eo())&&(Do(t,n),Oo(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ao=function(){var e=ko();return function(n,r){t.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},jo=function(){var e=Ao();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Mo={left:0,top:0,right:0,gap:0},No=function(e){return parseInt(e||``,10)||0},Po=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[No(n),No(r),No(i)]},Fo=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Mo;var t=Po(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Io=jo(),Lo=`data-scroll-locked`,Ro=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
|
+
.${co} {
|
|
3
3
|
overflow: hidden ${r};
|
|
4
4
|
padding-right: ${s}px ${r};
|
|
5
5
|
}
|
|
6
|
-
body[${
|
|
6
|
+
body[${Lo}] {
|
|
7
7
|
overflow: hidden ${r};
|
|
8
8
|
overscroll-behavior: contain;
|
|
9
9
|
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
@@ -16,47 +16,43 @@
|
|
|
16
16
|
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.${
|
|
19
|
+
.${oo} {
|
|
20
20
|
right: ${s}px ${r};
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.${
|
|
23
|
+
.${so} {
|
|
24
24
|
margin-right: ${s}px ${r};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.${
|
|
27
|
+
.${oo} .${oo} {
|
|
28
28
|
right: 0 ${r};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.${
|
|
31
|
+
.${so} .${so} {
|
|
32
32
|
margin-right: 0 ${r};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
body[${
|
|
36
|
-
${
|
|
35
|
+
body[${Lo}] {
|
|
36
|
+
${lo}: ${s}px;
|
|
37
37
|
}
|
|
38
|
-
`},
|
|
38
|
+
`},zo=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Bo=function(){t.useEffect(function(){return document.body.setAttribute(Lo,(zo()+1).toString()),function(){var e=zo()-1;e<=0?document.body.removeAttribute(Lo):document.body.setAttribute(Lo,e.toString())}},[])},Vo=function(e){var n=e.noRelative,r=e.noImportant,i=e.gapMode,a=i===void 0?`margin`:i;Bo();var o=t.useMemo(function(){return Fo(a)},[a]);return t.createElement(Io,{styles:Ro(o,!n,a,r?``:`!important`)})},Ho=!1;if(typeof window<`u`)try{var Uo=Object.defineProperty({},"passive",{get:function(){return Ho=!0,!0}});window.addEventListener(`test`,Uo,Uo),window.removeEventListener(`test`,Uo,Uo)}catch{Ho=!1}var Wo=Ho?{passive:!1}:!1,Go=function(e){return e.tagName===`TEXTAREA`},Ko=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Go(e)&&n[t]===`visible`)},qo=function(e){return Ko(e,`overflowY`)},Jo=function(e){return Ko(e,`overflowX`)},Yo=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Qo(e,r)){var i=$o(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Xo=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Zo=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Qo=function(e,t){return e===`v`?qo(t):Jo(t)},$o=function(e,t){return e===`v`?Xo(t):Zo(t)},es=function(e,t){return e===`h`&&t===`rtl`?-1:1},ts=function(e,t,n,r,i){var a=es(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=$o(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Qo(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},ns=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},rs=function(e){return[e.deltaX,e.deltaY]},is=function(e){return e&&`current`in e?e.current:e},as=function(e,t){return e[0]===t[0]&&e[1]===t[1]},os=function(e){return`
|
|
39
39
|
.block-interactivity-${e} {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
41
|
-
`},as=0,os=[];function ss(e){var n=t.useRef([]),r=t.useRef([0,0]),i=t.useRef(),a=t.useState(as++)[0],o=t.useState(ko)[0],s=t.useRef(e);t.useEffect(function(){s.current=e},[e]),t.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${a}`);var t=ro([e.lockRef.current],(e.shards||[]).map(ns),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${a}`)}),function(){document.body.classList.remove(`block-interactivity-${a}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${a}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=t.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var n=es(e),a=r.current,o=`deltaX`in e?e.deltaX:a[0]-n[0],c=`deltaY`in e?e.deltaY:a[1]-n[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=qo(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=qo(d,u)),!m)return!1;if(!i.current&&`changedTouches`in e&&(o||c)&&(i.current=l),!l)return!0;var h=i.current||l;return $o(h,t,e,h===`h`?o:c,!0)},[]),l=t.useCallback(function(e){var t=e;if(!(!os.length||os[os.length-1]!==o)){var r=`deltaY`in t?ts(t):es(t),i=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&rs(e.delta,r)})[0];if(i&&i.should){t.cancelable&&t.preventDefault();return}if(!i){var a=(s.current.shards||[]).map(ns).filter(Boolean).filter(function(e){return e.contains(t.target)});(a.length>0?c(t,a[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),u=t.useCallback(function(e,t,r,i){var a={name:e,delta:t,target:r,should:i,shadowParent:cs(r)};n.current.push(a),setTimeout(function(){n.current=n.current.filter(function(e){return e!==a})},1)},[]),d=t.useCallback(function(e){r.current=es(e),i.current=void 0},[]),f=t.useCallback(function(t){u(t.type,ts(t),t.target,c(t,e.lockRef.current))},[]),p=t.useCallback(function(t){u(t.type,es(t),t.target,c(t,e.lockRef.current))},[]);t.useEffect(function(){return os.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,Ho),document.addEventListener(`touchmove`,l,Ho),document.addEventListener(`touchstart`,d,Ho),function(){os=os.filter(function(e){return e!==o}),document.removeEventListener(`wheel`,l,Ho),document.removeEventListener(`touchmove`,l,Ho),document.removeEventListener(`touchstart`,d,Ho)}},[]);var m=e.removeScrollBar,h=e.inert;return t.createElement(t.Fragment,null,h?t.createElement(o,{styles:is(a)}):null,m?t.createElement(zo,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function cs(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ls=vo(yo,ss),us=t.forwardRef(function(e,n){return t.createElement(xo,to({},e,{ref:n,sideCar:ls}))});us.classNames=xo.classNames;var ds=[`Enter`,` `],fs=[`ArrowDown`,`PageUp`,`Home`],ps=[`ArrowUp`,`PageDown`,`End`],ms=[...fs,...ps],hs={ltr:[...ds,`ArrowRight`],rtl:[...ds,`ArrowLeft`]},gs={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},_s=`Menu`,[vs,ys,bs]=Zt(_s),[xs,Ss]=Ht(_s,[bs,Zi,Ma]),Cs=Zi(),ws=Ma(),[Ts,Es]=xs(_s),[Ds,Os]=xs(_s),ks=e=>{let{__scopeMenu:t,open:r=!1,children:i,dir:a,onOpenChange:o,modal:s=!0}=e,c=Cs(t),[l,u]=p.useState(null),d=p.useRef(!1),f=Qt(o),m=Rt(a);return p.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,n.jsx)(pa,{...c,children:(0,n.jsx)(Ts,{scope:t,open:r,onOpenChange:f,content:l,onContentChange:u,children:(0,n.jsx)(Ds,{scope:t,onClose:p.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:m,modal:s,children:i})})})};ks.displayName=_s;var As=`MenuAnchor`,js=p.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e,a=Cs(r);return(0,n.jsx)(ma,{...a,...i,ref:t})});js.displayName=As;var Ms=`MenuPortal`,[Ns,Ps]=xs(Ms,{forceMount:void 0}),Fs=e=>{let{__scopeMenu:t,forceMount:r,children:i,container:a}=e,o=Es(Ms,t);return(0,n.jsx)(Ns,{scope:t,forceMount:r,children:(0,n.jsx)(X,{present:r||o.open,children:(0,n.jsx)(va,{asChild:!0,container:a,children:i})})})};Fs.displayName=Ms;var Is=`MenuContent`,[Ls,Rs]=xs(Is),zs=p.forwardRef((e,t)=>{let r=Ps(Is,e.__scopeMenu),{forceMount:i=r.forceMount,...a}=e,o=Es(Is,e.__scopeMenu),s=Os(Is,e.__scopeMenu);return(0,n.jsx)(vs.Provider,{scope:e.__scopeMenu,children:(0,n.jsx)(X,{present:i||o.open,children:(0,n.jsx)(vs.Slot,{scope:e.__scopeMenu,children:s.modal?(0,n.jsx)(Bs,{...a,ref:t}):(0,n.jsx)(Vs,{...a,ref:t})})})})}),Bs=p.forwardRef((e,t)=>{let r=Es(Is,e.__scopeMenu),i=p.useRef(null),a=W(t,i);return p.useEffect(()=>{let e=i.current;if(e)return eo(e)},[]),(0,n.jsx)(Us,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Vs=p.forwardRef((e,t)=>{let r=Es(Is,e.__scopeMenu);return(0,n.jsx)(Us,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Hs=bt(`MenuContent.ScrollLock`),Us=p.forwardRef((e,t)=>{let{__scopeMenu:r,loop:i=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=Es(Is,r),y=Os(Is,r),b=Cs(r),x=ws(r),S=ys(r),[C,w]=p.useState(null),T=p.useRef(null),E=W(t,T,v.onContentChange),D=p.useRef(0),O=p.useRef(``),k=p.useRef(0),A=p.useRef(null),j=p.useRef(`right`),M=p.useRef(0),N=g?us:p.Fragment,P=g?{as:Hs,allowPinchZoom:!0}:void 0,F=e=>{var t,n;let r=O.current+e,i=S().filter(e=>!e.disabled),a=document.activeElement,o=(t=i.find(e=>e.ref.current===a))==null?void 0:t.textValue,s=Dc(i.map(e=>e.textValue),r,o),c=(n=i.find(e=>e.textValue===s))==null?void 0:n.ref.current;(function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))})(r),c&&setTimeout(()=>c.focus())};p.useEffect(()=>()=>window.clearTimeout(D.current),[]),gn();let I=p.useCallback(e=>{var t,n;return j.current===((t=A.current)==null?void 0:t.side)&&kc(e,(n=A.current)==null?void 0:n.area)},[]);return(0,n.jsx)(Ls,{scope:r,searchRef:O,onItemEnter:p.useCallback(e=>{I(e)&&e.preventDefault()},[I]),onItemLeave:p.useCallback(e=>{var t;I(e)||((t=T.current)==null||t.focus(),w(null))},[I]),onTriggerLeave:p.useCallback(e=>{I(e)&&e.preventDefault()},[I]),pointerGraceTimerRef:k,onPointerGraceIntentChange:p.useCallback(e=>{A.current=e},[]),children:(0,n.jsx)(N,{...P,children:(0,n.jsx)(Sn,{asChild:!0,trapped:a,onMountAutoFocus:K(o,e=>{var t;e.preventDefault(),(t=T.current)==null||t.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,n.jsx)(sn,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:h,children:(0,n.jsx)(Wa,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:i,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:K(l,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,n.jsx)(ha,{role:`menu`,"aria-orientation":`vertical`,"data-state":Sc(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:K(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&F(e.key));let i=T.current;if(e.target!==i||!ms.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);ps.includes(e.key)&&a.reverse(),Tc(a)}),onBlur:K(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:K(e.onPointerMove,Ac(e=>{let t=e.target,n=M.current!==e.clientX;e.currentTarget.contains(t)&&n&&(j.current=e.clientX>M.current?`right`:`left`,M.current=e.clientX)}))})})})})})})});zs.displayName=Is;var Ws=`MenuGroup`,Gs=p.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e;return(0,n.jsx)(q.div,{role:`group`,...i,ref:t})});Gs.displayName=Ws;var Ks=`MenuLabel`,qs=p.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e;return(0,n.jsx)(q.div,{...i,ref:t})});qs.displayName=Ks;var Js=`MenuItem`,Ys=`menu.itemSelect`,Xs=p.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:i,...a}=e,o=p.useRef(null),s=Os(Js,e.__scopeMenu),c=Rs(Js,e.__scopeMenu),l=W(t,o),u=p.useRef(!1),d=()=>{let e=o.current;if(!r&&e){let t=new CustomEvent(Ys,{bubbles:!0,cancelable:!0});e.addEventListener(Ys,e=>i==null?void 0:i(e),{once:!0}),Xt(e,t),t.defaultPrevented?u.current=!1:s.onClose()}};return(0,n.jsx)(Zs,{...a,ref:l,disabled:r,onClick:K(e.onClick,d),onPointerDown:t=>{var n;(n=e.onPointerDown)==null||n.call(e,t),u.current=!0},onPointerUp:K(e.onPointerUp,e=>{var t;u.current||(t=e.currentTarget)==null||t.click()}),onKeyDown:K(e.onKeyDown,e=>{let t=c.searchRef.current!==``;r||t&&e.key===` `||ds.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Xs.displayName=Js;var Zs=p.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:i=!1,textValue:a,...o}=e,s=Rs(Js,r),c=ws(r),l=p.useRef(null),u=W(t,l),[d,f]=p.useState(!1),[m,h]=p.useState(``);return p.useEffect(()=>{let e=l.current;if(e){var t;h(((t=e.textContent)==null?``:t).trim())}},[o.children]),(0,n.jsx)(vs.ItemSlot,{scope:r,disabled:i,textValue:a==null?m:a,children:(0,n.jsx)(Ga,{asChild:!0,...c,focusable:!i,children:(0,n.jsx)(q.div,{role:`menuitem`,"data-highlighted":d?``:void 0,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,...o,ref:u,onPointerMove:K(e.onPointerMove,Ac(e=>{i?s.onItemLeave(e):(s.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,Ac(e=>s.onItemLeave(e))),onFocus:K(e.onFocus,()=>f(!0)),onBlur:K(e.onBlur,()=>f(!1))})})})}),Qs=`MenuCheckboxItem`,$s=p.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:i,...a}=e;return(0,n.jsx)(sc,{scope:e.__scopeMenu,checked:r,children:(0,n.jsx)(Xs,{role:`menuitemcheckbox`,"aria-checked":Cc(r)?`mixed`:r,...a,ref:t,"data-state":wc(r),onSelect:K(a.onSelect,()=>i==null?void 0:i(Cc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});$s.displayName=Qs;var ec=`MenuRadioGroup`,[tc,nc]=xs(ec,{value:void 0,onValueChange:()=>{}}),rc=p.forwardRef((e,t)=>{let{value:r,onValueChange:i,...a}=e,o=Qt(i);return(0,n.jsx)(tc,{scope:e.__scopeMenu,value:r,onValueChange:o,children:(0,n.jsx)(Gs,{...a,ref:t})})});rc.displayName=ec;var ic=`MenuRadioItem`,ac=p.forwardRef((e,t)=>{let{value:r,...i}=e,a=nc(ic,e.__scopeMenu),o=r===a.value;return(0,n.jsx)(sc,{scope:e.__scopeMenu,checked:o,children:(0,n.jsx)(Xs,{role:`menuitemradio`,"aria-checked":o,...i,ref:t,"data-state":wc(o),onSelect:K(i.onSelect,()=>{var e;return(e=a.onValueChange)==null?void 0:e.call(a,r)},{checkForDefaultPrevented:!1})})})});ac.displayName=ic;var oc=`MenuItemIndicator`,[sc,cc]=xs(oc,{checked:!1}),lc=p.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:i,...a}=e,o=cc(oc,r);return(0,n.jsx)(X,{present:i||Cc(o.checked)||o.checked===!0,children:(0,n.jsx)(q.span,{...a,ref:t,"data-state":wc(o.checked)})})});lc.displayName=oc;var uc=`MenuSeparator`,dc=p.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e;return(0,n.jsx)(q.div,{role:`separator`,"aria-orientation":`horizontal`,...i,ref:t})});dc.displayName=uc;var fc=`MenuArrow`,pc=p.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e,a=Cs(r);return(0,n.jsx)(ga,{...a,...i,ref:t})});pc.displayName=fc;var mc=`MenuSub`,[hc,gc]=xs(mc),_c=e=>{let{__scopeMenu:t,children:r,open:i=!1,onOpenChange:a}=e,o=Es(mc,t),s=Cs(t),[c,l]=p.useState(null),[u,d]=p.useState(null),f=Qt(a);return p.useEffect(()=>(o.open===!1&&f(!1),()=>f(!1)),[o.open,f]),(0,n.jsx)(pa,{...s,children:(0,n.jsx)(Ts,{scope:t,open:i,onOpenChange:f,content:u,onContentChange:d,children:(0,n.jsx)(hc,{scope:t,contentId:In(),triggerId:In(),trigger:c,onTriggerChange:l,children:r})})})};_c.displayName=mc;var vc=`MenuSubTrigger`,yc=p.forwardRef((e,t)=>{let r=Es(vc,e.__scopeMenu),i=Os(vc,e.__scopeMenu),a=gc(vc,e.__scopeMenu),o=Rs(vc,e.__scopeMenu),s=p.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},d=p.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return p.useEffect(()=>d,[d]),p.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]),(0,n.jsx)(js,{asChild:!0,...u,children:(0,n.jsx)(Zs,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":r.open,"aria-controls":r.open?a.contentId:void 0,"data-state":Sc(r.open),...e,ref:yt(t,a.onTriggerChange),onClick:t=>{var n;(n=e.onClick)==null||n.call(e,t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,Ac(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!r.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:K(e.onPointerLeave,Ac(e=>{var t;d();let n=(t=r.content)==null?void 0:t.getBoundingClientRect();if(n){var i;let t=(i=r.content)==null?void 0:i.dataset.side,a=t===`right`,s=a?-5:5,l=n[a?`left`:`right`],u=n[a?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+s,y:e.clientY},{x:l,y:n.top},{x:u,y:n.top},{x:u,y:n.bottom},{x:l,y:n.bottom}],side:t}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:K(e.onKeyDown,t=>{let n=o.searchRef.current!==``;if(!(e.disabled||n&&t.key===` `)&&hs[i.dir].includes(t.key)){var a;r.onOpenChange(!0),(a=r.content)==null||a.focus(),t.preventDefault()}})})})});yc.displayName=vc;var bc=`MenuSubContent`,xc=p.forwardRef((e,t)=>{let r=Ps(Is,e.__scopeMenu),{forceMount:i=r.forceMount,align:a=`start`,...o}=e,s=Es(Is,e.__scopeMenu),c=Os(Is,e.__scopeMenu),l=gc(bc,e.__scopeMenu),u=p.useRef(null),d=W(t,u);return(0,n.jsx)(vs.Provider,{scope:e.__scopeMenu,children:(0,n.jsx)(X,{present:i||s.open,children:(0,n.jsx)(vs.Slot,{scope:e.__scopeMenu,children:(0,n.jsx)(Us,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:d,align:a,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;c.isUsingKeyboardRef.current&&((t=u.current)==null||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:K(e.onFocusOutside,e=>{e.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:K(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:K(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=gs[c.dir].includes(e.key);if(t&&n){var r;s.onOpenChange(!1),(r=l.trigger)==null||r.focus(),e.preventDefault()}})})})})})});xc.displayName=bc;function Sc(e){return e?`open`:`closed`}function Cc(e){return e===`indeterminate`}function wc(e){return Cc(e)?`indeterminate`:e?`checked`:`unchecked`}function Tc(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Ec(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Dc(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Ec(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Oc(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function kc(e,t){return t?Oc({x:e.clientX,y:e.clientY},t):!1}function Ac(e){return t=>t.pointerType===`mouse`?e(t):void 0}var jc=ks,Mc=js,Nc=Fs,Pc=zs,Fc=Gs,Ic=qs,Lc=Xs,Rc=$s,zc=rc,Bc=ac,Vc=lc,Hc=dc,Uc=pc,Wc=_c,Gc=yc,Kc=xc,qc=`DropdownMenu`,[Jc,Yc]=Ht(qc,[Ss]),Z=Ss(),[Xc,Zc]=Jc(qc),Qc=e=>{let{__scopeDropdownMenu:t,children:r,dir:i,open:a,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,l=Z(t),u=p.useRef(null),[d,f]=qt({prop:a,defaultProp:o==null?!1:o,onChange:s,caller:qc});return(0,n.jsx)(Xc,{scope:t,triggerId:In(),triggerRef:u,contentId:In(),open:d,onOpenChange:f,onOpenToggle:p.useCallback(()=>f(e=>!e),[f]),modal:c,children:(0,n.jsx)(jc,{...l,open:d,onOpenChange:f,dir:i,modal:c,children:r})})};Qc.displayName=qc;var $c=`DropdownMenuTrigger`,el=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:i=!1,...a}=e,o=Zc($c,r),s=Z(r);return(0,n.jsx)(Mc,{asChild:!0,...s,children:(0,n.jsx)(q.button,{type:`button`,id:o.triggerId,"aria-haspopup":`menu`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?`open`:`closed`,"data-disabled":i?``:void 0,disabled:i,...a,ref:yt(t,o.triggerRef),onPointerDown:K(e.onPointerDown,e=>{!i&&e.button===0&&e.ctrlKey===!1&&(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:K(e.onKeyDown,e=>{i||([`Enter`,` `].includes(e.key)&&o.onOpenToggle(),e.key===`ArrowDown`&&o.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});el.displayName=$c;var tl=`DropdownMenuPortal`,nl=e=>{let{__scopeDropdownMenu:t,...r}=e,i=Z(t);return(0,n.jsx)(Nc,{...i,...r})};nl.displayName=tl;var rl=`DropdownMenuContent`,il=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Zc(rl,r),o=Z(r),s=p.useRef(!1);return(0,n.jsx)(Pc,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...i,ref:t,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{var t;s.current||(t=a.triggerRef.current)==null||t.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:K(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!a.modal||r)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});il.displayName=rl;var al=`DropdownMenuGroup`,ol=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Fc,{...a,...i,ref:t})});ol.displayName=al;var sl=`DropdownMenuLabel`,cl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Ic,{...a,...i,ref:t})});cl.displayName=sl;var ll=`DropdownMenuItem`,ul=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Lc,{...a,...i,ref:t})});ul.displayName=ll;var dl=`DropdownMenuCheckboxItem`,fl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Rc,{...a,...i,ref:t})});fl.displayName=dl;var pl=`DropdownMenuRadioGroup`,ml=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(zc,{...a,...i,ref:t})});ml.displayName=pl;var hl=`DropdownMenuRadioItem`,gl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Bc,{...a,...i,ref:t})});gl.displayName=hl;var _l=`DropdownMenuItemIndicator`,vl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Vc,{...a,...i,ref:t})});vl.displayName=_l;var yl=`DropdownMenuSeparator`,bl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Hc,{...a,...i,ref:t})});bl.displayName=yl;var xl=`DropdownMenuArrow`,Sl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Uc,{...a,...i,ref:t})});Sl.displayName=xl;var Cl=e=>{let{__scopeDropdownMenu:t,children:r,open:i,onOpenChange:a,defaultOpen:o}=e,s=Z(t),[c,l]=qt({prop:i,defaultProp:o==null?!1:o,onChange:a,caller:`DropdownMenuSub`});return(0,n.jsx)(Wc,{...s,open:c,onOpenChange:l,children:r})},wl=`DropdownMenuSubTrigger`,Tl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Gc,{...a,...i,ref:t})});Tl.displayName=wl;var El=`DropdownMenuSubContent`,Dl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Kc,{...a,...i,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Dl.displayName=El;var Ol=Qc,kl=el,Al=nl,jl=il,Ml=ul,Nl=fl,Pl=ml,Fl=gl,Il=vl,Ll=bl,Rl=Cl,zl=Tl,Bl=Dl;let Vl=`univer-scrollbar-thin univer-scrollbar-track-gray-50 univer-scrollbar-thumb-gray-300 dark:!univer-scrollbar-track-gray-900 dark:!univer-scrollbar-thumb-gray-700`,Hl=`univer-border-gray-200 dark:!univer-border-gray-600 univer-border-solid`,Q=U(Hl,`univer-border`),Ul=U(Hl,`univer-border-l univer-border-b univer-border-t-0 univer-border-r-0`),Wl=U(Hl,`univer-border-l univer-border-b-0 univer-border-t-0 univer-border-r-0`),Gl=U(Hl,`univer-border-b-0 univer-border-t-0 rtl:univer-border-l-0 rtl:univer-border-r`),Kl=U(Hl,`univer-border-l-0 univer-border-b-0 univer-border-t univer-border-r-0`),ql=U(Hl,`univer-border-l-0 univer-border-b univer-border-t-0 univer-border-r-0`),Jl=U(Hl,`univer-border-l-0 univer-border-b-0 univer-border-t-0 univer-border-r`);function Yl({...e}){return(0,n.jsx)(Ol,{"data-slot":`dropdown-menu`,...e})}function Xl({...e}){return(0,n.jsx)(Al,{"data-slot":`dropdown-menu-portal`,...e})}function Zl({...e}){return(0,n.jsx)(kl,{"data-slot":`dropdown-menu-trigger`,...e})}function Ql({...e}){return(0,n.jsx)(Rl,{"data-slot":`dropdown-menu-sub`,...e})}function $l({...e}){return(0,n.jsx)(Pl,{"data-slot":`dropdown-menu-radio-group`,...e})}function eu({className:e,inset:t,children:r,...i}){return(0,n.jsxs)(zl,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":t,className:U(`univer-flex univer-cursor-default univer-select-none univer-items-center univer-justify-between univer-gap-2 univer-rounded univer-px-2 univer-py-1.5 univer-text-sm univer-outline-none data-[state=open]:univer-bg-gray-100 focus:univer-bg-gray-100 dark:data-[state=open]:!univer-bg-gray-600 dark:focus:!univer-bg-gray-600 [&_svg]:univer-pointer-events-none [&_svg]:univer-size-4 [&_svg]:univer-shrink-0`,e),...i,children:[r,(0,n.jsx)(re,{className:`ml-auto`})]})}function tu({className:e,...t}){return(0,n.jsx)(Bl,{"data-slot":`dropdown-menu-sub-content`,className:U(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[side=bottom]:univer-slide-in-from-top-2 data-[side=left]:univer-slide-in-from-right-2 data-[side=right]:univer-slide-in-from-left-2 data-[side=top]:univer-slide-in-from-bottom-2 univer-z-[1080] univer-box-border univer-max-h-[--radix-popper-available-height] univer-overflow-y-auto univer-rounded-md univer-bg-white univer-p-1.5 univer-text-gray-900 univer-shadow-md dark:!univer-bg-gray-700 dark:!univer-text-white`,Q,Vl,e),...t})}function nu({className:e,sideOffset:t=4,...r}){return(0,n.jsx)(Al,{children:(0,n.jsx)(jl,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:U(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[side=bottom]:univer-slide-in-from-top-2 data-[side=left]:univer-slide-in-from-right-2 data-[side=right]:univer-slide-in-from-left-2 data-[side=top]:univer-slide-in-from-bottom-2 univer-z-[1080] univer-box-border univer-max-h-[--radix-popper-available-height] univer-overflow-y-auto univer-rounded-md univer-bg-white univer-p-1.5 univer-text-gray-900 univer-shadow-md dark:!univer-bg-gray-700 dark:!univer-text-white`,Q,Vl,e),...r})})}function ru({className:e,inset:t,variant:r=`default`,...i}){return(0,n.jsx)(Ml,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":r,className:U(`univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center univer-gap-2 univer-rounded univer-px-2 univer-py-1.5 univer-text-sm univer-outline-none univer-transition-colors data-[disabled]:univer-pointer-events-none data-[variant=destructive]:univer-text-red-600 data-[disabled]:univer-opacity-50 focus:univer-bg-gray-100 data-[variant=destructive]:focus:univer-bg-red-50 dark:data-[variant=destructive]:!univer-text-red-400 dark:focus:!univer-bg-gray-600 dark:data-[variant=destructive]:focus:!univer-bg-red-900 [&>svg]:univer-size-4 [&>svg]:univer-shrink-0`,e),...i})}function iu({className:e,children:t,hideIndicator:r,checked:i,...a}){return(0,n.jsxs)(Nl,{"data-slot":`dropdown-menu-checkbox-item`,className:U(`univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center univer-rounded univer-py-1.5 univer-pr-2 univer-text-sm univer-outline-none univer-transition-colors data-[disabled]:univer-pointer-events-none data-[disabled]:univer-opacity-50 focus:univer-bg-gray-100 dark:focus:!univer-bg-gray-600`,{"univer-pl-8":!r,"univer-pl-2":r},e),checked:i,...a,children:[!r&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-2 univer-flex univer-size-3.5 univer-items-center univer-justify-center`,children:(0,n.jsx)(Il,{children:(0,n.jsx)(C,{className:`univer-block univer-size-4 univer-fill-current univer-text-primary-600`})})}),t]})}function au({className:e,children:t,hideIndicator:r,...i}){return(0,n.jsxs)(Fl,{"data-slot":`dropdown-menu-radio-item`,className:U(`univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center univer-rounded univer-py-1.5 univer-pr-2 univer-text-sm univer-outline-none univer-transition-colors data-[disabled]:univer-pointer-events-none data-[disabled]:univer-opacity-50 focus:univer-bg-gray-100 dark:focus:!univer-bg-gray-600`,{"univer-pl-8":!r,"univer-pl-2":r},e),...i,children:[!r&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-2 univer-flex univer-size-3.5 univer-items-center univer-justify-center`,children:(0,n.jsx)(Il,{children:(0,n.jsx)(C,{className:`univer-block univer-size-4 univer-fill-current univer-text-primary-600`})})}),t]})}function ou({className:e,...t}){return(0,n.jsx)(Ll,{className:U(`-univer-mx-1 univer-my-1 univer-h-px univer-bg-gray-200 dark:!univer-bg-gray-600`,e),...t})}function su(e){let{children:r,items:i,disabled:a,open:o,onOpenChange:s,...c}=e,[l,u]=(0,t.useState)(!1),d=o!==void 0,f=d?o:l;function p(e){a||(d||u(e),s==null||s(e))}function m(e,t){let{className:r,type:i}=e;if(i===`separator`)return(0,n.jsx)(ou,{className:r},t);if(i===`custom`)return(0,n.jsx)(`div`,{className:r,children:e.children},t);if(i===`radio`)return(0,n.jsx)($l,{className:r,value:e.value,onValueChange:e.onSelect,children:e.options.map((t,r)=>{if(`type`in t){if(t.type===`separator`)return(0,n.jsx)(ou,{className:t.className},r)}else{if(t.value===void 0)throw Error("[DropdownMenu]: `value` is required");return(0,n.jsx)(au,{value:t.value,disabled:t.disabled,hideIndicator:e.hideIndicator,children:t.label},t.value)}return null})},t);if(i===`checkbox`)return(0,n.jsx)(iu,{className:r,disabled:e.disabled,checked:e.checked,onSelect:()=>{var t;(t=e.onSelect)==null||t.call(e,e.value)},children:e.label},t);if(i===`item`)return(0,n.jsx)(ru,{className:r,disabled:e.disabled,variant:e.variant,onSelect:()=>{var t;(t=e.onSelect)==null||t.call(e,e)},children:e.children},t);if(i===`subItem`){var a;return(0,n.jsxs)(Ql,{children:[(0,n.jsx)(eu,{children:e.children}),(0,n.jsx)(Xl,{children:(0,n.jsx)(tu,{sideOffset:12,children:(a=e.options)==null?void 0:a.map((e,t)=>m(e,t))})})]},t)}}return(0,n.jsxs)(Yl,{modal:!1,open:f,onOpenChange:p,children:[(0,n.jsx)(Zl,{asChild:!0,children:r}),(0,n.jsx)(nu,{className:`univer-text-sm`,collisionPadding:{top:12,bottom:12},onWheel:e=>e.stopPropagation(),...c,children:i.map((e,t)=>m(e,t))})]})}var cu=`Popover`,[lu,uu]=Ht(cu,[Zi]),du=Zi(),[fu,pu]=lu(cu),mu=e=>{let{__scopePopover:t,children:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!1}=e,c=du(t),l=p.useRef(null),[u,d]=p.useState(!1),[f,m]=qt({prop:i,defaultProp:a==null?!1:a,onChange:o,caller:cu});return(0,n.jsx)(pa,{...c,children:(0,n.jsx)(fu,{scope:t,contentId:In(),triggerRef:l,open:f,onOpenChange:m,onOpenToggle:p.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:u,onCustomAnchorAdd:p.useCallback(()=>d(!0),[]),onCustomAnchorRemove:p.useCallback(()=>d(!1),[]),modal:s,children:r})})};mu.displayName=cu;var hu=`PopoverAnchor`,gu=p.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=pu(hu,r),o=du(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:c}=a;return p.useEffect(()=>(s(),()=>c()),[s,c]),(0,n.jsx)(ma,{...o,...i,ref:t})});gu.displayName=hu;var _u=`PopoverTrigger`,vu=p.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=pu(_u,r),o=du(r),s=W(t,a.triggerRef),c=(0,n.jsx)(q.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":Nu(a.open),...i,ref:s,onClick:K(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?c:(0,n.jsx)(ma,{asChild:!0,...o,children:c})});vu.displayName=_u;var yu=`PopoverPortal`,[bu,xu]=lu(yu,{forceMount:void 0}),Su=e=>{let{__scopePopover:t,forceMount:r,children:i,container:a}=e,o=pu(yu,t);return(0,n.jsx)(bu,{scope:t,forceMount:r,children:(0,n.jsx)(X,{present:r||o.open,children:(0,n.jsx)(va,{asChild:!0,container:a,children:i})})})};Su.displayName=yu;var Cu=`PopoverContent`,wu=p.forwardRef((e,t)=>{let r=xu(Cu,e.__scopePopover),{forceMount:i=r.forceMount,...a}=e,o=pu(Cu,e.__scopePopover);return(0,n.jsx)(X,{present:i||o.open,children:o.modal?(0,n.jsx)(Eu,{...a,ref:t}):(0,n.jsx)(Du,{...a,ref:t})})});wu.displayName=Cu;var Tu=bt(`PopoverContent.RemoveScroll`),Eu=p.forwardRef((e,t)=>{let r=pu(Cu,e.__scopePopover),i=p.useRef(null),a=W(t,i),o=p.useRef(!1);return p.useEffect(()=>{let e=i.current;if(e)return eo(e)},[]),(0,n.jsx)(us,{as:Tu,allowPinchZoom:!0,children:(0,n.jsx)(Ou,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),o.current||(t=r.triggerRef.current)==null||t.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;o.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Du=p.forwardRef((e,t)=>{let r=pu(Cu,e.__scopePopover),i=p.useRef(!1),a=p.useRef(!1);return(0,n.jsx)(Ou,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n;if((n=e.onCloseAutoFocus)==null||n.call(e,t),!t.defaultPrevented){var o;i.current||(o=r.triggerRef.current)==null||o.focus(),t.preventDefault()}i.current=!1,a.current=!1},onInteractOutside:t=>{var n,o;(n=e.onInteractOutside)==null||n.call(e,t),t.defaultPrevented||(i.current=!0,t.detail.originalEvent.type===`pointerdown`&&(a.current=!0));let s=t.target;(o=r.triggerRef.current)!=null&&o.contains(s)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&a.current&&t.preventDefault()}})}),Ou=p.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,p=pu(Cu,r),m=du(r);return gn(),(0,n.jsx)(Sn,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,n.jsx)(sn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:(0,n.jsx)(ha,{"data-state":Nu(p.open),role:`dialog`,id:p.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),ku=`PopoverClose`,Au=p.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=pu(ku,r);return(0,n.jsx)(q.button,{type:`button`,...i,ref:t,onClick:K(e.onClick,()=>a.onOpenChange(!1))})});Au.displayName=ku;var ju=`PopoverArrow`,Mu=p.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=du(r);return(0,n.jsx)(ga,{...a,...i,ref:t})});Mu.displayName=ju;function Nu(e){return e?`open`:`closed`}var Pu=mu,Fu=vu,Iu=Su,Lu=wu;function Ru({...e}){return(0,n.jsx)(Pu,{"data-slot":`popover`,...e})}function zu({...e}){return(0,n.jsx)(Fu,{"data-slot":`popover-trigger`,...e})}function Bu({className:e,align:t=`center`,sideOffset:r=4,...i}){return(0,n.jsx)(Iu,{children:(0,n.jsx)(Lu,{"data-slot":`popover-content`,align:t,sideOffset:r,className:U(`univer-outline-hidden data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[side=bottom]:univer-slide-in-from-top-2 data-[side=left]:univer-slide-in-from-right-2 data-[side=right]:univer-slide-in-from-left-2 data-[side=top]:univer-slide-in-from-bottom-2 univer-z-[1080] univer-max-h-[--radix-popper-available-height] univer-overflow-y-auto univer-rounded-md univer-bg-white univer-text-gray-900 univer-shadow-md dark:!univer-bg-gray-900 dark:!univer-text-white dark:focus-visible:!univer-border-gray-600`,Q,Vl,e),...i})})}function Vu(e){let{children:r,overlay:i,disabled:a,open:o,onOpenChange:s,...c}=e,[l,u]=(0,t.useState)(!1),d=o!==void 0,f=d?o:l;function p(e){a||(d||u(e),s==null||s(e))}return(0,n.jsxs)(Ru,{open:f,onOpenChange:p,children:[(0,n.jsx)(zu,{asChild:!0,children:r}),(0,n.jsx)(Bu,{...c,children:i})]})}function Hu(e,t=2){return String(e).padStart(t,`0`)}function Uu(e,t){let n=e==null?new Date:e;if(Number.isNaN(n.getTime()))return`Invalid Date`;let r={YYYY:String(n.getFullYear()),MM:Hu(n.getMonth()+1),DD:Hu(n.getDate()),HH:Hu(n.getHours()),mm:Hu(n.getMinutes()),ss:Hu(n.getSeconds())};return t.replace(/YYYY|MM|DD|HH|mm|ss/g,e=>{var t;return(t=r[e])==null?e:t})}function Wu(e){let{className:t,value:r,onValueChange:i}=e;function a(e){let[t,n,a]=e.target.value.split(`:`).map(Number),o=new Date(r==null?Date.now():r);o.setHours(t,n,a,0),i==null||i(o)}return(0,n.jsxs)(`div`,{"data-u-comp":`time-input`,className:`univer-relative univer-mx-auto univer-mt-1 univer-w-fit`,children:[(0,n.jsx)(T,{className:`univer-absolute univer-left-2 univer-top-1/2 -univer-translate-y-1/2 univer-text-gray-600 dark:!univer-text-gray-400`}),(0,n.jsx)(`input`,{className:U(`univer-block univer-h-7 univer-w-fit univer-appearance-none univer-rounded-md univer-bg-transparent univer-pl-6 univer-pr-2 univer-text-center univer-text-gray-800 univer-shadow univer-outline-none univer-transition-all univer-duration-200 focus:univer-border-primary-600 dark:!univer-text-white dark:focus:!univer-border-primary-500 [&::-webkit-calendar-picker-indicator]:univer-hidden [&::-webkit-calendar-picker-indicator]:univer-appearance-none`,Q,t),type:`time`,step:`1`,value:Uu(r,`HH:mm:ss`),onChange:a})]})}function Gu(e){let{data:r,itemKey:i,children:a,height:o,itemHeight:s,initialScrollIndex:c=0,overscan:l=2,className:u,style:d}=e,f=o&&s?c*s:0,p=(0,t.useRef)(null),[m,h]=(0,t.useState)(f);if((0,t.useEffect)(()=>{let e=p.current;if(!e||!o||!s)return;let t=c*s;e.scrollTop=t,h(t)},[o,c,s]),!o||!s||s<=0)return(0,n.jsx)(`div`,{className:u,style:d,children:r.map((e,t)=>{let r=typeof i==`function`?i(e):e[i];return(0,n.jsx)(`div`,{children:a(e,t)},r)})});let g=Math.max(0,Math.floor(m/s)-l),_=Math.ceil(o/s)+l*2,v=Math.min(r.length,g+_),y=g*s,b=r.length*s,x=r.slice(g,v);return(0,n.jsx)(`div`,{ref:p,className:u,style:{...d,height:o,overflowY:`auto`},onScroll:e=>h(e.currentTarget.scrollTop),children:(0,n.jsx)(`div`,{style:{height:b,position:`relative`},children:(0,n.jsx)(`div`,{style:{transform:`translateY(${y}px)`},children:x.map((e,t)=>{let r=typeof i==`function`?i(e):e[i];return(0,n.jsx)(`div`,{children:a(e,g+t)},r)})})})})}function Ku(e,t){return new Date(e,t+1,0).getDate()}function qu(e,t){return new Date(e,t,1).getDay()}function Ju(e){let{className:t,...r}=e;return(0,n.jsx)(`button`,{className:U(`univer-size-7 univer-rounded-md univer-border-none univer-bg-transparent univer-p-1 univer-transition-all hover:univer-bg-gray-200 dark:hover:!univer-bg-gray-600`,t),type:`button`,...r})}function Yu(e){let{className:r,max:i,min:a,showTime:o=!1,value:s,onValueChange:c}=e,{locale:l}=(0,t.useContext)(G),{ariaLabels:u,year:d,weekDays:f,months:p}=l==null?void 0:l.Calendar,m=new Date,[h,g]=(0,t.useState)((s==null?m:s).getFullYear()),[_,v]=(0,t.useState)((s==null?m:s).getMonth()),[y,b]=(0,t.useState)(!1);function x(){v(e=>e===0?(g(e=>e-1),11):e-1)}function S(){v(e=>e===11?(g(e=>e+1),0):e+1)}function C(e){v(Number(e))}function w(e){g(e),b(!1)}let T=(0,t.useMemo)(()=>{var e,t;let n=(e=a==null?void 0:a.getFullYear())==null?h-100:e,r=(t=i==null?void 0:i.getFullYear())==null?h+100:t;return Array.from({length:Math.max(0,r-n+1)},(e,t)=>({year:n+t}))},[h,i,a]),E=Math.max(0,T.findIndex(e=>e.year===h)),D=(0,t.useMemo)(()=>[{type:`radio`,value:String(_),hideIndicator:!0,options:p.map((e,t)=>({label:e,value:String(t)})),onSelect:C}],[_,p]),O=Ku(h,_),k=qu(h,_),A=(0,t.useMemo)(()=>{let e=[];for(let t=0;t<k;t++)e.push(null);for(let t=1;t<=O;t++)e.push(t);return e},[O,k]);function j(e){return e&&h===(s==null?void 0:s.getFullYear())&&_===(s==null?void 0:s.getMonth())&&e===(s==null?void 0:s.getDate())}function M(e){return e&&h===m.getFullYear()&&_===m.getMonth()&&e===m.getDate()}function N(e){var t,n,r;if(!e)return!1;let o=(t=s==null?void 0:s.getHours())==null?m.getHours():t,c=(n=s==null?void 0:s.getMinutes())==null?m.getMinutes():n,l=(r=s==null?void 0:s.getSeconds())==null?m.getSeconds():r,u=new Date(h,_,e,o,c,l);return!!(a&&u<a||i&&u>i)}function P(e){var t,n,r;if(N(e))return;let i=(t=s==null?void 0:s.getHours())==null?m.getHours():t,a=(n=s==null?void 0:s.getMinutes())==null?m.getMinutes():n,o=(r=s==null?void 0:s.getSeconds())==null?m.getSeconds():r,l=new Date(h,_,e,i,a,o);c==null||c(l)}function F(e){var t;let n=e.getHours(),r=e.getMinutes(),i=e.getSeconds(),a=new Date(h,_,(t=s==null?void 0:s.getDate())==null?m.getDate():t,n,r,i);c==null||c(a)}return(0,n.jsxs)(`div`,{"data-u-comp":`calendar`,className:U(`univer-mx-auto univer-max-w-xs univer-select-none univer-rounded univer-bg-white univer-text-gray-900 dark:!univer-bg-gray-900 dark:!univer-text-white`,r),children:[(0,n.jsxs)(`nav`,{className:`univer-mb-4 univer-flex univer-items-center univer-justify-between`,children:[(0,n.jsx)(Ju,{className:`univer-text-lg univer-text-gray-500 dark:!univer-text-gray-200`,"aria-label":u.previousMonth,onClick:x,children:(0,n.jsx)(re,{className:`univer-rotate-180`})}),(0,n.jsxs)(`span`,{className:`univer-flex univer-items-center univer-gap-0.5 univer-text-sm univer-font-medium`,children:[(0,n.jsx)(Vu,{align:`center`,className:`univer-w-24 univer-p-1.5`,open:y,overlay:(0,n.jsx)(Gu,{className:`univer-rounded`,data:T,height:224,initialScrollIndex:E,itemHeight:32,itemKey:`year`,children:e=>(0,n.jsx)(`button`,{className:U(`univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-center univer-rounded univer-border-none univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-900 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-600`,{"univer-bg-gray-200 dark:!univer-bg-gray-500":e.year===h}),type:`button`,onClick:()=>w(e.year),children:e.year})}),onOpenChange:b,children:(0,n.jsxs)(Pt,{variant:`text`,type:`button`,"aria-label":u.selectYear,children:[h,d]})}),(0,n.jsx)(su,{align:`center`,className:`univer-max-h-80 univer-min-w-28 univer-overflow-auto`,items:D,children:(0,n.jsx)(Pt,{variant:`text`,type:`button`,"aria-label":u.selectMonth,children:p[_]})})]}),(0,n.jsx)(Ju,{className:`univer-text-lg univer-text-gray-500 dark:!univer-text-gray-200`,"aria-label":u.nextMonth,onClick:S,children:(0,n.jsx)(re,{})})]}),(0,n.jsx)(`div`,{className:`univer-mb-1 univer-grid univer-grid-cols-7 univer-gap-1 univer-text-center univer-text-sm univer-text-gray-500 dark:!univer-text-gray-200`,children:f.map(e=>(0,n.jsx)(`div`,{children:e},e))}),(0,n.jsx)(`div`,{className:`univer-grid univer-grid-cols-7 univer-gap-1 univer-text-center`,children:A.map((e,t)=>e?(0,n.jsx)(Ju,{className:U({"!univer-bg-primary-600 univer-font-bold univer-text-white":!M(e)&&j(e),"dark:!univer-text-white":!M(e)&&!j(e),"!univer-bg-primary-600 univer-text-white":M(e)&&j(e),"univer-font-semibold univer-text-primary-600 dark:!univer-text-primary-500":M(e)&&!j(e),"univer-cursor-not-allowed univer-opacity-40":N(e),"univer-hover:bg-primary-100 univer-cursor-pointer univer-text-gray-800":!j(e)&&!N(e)}),onClick:()=>P(e),disabled:N(e),children:e},t):(0,n.jsx)(`div`,{},t))}),o&&(0,n.jsx)(Wu,{value:s,onValueChange:F})]})}function Xu({emptyText:e}){return(0,n.jsx)(`section`,{className:`univer-h-8 univer-px-2 univer-pr-32 univer-text-sm/8 univer-text-gray-600 dark:!univer-text-gray-200`,children:e})}function Zu(e){let{value:r,options:i=[],onChange:a,contentClassName:o,wrapperClassName:s}=e,{locale:c}=(0,t.useContext)(G),l=(0,t.useMemo)(()=>{let e=[i];return r.forEach((t,n)=>{let r=e[n].find(e=>e.value===t);r!=null&&r.children&&e.push(r.children)}),e},[r]);function u(e,t){if(t===r[e])return;if(r[e+1]){let n=r.slice(0,e+1);n[e]=t,a(n);return}let n=[...r];n[e]=t,a(n)}return(0,n.jsxs)(`section`,{"data-u-comp":`cascader-list`,className:U(`univer-overflow-auto-y univer-grid univer-h-full univer-max-h-80 univer-grid-flow-col univer-rounded univer-py-2 univer-text-gray-900 dark:!univer-text-white [&>ul:not(:last-child)]:univer-border-0 [&>ul:not(:last-child)]:univer-border-r [&>ul:not(:last-child)]:univer-border-solid [&>ul:not(:last-child)]:univer-border-r-gray-200`,Q,Vl,s),children:[l.map((e,t)=>e.length?(0,n.jsx)(`ul`,{className:U(`univer-m-0 univer-h-full univer-max-h-full univer-list-none univer-overflow-auto univer-px-2`,Vl,o),children:e.map(e=>(0,n.jsx)(`li`,{children:(0,n.jsxs)(`a`,{className:U(`univer-relative univer-block univer-h-8 univer-cursor-pointer univer-rounded univer-text-sm/8`,{"univer-px-7":t>0,"univer-px-1.5":t===0,"univer-bg-gray-200 dark:!univer-bg-gray-600":e.value===r[t]}),onClick:()=>u(t,e.value),children:[t>0&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-2 univer-flex univer-h-full univer-items-center`,children:e.value===r[t]&&(0,n.jsx)(C,{className:`univer-text-primary-600`})}),(0,n.jsx)(`span`,{children:e.label})]})},e.value))},t):(0,n.jsx)(Xu,{emptyText:c==null?void 0:c.CascaderList.empty},t)),r.length<=0&&(0,n.jsx)(Xu,{emptyText:c==null?void 0:c.CascaderList.empty})]})}function Qu(e){let{children:r,className:i,style:a,value:o,disabled:s,direction:c=`horizontal`,onChange:l}=e,u=e=>{o.includes(e)?l(o.filter(t=>t!==e)):l([...o,e])};return(0,n.jsx)(`div`,{className:U(`univer-flex univer-gap-2`,{"univer-flex-col":c===`vertical`},i),style:a,children:t.Children.map(r,(e,n)=>(0,t.isValidElement)(e)?(0,t.cloneElement)(e,{key:n,children:e.props.children,checked:e.props.value?o.includes(e.props.value):!1,disabled:s==null?e.props.disabled:s,onChange:u}):e)})}function $u(e){let{children:r,className:i,style:a,checked:o=!1,indeterminate:s=!1,value:c,disabled:l=!1,onChange:u,contentClassName:d}=e,f=(0,t.useRef)(null);function p(e){if(e.stopPropagation(),!(!u||l))if(c!==void 0)u==null||u(c);else{var t,n;let e=(t=f==null||(n=f.current)==null?void 0:n.checked)==null?!1:t;u==null||u(e)}}return(0,n.jsxs)(`label`,{"data-u-comp":`checkbox`,className:U(`univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-text-sm`,{"univer-cursor-pointer univer-text-gray-900 dark:!univer-text-white":!l,"univer-text-gray-400":l},i),style:a,children:[(0,n.jsxs)(`span`,{className:`univer-relative univer-block`,children:[(0,n.jsx)(`input`,{ref:f,className:`univer-absolute univer-size-0 univer-opacity-0`,type:`checkbox`,checked:o,disabled:l,onChange:p}),(0,n.jsxs)(`span`,{className:U(`univer-relative univer-box-border univer-flex univer-size-4 univer-items-center univer-justify-center univer-overflow-hidden univer-rounded univer-border univer-border-solid univer-transition-colors`,{"univer-opacity-50":l,"univer-border-primary-600 univer-bg-primary-600":o||s,"univer-border-gray-300 univer-bg-gray-50 dark:!univer-border-gray-500 dark:!univer-bg-gray-600":!o&&!s}),children:[o&&(0,n.jsx)(C,{className:`univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-size-3 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-text-white`}),s&&!o&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-h-0.5 univer-w-2.5 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded univer-bg-white`})]})]}),(0,n.jsx)(`span`,{className:U(`univer-select-none`,d),children:r})]})}var ed=`Dialog`,[td,nd]=Ht(ed),[rd,id]=td(ed),ad=e=>{let{__scopeDialog:t,children:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=p.useRef(null),l=p.useRef(null),[u,d]=qt({prop:i,defaultProp:a==null?!1:a,onChange:o,caller:ed});return(0,n.jsx)(rd,{scope:t,triggerRef:c,contentRef:l,contentId:In(),titleId:In(),descriptionId:In(),open:u,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(e=>!e),[d]),modal:s,children:r})};ad.displayName=ed;var od=`DialogTrigger`,sd=p.forwardRef((e,t)=>{let{__scopeDialog:r,...i}=e,a=id(od,r),o=W(t,a.triggerRef);return(0,n.jsx)(q.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":Dd(a.open),...i,ref:o,onClick:K(e.onClick,a.onOpenToggle)})});sd.displayName=od;var cd=`DialogPortal`,[ld,ud]=td(cd,{forceMount:void 0}),dd=e=>{let{__scopeDialog:t,forceMount:r,children:i,container:a}=e,o=id(cd,t);return(0,n.jsx)(ld,{scope:t,forceMount:r,children:p.Children.map(i,e=>(0,n.jsx)(X,{present:r||o.open,children:(0,n.jsx)(va,{asChild:!0,container:a,children:e})}))})};dd.displayName=cd;var fd=`DialogOverlay`,pd=p.forwardRef((e,t)=>{let r=ud(fd,e.__scopeDialog),{forceMount:i=r.forceMount,...a}=e,o=id(fd,e.__scopeDialog);return o.modal?(0,n.jsx)(X,{present:i||o.open,children:(0,n.jsx)(hd,{...a,ref:t})}):null});pd.displayName=fd;var md=bt(`DialogOverlay.RemoveScroll`),hd=p.forwardRef((e,t)=>{let{__scopeDialog:r,...i}=e,a=id(fd,r);return(0,n.jsx)(us,{as:md,allowPinchZoom:!0,shards:[a.contentRef],children:(0,n.jsx)(q.div,{"data-state":Dd(a.open),...i,ref:t,style:{pointerEvents:`auto`,...i.style}})})}),gd=`DialogContent`,_d=p.forwardRef((e,t)=>{let r=ud(gd,e.__scopeDialog),{forceMount:i=r.forceMount,...a}=e,o=id(gd,e.__scopeDialog);return(0,n.jsx)(X,{present:i||o.open,children:o.modal?(0,n.jsx)(vd,{...a,ref:t}):(0,n.jsx)(yd,{...a,ref:t})})});_d.displayName=gd;var vd=p.forwardRef((e,t)=>{let r=id(gd,e.__scopeDialog),i=p.useRef(null),a=W(t,r.contentRef,i);return p.useEffect(()=>{let e=i.current;if(e)return eo(e)},[]),(0,n.jsx)(bd,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),(t=r.triggerRef.current)==null||t.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault())})}),yd=p.forwardRef((e,t)=>{let r=id(gd,e.__scopeDialog),i=p.useRef(!1),a=p.useRef(!1);return(0,n.jsx)(bd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n;if((n=e.onCloseAutoFocus)==null||n.call(e,t),!t.defaultPrevented){var o;i.current||(o=r.triggerRef.current)==null||o.focus(),t.preventDefault()}i.current=!1,a.current=!1},onInteractOutside:t=>{var n,o;(n=e.onInteractOutside)==null||n.call(e,t),t.defaultPrevented||(i.current=!0,t.detail.originalEvent.type===`pointerdown`&&(a.current=!0));let s=t.target;(o=r.triggerRef.current)!=null&&o.contains(s)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&a.current&&t.preventDefault()}})}),bd=p.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,...s}=e,c=id(gd,r),l=p.useRef(null),u=W(t,l);return gn(),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Sn,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,n.jsx)(sn,{role:`dialog`,id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Dd(c.open),...s,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(jd,{titleId:c.titleId}),(0,n.jsx)(Nd,{contentRef:l,descriptionId:c.descriptionId})]})]})}),xd=`DialogTitle`,Sd=p.forwardRef((e,t)=>{let{__scopeDialog:r,...i}=e,a=id(xd,r);return(0,n.jsx)(q.h2,{id:a.titleId,...i,ref:t})});Sd.displayName=xd;var Cd=`DialogDescription`,wd=p.forwardRef((e,t)=>{let{__scopeDialog:r,...i}=e,a=id(Cd,r);return(0,n.jsx)(q.p,{id:a.descriptionId,...i,ref:t})});wd.displayName=Cd;var Td=`DialogClose`,Ed=p.forwardRef((e,t)=>{let{__scopeDialog:r,...i}=e,a=id(Td,r);return(0,n.jsx)(q.button,{type:`button`,...i,ref:t,onClick:K(e.onClick,()=>a.onOpenChange(!1))})});Ed.displayName=Td;function Dd(e){return e?`open`:`closed`}var Od=`DialogTitleWarning`,[kd,Ad]=Vt(Od,{contentName:gd,titleName:xd,docsSlug:`dialog`}),jd=({titleId:e})=>{let t=Ad(Od),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
-
|
|
43
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
-
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Md=`DialogDescriptionWarning`,Nd=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ad(Md).contentName}}.`;return p.useEffect(()=>{var r;let i=(r=e.current)==null?void 0:r.getAttribute(`aria-describedby`);t&&i&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Pd=ad,Fd=dd,Id=pd,Ld=_d,Rd=Sd,zd=wd,Bd=Ed;let Vd=Pd,Hd=Fd,Ud=(0,t.forwardRef)(({className:e,...t},r)=>(0,n.jsx)(Id,{ref:r,className:U(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 univer-fixed univer-inset-0 univer-z-[1080] univer-bg-[rgba(0,0,0,0.8)]`,e),...t}));Ud.displayName=Id.displayName;let Wd=(0,t.forwardRef)(({className:e,children:t,closable:r=!0,onClickClose:i,...a},o)=>(0,n.jsxs)(Hd,{children:[(0,n.jsx)(Ud,{}),(0,n.jsxs)(Ld,{ref:o,className:U(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=open]:univer-slide-in-from-left-1/2 data-[state=open]:univer-slide-in-from-top-[48%] data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[state=closed]:univer-slide-out-to-left-1/2 data-[state=closed]:univer-slide-out-to-top-[48%] univer-fixed univer-left-1/2 univer-top-1/2 univer-z-[1080] univer-box-border univer-grid univer-w-full univer-max-w-lg -univer-translate-x-1/2 -univer-translate-y-1/2 univer-gap-4 univer-bg-white univer-p-4 univer-text-gray-500 univer-shadow-md univer-duration-200 sm:!univer-rounded-lg dark:!univer-bg-gray-700 dark:!univer-text-gray-400`,Q,e),...a,children:[t,r&&(0,n.jsxs)(Bd,{className:`univer-absolute univer-right-4 univer-top-4 univer-size-6 univer-cursor-pointer univer-rounded-sm univer-border-none univer-bg-transparent univer-p-0 univer-transition-opacity hover:univer-opacity-100 disabled:univer-pointer-events-none`,onClick:i,children:[(0,n.jsx)(D,{className:`univer-size-4 univer-text-gray-400`}),(0,n.jsx)(`span`,{className:`univer-sr-only`,children:`Close`})]})]})]}));Wd.displayName=Ld.displayName;let Gd=({className:e,...t})=>(0,n.jsx)(`div`,{className:U(`univer-flex univer-flex-col univer-space-y-1.5 univer-text-center sm:!univer-text-left`,e),...t});Gd.displayName=`DialogHeader`;let Kd=({className:e,...t})=>(0,n.jsx)(`div`,{className:U(`univer-flex univer-flex-col-reverse sm:!univer-flex-row sm:!univer-justify-end sm:!univer-space-x-2`,e),...t});Kd.displayName=`DialogFooter`;let qd=(0,t.forwardRef)(({className:e,...t},r)=>(0,n.jsx)(Rd,{ref:r,className:U(`univer-my-0 univer-text-lg univer-font-semibold univer-leading-none univer-tracking-tight univer-text-gray-900 dark:!univer-text-white`,e),...t}));qd.displayName=Rd.displayName;let Jd=(0,t.forwardRef)(({className:e,...t},r)=>(0,n.jsx)(zd,{ref:r,className:U(`univer-text-sm univer-text-gray-500`,e),...t}));Jd.displayName=zd.displayName;function Yd(e={}){let n=(0,t.useCallback)(()=>{let{innerWidth:e,innerHeight:t}=window;return{x:Math.max(0,(e-0)/2),y:Math.max(0,(t-0)/2)}},[]),{defaultPosition:r=n(),enabled:i=!1}=e,[a,o]=(0,t.useState)(r),[s,c]=(0,t.useState)(!1),l=(0,t.useRef)(null),u=(0,t.useRef)({x:0,y:0}),d=(0,t.useRef)({x:0,y:0}),f=(0,t.useRef)(!1);(0,t.useEffect)(()=>{if(!l.current||f.current||e.defaultPosition)return;let{width:t,height:n}=l.current.getBoundingClientRect(),{innerWidth:r,innerHeight:i}=window,a=Math.max(0,(r-t)/2),s=Math.max(0,(i-n)/2);o({x:a,y:s}),u.current={x:a,y:s},f.current=!0},[e.defaultPosition]);let p=(0,t.useCallback)((e,t)=>{if(!l.current)return{x:e,y:t};let n=l.current.getBoundingClientRect(),{clientWidth:r,clientHeight:i}=document.documentElement,a=u.current.x+(e-d.current.x),o=u.current.y+(t-d.current.y);return a<0&&(a=0),o<0&&(o=0),a+n.width>r&&(a=r-n.width),o+n.height>i&&(o=i-n.height),{x:a,y:o}},[]),m=(0,t.useCallback)(e=>{i&&(e.preventDefault(),e.stopPropagation(),u.current={...a},d.current={x:e.clientX,y:e.clientY},c(!0),document.body.style.userSelect=`none`)},[i,a]),h=(0,t.useCallback)(e=>{s&&(e.preventDefault(),e.stopPropagation(),o(p(e.clientX,e.clientY)))},[s,p]),g=(0,t.useCallback)(()=>{c(!1),document.body.style.userSelect=``},[]);return(0,t.useEffect)(()=>{if(i)return document.addEventListener(`mousemove`,h),document.addEventListener(`mouseup`,g),()=>{document.removeEventListener(`mousemove`,h),document.removeEventListener(`mouseup`,g)}},[i,h,g]),{position:a,isDragging:s,elementRef:l,setElementRef:t=>{if(l.current=t,t&&!f.current&&!e.defaultPosition){let{width:e,height:n}=t.getBoundingClientRect(),{innerWidth:r,innerHeight:i}=window,a=Math.max(0,(r-e)/2),s=Math.max(0,(i-n)/2);o({x:a,y:s}),u.current={x:a,y:s},f.current=!0}},handleMouseDown:m}}function Xd(e){var r,i,a,o;let{className:s,children:c,style:l,open:u=!1,title:d,width:f,draggable:p=!1,defaultPosition:m,footer:h,mask:g=!0,keyboard:_=!0,closable:v=!0,maskClosable:y=!0,showOk:b,showCancel:x,onOpenChange:S,onClose:C,onOk:w,onCancel:T}=e,{locale:E}=(0,t.useContext)(G),{position:D,isDragging:O,setElementRef:k,handleMouseDown:A}=Yd({defaultPosition:m,enabled:p}),j=h==null?b||x?(0,n.jsxs)(`div`,{className:`univer-flex univer-justify-end univer-gap-2`,children:[x&&(0,n.jsx)(Pt,{onClick:T,children:(r=E==null||(i=E.Confirm)==null?void 0:i.cancel)==null?`Cancel`:r}),b&&(0,n.jsx)(Pt,{variant:`primary`,onClick:w,children:(a=E==null||(o=E.Confirm)==null?void 0:o.confirm)==null?`OK`:a})]}):null:h,M=(0,t.useCallback)(e=>{e&&p&&k(e)},[p,k]),N=(0,t.useCallback)(e=>{!g&&!e||(S==null||S(e),e||C==null||C())},[C,S]);function P(){S==null||S(!1),C==null||C()}return(0,n.jsx)(Vd,{open:u,onOpenChange:N,modal:g!==!1,children:(0,n.jsxs)(Wd,{ref:M,className:U(s,{"!univer-animate-none":p}),style:{...l,width:f?typeof f==`number`?`${f}px`:f:void 0,maxWidth:f?`initial`:void 0,...p?{position:`absolute`,margin:0,left:0,top:0,transform:`translate(${D.x}px, ${D.y}px)`,transition:O?`none`:void 0,cursor:O?`grabbing`:void 0}:{}},closable:v,onClickClose:P,onEscapeKeyDown:e=>{_&&P(),e.preventDefault()},onPointerDownOutside:e=>{y&&P(),e.preventDefault()},children:[(0,n.jsxs)(Gd,{className:U({"!univer-hidden":!d}),"data-drag-handle":p?`true`:void 0,style:{cursor:p?`grab`:void 0,userSelect:p?`none`:void 0,touchAction:p?`none`:void 0},onMouseDown:p?A:void 0,children:[(0,n.jsx)(qd,{children:d}),(0,n.jsx)(Jd,{className:`univer-hidden`})]}),c,j&&(0,n.jsx)(Kd,{children:j})]})})}let Zd=(e,t,n)=>{e%=360,t/=100,n/=100;let r=n*t,i=r*(1-Math.abs(e/60%2-1)),a=n-r,o=0,s=0,c=0;return e>=0&&e<60?(o=r,s=i,c=0):e>=60&&e<120?(o=i,s=r,c=0):e>=120&&e<180?(o=0,s=r,c=i):e>=180&&e<240?(o=0,s=i,c=r):e>=240&&e<300?(o=i,s=0,c=r):e>=300&&e<360&&(o=r,s=0,c=i),[Math.round((o+a)*255),Math.round((s+a)*255),Math.round((c+a)*255)]},Qd=(e,t,n)=>{let r=e=>e.toString(16).padStart(2,`0`);return`#${r(e)}${r(t)}${r(n)}`},$d=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=0,o=0,s=r;return r!==0&&(o=i/r),i!==0&&(r===e?a=(t-n)/i+(t<n?6:0):r===t?a=(n-e)/i+2:r===n&&(a=(e-t)/i+4),a*=60),[a,o*100,s*100]},ef=e=>{e.length===4&&(e=`#${e.slice(1).split(``).map(e=>e+e).join(``)}`);let[t,n,r]=e.match(/\w\w/g).map(e=>Number.parseInt(e,16));return $d(t,n,r)},tf=(e,t,n)=>{let[r,i,a]=Zd(e,t,n);return Qd(r,i,a)},nf=(e,t,n,r)=>{let[i,a,o]=Zd(e,t,n);return`rgba(${i}, ${a}, ${o}, ${r})`},rf=e=>{let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);if(!t)throw Error(`Invalid RGBA string`);return[Number.parseInt(t[1],10),Number.parseInt(t[2],10),Number.parseInt(t[3],10),t[4]?Number.parseFloat(t[4]):1]};function af({hsv:e,alpha:r,onChange:i,onChanged:a}){let[o,s]=(0,t.useState)(!1),c=(0,t.useRef)(null),l=(0,t.useRef)(null),u=(0,t.useRef)(r),d=(0,t.useCallback)(e=>{var t,n;let r=c.current;if(!r)return;let a=(t=(n=l.current)==null?void 0:n.clientWidth)==null?0:t,o=r.getBoundingClientRect(),s=o.width-a;if(s<=0){i(0);return}let u=Math.max(0,Math.min(e-o.left,s));i(Math.round(u/s*100)/100)},[i]),f=(0,t.useCallback)(e=>{o&&d(e.clientX)},[o,d]);(0,t.useEffect)(()=>{u.current=r},[r]);let p=(0,t.useCallback)(()=>{s(!1),a==null||a(u.current)},[a]);(0,t.useEffect)(()=>(o&&(window.addEventListener(`pointermove`,f),window.addEventListener(`pointerup`,p),window.addEventListener(`mouseup`,p)),()=>{window.removeEventListener(`pointermove`,f),window.removeEventListener(`pointerup`,p),window.removeEventListener(`mouseup`,p)}),[o,f,p]);let m=()=>{var e,t,n,i;let a=Math.min(Math.max(r*100,0),100),o=(e=(t=l.current)==null?void 0:t.clientWidth)==null?0:e,s=(n=(i=c.current)==null?void 0:i.clientWidth)==null?0:n,u=s>0?o/s*100:0;return`${a/100*(100-u)}%`},h=Zd(...e);return(0,n.jsxs)(`div`,{"data-u-comp":`color-picker-alpha-slider`,className:`univer-relative univer-w-full univer-select-none`,children:[(0,n.jsx)(`div`,{className:`univer-absolute univer-inset-0 univer-rounded-full`,style:{backgroundImage:`linear-gradient(45deg, #E3E5EA 25%, transparent 25%), linear-gradient(-45deg, #E3E5EA 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #E3E5EA 75%), linear-gradient(-45deg, transparent 75%, #E3E5EA 75%)`,backgroundPosition:`0 0, 0 4px, 4px -4px, -4px 0`,backgroundSize:`8px 8px`}}),(0,n.jsx)(`div`,{ref:c,"data-u-comp":`color-picker-alpha-slider-track`,className:`univer-relative univer-h-2 univer-w-full univer-cursor-pointer univer-rounded-full univer-shadow-inner`,style:{background:`linear-gradient(to right, transparent, rgb(${h.join(`,`)}))`},onPointerDown:e=>{s(!0),d(e.clientX)},children:(0,n.jsx)(`div`,{ref:l,"data-u-comp":`color-picker-alpha-slider-thumb`,className:`univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform univer-duration-75 univer-will-change-transform`,style:{left:m(),transform:`translateY(-50%)`,transition:o?`none`:`all 0.1s ease-out`}})})]})}function of({hsv:e,onChange:r}){let[i,a]=(0,t.useState)(``),o=(0,t.useMemo)(()=>tf(e[0],e[1],e[2]),[e]);(0,t.useEffect)(()=>{a(o.replace(/^#/,``))},[o]);let s=e=>/^[0-9A-Fa-f]{6}$/.test(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`input`,{className:U(`univer-w-full univer-px-2 !univer-pl-4 univer-uppercase focus:univer-border-primary-500 focus:univer-outline-none dark:!univer-text-white`,Q),value:i,onChange:e=>{let t=e.target.value.trim();if(!(t.length>6)&&!(t!==``&&!/^[0-9A-Fa-f]*$/.test(t))&&(a(t),s(t))){let e=ef(t);e&&r&&r(...e)}},onBlur:()=>{s(i)||a(o.replace(/^#/,``))},maxLength:6,spellCheck:!1}),(0,n.jsx)(`span`,{className:`univer-absolute univer-left-1.5 univer-top-1/2 -univer-translate-y-1/2 univer-text-sm univer-text-gray-400`,children:`#`})]})}function sf({hsv:e,alpha:r,format:i,onChange:a}){let[o,s]=(0,t.useState)({r:0,g:0,b:0,a:1});(0,t.useEffect)(()=>{let[t,n,i]=Zd(e[0],e[1],e[2]);s({r:Math.round(t),g:Math.round(n),b:Math.round(i),a:r==null?1:r})},[e,r]);let c=(t,n)=>{if(t===`a`){if(n!==``&&!/^\d*\.?\d*$/.test(n))return;let t=n===``?0:Number.parseFloat(n);if(t>1)return;s({...o,a:t}),a&&a(e[0],e[1],e[2],t);return}if(n!==``&&!/^\d*$/.test(n))return;let r=n===``?0:Number.parseInt(n,10);if(r>255)return;let i={...o,[t]:r};s(i),a&&a(...$d(i.r,i.g,i.b),o.a)},l=()=>{let[t,n,i]=Zd(e[0],e[1],e[2]);s({r:Math.round(t),g:Math.round(n),b:Math.round(i),a:r==null?1:r})};return(0,n.jsxs)(`div`,{className:`univer-flex univer-items-center univer-gap-2 [&>input]:univer-w-11 [&>input]:univer-border-gray-200 [&>input]:focus:univer-border-primary-500 dark:[&>input]:!univer-border-gray-600 dark:[&>input]:!univer-text-white`,children:[(0,n.jsx)(`input`,{value:o.r,onChange:e=>c(`r`,e.target.value),onBlur:l,maxLength:3}),(0,n.jsx)(`input`,{value:o.g,onChange:e=>c(`g`,e.target.value),onBlur:l,maxLength:3}),(0,n.jsx)(`input`,{value:o.b,onChange:e=>c(`b`,e.target.value),onBlur:l,maxLength:3}),i===`rgba`&&(0,n.jsx)(`input`,{value:o.a,onChange:e=>c(`a`,e.target.value),onBlur:l,maxLength:4})]})}function cf({hsv:e,alpha:t,format:r,onChange:i}){return(0,n.jsx)(`div`,{className:`dark:![&_input]:univer-border-gray-600 dark:![&_input]:univer-text-white univer-flex univer-gap-2 [&_input]:univer-box-border [&_input]:univer-flex [&_input]:univer-h-7 [&_input]:univer-items-center [&_input]:univer-rounded [&_input]:univer-border [&_input]:univer-border-solid [&_input]:univer-border-gray-200 [&_input]:univer-bg-transparent [&_input]:univer-px-1.5 [&_input]:univer-text-sm [&_input]:univer-text-gray-700 [&_input]:univer-outline-none`,children:(0,n.jsxs)(`div`,{className:`univer-relative univer-flex univer-flex-1 univer-gap-2`,children:[(0,n.jsx)(of,{hsv:e,onChange:i}),(0,n.jsx)(sf,{hsv:e,alpha:t,format:r,onChange:i})]})})}let lf=[[`#FFFFFF`,`#E1EFFE`,`#FDE8E8`,`#FEECDC`,`#FFF4B9`,`#DEF7EC`,`#D5F5F6`,`#EDEBFE`,`#FCE8F3`],[`#CDD0D8`,`#A4CAFE`,`#F8B4B4`,`#FDBA8C`,`#FAC815`,`#84E1BC`,`#7EDCE2`,`#CABFFD`,`#F8B4D9`],[`#979DAC`,`#3F83F8`,`#F05252`,`#FF5A1F`,`#D49D0F`,`#0DA471`,`#0694A2`,`#9061F9`,`#E74694`],[`#414657`,`#1A56DB`,`#C81E1E`,`#B43403`,`#9A6D15`,`#046C4E`,`#036672`,`#6C2BD9`,`#BF125D`],[`#000000`,`#233876`,`#771D1D`,`#8A2C0D`,`#634312`,`#014737`,`#014451`,`#4A1D96`,`#751A3D`]];function uf({hsv:e,onChange:r}){let i=(0,t.useCallback)(e=>{let[t,n,i]=ef(e);r(t,n,i)},[r]),a=tf(e[0],e[1],e[2]);return(0,n.jsx)(`div`,{"data-u-comp":`color-picker-presets`,className:`univer-grid univer-content-center univer-gap-2`,children:lf.map((e,t)=>(0,n.jsx)(`div`,{className:`univer-grid univer-grid-flow-col univer-items-center univer-justify-between univer-gap-2`,children:e.map((e,r)=>(0,n.jsx)(`button`,{type:`button`,className:U(`univer-box-border univer-size-5 univer-cursor-pointer univer-rounded-full univer-border univer-border-solid univer-border-transparent univer-bg-gray-300 univer-transition-shadow`,{"univer-ring-2 univer-ring-offset-2 univer-ring-offset-white dark:!univer-ring-primary-600 dark:!univer-ring-offset-gray-600":e.toUpperCase()===a.toUpperCase(),"!univer-border-gray-200":t===0&&r===0}),style:{backgroundColor:e},onClick:()=>i(e)},r))},t))})}function df({hsv:e,onChange:r,onChanged:i}){let a=(0,t.useRef)(null),o=(0,t.useRef)(null),[s,c]=(0,t.useState)(!1);(0,t.useEffect)(()=>{let t=a.current;if(!t)return;let n=t.getContext(`2d`);if(!n)return;let r=n.createLinearGradient(0,0,t.width,0);r.addColorStop(0,`hsl(${e[0]}, 0%, 50%)`),r.addColorStop(1,`hsl(${e[0]}, 100%, 50%)`),n.fillStyle=r,n.fillRect(0,0,t.width,t.height);let i=n.createLinearGradient(0,0,0,t.height);i.addColorStop(0,`rgba(255, 255, 255, 0)`),i.addColorStop(1,`rgba(0, 0, 0, 1)`),n.fillStyle=i,n.fillRect(0,0,t.width,t.height)},[e[0]]);let l=t=>{t.stopPropagation();let n=a.current;if(!n)return;let i=n.getBoundingClientRect(),o=Math.max(0,Math.min(t.clientX-i.left,i.width)),s=Math.max(0,Math.min(t.clientY-i.top,i.height)),c=o/i.width*100,l=100-s/i.height*100;r(e[0],c,l)},u=(0,t.useCallback)(()=>{c(!1)},[]);function d(){i==null||i(e[0],e[1],e[2])}return(0,t.useEffect)(()=>{var e;return(e=o.current)==null||e.addEventListener(`mouseup`,d),window.addEventListener(`pointerup`,u),window.addEventListener(`mouseup`,u),()=>{var e;(e=o.current)==null||e.removeEventListener(`mouseup`,d),window.removeEventListener(`pointerup`,u),window.removeEventListener(`mouseup`,u)}},[e]),(0,t.useEffect)(()=>{let e=()=>{c(!1)};return window.addEventListener(`pointerup`,e),window.addEventListener(`mouseup`,e),()=>{window.removeEventListener(`pointerup`,e),window.removeEventListener(`mouseup`,e)}},[]),(0,n.jsxs)(`div`,{"data-u-comp":`color-picker-spectrum`,ref:o,className:`univer-relative univer-overflow-hidden`,children:[(0,n.jsx)(`canvas`,{ref:a,"data-u-comp":`color-picker-spectrum-canvas`,className:`univer-size-full univer-cursor-crosshair univer-rounded`,onPointerDown:e=>{c(!0),l(e)},onPointerMove:e=>s&&l(e)}),(0,n.jsx)(`div`,{className:`univer-pointer-events-none univer-absolute univer-left-0 univer-top-0 univer-size-4 univer-rounded-full univer-border-2 univer-border-white univer-shadow-md univer-ring-2 univer-ring-white univer-will-change-transform`,style:(()=>{var t,n,r,i;let a=(t=(n=o.current)==null?void 0:n.clientWidth)==null?0:t,c=(r=(i=o.current)==null?void 0:i.clientHeight)==null?0:r;return{transform:`translate(${e[1]/100*a-8}px, ${(100-e[2])/100*c-8}px)`,transition:s?`none`:`transform 0.1s ease-out`}})()})]})}function ff({hsv:e,onChange:r,onChanged:i}){let[a,o]=(0,t.useState)(!1),s=(0,t.useRef)(null),c=(0,t.useRef)(null),l=(0,t.useRef)(e),u=(0,t.useCallback)(t=>{var n,i;let a=s.current;if(!a)return;let o=(n=(i=c.current)==null?void 0:i.clientWidth)==null?0:n,l=a.getBoundingClientRect(),u=l.width-o;if(u<=0){r(0,e[1],e[2]);return}let d=Math.max(0,Math.min(t-l.left,u));r(Math.round(d/u*360),e[1],e[2])},[e,r]),d=(0,t.useCallback)(e=>{e.stopPropagation(),a&&u(e.clientX)},[a,u]);(0,t.useEffect)(()=>{l.current=e},[e]);let f=(0,t.useCallback)(()=>{o(!1);let[e,t,n]=l.current;i==null||i(e,t,n)},[i]);return(0,t.useEffect)(()=>(a&&(window.addEventListener(`pointermove`,d),window.addEventListener(`pointerup`,f),window.addEventListener(`mouseup`,f)),()=>{window.removeEventListener(`pointermove`,d),window.removeEventListener(`pointerup`,f),window.removeEventListener(`mouseup`,f)}),[a,d,f]),(0,n.jsx)(`div`,{"data-u-comp":`color-picker-hue-slider`,className:`univer-relative univer-w-full univer-select-none`,children:(0,n.jsx)(`div`,{ref:s,className:`univer-relative univer-h-2 univer-w-full univer-cursor-pointer univer-rounded-full univer-shadow-inner`,style:{background:`linear-gradient(to right,
|
|
41
|
+
`},ss=0,cs=[];function ls(e){var n=t.useRef([]),r=t.useRef([0,0]),i=t.useRef(),a=t.useState(ss++)[0],o=t.useState(jo)[0],s=t.useRef(e);t.useEffect(function(){s.current=e},[e]),t.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${a}`);var t=ao([e.lockRef.current],(e.shards||[]).map(is),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${a}`)}),function(){document.body.classList.remove(`block-interactivity-${a}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${a}`)})}}},[e.inert,e.lockRef.current,e.shards]);var c=t.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!s.current.allowPinchZoom;var n=ns(e),a=r.current,o=`deltaX`in e?e.deltaX:a[0]-n[0],c=`deltaY`in e?e.deltaY:a[1]-n[1],l,u=e.target,d=Math.abs(o)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Yo(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Yo(d,u)),!m)return!1;if(!i.current&&`changedTouches`in e&&(o||c)&&(i.current=l),!l)return!0;var h=i.current||l;return ts(h,t,e,h===`h`?o:c,!0)},[]),l=t.useCallback(function(e){var t=e;if(!(!cs.length||cs[cs.length-1]!==o)){var r=`deltaY`in t?rs(t):ns(t),i=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&as(e.delta,r)})[0];if(i&&i.should){t.cancelable&&t.preventDefault();return}if(!i){var a=(s.current.shards||[]).map(is).filter(Boolean).filter(function(e){return e.contains(t.target)});(a.length>0?c(t,a[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),u=t.useCallback(function(e,t,r,i){var a={name:e,delta:t,target:r,should:i,shadowParent:us(r)};n.current.push(a),setTimeout(function(){n.current=n.current.filter(function(e){return e!==a})},1)},[]),d=t.useCallback(function(e){r.current=ns(e),i.current=void 0},[]),f=t.useCallback(function(t){u(t.type,rs(t),t.target,c(t,e.lockRef.current))},[]),p=t.useCallback(function(t){u(t.type,ns(t),t.target,c(t,e.lockRef.current))},[]);t.useEffect(function(){return cs.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,l,Wo),document.addEventListener(`touchmove`,l,Wo),document.addEventListener(`touchstart`,d,Wo),function(){cs=cs.filter(function(e){return e!==o}),document.removeEventListener(`wheel`,l,Wo),document.removeEventListener(`touchmove`,l,Wo),document.removeEventListener(`touchstart`,d,Wo)}},[]);var m=e.removeScrollBar,h=e.inert;return t.createElement(t.Fragment,null,h?t.createElement(o,{styles:os(a)}):null,m?t.createElement(Vo,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function us(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ds=bo(xo,ls),fs=t.forwardRef(function(e,n){return t.createElement(Co,ro({},e,{ref:n,sideCar:ds}))});fs.classNames=Co.classNames;var ps=[`Enter`,` `],ms=[`ArrowDown`,`PageUp`,`Home`],hs=[`ArrowUp`,`PageDown`,`End`],gs=[...ms,...hs],_s={ltr:[...ps,`ArrowRight`],rtl:[...ps,`ArrowLeft`]},vs={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},ys=`Menu`,[bs,xs,Ss]=$t(ys),[Cs,ws]=Vt(ys,[Ss,$i,Pa]),Ts=$i(),Es=Pa(),[Ds,Os]=Cs(ys),[ks,As]=Cs(ys),js=e=>{let{__scopeMenu:t,open:r=!1,children:i,dir:a,onOpenChange:o,modal:s=!0}=e,c=Ts(t),[l,u]=p.useState(null),d=p.useRef(!1),f=en(o),m=Lt(a);return p.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),p.useEffect(()=>{if(!r)return;let e=()=>f(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[r,f]),(0,n.jsx)(ha,{...c,children:(0,n.jsx)(Ds,{scope:t,open:r,onOpenChange:f,content:l,onContentChange:u,children:(0,n.jsx)(ks,{scope:t,onClose:p.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:m,modal:s,children:i})})})};js.displayName=ys;var Ms=`MenuAnchor`,Ns=p.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e,a=Ts(r);return(0,n.jsx)(ga,{...a,...i,ref:t})});Ns.displayName=Ms;var Ps=`MenuPortal`,[Fs,Is]=Cs(Ps,{forceMount:void 0}),Ls=e=>{let{__scopeMenu:t,forceMount:r,children:i,container:a}=e,o=Os(Ps,t);return(0,n.jsx)(Fs,{scope:t,forceMount:r,children:(0,n.jsx)(X,{present:r||o.open,children:(0,n.jsx)(ba,{asChild:!0,container:a,children:i})})})};Ls.displayName=Ps;var Rs=`MenuContent`,[zs,Bs]=Cs(Rs),Vs=p.forwardRef((e,t)=>{let r=Is(Rs,e.__scopeMenu),{forceMount:i=r.forceMount,...a}=e,o=Os(Rs,e.__scopeMenu),s=As(Rs,e.__scopeMenu);return(0,n.jsx)(bs.Provider,{scope:e.__scopeMenu,children:(0,n.jsx)(X,{present:i||o.open,children:(0,n.jsx)(bs.Slot,{scope:e.__scopeMenu,children:s.modal?(0,n.jsx)(Hs,{...a,ref:t}):(0,n.jsx)(Us,{...a,ref:t})})})})}),Hs=p.forwardRef((e,t)=>{let r=Os(Rs,e.__scopeMenu),i=p.useRef(null),a=W(t,i);return p.useEffect(()=>{let e=i.current;if(e)return no(e)},[]),(0,n.jsx)(Gs,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Us=p.forwardRef((e,t)=>{let r=Os(Rs,e.__scopeMenu);return(0,n.jsx)(Gs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Ws=bt(`MenuContent.ScrollLock`),Gs=p.forwardRef((e,t)=>{let{__scopeMenu:r,loop:i=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:h,disableOutsideScroll:g,..._}=e,v=Os(Rs,r),y=As(Rs,r),b=Ts(r),x=Es(r),S=xs(r),[C,w]=p.useState(null),T=p.useRef(null),E=W(t,T,v.onContentChange),D=p.useRef(0),O=p.useRef(``),k=p.useRef(0),A=p.useRef(null),j=p.useRef(`right`),M=p.useRef(0),N=g?fs:p.Fragment,P=g?{as:Ws,allowPinchZoom:!0}:void 0,F=e=>{var t,n;let r=O.current+e,i=S().filter(e=>!e.disabled),a=document.activeElement,o=(t=i.find(e=>e.ref.current===a))==null?void 0:t.textValue,s=kc(i.map(e=>e.textValue),r,o),c=(n=i.find(e=>e.textValue===s))==null?void 0:n.ref.current;(function e(t){O.current=t,window.clearTimeout(D.current),t!==``&&(D.current=window.setTimeout(()=>e(``),1e3))})(r),c&&setTimeout(()=>c.focus())};p.useEffect(()=>()=>window.clearTimeout(D.current),[]),vn();let I=p.useCallback(e=>{var t,n;return j.current===((t=A.current)==null?void 0:t.side)&&jc(e,(n=A.current)==null?void 0:n.area)},[]);return(0,n.jsx)(zs,{scope:r,searchRef:O,onItemEnter:p.useCallback(e=>{I(e)&&e.preventDefault()},[I]),onItemLeave:p.useCallback(e=>{var t;I(e)||((t=T.current)==null||t.focus(),w(null))},[I]),onTriggerLeave:p.useCallback(e=>{I(e)&&e.preventDefault()},[I]),pointerGraceTimerRef:k,onPointerGraceIntentChange:p.useCallback(e=>{A.current=e},[]),children:(0,n.jsx)(N,{...P,children:(0,n.jsx)(wn,{asChild:!0,trapped:a,onMountAutoFocus:K(o,e=>{var t;e.preventDefault(),(t=T.current)==null||t.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,n.jsx)(cn,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:h,children:(0,n.jsx)(Ka,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:i,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:K(l,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,n.jsx)(_a,{role:`menu`,"aria-orientation":`vertical`,"data-state":wc(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:E,style:{outline:`none`,..._.style},onKeyDown:K(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&F(e.key));let i=T.current;if(e.target!==i||!gs.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);hs.includes(e.key)&&a.reverse(),Dc(a)}),onBlur:K(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),O.current=``)}),onPointerMove:K(e.onPointerMove,Mc(e=>{let t=e.target,n=M.current!==e.clientX;e.currentTarget.contains(t)&&n&&(j.current=e.clientX>M.current?`right`:`left`,M.current=e.clientX)}))})})})})})})});Vs.displayName=Rs;var Ks=`MenuGroup`,qs=p.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e;return(0,n.jsx)(q.div,{role:`group`,...i,ref:t})});qs.displayName=Ks;var Js=`MenuLabel`,Ys=p.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e;return(0,n.jsx)(q.div,{...i,ref:t})});Ys.displayName=Js;var Xs=`MenuItem`,Zs=`menu.itemSelect`,Qs=p.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:i,...a}=e,o=p.useRef(null),s=As(Xs,e.__scopeMenu),c=Bs(Xs,e.__scopeMenu),l=W(t,o),u=p.useRef(!1),d=()=>{let e=o.current;if(!r&&e){let t=new CustomEvent(Zs,{bubbles:!0,cancelable:!0});e.addEventListener(Zs,e=>i==null?void 0:i(e),{once:!0}),Qt(e,t),t.defaultPrevented?u.current=!1:s.onClose()}};return(0,n.jsx)($s,{...a,ref:l,disabled:r,onClick:K(e.onClick,d),onPointerDown:t=>{var n;(n=e.onPointerDown)==null||n.call(e,t),u.current=!0},onPointerUp:K(e.onPointerUp,e=>{var t;u.current||(t=e.currentTarget)==null||t.click()}),onKeyDown:K(e.onKeyDown,e=>{let t=c.searchRef.current!==``;r||t&&e.key===` `||ps.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Qs.displayName=Xs;var $s=p.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:i=!1,textValue:a,...o}=e,s=Bs(Xs,r),c=Es(r),l=p.useRef(null),u=W(t,l),[d,f]=p.useState(!1),[m,h]=p.useState(``);return p.useEffect(()=>{let e=l.current;if(e){var t;h(((t=e.textContent)==null?``:t).trim())}},[o.children]),(0,n.jsx)(bs.ItemSlot,{scope:r,disabled:i,textValue:a==null?m:a,children:(0,n.jsx)(qa,{asChild:!0,...c,focusable:!i,children:(0,n.jsx)(q.div,{role:`menuitem`,"data-highlighted":d?``:void 0,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,...o,ref:u,onPointerMove:K(e.onPointerMove,Mc(e=>{i?s.onItemLeave(e):(s.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,Mc(e=>s.onItemLeave(e))),onFocus:K(e.onFocus,()=>f(!0)),onBlur:K(e.onBlur,()=>f(!1))})})})}),ec=`MenuCheckboxItem`,tc=p.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:i,...a}=e;return(0,n.jsx)(lc,{scope:e.__scopeMenu,checked:r,children:(0,n.jsx)(Qs,{role:`menuitemcheckbox`,"aria-checked":Tc(r)?`mixed`:r,...a,ref:t,"data-state":Ec(r),onSelect:K(a.onSelect,()=>i==null?void 0:i(Tc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});tc.displayName=ec;var nc=`MenuRadioGroup`,[rc,ic]=Cs(nc,{value:void 0,onValueChange:()=>{}}),ac=p.forwardRef((e,t)=>{let{value:r,onValueChange:i,...a}=e,o=en(i);return(0,n.jsx)(rc,{scope:e.__scopeMenu,value:r,onValueChange:o,children:(0,n.jsx)(qs,{...a,ref:t})})});ac.displayName=nc;var oc=`MenuRadioItem`,sc=p.forwardRef((e,t)=>{let{value:r,...i}=e,a=ic(oc,e.__scopeMenu),o=r===a.value;return(0,n.jsx)(lc,{scope:e.__scopeMenu,checked:o,children:(0,n.jsx)(Qs,{role:`menuitemradio`,"aria-checked":o,...i,ref:t,"data-state":Ec(o),onSelect:K(i.onSelect,()=>{var e;return(e=a.onValueChange)==null?void 0:e.call(a,r)},{checkForDefaultPrevented:!1})})})});sc.displayName=oc;var cc=`MenuItemIndicator`,[lc,uc]=Cs(cc,{checked:!1}),dc=p.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:i,...a}=e,o=uc(cc,r);return(0,n.jsx)(X,{present:i||Tc(o.checked)||o.checked===!0,children:(0,n.jsx)(q.span,{...a,ref:t,"data-state":Ec(o.checked)})})});dc.displayName=cc;var fc=`MenuSeparator`,pc=p.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e;return(0,n.jsx)(q.div,{role:`separator`,"aria-orientation":`horizontal`,...i,ref:t})});pc.displayName=fc;var mc=`MenuArrow`,hc=p.forwardRef((e,t)=>{let{__scopeMenu:r,...i}=e,a=Ts(r);return(0,n.jsx)(va,{...a,...i,ref:t})});hc.displayName=mc;var gc=`MenuSub`,[_c,vc]=Cs(gc),yc=e=>{let{__scopeMenu:t,children:r,open:i=!1,onOpenChange:a}=e,o=Os(gc,t),s=Ts(t),[c,l]=p.useState(null),[u,d]=p.useState(null),f=en(a);return p.useEffect(()=>(o.open===!1&&f(!1),()=>f(!1)),[o.open,f]),(0,n.jsx)(ha,{...s,children:(0,n.jsx)(Ds,{scope:t,open:i,onOpenChange:f,content:u,onContentChange:d,children:(0,n.jsx)(_c,{scope:t,contentId:Rn(),triggerId:Rn(),trigger:c,onTriggerChange:l,children:r})})})};yc.displayName=gc;var bc=`MenuSubTrigger`,xc=p.forwardRef((e,t)=>{let r=Os(bc,e.__scopeMenu),i=As(bc,e.__scopeMenu),a=vc(bc,e.__scopeMenu),o=Bs(bc,e.__scopeMenu),s=p.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},d=p.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);p.useEffect(()=>d,[d]),p.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]);let f=W(t,a.onTriggerChange);return(0,n.jsx)(Ns,{asChild:!0,...u,children:(0,n.jsx)($s,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":r.open,"aria-controls":r.open?a.contentId:void 0,"data-state":wc(r.open),...e,ref:f,onClick:t=>{var n;(n=e.onClick)==null||n.call(e,t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,Mc(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!r.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:K(e.onPointerLeave,Mc(e=>{var t;d();let n=(t=r.content)==null?void 0:t.getBoundingClientRect();if(n){var i;let t=(i=r.content)==null?void 0:i.dataset.side,a=t===`right`,s=a?-5:5,l=n[a?`left`:`right`],u=n[a?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+s,y:e.clientY},{x:l,y:n.top},{x:u,y:n.top},{x:u,y:n.bottom},{x:l,y:n.bottom}],side:t}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:K(e.onKeyDown,t=>{let n=o.searchRef.current!==``;if(!(e.disabled||n&&t.key===` `)&&_s[i.dir].includes(t.key)){var a;r.onOpenChange(!0),(a=r.content)==null||a.focus(),t.preventDefault()}})})})});xc.displayName=bc;var Sc=`MenuSubContent`,Cc=p.forwardRef((e,t)=>{let r=Is(Rs,e.__scopeMenu),{forceMount:i=r.forceMount,align:a=`start`,...o}=e,s=Os(Rs,e.__scopeMenu),c=As(Rs,e.__scopeMenu),l=vc(Sc,e.__scopeMenu),u=p.useRef(null),d=W(t,u);return(0,n.jsx)(bs.Provider,{scope:e.__scopeMenu,children:(0,n.jsx)(X,{present:i||s.open,children:(0,n.jsx)(bs.Slot,{scope:e.__scopeMenu,children:(0,n.jsx)(Gs,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:d,align:a,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;c.isUsingKeyboardRef.current&&((t=u.current)==null||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:K(e.onFocusOutside,e=>{e.target!==l.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:K(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:K(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=vs[c.dir].includes(e.key);if(t&&n){var r;s.onOpenChange(!1),(r=l.trigger)==null||r.focus(),e.preventDefault()}})})})})})});Cc.displayName=Sc;function wc(e){return e?`open`:`closed`}function Tc(e){return e===`indeterminate`}function Ec(e){return Tc(e)?`indeterminate`:e?`checked`:`unchecked`}function Dc(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Oc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function kc(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Oc(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Ac(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function jc(e,t){return t?Ac({x:e.clientX,y:e.clientY},t):!1}function Mc(e){return t=>t.pointerType===`mouse`?e(t):void 0}var Nc=js,Pc=Ns,Fc=Ls,Ic=Vs,Lc=qs,Rc=Ys,zc=Qs,Bc=tc,Vc=ac,Hc=sc,Uc=dc,Wc=pc,Gc=hc,Kc=yc,qc=xc,Jc=Cc,Yc=`DropdownMenu`,[Xc,Zc]=Vt(Yc,[ws]),Z=ws(),[Qc,$c]=Xc(Yc),el=e=>{let{__scopeDropdownMenu:t,children:r,dir:i,open:a,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,l=Z(t),u=p.useRef(null),[d,f]=Yt({prop:a,defaultProp:o==null?!1:o,onChange:s,caller:Yc});return(0,n.jsx)(Qc,{scope:t,triggerId:Rn(),triggerRef:u,contentId:Rn(),open:d,onOpenChange:f,onOpenToggle:p.useCallback(()=>f(e=>!e),[f]),modal:c,children:(0,n.jsx)(Nc,{...l,open:d,onOpenChange:f,dir:i,modal:c,children:r})})};el.displayName=Yc;var tl=`DropdownMenuTrigger`,nl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:i=!1,...a}=e,o=$c(tl,r),s=Z(r),c=W(t,o.triggerRef);return(0,n.jsx)(Pc,{asChild:!0,...s,children:(0,n.jsx)(q.button,{type:`button`,id:o.triggerId,"aria-haspopup":`menu`,"aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?`open`:`closed`,"data-disabled":i?``:void 0,disabled:i,...a,ref:c,onPointerDown:K(e.onPointerDown,e=>{!i&&e.button===0&&e.ctrlKey===!1&&(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:K(e.onKeyDown,e=>{i||([`Enter`,` `].includes(e.key)&&o.onOpenToggle(),e.key===`ArrowDown`&&o.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});nl.displayName=tl;var rl=`DropdownMenuPortal`,il=e=>{let{__scopeDropdownMenu:t,...r}=e,i=Z(t);return(0,n.jsx)(Fc,{...i,...r})};il.displayName=rl;var al=`DropdownMenuContent`,ol=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=$c(al,r),o=Z(r),s=p.useRef(!1);return(0,n.jsx)(Ic,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...i,ref:t,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{var t;s.current||(t=a.triggerRef.current)==null||t.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:K(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!a.modal||r)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});ol.displayName=al;var sl=`DropdownMenuGroup`,cl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Lc,{...a,...i,ref:t})});cl.displayName=sl;var ll=`DropdownMenuLabel`,ul=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Rc,{...a,...i,ref:t})});ul.displayName=ll;var dl=`DropdownMenuItem`,fl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(zc,{...a,...i,ref:t})});fl.displayName=dl;var pl=`DropdownMenuCheckboxItem`,ml=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Bc,{...a,...i,ref:t})});ml.displayName=pl;var hl=`DropdownMenuRadioGroup`,gl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Vc,{...a,...i,ref:t})});gl.displayName=hl;var _l=`DropdownMenuRadioItem`,vl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Hc,{...a,...i,ref:t})});vl.displayName=_l;var yl=`DropdownMenuItemIndicator`,bl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Uc,{...a,...i,ref:t})});bl.displayName=yl;var xl=`DropdownMenuSeparator`,Sl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Wc,{...a,...i,ref:t})});Sl.displayName=xl;var Cl=`DropdownMenuArrow`,wl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Gc,{...a,...i,ref:t})});wl.displayName=Cl;var Tl=e=>{let{__scopeDropdownMenu:t,children:r,open:i,onOpenChange:a,defaultOpen:o}=e,s=Z(t),[c,l]=Yt({prop:i,defaultProp:o==null?!1:o,onChange:a,caller:`DropdownMenuSub`});return(0,n.jsx)(Kc,{...s,open:c,onOpenChange:l,children:r})},El=`DropdownMenuSubTrigger`,Dl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(qc,{...a,...i,ref:t})});Dl.displayName=El;var Ol=`DropdownMenuSubContent`,kl=p.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...i}=e,a=Z(r);return(0,n.jsx)(Jc,{...a,...i,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});kl.displayName=Ol;var Al=el,jl=nl,Ml=il,Nl=ol,Pl=fl,Fl=ml,Il=gl,Ll=vl,Rl=bl,zl=Sl,Bl=Tl,Vl=Dl,Hl=kl;let Ul=`univer-scrollbar-thin univer-scrollbar-track-gray-50 univer-scrollbar-thumb-gray-300 dark:!univer-scrollbar-track-gray-900 dark:!univer-scrollbar-thumb-gray-700`,Wl=`univer-border-gray-200 dark:!univer-border-gray-600 univer-border-solid`,Q=U(Wl,`univer-border`),Gl=U(Wl,`univer-border-l univer-border-b univer-border-t-0 univer-border-r-0`),Kl=U(Wl,`univer-border-l univer-border-b-0 univer-border-t-0 univer-border-r-0`),ql=U(Wl,`univer-border-b-0 univer-border-t-0 rtl:univer-border-l-0 rtl:univer-border-r`),Jl=U(Wl,`univer-border-l-0 univer-border-b-0 univer-border-t univer-border-r-0`),Yl=U(Wl,`univer-border-l-0 univer-border-b univer-border-t-0 univer-border-r-0`),Xl=U(Wl,`univer-border-l-0 univer-border-b-0 univer-border-t-0 univer-border-r`);function Zl({...e}){return(0,n.jsx)(Al,{"data-slot":`dropdown-menu`,...e})}function Ql({...e}){return(0,n.jsx)(Ml,{"data-slot":`dropdown-menu-portal`,...e})}function $l({...e}){return(0,n.jsx)(jl,{"data-slot":`dropdown-menu-trigger`,...e})}function eu({...e}){return(0,n.jsx)(Bl,{"data-slot":`dropdown-menu-sub`,...e})}function tu({...e}){return(0,n.jsx)(Il,{"data-slot":`dropdown-menu-radio-group`,...e})}function nu({className:e,inset:t,children:r,...i}){return(0,n.jsxs)(Vl,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":t,className:U(`univer-flex univer-cursor-default univer-select-none univer-items-center univer-justify-between univer-gap-2 univer-rounded univer-px-2 univer-py-1.5 univer-text-sm univer-outline-none data-[state=open]:univer-bg-gray-100 focus:univer-bg-gray-100 dark:data-[state=open]:!univer-bg-gray-600 dark:focus:!univer-bg-gray-600 [&_svg]:univer-pointer-events-none [&_svg]:univer-size-4 [&_svg]:univer-shrink-0`,e),...i,children:[r,(0,n.jsx)(re,{className:`ml-auto`})]})}function ru({className:e,...t}){return(0,n.jsx)(Hl,{"data-slot":`dropdown-menu-sub-content`,className:U(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[side=bottom]:univer-slide-in-from-top-2 data-[side=left]:univer-slide-in-from-right-2 data-[side=right]:univer-slide-in-from-left-2 data-[side=top]:univer-slide-in-from-bottom-2 univer-z-[1080] univer-box-border univer-max-h-[--radix-popper-available-height] univer-overflow-y-auto univer-rounded-md univer-bg-white univer-p-1.5 univer-text-gray-900 univer-shadow-md dark:!univer-bg-gray-700 dark:!univer-text-white`,Q,Ul,e),...t})}function iu({className:e,sideOffset:t=4,...r}){return(0,n.jsx)(Ml,{children:(0,n.jsx)(Nl,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:U(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[side=bottom]:univer-slide-in-from-top-2 data-[side=left]:univer-slide-in-from-right-2 data-[side=right]:univer-slide-in-from-left-2 data-[side=top]:univer-slide-in-from-bottom-2 univer-z-[1080] univer-box-border univer-max-h-[--radix-popper-available-height] univer-overflow-y-auto univer-rounded-md univer-bg-white univer-p-1.5 univer-text-gray-900 univer-shadow-md dark:!univer-bg-gray-700 dark:!univer-text-white`,Q,Ul,e),...r})})}function au({className:e,inset:t,variant:r=`default`,...i}){return(0,n.jsx)(Pl,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":r,className:U(`univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center univer-gap-2 univer-rounded univer-px-2 univer-py-1.5 univer-text-sm univer-outline-none univer-transition-colors data-[disabled]:univer-pointer-events-none data-[variant=destructive]:univer-text-red-600 data-[disabled]:univer-opacity-50 focus:univer-bg-gray-100 data-[variant=destructive]:focus:univer-bg-red-50 dark:data-[variant=destructive]:!univer-text-red-400 dark:focus:!univer-bg-gray-600 dark:data-[variant=destructive]:focus:!univer-bg-red-900 [&>svg]:univer-size-4 [&>svg]:univer-shrink-0`,e),...i})}function ou({className:e,children:t,hideIndicator:r,checked:i,...a}){return(0,n.jsxs)(Fl,{"data-slot":`dropdown-menu-checkbox-item`,className:U(`univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center univer-rounded univer-py-1.5 univer-pr-2 univer-text-sm univer-outline-none univer-transition-colors data-[disabled]:univer-pointer-events-none data-[disabled]:univer-opacity-50 focus:univer-bg-gray-100 dark:focus:!univer-bg-gray-600`,{"univer-pl-8":!r,"univer-pl-2":r},e),checked:i,...a,children:[!r&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-2 univer-flex univer-size-3.5 univer-items-center univer-justify-center`,children:(0,n.jsx)(Rl,{children:(0,n.jsx)(C,{className:`univer-block univer-size-4 univer-fill-current univer-text-primary-600`})})}),t]})}function su({className:e,children:t,hideIndicator:r,...i}){return(0,n.jsxs)(Ll,{"data-slot":`dropdown-menu-radio-item`,className:U(`univer-relative univer-flex univer-cursor-default univer-select-none univer-items-center univer-rounded univer-py-1.5 univer-pr-2 univer-text-sm univer-outline-none univer-transition-colors data-[disabled]:univer-pointer-events-none data-[disabled]:univer-opacity-50 focus:univer-bg-gray-100 dark:focus:!univer-bg-gray-600`,{"univer-pl-8":!r,"univer-pl-2":r},e),...i,children:[!r&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-2 univer-flex univer-size-3.5 univer-items-center univer-justify-center`,children:(0,n.jsx)(Rl,{children:(0,n.jsx)(C,{className:`univer-block univer-size-4 univer-fill-current univer-text-primary-600`})})}),t]})}function cu({className:e,...t}){return(0,n.jsx)(zl,{className:U(`-univer-mx-1 univer-my-1 univer-h-px univer-bg-gray-200 dark:!univer-bg-gray-600`,e),...t})}function lu(e){let{children:r,items:i,disabled:a,open:o,onOpenChange:s,...c}=e,[l,u]=(0,t.useState)(!1),d=o!==void 0,f=d?o:l;function p(e){a||(d||u(e),s==null||s(e))}function m(e,t){let{className:r,type:i}=e;if(i===`separator`)return(0,n.jsx)(cu,{className:r},t);if(i===`custom`)return(0,n.jsx)(`div`,{className:r,children:e.children},t);if(i===`radio`)return(0,n.jsx)(tu,{className:r,value:e.value,onValueChange:e.onSelect,children:e.options.map((t,r)=>{if(`type`in t){if(t.type===`separator`)return(0,n.jsx)(cu,{className:t.className},r)}else{if(t.value===void 0)throw Error("[DropdownMenu]: `value` is required");return(0,n.jsx)(su,{value:t.value,disabled:t.disabled,hideIndicator:e.hideIndicator,children:t.label},t.value)}return null})},t);if(i===`checkbox`)return(0,n.jsx)(ou,{className:r,disabled:e.disabled,checked:e.checked,onSelect:()=>{var t;(t=e.onSelect)==null||t.call(e,e.value)},children:e.label},t);if(i===`item`)return(0,n.jsx)(au,{className:r,disabled:e.disabled,variant:e.variant,onSelect:()=>{var t;(t=e.onSelect)==null||t.call(e,e)},children:e.children},t);if(i===`subItem`){var a;return(0,n.jsxs)(eu,{children:[(0,n.jsx)(nu,{children:e.children}),(0,n.jsx)(Ql,{children:(0,n.jsx)(ru,{sideOffset:12,children:(a=e.options)==null?void 0:a.map((e,t)=>m(e,t))})})]},t)}}return(0,n.jsxs)(Zl,{modal:!1,open:f,onOpenChange:p,children:[(0,n.jsx)($l,{asChild:!0,children:r}),(0,n.jsx)(iu,{className:`univer-text-sm`,collisionPadding:{top:12,bottom:12},onWheel:e=>e.stopPropagation(),...c,children:i.map((e,t)=>m(e,t))})]})}var uu=`Popover`,[du,fu]=Vt(uu,[$i]),pu=$i(),[mu,hu]=du(uu),gu=e=>{let{__scopePopover:t,children:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!1}=e,c=pu(t),l=p.useRef(null),[u,d]=p.useState(!1),[f,m]=Yt({prop:i,defaultProp:a==null?!1:a,onChange:o,caller:uu});return(0,n.jsx)(ha,{...c,children:(0,n.jsx)(mu,{scope:t,contentId:Rn(),triggerRef:l,open:f,onOpenChange:m,onOpenToggle:p.useCallback(()=>m(e=>!e),[m]),hasCustomAnchor:u,onCustomAnchorAdd:p.useCallback(()=>d(!0),[]),onCustomAnchorRemove:p.useCallback(()=>d(!1),[]),modal:s,children:r})})};gu.displayName=uu;var _u=`PopoverAnchor`,vu=p.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=hu(_u,r),o=pu(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:c}=a;return p.useEffect(()=>(s(),()=>c()),[s,c]),(0,n.jsx)(ga,{...o,...i,ref:t})});vu.displayName=_u;var yu=`PopoverTrigger`,bu=p.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=hu(yu,r),o=pu(r),s=W(t,a.triggerRef),c=(0,n.jsx)(q.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":Fu(a.open),...i,ref:s,onClick:K(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?c:(0,n.jsx)(ga,{asChild:!0,...o,children:c})});bu.displayName=yu;var xu=`PopoverPortal`,[Su,Cu]=du(xu,{forceMount:void 0}),wu=e=>{let{__scopePopover:t,forceMount:r,children:i,container:a}=e,o=hu(xu,t);return(0,n.jsx)(Su,{scope:t,forceMount:r,children:(0,n.jsx)(X,{present:r||o.open,children:(0,n.jsx)(ba,{asChild:!0,container:a,children:i})})})};wu.displayName=xu;var Tu=`PopoverContent`,Eu=p.forwardRef((e,t)=>{let r=Cu(Tu,e.__scopePopover),{forceMount:i=r.forceMount,...a}=e,o=hu(Tu,e.__scopePopover);return(0,n.jsx)(X,{present:i||o.open,children:o.modal?(0,n.jsx)(Ou,{...a,ref:t}):(0,n.jsx)(ku,{...a,ref:t})})});Eu.displayName=Tu;var Du=bt(`PopoverContent.RemoveScroll`),Ou=p.forwardRef((e,t)=>{let r=hu(Tu,e.__scopePopover),i=p.useRef(null),a=W(t,i),o=p.useRef(!1);return p.useEffect(()=>{let e=i.current;if(e)return no(e)},[]),(0,n.jsx)(fs,{as:Du,allowPinchZoom:!0,children:(0,n.jsx)(Au,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),o.current||(t=r.triggerRef.current)==null||t.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;o.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),ku=p.forwardRef((e,t)=>{let r=hu(Tu,e.__scopePopover),i=p.useRef(!1),a=p.useRef(!1);return(0,n.jsx)(Au,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n;if((n=e.onCloseAutoFocus)==null||n.call(e,t),!t.defaultPrevented){var o;i.current||(o=r.triggerRef.current)==null||o.focus(),t.preventDefault()}i.current=!1,a.current=!1},onInteractOutside:t=>{var n,o;(n=e.onInteractOutside)==null||n.call(e,t),t.defaultPrevented||(i.current=!0,t.detail.originalEvent.type===`pointerdown`&&(a.current=!0));let s=t.target;(o=r.triggerRef.current)!=null&&o.contains(s)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&a.current&&t.preventDefault()}})}),Au=p.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,p=hu(Tu,r),m=pu(r);return vn(),(0,n.jsx)(wn,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,n.jsx)(cn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,n.jsx)(_a,{"data-state":Fu(p.open),role:`dialog`,id:p.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),ju=`PopoverClose`,Mu=p.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=hu(ju,r);return(0,n.jsx)(q.button,{type:`button`,...i,ref:t,onClick:K(e.onClick,()=>a.onOpenChange(!1))})});Mu.displayName=ju;var Nu=`PopoverArrow`,Pu=p.forwardRef((e,t)=>{let{__scopePopover:r,...i}=e,a=pu(r);return(0,n.jsx)(va,{...a,...i,ref:t})});Pu.displayName=Nu;function Fu(e){return e?`open`:`closed`}var Iu=gu,Lu=bu,Ru=wu,zu=Eu;function Bu({...e}){return(0,n.jsx)(Iu,{"data-slot":`popover`,...e})}function Vu({...e}){return(0,n.jsx)(Lu,{"data-slot":`popover-trigger`,...e})}function Hu({className:e,align:t=`center`,sideOffset:r=4,...i}){return(0,n.jsx)(Ru,{children:(0,n.jsx)(zu,{"data-slot":`popover-content`,align:t,sideOffset:r,className:U(`univer-outline-hidden data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[side=bottom]:univer-slide-in-from-top-2 data-[side=left]:univer-slide-in-from-right-2 data-[side=right]:univer-slide-in-from-left-2 data-[side=top]:univer-slide-in-from-bottom-2 univer-z-[1080] univer-max-h-[--radix-popper-available-height] univer-overflow-y-auto univer-rounded-md univer-bg-white univer-text-gray-900 univer-shadow-md dark:!univer-bg-gray-900 dark:!univer-text-white dark:focus-visible:!univer-border-gray-600`,Q,Ul,e),...i})})}function Uu(e){let{children:r,overlay:i,disabled:a,open:o,onOpenChange:s,...c}=e,[l,u]=(0,t.useState)(!1),d=o!==void 0,f=d?o:l;function p(e){a||(d||u(e),s==null||s(e))}return(0,n.jsxs)(Bu,{open:f,onOpenChange:p,children:[(0,n.jsx)(Vu,{asChild:!0,children:r}),(0,n.jsx)(Hu,{...c,children:i})]})}function Wu(e,t=2){return String(e).padStart(t,`0`)}function Gu(e,t){let n=e==null?new Date:e;if(Number.isNaN(n.getTime()))return`Invalid Date`;let r={YYYY:String(n.getFullYear()),MM:Wu(n.getMonth()+1),DD:Wu(n.getDate()),HH:Wu(n.getHours()),mm:Wu(n.getMinutes()),ss:Wu(n.getSeconds())};return t.replace(/YYYY|MM|DD|HH|mm|ss/g,e=>{var t;return(t=r[e])==null?e:t})}function Ku(e){let{className:t,value:r,onValueChange:i}=e;function a(e){let[t,n,a]=e.target.value.split(`:`).map(Number),o=new Date(r==null?Date.now():r);o.setHours(t,n,a,0),i==null||i(o)}return(0,n.jsxs)(`div`,{"data-u-comp":`time-input`,className:`univer-relative univer-mx-auto univer-mt-1 univer-w-fit`,children:[(0,n.jsx)(T,{className:`univer-absolute univer-left-2 univer-top-1/2 -univer-translate-y-1/2 univer-text-gray-600 dark:!univer-text-gray-400`}),(0,n.jsx)(`input`,{className:U(`univer-block univer-h-7 univer-w-fit univer-appearance-none univer-rounded-md univer-bg-transparent univer-pl-6 univer-pr-2 univer-text-center univer-text-gray-800 univer-shadow univer-outline-none univer-transition-all univer-duration-200 focus:univer-border-primary-600 dark:!univer-text-white dark:focus:!univer-border-primary-500 [&::-webkit-calendar-picker-indicator]:univer-hidden [&::-webkit-calendar-picker-indicator]:univer-appearance-none`,Q,t),type:`time`,step:`1`,value:Gu(r,`HH:mm:ss`),onChange:a})]})}function qu(e){let{data:r,itemKey:i,children:a,height:o,itemHeight:s,initialScrollIndex:c=0,overscan:l=2,className:u,style:d}=e,f=o&&s?c*s:0,p=(0,t.useRef)(null),[m,h]=(0,t.useState)(f);if((0,t.useEffect)(()=>{let e=p.current;if(!e||!o||!s)return;let t=c*s;e.scrollTop=t,h(t)},[o,c,s]),!o||!s||s<=0)return(0,n.jsx)(`div`,{className:u,style:d,children:r.map((e,t)=>{let r=typeof i==`function`?i(e):e[i];return(0,n.jsx)(`div`,{children:a(e,t)},r)})});let g=Math.max(0,Math.floor(m/s)-l),_=Math.ceil(o/s)+l*2,v=Math.min(r.length,g+_),y=g*s,b=r.length*s,x=r.slice(g,v);return(0,n.jsx)(`div`,{ref:p,className:u,style:{...d,height:o,overflowY:`auto`},onScroll:e=>h(e.currentTarget.scrollTop),children:(0,n.jsx)(`div`,{style:{height:b,position:`relative`},children:(0,n.jsx)(`div`,{style:{transform:`translateY(${y}px)`},children:x.map((e,t)=>{let r=typeof i==`function`?i(e):e[i];return(0,n.jsx)(`div`,{children:a(e,g+t)},r)})})})})}function Ju(e,t){return new Date(e,t+1,0).getDate()}function Yu(e,t){return new Date(e,t,1).getDay()}function Xu(e){let{className:t,...r}=e;return(0,n.jsx)(`button`,{className:U(`univer-size-7 univer-rounded-md univer-border-none univer-bg-transparent univer-p-1 univer-transition-all hover:univer-bg-gray-200 dark:hover:!univer-bg-gray-600`,t),type:`button`,...r})}function Zu(e){let{className:r,max:i,min:a,showTime:o=!1,value:s,onValueChange:c}=e,{locale:l}=(0,t.useContext)(G),{ariaLabels:u,year:d,weekDays:f,months:p}=l==null?void 0:l.Calendar,m=new Date,[h,g]=(0,t.useState)((s==null?m:s).getFullYear()),[_,v]=(0,t.useState)((s==null?m:s).getMonth()),[y,b]=(0,t.useState)(!1);function x(){v(e=>e===0?(g(e=>e-1),11):e-1)}function S(){v(e=>e===11?(g(e=>e+1),0):e+1)}function C(e){v(Number(e))}function w(e){g(e),b(!1)}let T=(0,t.useMemo)(()=>{var e,t;let n=(e=a==null?void 0:a.getFullYear())==null?h-100:e,r=(t=i==null?void 0:i.getFullYear())==null?h+100:t;return Array.from({length:Math.max(0,r-n+1)},(e,t)=>({year:n+t}))},[h,i,a]),E=Math.max(0,T.findIndex(e=>e.year===h)),D=(0,t.useMemo)(()=>[{type:`radio`,value:String(_),hideIndicator:!0,options:p.map((e,t)=>({label:e,value:String(t)})),onSelect:C}],[_,p]),O=Ju(h,_),k=Yu(h,_),A=(0,t.useMemo)(()=>{let e=[];for(let t=0;t<k;t++)e.push(null);for(let t=1;t<=O;t++)e.push(t);return e},[O,k]);function j(e){return e&&h===(s==null?void 0:s.getFullYear())&&_===(s==null?void 0:s.getMonth())&&e===(s==null?void 0:s.getDate())}function M(e){return e&&h===m.getFullYear()&&_===m.getMonth()&&e===m.getDate()}function N(e){var t,n,r;if(!e)return!1;let o=(t=s==null?void 0:s.getHours())==null?m.getHours():t,c=(n=s==null?void 0:s.getMinutes())==null?m.getMinutes():n,l=(r=s==null?void 0:s.getSeconds())==null?m.getSeconds():r,u=new Date(h,_,e,o,c,l);return!!(a&&u<a||i&&u>i)}function P(e){var t,n,r;if(N(e))return;let i=(t=s==null?void 0:s.getHours())==null?m.getHours():t,a=(n=s==null?void 0:s.getMinutes())==null?m.getMinutes():n,o=(r=s==null?void 0:s.getSeconds())==null?m.getSeconds():r,l=new Date(h,_,e,i,a,o);c==null||c(l)}function F(e){var t;let n=e.getHours(),r=e.getMinutes(),i=e.getSeconds(),a=new Date(h,_,(t=s==null?void 0:s.getDate())==null?m.getDate():t,n,r,i);c==null||c(a)}return(0,n.jsxs)(`div`,{"data-u-comp":`calendar`,className:U(`univer-mx-auto univer-max-w-xs univer-select-none univer-rounded univer-bg-white univer-text-gray-900 dark:!univer-bg-gray-900 dark:!univer-text-white`,r),children:[(0,n.jsxs)(`nav`,{className:`univer-mb-4 univer-flex univer-items-center univer-justify-between`,children:[(0,n.jsx)(Xu,{className:`univer-text-lg univer-text-gray-500 dark:!univer-text-gray-200`,"aria-label":u.previousMonth,onClick:x,children:(0,n.jsx)(re,{className:`univer-rotate-180`})}),(0,n.jsxs)(`span`,{className:`univer-flex univer-items-center univer-gap-0.5 univer-text-sm univer-font-medium`,children:[(0,n.jsx)(Uu,{align:`center`,className:`univer-w-24 univer-p-1.5`,open:y,overlay:(0,n.jsx)(qu,{className:`univer-rounded`,data:T,height:224,initialScrollIndex:E,itemHeight:32,itemKey:`year`,children:e=>(0,n.jsx)(`button`,{className:U(`univer-flex univer-h-8 univer-w-full univer-items-center univer-justify-center univer-rounded univer-border-none univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-900 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-600`,{"univer-bg-gray-200 dark:!univer-bg-gray-500":e.year===h}),type:`button`,onClick:()=>w(e.year),children:e.year})}),onOpenChange:b,children:(0,n.jsxs)(Pt,{variant:`text`,type:`button`,"aria-label":u.selectYear,children:[h,d]})}),(0,n.jsx)(lu,{align:`center`,className:`univer-max-h-80 univer-min-w-28 univer-overflow-auto`,items:D,children:(0,n.jsx)(Pt,{variant:`text`,type:`button`,"aria-label":u.selectMonth,children:p[_]})})]}),(0,n.jsx)(Xu,{className:`univer-text-lg univer-text-gray-500 dark:!univer-text-gray-200`,"aria-label":u.nextMonth,onClick:S,children:(0,n.jsx)(re,{})})]}),(0,n.jsx)(`div`,{className:`univer-mb-1 univer-grid univer-grid-cols-7 univer-gap-1 univer-text-center univer-text-sm univer-text-gray-500 dark:!univer-text-gray-200`,children:f.map(e=>(0,n.jsx)(`div`,{children:e},e))}),(0,n.jsx)(`div`,{className:`univer-grid univer-grid-cols-7 univer-gap-1 univer-text-center`,children:A.map((e,t)=>e?(0,n.jsx)(Xu,{className:U({"!univer-bg-primary-600 univer-font-bold univer-text-white":!M(e)&&j(e),"dark:!univer-text-white":!M(e)&&!j(e),"!univer-bg-primary-600 univer-text-white":M(e)&&j(e),"univer-font-semibold univer-text-primary-600 dark:!univer-text-primary-500":M(e)&&!j(e),"univer-cursor-not-allowed univer-opacity-40":N(e),"univer-hover:bg-primary-100 univer-cursor-pointer univer-text-gray-800":!j(e)&&!N(e)}),onClick:()=>P(e),disabled:N(e),children:e},t):(0,n.jsx)(`div`,{},t))}),o&&(0,n.jsx)(Ku,{value:s,onValueChange:F})]})}function Qu({emptyText:e}){return(0,n.jsx)(`section`,{className:`univer-h-8 univer-px-2 univer-pr-32 univer-text-sm/8 univer-text-gray-600 dark:!univer-text-gray-200`,children:e})}function $u(e){let{value:r,options:i=[],onChange:a,contentClassName:o,wrapperClassName:s}=e,{locale:c}=(0,t.useContext)(G),l=(0,t.useMemo)(()=>{let e=[i];return r.forEach((t,n)=>{let r=e[n].find(e=>e.value===t);r!=null&&r.children&&e.push(r.children)}),e},[r]);function u(e,t){if(t===r[e])return;if(r[e+1]){let n=r.slice(0,e+1);n[e]=t,a(n);return}let n=[...r];n[e]=t,a(n)}return(0,n.jsxs)(`section`,{"data-u-comp":`cascader-list`,className:U(`univer-overflow-auto-y univer-grid univer-h-full univer-max-h-80 univer-grid-flow-col univer-rounded univer-py-2 univer-text-gray-900 dark:!univer-text-white [&>ul:not(:last-child)]:univer-border-0 [&>ul:not(:last-child)]:univer-border-r [&>ul:not(:last-child)]:univer-border-solid [&>ul:not(:last-child)]:univer-border-r-gray-200`,Q,Ul,s),children:[l.map((e,t)=>e.length?(0,n.jsx)(`ul`,{className:U(`univer-m-0 univer-h-full univer-max-h-full univer-list-none univer-overflow-auto univer-px-2`,Ul,o),children:e.map(e=>(0,n.jsx)(`li`,{children:(0,n.jsxs)(`a`,{className:U(`univer-relative univer-block univer-h-8 univer-cursor-pointer univer-rounded univer-text-sm/8`,{"univer-px-7":t>0,"univer-px-1.5":t===0,"univer-bg-gray-200 dark:!univer-bg-gray-600":e.value===r[t]}),onClick:()=>u(t,e.value),children:[t>0&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-2 univer-flex univer-h-full univer-items-center`,children:e.value===r[t]&&(0,n.jsx)(C,{className:`univer-text-primary-600`})}),(0,n.jsx)(`span`,{children:e.label})]})},e.value))},t):(0,n.jsx)(Qu,{emptyText:c==null?void 0:c.CascaderList.empty},t)),r.length<=0&&(0,n.jsx)(Qu,{emptyText:c==null?void 0:c.CascaderList.empty})]})}function ed(e){let{children:r,className:i,style:a,value:o,disabled:s,direction:c=`horizontal`,onChange:l}=e,u=e=>{o.includes(e)?l(o.filter(t=>t!==e)):l([...o,e])};return(0,n.jsx)(`div`,{className:U(`univer-flex univer-gap-2`,{"univer-flex-col":c===`vertical`},i),style:a,children:t.Children.map(r,(e,n)=>(0,t.isValidElement)(e)?(0,t.cloneElement)(e,{key:n,children:e.props.children,checked:e.props.value?o.includes(e.props.value):!1,disabled:s==null?e.props.disabled:s,onChange:u}):e)})}function td(e){let{children:r,className:i,style:a,checked:o=!1,indeterminate:s=!1,value:c,disabled:l=!1,onChange:u,contentClassName:d}=e,f=(0,t.useRef)(null);function p(e){if(e.stopPropagation(),!(!u||l))if(c!==void 0)u==null||u(c);else{var t,n;let e=(t=f==null||(n=f.current)==null?void 0:n.checked)==null?!1:t;u==null||u(e)}}return(0,n.jsxs)(`label`,{"data-u-comp":`checkbox`,className:U(`univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-text-sm`,{"univer-cursor-pointer univer-text-gray-900 dark:!univer-text-white":!l,"univer-text-gray-400":l},i),style:a,children:[(0,n.jsxs)(`span`,{className:`univer-relative univer-block`,children:[(0,n.jsx)(`input`,{ref:f,className:`univer-absolute univer-size-0 univer-opacity-0`,type:`checkbox`,checked:o,disabled:l,onChange:p}),(0,n.jsxs)(`span`,{className:U(`univer-relative univer-box-border univer-flex univer-size-4 univer-items-center univer-justify-center univer-overflow-hidden univer-rounded univer-border univer-border-solid univer-transition-colors`,{"univer-opacity-50":l,"univer-border-primary-600 univer-bg-primary-600":o||s,"univer-border-gray-300 univer-bg-gray-50 dark:!univer-border-gray-500 dark:!univer-bg-gray-600":!o&&!s}),children:[o&&(0,n.jsx)(C,{className:`univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-size-3 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-text-white`}),s&&!o&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-h-0.5 univer-w-2.5 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded univer-bg-white`})]})]}),(0,n.jsx)(`span`,{className:U(`univer-select-none`,d),children:r})]})}var nd=`Dialog`,[rd,id]=Vt(nd),[ad,od]=rd(nd),sd=e=>{let{__scopeDialog:t,children:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=p.useRef(null),l=p.useRef(null),[u,d]=Yt({prop:i,defaultProp:a==null?!1:a,onChange:o,caller:nd});return(0,n.jsx)(ad,{scope:t,triggerRef:c,contentRef:l,contentId:Rn(),titleId:Rn(),descriptionId:Rn(),open:u,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(e=>!e),[d]),modal:s,children:r})};sd.displayName=nd;var cd=`DialogTrigger`,ld=p.forwardRef((e,t)=>{let{__scopeDialog:r,...i}=e,a=od(cd,r),o=W(t,a.triggerRef);return(0,n.jsx)(q.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":kd(a.open),...i,ref:o,onClick:K(e.onClick,a.onOpenToggle)})});ld.displayName=cd;var ud=`DialogPortal`,[dd,fd]=rd(ud,{forceMount:void 0}),pd=e=>{let{__scopeDialog:t,forceMount:r,children:i,container:a}=e,o=od(ud,t);return(0,n.jsx)(dd,{scope:t,forceMount:r,children:p.Children.map(i,e=>(0,n.jsx)(X,{present:r||o.open,children:(0,n.jsx)(ba,{asChild:!0,container:a,children:e})}))})};pd.displayName=ud;var md=`DialogOverlay`,hd=p.forwardRef((e,t)=>{let r=fd(md,e.__scopeDialog),{forceMount:i=r.forceMount,...a}=e,o=od(md,e.__scopeDialog);return o.modal?(0,n.jsx)(X,{present:i||o.open,children:(0,n.jsx)(_d,{...a,ref:t})}):null});hd.displayName=md;var gd=bt(`DialogOverlay.RemoveScroll`),_d=p.forwardRef((e,t)=>{let{__scopeDialog:r,...i}=e,a=od(md,r),o=W(t,dn());return(0,n.jsx)(fs,{as:gd,allowPinchZoom:!0,shards:[a.contentRef],children:(0,n.jsx)(q.div,{"data-state":kd(a.open),...i,ref:o,style:{pointerEvents:`auto`,...i.style}})})}),vd=`DialogContent`,yd=p.forwardRef((e,t)=>{let r=fd(vd,e.__scopeDialog),{forceMount:i=r.forceMount,...a}=e,o=od(vd,e.__scopeDialog);return(0,n.jsx)(X,{present:i||o.open,children:o.modal?(0,n.jsx)(bd,{...a,ref:t}):(0,n.jsx)(xd,{...a,ref:t})})});yd.displayName=vd;var bd=p.forwardRef((e,t)=>{let r=od(vd,e.__scopeDialog),i=p.useRef(null),a=W(t,r.contentRef,i);return p.useEffect(()=>{let e=i.current;if(e)return no(e)},[]),(0,n.jsx)(Sd,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:K(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),(t=r.triggerRef.current)==null||t.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:K(e.onFocusOutside,e=>e.preventDefault())})}),xd=p.forwardRef((e,t)=>{let r=od(vd,e.__scopeDialog),i=p.useRef(!1),a=p.useRef(!1);return(0,n.jsx)(Sd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n;if((n=e.onCloseAutoFocus)==null||n.call(e,t),!t.defaultPrevented){var o;i.current||(o=r.triggerRef.current)==null||o.focus(),t.preventDefault()}i.current=!1,a.current=!1},onInteractOutside:t=>{var n,o;(n=e.onInteractOutside)==null||n.call(e,t),t.defaultPrevented||(i.current=!0,t.detail.originalEvent.type===`pointerdown`&&(a.current=!0));let s=t.target;(o=r.triggerRef.current)!=null&&o.contains(s)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&a.current&&t.preventDefault()}})}),Sd=p.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,...s}=e,c=od(vd,r);return vn(),(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(wn,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,n.jsx)(cn,{role:`dialog`,id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":kd(c.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),Cd=`DialogTitle`,wd=p.forwardRef((e,t)=>{let{__scopeDialog:r,...i}=e,a=od(Cd,r);return(0,n.jsx)(q.h2,{id:a.titleId,...i,ref:t})});wd.displayName=Cd;var Td=`DialogDescription`,Ed=p.forwardRef((e,t)=>{let{__scopeDialog:r,...i}=e,a=od(Td,r);return(0,n.jsx)(q.p,{id:a.descriptionId,...i,ref:t})});Ed.displayName=Td;var Dd=`DialogClose`,Od=p.forwardRef((e,t)=>{let{__scopeDialog:r,...i}=e,a=od(Dd,r);return(0,n.jsx)(q.button,{type:`button`,...i,ref:t,onClick:K(e.onClick,()=>a.onOpenChange(!1))})});Od.displayName=Dd;function kd(e){return e?`open`:`closed`}let Ad=sd,jd=pd,Md=(0,t.forwardRef)(({className:e,...t},r)=>(0,n.jsx)(hd,{ref:r,className:U(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 univer-fixed univer-inset-0 univer-z-[1080] univer-bg-[rgba(0,0,0,0.8)]`,e),...t}));Md.displayName=hd.displayName;let Nd=(0,t.forwardRef)(({className:e,children:t,closable:r=!0,onClickClose:i,mountContainer:a,...o},s)=>(0,n.jsxs)(jd,{container:a==null?void 0:a,children:[(0,n.jsx)(Md,{}),(0,n.jsxs)(yd,{ref:s,className:U(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=open]:univer-slide-in-from-left-1/2 data-[state=open]:univer-slide-in-from-top-[48%] data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[state=closed]:univer-slide-out-to-left-1/2 data-[state=closed]:univer-slide-out-to-top-[48%] univer-fixed univer-left-1/2 univer-top-1/2 univer-z-[1080] univer-box-border univer-grid univer-w-full univer-max-w-lg -univer-translate-x-1/2 -univer-translate-y-1/2 univer-gap-4 univer-bg-white univer-p-4 univer-text-gray-500 univer-shadow-md univer-duration-200 sm:!univer-rounded-lg dark:!univer-bg-gray-700 dark:!univer-text-gray-400`,Q,e),...o,children:[t,r&&(0,n.jsxs)(Od,{"data-slot":`close`,className:`univer-absolute univer-right-4 univer-top-4 univer-size-6 univer-cursor-pointer univer-rounded-sm univer-border-none univer-bg-transparent univer-p-0 univer-transition-opacity hover:univer-opacity-100 disabled:univer-pointer-events-none rtl:univer-left-4 rtl:univer-right-auto`,onClick:i,children:[(0,n.jsx)(D,{className:`univer-size-4 univer-text-gray-400`}),(0,n.jsx)(`span`,{className:`univer-sr-only`,children:`Close`})]})]})]}));Nd.displayName=yd.displayName;let Pd=({className:e,...t})=>(0,n.jsx)(`div`,{"data-slot":`dialog-header`,className:U(`univer-flex univer-flex-col univer-space-y-1.5 univer-text-center sm:!univer-text-left sm:rtl:!univer-text-right`,e),...t});Pd.displayName=`DialogHeader`;let Fd=({className:e,...t})=>(0,n.jsx)(`div`,{className:U(`univer-flex univer-flex-col-reverse sm:!univer-flex-row sm:!univer-justify-end sm:!univer-space-x-2`,e),...t});Fd.displayName=`DialogFooter`;let Id=(0,t.forwardRef)(({className:e,...t},r)=>(0,n.jsx)(wd,{ref:r,className:U(`univer-my-0 univer-text-lg univer-font-semibold univer-leading-none univer-tracking-tight univer-text-gray-900 dark:!univer-text-white`,e),...t}));Id.displayName=wd.displayName;let Ld=(0,t.forwardRef)(({className:e,...t},r)=>(0,n.jsx)(Ed,{ref:r,className:U(`univer-text-sm univer-text-gray-500`,e),...t}));Ld.displayName=Ed.displayName;function Rd(e={}){let n=(0,t.useCallback)(()=>{let{innerWidth:e,innerHeight:t}=window;return{x:Math.max(0,(e-0)/2),y:Math.max(0,(t-0)/2)}},[]),{defaultPosition:r=n(),enabled:i=!1}=e,[a,o]=(0,t.useState)(r),[s,c]=(0,t.useState)(!1),l=(0,t.useRef)(null),u=(0,t.useRef)({x:0,y:0}),d=(0,t.useRef)({x:0,y:0}),f=(0,t.useRef)(!1);(0,t.useEffect)(()=>{if(!l.current||f.current||e.defaultPosition)return;let{width:t,height:n}=l.current.getBoundingClientRect(),{innerWidth:r,innerHeight:i}=window,a=Math.max(0,(r-t)/2),s=Math.max(0,(i-n)/2);o({x:a,y:s}),u.current={x:a,y:s},f.current=!0},[e.defaultPosition]);let p=(0,t.useCallback)((e,t)=>{if(!l.current)return{x:e,y:t};let n=l.current.getBoundingClientRect(),{clientWidth:r,clientHeight:i}=document.documentElement,a=u.current.x+(e-d.current.x),o=u.current.y+(t-d.current.y);return a<0&&(a=0),o<0&&(o=0),a+n.width>r&&(a=r-n.width),o+n.height>i&&(o=i-n.height),{x:a,y:o}},[]),m=(0,t.useCallback)(e=>{i&&(e.preventDefault(),e.stopPropagation(),u.current={...a},d.current={x:e.clientX,y:e.clientY},c(!0),document.body.style.userSelect=`none`)},[i,a]),h=(0,t.useCallback)(e=>{s&&(e.preventDefault(),e.stopPropagation(),o(p(e.clientX,e.clientY)))},[s,p]),g=(0,t.useCallback)(()=>{c(!1),document.body.style.userSelect=``},[]);return(0,t.useEffect)(()=>{if(i)return document.addEventListener(`mousemove`,h),document.addEventListener(`mouseup`,g),()=>{document.removeEventListener(`mousemove`,h),document.removeEventListener(`mouseup`,g)}},[i,h,g]),{position:a,isDragging:s,elementRef:l,setElementRef:t=>{if(l.current=t,t&&!f.current&&!e.defaultPosition){let{width:e,height:n}=t.getBoundingClientRect(),{innerWidth:r,innerHeight:i}=window,a=Math.max(0,(r-e)/2),s=Math.max(0,(i-n)/2);o({x:a,y:s}),u.current={x:a,y:s},f.current=!0}},handleMouseDown:m}}function zd(e){var r,i,a,o;let{className:s,children:c,style:l,open:u=!1,title:d,width:f,draggable:p=!1,defaultPosition:m,footer:h,mask:g=!0,keyboard:_=!0,closable:v=!0,maskClosable:y=!0,showOk:b,showCancel:x,onOpenChange:S,onClose:C,onOk:w,onCancel:T}=e,{locale:E,mountContainer:D,direction:O}=(0,t.useContext)(G),{position:k,isDragging:A,setElementRef:j,handleMouseDown:M}=Rd({defaultPosition:m,enabled:p}),N=h==null?b||x?(0,n.jsxs)(`div`,{className:`univer-flex univer-justify-end univer-gap-2`,children:[x&&(0,n.jsx)(Pt,{onClick:T,children:(r=E==null||(i=E.Confirm)==null?void 0:i.cancel)==null?`Cancel`:r}),b&&(0,n.jsx)(Pt,{variant:`primary`,onClick:w,children:(a=E==null||(o=E.Confirm)==null?void 0:o.confirm)==null?`OK`:a})]}):null:h,P=(0,t.useCallback)(e=>{e&&p&&j(e)},[p,j]),F=(0,t.useCallback)(e=>{!g&&!e||(S==null||S(e),e||C==null||C())},[C,S]);function I(){S==null||S(!1),C==null||C()}return(0,n.jsx)(Ad,{open:u,onOpenChange:F,modal:g!==!1,children:(0,n.jsxs)(Nd,{ref:P,className:U(s,{"!univer-animate-none":p}),style:{...l,width:f?typeof f==`number`?`${f}px`:f:void 0,maxWidth:f?`initial`:void 0,...p?{position:`absolute`,margin:0,left:0,top:0,transform:`translate(${k.x}px, ${k.y}px)`,transition:A?`none`:void 0,cursor:A?`grabbing`:void 0}:{}},closable:v,mountContainer:D,dir:O,onClickClose:I,onEscapeKeyDown:e=>{_&&I(),e.preventDefault()},onPointerDownOutside:e=>{y&&I(),e.preventDefault()},children:[(0,n.jsxs)(Pd,{className:U({"!univer-hidden":!d}),"data-drag-handle":p?`true`:void 0,style:{cursor:p?`grab`:void 0,userSelect:p?`none`:void 0,touchAction:p?`none`:void 0},onMouseDown:p?M:void 0,children:[(0,n.jsx)(Id,{children:d}),(0,n.jsx)(Ld,{className:`univer-hidden`})]}),c,N&&(0,n.jsx)(Fd,{children:N})]})})}let Bd=(e,t,n)=>{e%=360,t/=100,n/=100;let r=n*t,i=r*(1-Math.abs(e/60%2-1)),a=n-r,o=0,s=0,c=0;return e>=0&&e<60?(o=r,s=i,c=0):e>=60&&e<120?(o=i,s=r,c=0):e>=120&&e<180?(o=0,s=r,c=i):e>=180&&e<240?(o=0,s=i,c=r):e>=240&&e<300?(o=i,s=0,c=r):e>=300&&e<360&&(o=r,s=0,c=i),[Math.round((o+a)*255),Math.round((s+a)*255),Math.round((c+a)*255)]},Vd=(e,t,n)=>{let r=e=>e.toString(16).padStart(2,`0`);return`#${r(e)}${r(t)}${r(n)}`},Hd=(e,t,n)=>{e/=255,t/=255,n/=255;let r=Math.max(e,t,n),i=r-Math.min(e,t,n),a=0,o=0,s=r;return r!==0&&(o=i/r),i!==0&&(r===e?a=(t-n)/i+(t<n?6:0):r===t?a=(n-e)/i+2:r===n&&(a=(e-t)/i+4),a*=60),[a,o*100,s*100]},Ud=e=>{e.length===4&&(e=`#${e.slice(1).split(``).map(e=>e+e).join(``)}`);let[t,n,r]=e.match(/\w\w/g).map(e=>Number.parseInt(e,16));return Hd(t,n,r)},Wd=(e,t,n)=>{let[r,i,a]=Bd(e,t,n);return Vd(r,i,a)},Gd=(e,t,n,r)=>{let[i,a,o]=Bd(e,t,n);return`rgba(${i}, ${a}, ${o}, ${r})`},Kd=e=>{let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d+))?\)/);if(!t)throw Error(`Invalid RGBA string`);return[Number.parseInt(t[1],10),Number.parseInt(t[2],10),Number.parseInt(t[3],10),t[4]?Number.parseFloat(t[4]):1]};function qd({hsv:e,alpha:r,onChange:i,onChanged:a}){let[o,s]=(0,t.useState)(!1),c=(0,t.useRef)(null),l=(0,t.useRef)(null),u=(0,t.useRef)(r),d=(0,t.useCallback)(e=>{var t,n;let r=c.current;if(!r)return;let a=(t=(n=l.current)==null?void 0:n.clientWidth)==null?0:t,o=r.getBoundingClientRect(),s=o.width-a;if(s<=0){i(0);return}let u=Math.max(0,Math.min(e-o.left,s));i(Math.round(u/s*100)/100)},[i]),f=(0,t.useCallback)(e=>{o&&d(e.clientX)},[o,d]);(0,t.useEffect)(()=>{u.current=r},[r]);let p=(0,t.useCallback)(()=>{s(!1),a==null||a(u.current)},[a]);(0,t.useEffect)(()=>(o&&(window.addEventListener(`pointermove`,f),window.addEventListener(`pointerup`,p),window.addEventListener(`mouseup`,p)),()=>{window.removeEventListener(`pointermove`,f),window.removeEventListener(`pointerup`,p),window.removeEventListener(`mouseup`,p)}),[o,f,p]);let m=()=>{var e,t,n,i;let a=Math.min(Math.max(r*100,0),100),o=(e=(t=l.current)==null?void 0:t.clientWidth)==null?0:e,s=(n=(i=c.current)==null?void 0:i.clientWidth)==null?0:n,u=s>0?o/s*100:0;return`${a/100*(100-u)}%`},h=Bd(...e);return(0,n.jsxs)(`div`,{"data-u-comp":`color-picker-alpha-slider`,className:`univer-relative univer-w-full univer-select-none`,children:[(0,n.jsx)(`div`,{className:`univer-absolute univer-inset-0 univer-rounded-full`,style:{backgroundImage:`linear-gradient(45deg, #E3E5EA 25%, transparent 25%), linear-gradient(-45deg, #E3E5EA 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #E3E5EA 75%), linear-gradient(-45deg, transparent 75%, #E3E5EA 75%)`,backgroundPosition:`0 0, 0 4px, 4px -4px, -4px 0`,backgroundSize:`8px 8px`}}),(0,n.jsx)(`div`,{ref:c,"data-u-comp":`color-picker-alpha-slider-track`,className:`univer-relative univer-h-2 univer-w-full univer-cursor-pointer univer-rounded-full univer-shadow-inner`,style:{background:`linear-gradient(to right, transparent, rgb(${h.join(`,`)}))`},onPointerDown:e=>{s(!0),d(e.clientX)},children:(0,n.jsx)(`div`,{ref:l,"data-u-comp":`color-picker-alpha-slider-thumb`,className:`univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform univer-duration-75 univer-will-change-transform`,style:{left:m(),transform:`translateY(-50%)`,transition:o?`none`:`all 0.1s ease-out`}})})]})}function Jd({hsv:e,onChange:r}){let[i,a]=(0,t.useState)(``),o=(0,t.useMemo)(()=>Wd(e[0],e[1],e[2]),[e]);(0,t.useEffect)(()=>{a(o.replace(/^#/,``))},[o]);let s=e=>/^[0-9A-Fa-f]{6}$/.test(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`input`,{className:U(`univer-w-full univer-px-2 !univer-pl-4 univer-uppercase focus:univer-border-primary-500 focus:univer-outline-none rtl:!univer-pl-2 rtl:!univer-pr-4 dark:!univer-text-white`,Q),value:i,onChange:e=>{let t=e.target.value.trim();if(!(t.length>6)&&!(t!==``&&!/^[0-9A-Fa-f]*$/.test(t))&&(a(t),s(t))){let e=Ud(t);e&&r&&r(...e)}},onBlur:()=>{s(i)||a(o.replace(/^#/,``))},maxLength:6,spellCheck:!1}),(0,n.jsx)(`span`,{className:`univer-absolute univer-left-1.5 univer-top-1/2 -univer-translate-y-1/2 univer-text-sm univer-text-gray-400 rtl:univer-left-auto rtl:univer-right-1.5`,children:`#`})]})}function Yd({hsv:e,alpha:r,format:i,onChange:a}){let[o,s]=(0,t.useState)({r:0,g:0,b:0,a:1});(0,t.useEffect)(()=>{let[t,n,i]=Bd(e[0],e[1],e[2]);s({r:Math.round(t),g:Math.round(n),b:Math.round(i),a:r==null?1:r})},[e,r]);let c=(t,n)=>{if(t===`a`){if(n!==``&&!/^\d*\.?\d*$/.test(n))return;let t=n===``?0:Number.parseFloat(n);if(t>1)return;s({...o,a:t}),a&&a(e[0],e[1],e[2],t);return}if(n!==``&&!/^\d*$/.test(n))return;let r=n===``?0:Number.parseInt(n,10);if(r>255)return;let i={...o,[t]:r};s(i),a&&a(...Hd(i.r,i.g,i.b),o.a)},l=()=>{let[t,n,i]=Bd(e[0],e[1],e[2]);s({r:Math.round(t),g:Math.round(n),b:Math.round(i),a:r==null?1:r})};return(0,n.jsxs)(`div`,{className:`univer-flex univer-items-center univer-gap-2 [&>input]:univer-w-11 [&>input]:univer-border-gray-200 [&>input]:focus:univer-border-primary-500 dark:[&>input]:!univer-border-gray-600 dark:[&>input]:!univer-text-white`,children:[(0,n.jsx)(`input`,{value:o.r,onChange:e=>c(`r`,e.target.value),onBlur:l,maxLength:3}),(0,n.jsx)(`input`,{value:o.g,onChange:e=>c(`g`,e.target.value),onBlur:l,maxLength:3}),(0,n.jsx)(`input`,{value:o.b,onChange:e=>c(`b`,e.target.value),onBlur:l,maxLength:3}),i===`rgba`&&(0,n.jsx)(`input`,{value:o.a,onChange:e=>c(`a`,e.target.value),onBlur:l,maxLength:4})]})}function Xd({hsv:e,alpha:t,format:r,onChange:i}){return(0,n.jsx)(`div`,{className:`dark:![&_input]:univer-border-gray-600 dark:![&_input]:univer-text-white univer-flex univer-gap-2 [&_input]:univer-box-border [&_input]:univer-flex [&_input]:univer-h-7 [&_input]:univer-items-center [&_input]:univer-rounded [&_input]:univer-border [&_input]:univer-border-solid [&_input]:univer-border-gray-200 [&_input]:univer-bg-transparent [&_input]:univer-px-1.5 [&_input]:univer-text-sm [&_input]:univer-text-gray-700 [&_input]:univer-outline-none`,children:(0,n.jsxs)(`div`,{className:`univer-relative univer-flex univer-flex-1 univer-gap-2`,children:[(0,n.jsx)(Jd,{hsv:e,onChange:i}),(0,n.jsx)(Yd,{hsv:e,alpha:t,format:r,onChange:i})]})})}let Zd=[[`#FFFFFF`,`#E1EFFE`,`#FDE8E8`,`#FEECDC`,`#FFF4B9`,`#DEF7EC`,`#D5F5F6`,`#EDEBFE`,`#FCE8F3`],[`#CDD0D8`,`#A4CAFE`,`#F8B4B4`,`#FDBA8C`,`#FAC815`,`#84E1BC`,`#7EDCE2`,`#CABFFD`,`#F8B4D9`],[`#979DAC`,`#3F83F8`,`#F05252`,`#FF5A1F`,`#D49D0F`,`#0DA471`,`#0694A2`,`#9061F9`,`#E74694`],[`#414657`,`#1A56DB`,`#C81E1E`,`#B43403`,`#9A6D15`,`#046C4E`,`#036672`,`#6C2BD9`,`#BF125D`],[`#000000`,`#233876`,`#771D1D`,`#8A2C0D`,`#634312`,`#014737`,`#014451`,`#4A1D96`,`#751A3D`]];function Qd({hsv:e,onChange:r}){let i=(0,t.useCallback)(e=>{let[t,n,i]=Ud(e);r(t,n,i)},[r]),a=Wd(e[0],e[1],e[2]);return(0,n.jsx)(`div`,{"data-u-comp":`color-picker-presets`,className:`univer-grid univer-content-center univer-gap-2`,children:Zd.map((e,t)=>(0,n.jsx)(`div`,{className:`univer-grid univer-grid-flow-col univer-items-center univer-justify-between univer-gap-2`,children:e.map((e,r)=>(0,n.jsx)(`button`,{type:`button`,className:U(`univer-box-border univer-size-5 univer-cursor-pointer univer-rounded-full univer-border univer-border-solid univer-border-transparent univer-bg-gray-300 univer-transition-shadow`,{"univer-ring-2 univer-ring-offset-2 univer-ring-offset-white dark:!univer-ring-primary-600 dark:!univer-ring-offset-gray-600":e.toUpperCase()===a.toUpperCase(),"!univer-border-gray-200":t===0&&r===0}),style:{backgroundColor:e},onClick:()=>i(e)},r))},t))})}function $d({hsv:e,onChange:r,onChanged:i}){let a=(0,t.useRef)(null),o=(0,t.useRef)(null),[s,c]=(0,t.useState)(!1);(0,t.useEffect)(()=>{let t=a.current;if(!t)return;let n=t.getContext(`2d`);if(!n)return;let r=n.createLinearGradient(0,0,t.width,0);r.addColorStop(0,`hsl(${e[0]}, 0%, 50%)`),r.addColorStop(1,`hsl(${e[0]}, 100%, 50%)`),n.fillStyle=r,n.fillRect(0,0,t.width,t.height);let i=n.createLinearGradient(0,0,0,t.height);i.addColorStop(0,`rgba(255, 255, 255, 0)`),i.addColorStop(1,`rgba(0, 0, 0, 1)`),n.fillStyle=i,n.fillRect(0,0,t.width,t.height)},[e[0]]);let l=t=>{t.stopPropagation();let n=a.current;if(!n)return;let i=n.getBoundingClientRect(),o=Math.max(0,Math.min(t.clientX-i.left,i.width)),s=Math.max(0,Math.min(t.clientY-i.top,i.height)),c=o/i.width*100,l=100-s/i.height*100;r(e[0],c,l)},u=(0,t.useCallback)(()=>{c(!1)},[]);function d(){i==null||i(e[0],e[1],e[2])}return(0,t.useEffect)(()=>{var e;return(e=o.current)==null||e.addEventListener(`mouseup`,d),window.addEventListener(`pointerup`,u),window.addEventListener(`mouseup`,u),()=>{var e;(e=o.current)==null||e.removeEventListener(`mouseup`,d),window.removeEventListener(`pointerup`,u),window.removeEventListener(`mouseup`,u)}},[e]),(0,t.useEffect)(()=>{let e=()=>{c(!1)};return window.addEventListener(`pointerup`,e),window.addEventListener(`mouseup`,e),()=>{window.removeEventListener(`pointerup`,e),window.removeEventListener(`mouseup`,e)}},[]),(0,n.jsxs)(`div`,{"data-u-comp":`color-picker-spectrum`,ref:o,className:`univer-relative univer-overflow-hidden`,children:[(0,n.jsx)(`canvas`,{ref:a,"data-u-comp":`color-picker-spectrum-canvas`,className:`univer-size-full univer-cursor-crosshair univer-rounded`,onPointerDown:e=>{c(!0),l(e)},onPointerMove:e=>s&&l(e)}),(0,n.jsx)(`div`,{className:`univer-pointer-events-none univer-absolute univer-left-0 univer-top-0 univer-size-4 univer-rounded-full univer-border-2 univer-border-white univer-shadow-md univer-ring-2 univer-ring-white univer-will-change-transform`,style:(()=>{var t,n,r,i;let a=(t=(n=o.current)==null?void 0:n.clientWidth)==null?0:t,c=(r=(i=o.current)==null?void 0:i.clientHeight)==null?0:r;return{transform:`translate(${e[1]/100*a-8}px, ${(100-e[2])/100*c-8}px)`,transition:s?`none`:`transform 0.1s ease-out`}})()})]})}function ef({hsv:e,onChange:r,onChanged:i}){let[a,o]=(0,t.useState)(!1),s=(0,t.useRef)(null),c=(0,t.useRef)(null),l=(0,t.useRef)(e),u=(0,t.useCallback)(t=>{var n,i;let a=s.current;if(!a)return;let o=(n=(i=c.current)==null?void 0:i.clientWidth)==null?0:n,l=a.getBoundingClientRect(),u=l.width-o;if(u<=0){r(0,e[1],e[2]);return}let d=Math.max(0,Math.min(t-l.left,u));r(Math.round(d/u*360),e[1],e[2])},[e,r]),d=(0,t.useCallback)(e=>{e.stopPropagation(),a&&u(e.clientX)},[a,u]);(0,t.useEffect)(()=>{l.current=e},[e]);let f=(0,t.useCallback)(()=>{o(!1);let[e,t,n]=l.current;i==null||i(e,t,n)},[i]);return(0,t.useEffect)(()=>(a&&(window.addEventListener(`pointermove`,d),window.addEventListener(`pointerup`,f),window.addEventListener(`mouseup`,f)),()=>{window.removeEventListener(`pointermove`,d),window.removeEventListener(`pointerup`,f),window.removeEventListener(`mouseup`,f)}),[a,d,f]),(0,n.jsx)(`div`,{"data-u-comp":`color-picker-hue-slider`,className:`univer-relative univer-w-full univer-select-none`,children:(0,n.jsx)(`div`,{ref:s,className:`univer-relative univer-h-2 univer-w-full univer-cursor-pointer univer-rounded-full univer-shadow-inner`,style:{background:`linear-gradient(to right,
|
|
46
42
|
hsl(0, 100%, 50%),
|
|
47
43
|
hsl(60, 100%, 50%),
|
|
48
44
|
hsl(120, 100%, 50%),
|
|
49
45
|
hsl(180, 100%, 50%),
|
|
50
46
|
hsl(240, 100%, 50%),
|
|
51
47
|
hsl(300, 100%, 50%),
|
|
52
|
-
hsl(360, 100%, 50%))`},onPointerDown:e=>{o(!0),u(e.clientX)},children:(0,n.jsx)(`div`,{ref:c,"data-u-comp":`color-picker-hue-slider-thumb`,className:`univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform univer-duration-75 univer-will-change-transform`,style:{left:(()=>{var t,n,r,i;let a=Math.min(Math.max(e[0],0),360),o=(t=(n=c.current)==null?void 0:n.clientWidth)==null?0:t,l=(r=(i=s.current)==null?void 0:i.clientWidth)==null?0:r,u=l>0?o/l*100:0;return`${a/360*(100-u)}%`})(),transform:`translateY(-50%)`,transition:a?`none`:`all 0.1s ease-out`}})})})}let pf=(0,t.memo)(df),mf=(0,t.memo)(ff),hf=(0,t.memo)(af),gf=(0,t.memo)(cf),_f=(0,t.memo)(uf);function vf({format:e=`hex`,value:r,onChange:i}){if(!zt)return null;let{locale:a}=(0,t.useContext)(G),[o,s]=(0,t.useState)([0,100,100]),[c,l]=(0,t.useState)(1),[u,d]=(0,t.useState)(!1),f=(0,t.useCallback)((e,t,n)=>Zd(e,t,n),[]);(0,t.useEffect)(()=>{try{let t=r||(e===`hex`?`#000000`:`rgba(0, 0, 0, 1)`);if(e===`hex`){let[e,n,r]=ef(t);s([e,n,r]),l(1)}else if(e===`rgba`){let[e,n,r,i]=rf(t),[a,o,c]=$d(e,n,r);s([a,o,c]),l(i)}}catch(e){console.error(`Invalid value:`,e)}},[r,e]);function p(e,t,n){s([e,t,n])}function m(e){l(e)}function h(t,n,r,a=c){if(e===`hex`){let[e,a,o]=f(t,n,r),s=Qd(e,a,o);i==null||i(s)}else if(e===`rgba`){let[e,o,s]=f(t,n,r);i==null||i(`rgba(${e}, ${o}, ${s}, ${a})`)}}function g(){let[t,n,r]=o;if(e===`hex`){let e=tf(t,n,r);i==null||i(e)}else if(e===`rgba`){let[e,a,o]=f(t,n,r);i==null||i(`rgba(${e}, ${a}, ${o}, ${c})`)}d(!1)}return(0,n.jsxs)(`div`,{"data-u-comp":`color-picker`,className:`univer-cursor-default univer-space-y-2 univer-rounded-lg`,onClick:e=>e.stopPropagation(),children:[(0,n.jsx)(_f,{hsv:o,onChange:(e,t,n)=>{p(e,t,n),m(1),h(e,t,n,1)}}),(0,n.jsx)(`div`,{className:`univer-flex univer-h-7 univer-items-center`,children:(0,n.jsx)(`a`,{className:`univer-cursor-pointer univer-gap-2 univer-text-sm univer-text-gray-900 univer-transition-opacity hover:univer-opacity-80 dark:!univer-text-white`,onClick:()=>d(!0),children:a==null?void 0:a.ColorPicker.more})}),(0,n.jsx)(Xd,{className:`!univer-w-fit !univer-p-2.5`,closable:!1,maskClosable:!1,open:u,onOpenChange:d,children:(0,n.jsxs)(`div`,{className:`univer-grid univer-w-64 univer-gap-2`,children:[(0,n.jsx)(pf,{hsv:o,onChange:p}),(0,n.jsxs)(`div`,{className:`univer-flex univer-items-center univer-gap-2`,children:[(0,n.jsx)(`div`,{className:`univer-size-6 univer-flex-shrink-0 univer-rounded-sm`,style:{backgroundColor:e===`hex`?tf(...o):nf(...o,c)}}),(0,n.jsxs)(`div`,{className:`univer-flex-1 univer-space-y-2`,children:[(0,n.jsx)(mf,{hsv:o,onChange:p}),e===`rgba`&&(0,n.jsx)(hf,{hsv:o,alpha:c,onChange:m})]})]}),(0,n.jsx)(gf,{hsv:o,alpha:c,format:e,onChange:(e,t,n,r)=>{p(e,t,n),r!==void 0&&m(r)}}),(0,n.jsxs)(`footer`,{className:`univer-flex univer-items-center univer-justify-end univer-gap-2`,children:[(0,n.jsx)(Pt,{onClick:()=>d(!1),children:a==null?void 0:a.ColorPicker.cancel}),(0,n.jsx)(Pt,{variant:`primary`,onClick:g,children:a==null?void 0:a.ColorPicker.confirm})]})]})})]})}function yf(e){let{locale:t,cancelText:r,confirmText:i,onClose:a,onConfirm:o,closable:s=!0}=e;return(0,n.jsxs)(`footer`,{className:`univer-flex univer-items-center univer-justify-end univer-gap-2`,children:[s&&(0,n.jsx)(Pt,{onClick:a,children:r==null?t==null?void 0:t.Confirm.cancel:r}),(0,n.jsx)(Pt,{variant:`primary`,onClick:o,children:i==null?t==null?void 0:t.Confirm.confirm:i})]})}function bf(e){let{children:r,visible:i=!1,title:a,cancelText:o,confirmText:s,width:c,onClose:l,onConfirm:u,closable:d=!0}=e,{locale:f}=(0,t.useContext)(G);return(0,n.jsx)(Xd,{open:i,title:a,maskClosable:!1,footer:(0,n.jsx)(yf,{locale:f,cancelText:o,confirmText:s,onClose:l,onConfirm:u,closable:d}),onClose:l,width:c,closable:d,children:r})}function xf(e){let{value:r,onValueChange:i,className:a}=e,[o,s]=(0,t.useState)(!1);function c(e){i==null||i(e),s(!1)}return(0,n.jsx)(Vu,{align:`start`,overlay:(0,n.jsx)(`div`,{className:`univer-p-2`,children:(0,n.jsx)(Yu,{value:r,onValueChange:c})}),open:o,onOpenChange:s,children:(0,n.jsxs)(`button`,{className:U(`univer-flex univer-h-8 univer-items-center univer-justify-between univer-gap-2 univer-rounded-md univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-800 univer-transition-all hover:univer-border-primary-600 dark:!univer-text-white`,Q,a),type:`button`,children:[Uu(r,`YYYY-MM-DD`),(0,n.jsx)(x,{className:`univer-text-gray-600 dark:!univer-text-gray-400`})]})})}function Sf(e){let{value:r=[new Date,new Date],onValueChange:i,className:a}=e,[o,s]=(0,t.useState)(!1);function c(e){let[t,n]=e;t>n&&([t,n]=[n,t]),i==null||i([t,n]),s(!1)}return(0,n.jsx)(Vu,{align:`start`,overlay:(0,n.jsxs)(`div`,{className:`univer-grid univer-grid-cols-2 univer-gap-2 univer-p-2`,children:[(0,n.jsx)(Yu,{value:r[0],max:r[1],onValueChange:e=>{c([e,r[1]])}}),(0,n.jsx)(Yu,{value:r[1],min:r[0],onValueChange:e=>{c([r[0],e])}})]}),open:o,onOpenChange:s,children:(0,n.jsxs)(`button`,{className:U(`univer-flex univer-h-8 univer-items-center univer-justify-between univer-gap-2 univer-rounded-md univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-800 univer-transition-all hover:univer-border-primary-600 dark:!univer-text-white`,Q,a),type:`button`,children:[(0,n.jsxs)(`span`,{className:`univer-flex univer-gap-1`,children:[(0,n.jsx)(`span`,{children:Uu(r[0],`YYYY-MM-DD`)}),(0,n.jsx)(`span`,{children:`-`}),(0,n.jsx)(`span`,{children:Uu(r[1],`YYYY-MM-DD`)})]}),(0,n.jsx)(x,{className:`univer-text-gray-600 dark:!univer-text-gray-400`})]})})}function Cf(e,t,n){if(t===n||t<0||n<0||t>=e.length||n>=e.length)return e;let r=[...e],[i]=r.splice(t,1);return r.splice(n,0,i),r}function wf(e){let{list:i,onListChange:a,idKey:o,itemRender:s,className:c,style:l,draggableHandle:u,rowHeight:d,margin:f=[0,0],onDragStart:p,onDragStop:m,...h}=e,[g,_]=(0,t.useState)(i),v=(0,t.useRef)(i),[y,b]=(0,t.useState)(null),[x,S]=(0,t.useState)(null),[C,w]=(0,t.useState)(null),[T,E]=(0,t.useState)(null),[D,O]=(0,t.useState)(!1),k=(0,t.useRef)(null),A=(0,t.useRef)({x:0,y:0}),j=(0,t.useRef)({width:0,height:0}),M=(0,t.useRef)(null),N=(0,t.useRef)(null),P=(0,t.useRef)(null),F=(0,t.useRef)(-1),{direction:I}=(0,t.useContext)(G);(0,t.useEffect)(()=>{y||(_(i),v.current=i)},[y,i]),(0,t.useEffect)(()=>{O(typeof document<`u`)},[]),(0,t.useEffect)(()=>{let e=M.current;e&&(e.replaceChildren(),C&&e.appendChild(C))},[C]),(0,t.useEffect)(()=>{if(!y)return;let e=e=>{let t=P.current;if(!t||k.current!==e.pointerId)return;E({x:e.clientX-A.current.x,y:e.clientY-A.current.y});let n=document.elementFromPoint(e.clientX,e.clientY),r=n==null?void 0:n.closest(`[data-draggable-list-item-id]`),i=r==null?void 0:r.dataset.draggableListItemId;!i||i===t||(S(i),_(e=>{let n=e.findIndex(e=>R(e)===t),r=e.findIndex(e=>R(e)===i);if(n<0||r<0||n===r)return e;let a=Cf(e,n,r);return v.current=a,a}))},t=e=>{if(k.current!==e.pointerId)return;let t=P.current,n=F.current,r=v.current;if(t){let e=r.findIndex(e=>R(e)===t);m==null||m(void 0,{y:n},{y:e}),n>=0&&a([...r])}k.current=null,N.current=null,P.current=null,F.current=-1,S(null),w(null),E(null),b(null)};return window.addEventListener(`pointermove`,e),window.addEventListener(`pointerup`,t),window.addEventListener(`pointercancel`,t),()=>{window.removeEventListener(`pointermove`,e),window.removeEventListener(`pointerup`,t),window.removeEventListener(`pointercancel`,t)}},[y,m,a]);let L=(0,t.useMemo)(()=>{let[e,t]=f;return{rowGap:`${t}px`,paddingLeft:e?`${e}px`:void 0,paddingRight:e?`${e}px`:void 0,...l}},[f,l]),R=e=>String(e[o]),z=y?g.find(e=>R(e)===y):null;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{...h,className:U(`univer-flex univer-flex-col`,y&&`univer-cursor-grabbing univer-select-none`,c),style:L,children:g.map((e,t)=>{let r=R(e),i=y===r;return(0,n.jsxs)(`div`,{"data-draggable-list-item-id":r,className:U(`univer-relative univer-transition-all univer-duration-150`,i&&`univer-opacity-0`,x===r&&!i&&`univer-bg-primary-50/60 dark:!univer-bg-primary-900/20 univer-rounded univer-border univer-border-primary-200 dark:!univer-border-primary-700`),onPointerDownCapture:e=>{if(k.current!==null||(u?N.current=e.target.closest(u)?r:null:N.current=r,N.current!==r))return;let n=e.currentTarget.getBoundingClientRect();A.current={x:e.clientX-n.left,y:e.clientY-n.top},j.current={width:n.width,height:n.height},E({x:n.left,y:n.top}),w(e.currentTarget.cloneNode(!0)),k.current=e.pointerId,P.current=r,F.current=t,b(r),v.current=g,p==null||p(void 0,{y:t}),e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId)},style:{...d?{minHeight:`${d}px`}:void 0,cursor:y?`grabbing`:void 0},children:[i&&(0,n.jsx)(`div`,{className:`univer-bg-primary-50/50 univer-absolute univer-inset-0 univer-rounded univer-border univer-border-dashed univer-border-primary-300`}),s(e,t)]},r)})}),D&&z&&T&&(0,r.createPortal)((0,n.jsx)(`div`,{dir:I,className:U(`univer-pointer-events-none univer-fixed univer-rounded-md univer-border univer-border-gray-200 univer-bg-white univer-shadow-lg dark:!univer-border-gray-700 dark:!univer-bg-gray-800`),style:{zIndex:2147483647,left:`${T.x}px`,top:`${T.y}px`,width:`${j.current.width}px`,height:`${j.current.height}px`,opacity:.95},children:C?(0,n.jsx)(`div`,{ref:M}):s(z,g.findIndex(e=>R(e)===R(z)))}),document.body)]})}let Tf=(0,t.createContext)(!1),Ef=e=>{let{label:r,desc:i,children:a,style:o,className:s,error:c,contentStyle:l,collapsable:u=!1,defaultCollapsed:d=!1}=e,[f,p]=(0,t.useState)(d);return(0,n.jsx)(Tf.Provider,{value:!0,children:(0,n.jsxs)(`div`,{"data-u-comp":`form-layout`,className:U(`univer-mb-3 univer-flex univer-flex-col`,s),style:o,children:[r&&(0,n.jsxs)(`div`,{className:U(`univer-mb-2 univer-flex univer-min-h-3.5 univer-items-center univer-text-sm univer-text-gray-900 dark:!univer-text-white`,{"univer-cursor-pointer":u}),onClick:()=>p(!f),children:[r,u&&(0,n.jsx)(ae,{className:U(`univer-ml-1 univer-transition-transform`,{"univer-rotate-180":f})})]}),f&&u?null:(0,n.jsxs)(n.Fragment,{children:[i&&(0,n.jsx)(`div`,{className:`univer-mt-1 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200`,children:i}),a?(0,n.jsxs)(`div`,{className:U(`last:univer-mb-0 [&_[data-u-comp=input]]:univer-w-full [&_[data-u-comp=select]]:univer-w-full`,{"[&_[data-u-comp=input]]:univer-border-red-500":c,"[&_[data-u-comp=select]]:univer-border-red-500":c}),style:l,children:[a,c?(0,n.jsx)(`div`,{className:`univer-mt-1 univer-text-xs univer-text-red-500`,children:c}):null]}):null]})]})})},Df=e=>(0,n.jsx)(`div`,{className:`univer-flex univer-justify-between [&_[data-u-comp=form-layout]]:univer-max-w-[calc(50%-8px)] [&_[data-u-comp=form-layout]]:univer-shrink [&_[data-u-comp=form-layout]]:univer-grow`,children:e.children});function Of(e){let{className:r,value:i=0,total:a=0,loop:o,text:s,onChange:c}=e,l=(0,t.useMemo)(()=>s==null?`${i}/${a}`:s,[i,a,s]),u=a>0;return(0,n.jsx)(`div`,{"data-u-comp":`pager`,className:U(`univer-flex univer-flex-shrink-0 univer-items-center univer-text-sm univer-text-gray-700 dark:!univer-text-gray-400`,r),children:u?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`button`,{"data-u-comp":`pager-left-arrow`,className:`univer-inline-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded univer-border-none univer-bg-transparent univer-p-0 hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-600`,type:`button`,role:`button`,onClick:()=>{i===1?o&&(c==null||c(a)):c==null||c(i-1)},children:(0,n.jsx)(te,{})}),(0,n.jsx)(`span`,{className:`univer-mx-1`,children:l}),(0,n.jsx)(`button`,{"data-u-comp":`pager-right-arrow`,className:`univer-inline-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded univer-border-none univer-bg-transparent univer-p-0 hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-600`,type:`button`,role:`button`,onClick:()=>{i===a?o&&(c==null||c(1)):c==null||c(i+1)},children:(0,n.jsx)(re,{})})]}):(0,n.jsx)(`div`,{className:`univer-mx-1`,children:l})})}let kf=`
|
|
48
|
+
hsl(360, 100%, 50%))`},onPointerDown:e=>{o(!0),u(e.clientX)},children:(0,n.jsx)(`div`,{ref:c,"data-u-comp":`color-picker-hue-slider-thumb`,className:`univer-absolute univer-top-1/2 univer-box-border univer-size-2 univer-rounded-full univer-bg-transparent univer-shadow-md univer-ring-2 univer-ring-white univer-transition-transform univer-duration-75 univer-will-change-transform`,style:{left:(()=>{var t,n,r,i;let a=Math.min(Math.max(e[0],0),360),o=(t=(n=c.current)==null?void 0:n.clientWidth)==null?0:t,l=(r=(i=s.current)==null?void 0:i.clientWidth)==null?0:r,u=l>0?o/l*100:0;return`${a/360*(100-u)}%`})(),transform:`translateY(-50%)`,transition:a?`none`:`all 0.1s ease-out`}})})})}let tf=(0,t.memo)($d),nf=(0,t.memo)(ef),rf=(0,t.memo)(qd),af=(0,t.memo)(Xd),of=(0,t.memo)(Qd);function sf({format:e=`hex`,value:r,onChange:i}){if(!Rt)return null;let{direction:a,locale:o}=(0,t.useContext)(G),[s,c]=(0,t.useState)([0,100,100]),[l,u]=(0,t.useState)(1),[d,f]=(0,t.useState)(!1),p=(0,t.useCallback)((e,t,n)=>Bd(e,t,n),[]);(0,t.useEffect)(()=>{try{let t=r||(e===`hex`?`#000000`:`rgba(0, 0, 0, 1)`);if(e===`hex`){let[e,n,r]=Ud(t);c([e,n,r]),u(1)}else if(e===`rgba`){let[e,n,r,i]=Kd(t),[a,o,s]=Hd(e,n,r);c([a,o,s]),u(i)}}catch(e){console.error(`Invalid value:`,e)}},[r,e]);function m(e,t,n){c([e,t,n])}function h(e){u(e)}function g(t,n,r,a=l){if(e===`hex`){let[e,a,o]=p(t,n,r),s=Vd(e,a,o);i==null||i(s)}else if(e===`rgba`){let[e,o,s]=p(t,n,r);i==null||i(`rgba(${e}, ${o}, ${s}, ${a})`)}}function _(){let[t,n,r]=s;if(e===`hex`){let e=Wd(t,n,r);i==null||i(e)}else if(e===`rgba`){let[e,a,o]=p(t,n,r);i==null||i(`rgba(${e}, ${a}, ${o}, ${l})`)}f(!1)}return(0,n.jsxs)(`div`,{"data-u-comp":`color-picker`,dir:a,className:`univer-cursor-default univer-space-y-2 univer-rounded-lg`,onClick:e=>e.stopPropagation(),children:[(0,n.jsx)(of,{hsv:s,onChange:(e,t,n)=>{m(e,t,n),h(1),g(e,t,n,1)}}),(0,n.jsx)(`div`,{className:`univer-flex univer-h-7 univer-items-center`,children:(0,n.jsx)(`a`,{className:`univer-cursor-pointer univer-gap-2 univer-text-sm univer-text-gray-900 univer-transition-opacity hover:univer-opacity-80 dark:!univer-text-white`,onClick:()=>f(!0),children:o==null?void 0:o.ColorPicker.more})}),(0,n.jsx)(zd,{className:`!univer-z-[1090] !univer-w-fit !univer-p-2.5`,closable:!1,maskClosable:!1,open:d,onOpenChange:f,children:(0,n.jsxs)(`div`,{className:`univer-grid univer-w-64 univer-gap-2`,children:[(0,n.jsx)(tf,{hsv:s,onChange:m}),(0,n.jsxs)(`div`,{className:`univer-flex univer-items-center univer-gap-2`,children:[(0,n.jsx)(`div`,{className:`univer-size-6 univer-flex-shrink-0 univer-rounded-sm`,style:{backgroundColor:e===`hex`?Wd(...s):Gd(...s,l)}}),(0,n.jsxs)(`div`,{className:`univer-flex-1 univer-space-y-2`,children:[(0,n.jsx)(nf,{hsv:s,onChange:m}),e===`rgba`&&(0,n.jsx)(rf,{hsv:s,alpha:l,onChange:h})]})]}),(0,n.jsx)(af,{hsv:s,alpha:l,format:e,onChange:(e,t,n,r)=>{m(e,t,n),r!==void 0&&h(r)}}),(0,n.jsxs)(`footer`,{className:`univer-flex univer-items-center univer-justify-end univer-gap-2`,children:[(0,n.jsx)(Pt,{onClick:()=>f(!1),children:o==null?void 0:o.ColorPicker.cancel}),(0,n.jsx)(Pt,{variant:`primary`,onClick:_,children:o==null?void 0:o.ColorPicker.confirm})]})]})})]})}function cf(e){let{locale:t,cancelText:r,confirmText:i,onClose:a,onConfirm:o,closable:s=!0}=e;return(0,n.jsxs)(`footer`,{className:`univer-flex univer-items-center univer-justify-end univer-gap-2`,children:[s&&(0,n.jsx)(Pt,{onClick:a,children:r==null?t==null?void 0:t.Confirm.cancel:r}),(0,n.jsx)(Pt,{variant:`primary`,onClick:o,children:i==null?t==null?void 0:t.Confirm.confirm:i})]})}function lf(e){let{children:r,visible:i=!1,title:a,cancelText:o,confirmText:s,width:c,onClose:l,onConfirm:u,closable:d=!0}=e,{locale:f}=(0,t.useContext)(G);return(0,n.jsx)(zd,{open:i,title:a,maskClosable:!1,footer:(0,n.jsx)(cf,{locale:f,cancelText:o,confirmText:s,onClose:l,onConfirm:u,closable:d}),onClose:l,width:c,closable:d,children:r})}function uf(e){let{value:r,onValueChange:i,className:a}=e,[o,s]=(0,t.useState)(!1);function c(e){i==null||i(e),s(!1)}return(0,n.jsx)(Uu,{align:`start`,overlay:(0,n.jsx)(`div`,{className:`univer-p-2`,children:(0,n.jsx)(Zu,{value:r,onValueChange:c})}),open:o,onOpenChange:s,children:(0,n.jsxs)(`button`,{className:U(`univer-flex univer-h-8 univer-items-center univer-justify-between univer-gap-2 univer-rounded-md univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-800 univer-transition-all hover:univer-border-primary-600 dark:!univer-text-white`,Q,a),type:`button`,children:[Gu(r,`YYYY-MM-DD`),(0,n.jsx)(x,{className:`univer-text-gray-600 dark:!univer-text-gray-400`})]})})}function df(e){let{value:r=[new Date,new Date],onValueChange:i,className:a}=e,[o,s]=(0,t.useState)(!1);function c(e){let[t,n]=e;t>n&&([t,n]=[n,t]),i==null||i([t,n]),s(!1)}return(0,n.jsx)(Uu,{align:`start`,overlay:(0,n.jsxs)(`div`,{className:`univer-grid univer-grid-cols-2 univer-gap-2 univer-p-2`,children:[(0,n.jsx)(Zu,{value:r[0],max:r[1],onValueChange:e=>{c([e,r[1]])}}),(0,n.jsx)(Zu,{value:r[1],min:r[0],onValueChange:e=>{c([r[0],e])}})]}),open:o,onOpenChange:s,children:(0,n.jsxs)(`button`,{className:U(`univer-flex univer-h-8 univer-items-center univer-justify-between univer-gap-2 univer-rounded-md univer-bg-transparent univer-px-2 univer-text-sm univer-text-gray-800 univer-transition-all hover:univer-border-primary-600 dark:!univer-text-white`,Q,a),type:`button`,children:[(0,n.jsxs)(`span`,{className:`univer-flex univer-gap-1`,children:[(0,n.jsx)(`span`,{children:Gu(r[0],`YYYY-MM-DD`)}),(0,n.jsx)(`span`,{children:`-`}),(0,n.jsx)(`span`,{children:Gu(r[1],`YYYY-MM-DD`)})]}),(0,n.jsx)(x,{className:`univer-text-gray-600 dark:!univer-text-gray-400`})]})})}function ff(e,t,n){if(t===n||t<0||n<0||t>=e.length||n>=e.length)return e;let r=[...e],[i]=r.splice(t,1);return r.splice(n,0,i),r}function pf(e){let{list:i,onListChange:a,idKey:o,itemRender:s,className:c,style:l,draggableHandle:u,rowHeight:d,margin:f=[0,0],onDragStart:p,onDragStop:m,...h}=e,[g,_]=(0,t.useState)(i),v=(0,t.useRef)(i),[y,b]=(0,t.useState)(null),[x,S]=(0,t.useState)(null),[C,w]=(0,t.useState)(null),[T,E]=(0,t.useState)(null),[D,O]=(0,t.useState)(!1),k=(0,t.useRef)(null),A=(0,t.useRef)({x:0,y:0}),j=(0,t.useRef)({width:0,height:0}),M=(0,t.useRef)(null),N=(0,t.useRef)(null),P=(0,t.useRef)(null),F=(0,t.useRef)(-1),{direction:I}=(0,t.useContext)(G);(0,t.useEffect)(()=>{y||(_(i),v.current=i)},[y,i]),(0,t.useEffect)(()=>{O(typeof document<`u`)},[]),(0,t.useEffect)(()=>{let e=M.current;e&&(e.replaceChildren(),C&&e.appendChild(C))},[C]),(0,t.useEffect)(()=>{if(!y)return;let e=e=>{let t=P.current;if(!t||k.current!==e.pointerId)return;E({x:e.clientX-A.current.x,y:e.clientY-A.current.y});let n=document.elementFromPoint(e.clientX,e.clientY),r=n==null?void 0:n.closest(`[data-draggable-list-item-id]`),i=r==null?void 0:r.dataset.draggableListItemId;!i||i===t||(S(i),_(e=>{let n=e.findIndex(e=>R(e)===t),r=e.findIndex(e=>R(e)===i);if(n<0||r<0||n===r)return e;let a=ff(e,n,r);return v.current=a,a}))},t=e=>{if(k.current!==e.pointerId)return;let t=P.current,n=F.current,r=v.current;if(t){let e=r.findIndex(e=>R(e)===t);m==null||m(void 0,{y:n},{y:e}),n>=0&&a([...r])}k.current=null,N.current=null,P.current=null,F.current=-1,S(null),w(null),E(null),b(null)};return window.addEventListener(`pointermove`,e),window.addEventListener(`pointerup`,t),window.addEventListener(`pointercancel`,t),()=>{window.removeEventListener(`pointermove`,e),window.removeEventListener(`pointerup`,t),window.removeEventListener(`pointercancel`,t)}},[y,m,a]);let L=(0,t.useMemo)(()=>{let[e,t]=f;return{rowGap:`${t}px`,paddingLeft:e?`${e}px`:void 0,paddingRight:e?`${e}px`:void 0,...l}},[f,l]),R=e=>String(e[o]),z=y?g.find(e=>R(e)===y):null;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`div`,{...h,className:U(`univer-flex univer-flex-col`,y&&`univer-cursor-grabbing univer-select-none`,c),style:L,children:g.map((e,t)=>{let r=R(e),i=y===r;return(0,n.jsxs)(`div`,{"data-draggable-list-item-id":r,className:U(`univer-relative univer-transition-all univer-duration-150`,i&&`univer-opacity-0`,x===r&&!i&&`univer-bg-primary-50/60 dark:!univer-bg-primary-900/20 univer-rounded univer-border univer-border-primary-200 dark:!univer-border-primary-700`),onPointerDownCapture:e=>{if(k.current!==null||(u?N.current=e.target.closest(u)?r:null:N.current=r,N.current!==r))return;let n=e.currentTarget.getBoundingClientRect();A.current={x:e.clientX-n.left,y:e.clientY-n.top},j.current={width:n.width,height:n.height},E({x:n.left,y:n.top}),w(e.currentTarget.cloneNode(!0)),k.current=e.pointerId,P.current=r,F.current=t,b(r),v.current=g,p==null||p(void 0,{y:t}),e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId)},style:{...d?{minHeight:`${d}px`}:void 0,cursor:y?`grabbing`:void 0},children:[i&&(0,n.jsx)(`div`,{className:`univer-bg-primary-50/50 univer-absolute univer-inset-0 univer-rounded univer-border univer-border-dashed univer-border-primary-300`}),s(e,t)]},r)})}),D&&z&&T&&(0,r.createPortal)((0,n.jsx)(`div`,{dir:I,className:U(`univer-pointer-events-none univer-fixed univer-rounded-md univer-border univer-border-gray-200 univer-bg-white univer-shadow-lg dark:!univer-border-gray-700 dark:!univer-bg-gray-800`),style:{zIndex:2147483647,left:`${T.x}px`,top:`${T.y}px`,width:`${j.current.width}px`,height:`${j.current.height}px`,opacity:.95},children:C?(0,n.jsx)(`div`,{ref:M}):s(z,g.findIndex(e=>R(e)===R(z)))}),document.body)]})}let mf=(0,t.createContext)(!1),hf=e=>{let{label:r,desc:i,children:a,style:o,className:s,error:c,contentStyle:l,collapsable:u=!1,defaultCollapsed:d=!1}=e,[f,p]=(0,t.useState)(d);return(0,n.jsx)(mf.Provider,{value:!0,children:(0,n.jsxs)(`div`,{"data-u-comp":`form-layout`,className:U(`univer-mb-3 univer-flex univer-flex-col`,s),style:o,children:[r&&(0,n.jsxs)(`div`,{className:U(`univer-mb-2 univer-flex univer-min-h-3.5 univer-items-center univer-text-sm univer-text-gray-900 dark:!univer-text-white`,{"univer-cursor-pointer":u}),onClick:()=>p(!f),children:[r,u&&(0,n.jsx)(ae,{className:U(`univer-ml-1 univer-transition-transform`,{"univer-rotate-180":f})})]}),f&&u?null:(0,n.jsxs)(n.Fragment,{children:[i&&(0,n.jsx)(`div`,{className:`univer-mt-1 univer-text-sm univer-text-gray-600 dark:!univer-text-gray-200`,children:i}),a?(0,n.jsxs)(`div`,{className:U(`last:univer-mb-0 [&_[data-u-comp=input]]:univer-w-full [&_[data-u-comp=select]]:univer-w-full`,{"[&_[data-u-comp=input]]:univer-border-red-500":c,"[&_[data-u-comp=select]]:univer-border-red-500":c}),style:l,children:[a,c?(0,n.jsx)(`div`,{className:`univer-mt-1 univer-text-xs univer-text-red-500`,children:c}):null]}):null]})]})})},gf=e=>(0,n.jsx)(`div`,{className:`univer-flex univer-justify-between [&_[data-u-comp=form-layout]]:univer-max-w-[calc(50%-8px)] [&_[data-u-comp=form-layout]]:univer-shrink [&_[data-u-comp=form-layout]]:univer-grow`,children:e.children});function _f(e){let{className:r,value:i=0,total:a=0,loop:o,text:s,onChange:c}=e,l=(0,t.useMemo)(()=>s==null?`${i}/${a}`:s,[i,a,s]),u=a>0;return(0,n.jsx)(`div`,{"data-u-comp":`pager`,className:U(`univer-flex univer-flex-shrink-0 univer-items-center univer-text-sm univer-text-gray-700 dark:!univer-text-gray-400`,r),children:u?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`button`,{"data-u-comp":`pager-left-arrow`,className:`univer-inline-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded univer-border-none univer-bg-transparent univer-p-0 hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-600`,type:`button`,role:`button`,onClick:()=>{i===1?o&&(c==null||c(a)):c==null||c(i-1)},children:(0,n.jsx)(te,{})}),(0,n.jsx)(`span`,{className:`univer-mx-1`,children:l}),(0,n.jsx)(`button`,{"data-u-comp":`pager-right-arrow`,className:`univer-inline-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded univer-border-none univer-bg-transparent univer-p-0 hover:univer-bg-gray-50 dark:hover:!univer-bg-gray-600`,type:`button`,role:`button`,onClick:()=>{i===a?o&&(c==null||c(1)):c==null||c(i+1)},children:(0,n.jsx)(re,{})})]}):(0,n.jsx)(`div`,{className:`univer-mx-1`,children:l})})}let vf=`
|
|
53
49
|
univer-flex univer-cursor-pointer univer-items-center univer-justify-center univer-border-none
|
|
54
50
|
univer-bg-transparent univer-p-0 univer-text-current
|
|
55
51
|
hover:univer-text-white
|
|
56
|
-
`;function Af(e){let{className:i,images:a,open:o,onOpenChange:s}=e,[c,l]=(0,t.useState)(!1),[u,d]=(0,t.useState)(0),[f,p]=(0,t.useState)(1),{direction:m}=(0,t.useContext)(G),h=(0,t.useRef)(null),g=(0,t.useMemo)(()=>a[u],[u,a]);if((0,t.useEffect)(()=>{o&&h.current&&h.current.focus()},[o]),(0,t.useEffect)(()=>{if(!o)return;let e=e=>{e.key===`Escape`&&(s==null||s(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[o,s]),(0,t.useEffect)(()=>{if(o)l(!0);else{let e=setTimeout(()=>{l(!1)},150);return()=>clearTimeout(e)}},[o]),(0,t.useEffect)(()=>{if(!o)return;let e=e=>{e.preventDefault();let t=-e.deltaY*.001;p(e=>Math.min(Math.max(.5,e+t),2))};return window.addEventListener(`wheel`,e,{passive:!1}),()=>{window.removeEventListener(`wheel`,e)}},[o]),!o&&!c)return null;function _(e){if(e===`reset`){p(1);return}let t=f+e;t<.5||t>2||p(t)}return(0,r.createPortal)((0,n.jsxs)(`div`,{"data-u-comp":`gallery`,dir:m,role:`dialog`,"aria-modal":`true`,"aria-label":`Image gallery`,tabIndex:-1,ref:h,className:U(`univer-fixed univer-inset-0 univer-z-[1080] univer-flex univer-h-screen univer-w-screen univer-select-none univer-items-center univer-justify-center`,{"univer-animate-in univer-fade-in":o,"univer-animate-out univer-fade-out":!o},i),children:[(0,n.jsx)(`div`,{className:`univer-absolute univer-inset-0 univer-size-full univer-bg-gray-900 univer-opacity-80`,"aria-hidden":`true`,onClick:()=>s==null?void 0:s(!1)}),(0,n.jsx)(`div`,{className:`univer-relative univer-flex univer-w-fit univer-items-center univer-justify-center`,children:g&&(0,n.jsx)(`img`,{className:`univer-h-full univer-w-full univer-object-contain univer-transition-transform univer-duration-300 univer-ease-out`,style:{transform:`scale(${f})`},src:g,alt:`Image ${u+1} of ${a.length}`,draggable:!1})}),(0,n.jsxs)(`footer`,{className:`univer-absolute univer-bottom-6 univer-left-1/2 univer-flex -univer-translate-x-1/2 univer-items-center univer-gap-3 univer-rounded-full univer-bg-gray-800 univer-px-6 univer-py-3 univer-text-gray-400`,children:[(0,n.jsx)(Of,{className:`!univer-text-gray-400 [&_[data-u-comp=pager-left-arrow]:hover]:!univer-bg-gray-600 [&_[data-u-comp=pager-right-arrow]:hover]:!univer-bg-gray-600`,value:u+1,total:a.length,onChange:e=>d(e-1)}),(0,n.jsx)(`button`,{type:`button`,"aria-label":`Zoom in`,className:kf,onClick:()=>_(.25),children:(0,n.jsx)(pe,{"aria-hidden":`true`})}),(0,n.jsx)(`button`,{type:`button`,"aria-label":`Zoom out`,className:kf,onClick:()=>_(-.25),children:(0,n.jsx)(he,{"aria-hidden":`true`})}),(0,n.jsx)(`button`,{type:`button`,"aria-label":`Reset zoom`,className:kf,onClick:()=>_(`reset`),children:(0,n.jsx)(se,{"aria-hidden":`true`})})]})]}),document.body)}let jf=mt(`univer-box-border univer-w-full univer-rounded-md univer-bg-white univer-transition-colors univer-duration-200 placeholder:univer-text-gray-400 focus:univer-border-primary-600 focus:univer-outline-none focus:univer-ring-2 focus:univer-ring-primary-50 dark:!univer-bg-gray-700 dark:!univer-text-white dark:focus:!univer-ring-primary-900`,{variants:{size:{mini:`univer-h-7 univer-px-1.5 univer-text-sm`,small:`univer-h-8 univer-px-2 univer-text-sm`,middle:`univer-h-10 univer-px-3 univer-text-base`,large:`univer-h-12 univer-px-4 univer-text-lg`}},defaultVariants:{size:`small`}}),Mf=(0,t.forwardRef)(({autoFocus:e=!1,className:r,style:i,type:a=`text`,placeholder:o,value:s,size:c=`small`,allowClear:l=!1,disabled:u=!1,onClick:d,onKeyDown:f,onChange:p,onFocus:m,onBlur:h,slot:g,inputClass:_,inputStyle:v,...y},b)=>{let x=e=>{e.stopPropagation(),p==null||p(``)},S=e=>{p==null||p(e.target.value)},C=(0,t.useMemo)(()=>l&&s&&!u||g,[l,u,g,s]),[w,T]=(0,t.useState)(0),E=(0,t.useRef)(null);return(0,t.useEffect)(()=>{let e=null;return g&&E.current&&(e=new MutationObserver(()=>{E.current&&T(E.current.offsetWidth+8)}),e.observe(E.current,{childList:!0,subtree:!0}),T(E.current.offsetWidth+8)),()=>e==null?void 0:e.disconnect()},[E.current]),(0,t.useEffect)(()=>{l&&!(g&&E.current)&&T(26)},[]),(0,n.jsxs)(`div`,{"data-u-comp":`input`,className:U(`univer-relative univer-inline-flex univer-w-full univer-items-center univer-rounded-md`,u&&`univer-cursor-not-allowed`,r),style:i,children:[(0,n.jsx)(`input`,{ref:b,type:a,className:U(jf({size:c}),Q,u&&`univer-cursor-not-allowed univer-bg-gray-50 univer-text-gray-400 dark:!univer-text-gray-500`,l&&!g&&`univer-pr-8`,_),placeholder:o,value:s,disabled:u,autoFocus:e,onClick:d,onKeyDown:f,onChange:S,onFocus:m,onBlur:h,style:{...v,paddingRight:w},...y}),C&&(0,n.jsxs)(`div`,{className:`univer-absolute univer-right-2 univer-flex univer-items-center univer-gap-1 univer-rounded-full`,ref:E,children:[g,l&&s&&!u&&(0,n.jsx)(`button`,{type:`button`,onClick:x,className:`univer-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded-full univer-border-none univer-bg-transparent univer-p-1 univer-text-gray-400 univer-transition-colors univer-duration-200 hover:univer-text-gray-500 focus:univer-outline-none`,children:(0,n.jsx)(D,{className:`univer-size-3`})})]})]})}),Nf=(0,t.forwardRef)(({value:e,defaultValue:r,size:i=`small`,min:a=-(2**53-1),max:o=2**53-1,step:s=1,precision:c,formatter:l,parser:u,controls:d=!0,className:f,inputClassName:p,controlsClassName:m,disabled:h,onChange:g,onKeyDown:_,onPressEnter:v,onFocus:y,onBlur:b,allowEmpty:x=!1},S)=>{let[C,w]=(0,t.useState)(e===void 0?r===void 0?null:r:e),T=(0,t.useRef)(C),[E,D]=(0,t.useState)(M(C)),O=(0,t.useRef)(null),k=(0,t.useRef)(null),A=(0,t.useRef)(null),j=e=>{S&&(typeof S==`function`?S(e):S.current=e),O.current=e};(0,t.useEffect)(()=>{e!==void 0&&e!==C&&(w(e),T.current=e,D(M(e)))},[e]),(0,t.useEffect)(()=>{C!==null&&(T.current=C)},[C]),(0,t.useEffect)(()=>()=>{k.current&&clearTimeout(k.current),A.current&&clearInterval(A.current)},[]);function M(e){if(e==null)return``;let t=e;return c!==void 0&&(t=Number(e).toFixed(c)),l?l(t):String(t)}function N(e){if(!e)return null;let t=e;u&&(t=u(e));try{let e=t.replace(/[^\d.-]/g,``).split(`.`),n=e[0],r=e.length>1?e.slice(1).join(``):``,i=n+(r?`.${r}`:``),a=Number(i);if(Number.isNaN(a))return null;let o;if(c!==void 0){let e=10**c,t=Math.round(a*e)/e;o=t.toString().includes(`e`)?Number.parseFloat(t.toFixed(c)):t}else o=a.toString().includes(`e`)?Number.parseFloat(a.toFixed(16).replace(/\.?0+$/,``)):a;return o}catch{return null}}function P(e){return e===null?null:o!==void 0&&e>o?o:a!==void 0&&e<a?a:e}function F(e){if(x&&e===``){D(e),w(null),g==null||g(null);return}let t=N(e),n=P(t);D(t!==null&&n!==t?M(n):e),w(n),g==null||g(n)}function I(e){if(C===null){if(E===``&&x)g&&g(null);else{let e=T.current;w(e),D(M(e)),g&&g(e)}b==null||b(e);return}let t=C;o!==void 0&&t>o&&(t=o),a!==void 0&&t<a&&(t=a),t===C?D(M(C)):(w(t),D(M(t)),g==null||g(t)),b==null||b(e)}function L(e){if(h)return;let t=e?s:-s,n;n=C===null?T.current===null?a>0?a:0:T.current:C;let r=n+t;o!==void 0&&r>o&&(r=o),a!==void 0&&r<a&&(r=a),r!==n&&(w(r),T.current=r,D(M(r)),g==null||g(r))}function R(e){h||(_==null||_(e),e.key===`ArrowUp`?(e.preventDefault(),L(!0)):e.key===`ArrowDown`?(e.preventDefault(),L(!1)):e.key===`Enter`&&(v==null||v(e)))}function z(e){var t;h||(L(e),(t=O.current)==null||t.focus())}let ee=h||o!==void 0&&C!==null&&C>=o,te=h||a!==void 0&&C!==null&&C<=a;return(0,n.jsx)(`div`,{className:U(`univer-inline-block`,f),children:(0,n.jsxs)(`div`,{className:`univer-relative univer-w-full`,children:[(0,n.jsx)(Mf,{ref:j,className:U(`univer-box-border`,p),size:i,value:E,disabled:h,onChange:F,onFocus:y,onBlur:I,onKeyDown:R}),d&&(0,n.jsxs)(`div`,{className:U(`univer-absolute univer-right-px univer-top-px univer-flex univer-h-[calc(100%-2px)] univer-flex-col univer-overflow-hidden univer-rounded-r-md before:univer-absolute before:univer-top-1/2 before:univer-block before:univer-h-px before:univer-w-full before:-univer-translate-y-1/2 before:univer-bg-gray-200 before:univer-content-[""] rtl:univer-left-px rtl:univer-right-auto rtl:univer-rounded-l-md rtl:univer-rounded-r-none dark:before:!univer-bg-gray-600`,Wl,Gl,m),children:[(0,n.jsx)(`span`,{className:U(`univer-box-border univer-flex univer-h-1/2 univer-w-5 univer-cursor-pointer univer-items-center univer-justify-center univer-border-none univer-bg-transparent univer-p-0 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-600`,ee&&`univer-cursor-not-allowed univer-opacity-60`),role:`button`,"aria-label":`increment`,"aria-disabled":ee,tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:()=>{ee||z(!0)},children:`+`}),(0,n.jsx)(`span`,{className:U(`univer-box-border univer-flex univer-h-1/2 univer-w-5 univer-cursor-pointer univer-items-center univer-justify-center univer-border-none univer-bg-transparent univer-p-0 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-600`,te&&`univer-cursor-not-allowed univer-opacity-60`),role:`button`,"aria-label":`decrement`,"aria-disabled":te,tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:()=>{te||z(!1)},children:`-`})]})]})})});function Pf({items:e,value:r,defaultValue:i,onChange:a,className:o=``}){let[s,c]=(0,t.useState)(r===void 0?i||e[0].value:r),[l,u]=(0,t.useState)({}),d=(0,t.useRef)(new Map),f=(0,t.useRef)(null);(0,t.useEffect)(()=>{r!==void 0&&r!==s&&c(r)},[r]);let p=(e,t)=>{let n=d.current.get(e),r=t?d.current.get(t):null;if(n&&f.current){let e=f.current.getBoundingClientRect(),t=n.getBoundingClientRect(),i=t.left-e.left-4;u(r?{"--slide-from":`${r.getBoundingClientRect().left-e.left-4}px`,"--slide-to":`${i}px`,width:`${t.width}px`,transform:`translateX(${i}px)`}:{width:`${t.width}px`,transform:`translateX(${i}px)`})}};(0,t.useEffect)(()=>{p(s)},[s]);let m=e=>{let t=s;c(e),a==null||a(e),p(e,t)};return(0,n.jsxs)(`div`,{"data-u-comp":`segmented`,ref:f,className:U(`univer-relative univer-box-border univer-flex univer-min-w-0 univer-gap-1 univer-rounded-lg univer-bg-gray-100 univer-p-1 dark:!univer-bg-gray-800`,o),children:[(0,n.jsx)(`div`,{className:`univer-animate-univer-slide univer-absolute univer-h-6 univer-rounded-md univer-bg-white univer-shadow-sm univer-transition-all univer-duration-200 dark:!univer-bg-gray-700 dark:!univer-text-gray-400`,style:l}),e.map(e=>(0,n.jsx)(`button`,{ref:t=>{t&&d.current.set(e.value,t)},className:U(`univer-relative univer-box-border univer-min-w-0 univer-flex-1 univer-cursor-pointer univer-truncate univer-border-none univer-bg-transparent univer-px-3 univer-py-1 univer-text-xs univer-font-medium univer-transition-colors`,{"univer-text-gray-900 dark:!univer-text-white":s===e.value,"univer-text-gray-500 hover:univer-text-gray-900 dark:hover:!univer-text-white":s!==e.value}),type:`button`,onClick:()=>m(e.value),children:e.label},String(e.value)))]})}function Ff(e){let{children:i,className:a,asChild:o=!0,title:s,placement:c=`bottom`,showIfEllipsis:l=!1,visible:u,onVisibleChange:d}=e,{direction:f}=(0,t.useContext)(G),[p,m]=(0,t.useState)(!1),h=u!==void 0,g=h?u:p,_=(0,t.useRef)(null),v=(0,t.useRef)(null),y=(0,t.useRef)(null),[b,x]=(0,t.useState)(null),[S,C]=(0,t.useState)(c);function w(e){return Math.abs(e.scrollWidth-e.clientWidth)>1}function T(){h?d==null||d(!0):m(!0)}function E(){h?d==null||d(!1):m(!1)}(0,t.useLayoutEffect)(()=>{if(!g)return;let e=_.current,t=v.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,o=[c,`bottom`,`top`,`right`,`left`],s=c,l=0,u=0,d=e=>{let t=0,i=0;return e===`bottom`?(t=n.bottom+8,i=n.left+n.width/2-r.width/2):e===`top`?(t=n.top-r.height-8,i=n.left+n.width/2-r.width/2):e===`left`?(t=n.top+n.height/2-r.height/2,i=n.left-r.width-8):(t=n.top+n.height/2-r.height/2,i=n.right+8),{t,l:i}};for(let e of o){let{t,l:n}=d(e),o=n>=0&&n+r.width<=i,c=t>=0&&t+r.height<=a;if(o&&c){s=e,l=t,u=n;break}}if(!l&&!u){let e=d(c);l=Math.min(Math.max(0,e.t),a-r.height),u=Math.min(Math.max(0,e.l),i-r.width)}C(s),x({top:Math.round(l+window.scrollY),left:Math.round(u+window.scrollX)})},[g,c]),(0,t.useEffect)(()=>{if(!g)return;let e=()=>{if(!_.current||!v.current)return;let e=_.current.getBoundingClientRect(),t=v.current.getBoundingClientRect(),n=0,r=0;S===`bottom`?(n=e.bottom+8,r=e.left+e.width/2-t.width/2):S===`top`?(n=e.top-t.height-8,r=e.left+e.width/2-t.width/2):S===`left`?(n=e.top+e.height/2-t.height/2,r=e.left-t.width-8):(n=e.top+e.height/2-t.height/2,r=e.right+8),x({top:Math.round(n+window.scrollY),left:Math.round(r+window.scrollX)})};return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[g,S]);let D={ref:e=>_.current=e,onMouseEnter:()=>{l&&_.current&&!w(_.current)||T()},onMouseLeave:()=>E(),onFocus:()=>T(),onBlur:()=>E()},O=o?(0,n.jsx)(`span`,{...D,className:`univer-inline-flex univer-max-w-full univer-items-center univer-truncate`,children:i}):(0,n.jsx)(`button`,{type:`button`,...D,children:i}),k=null;if(typeof document<`u`&&g&&s&&document.body){var A,j;k=(0,r.createPortal)((0,n.jsxs)(`div`,{ref:v,dir:f,role:`tooltip`,className:U(`univer-animate-in univer-fade-in-0 univer-zoom-in-95 univer-pointer-events-auto univer-absolute univer-z-[1081] univer-box-border univer-w-fit univer-max-w-sm univer-text-balance univer-rounded-lg univer-bg-gray-700 univer-px-2.5 univer-py-2 univer-text-xs univer-font-medium univer-text-white univer-shadow-lg univer-drop-shadow-sm dark:!univer-bg-gray-100 dark:!univer-text-gray-900`,a),style:{top:(A=b==null?void 0:b.top)==null?-9999:A,left:(j=b==null?void 0:b.left)==null?-9999:j},onMouseEnter:()=>T(),onMouseLeave:()=>E(),children:[(0,n.jsx)(`div`,{className:`univer-break-words`,children:s}),(0,n.jsx)(`div`,{ref:y,className:`univer-absolute univer-size-2.5 univer-rotate-45 univer-rounded-sm univer-bg-gray-700 dark:!univer-bg-gray-100`,style:{...S===`bottom`&&{top:-5,left:`50%`,transform:`translateX(-50%) rotate(45deg)`},...S===`top`&&{bottom:-5,left:`50%`,transform:`translateX(-50%) rotate(45deg)`},...S===`left`&&{right:-5,top:`50%`,transform:`translateY(-50%) rotate(45deg)`},...S===`right`&&{left:-5,top:`50%`,transform:`translateY(-50%) rotate(45deg)`}}})]}),document.body)}return(0,n.jsxs)(n.Fragment,{children:[O,k]})}let If={type:`linear`,stops:[{color:`#ffffff`,offset:0},{color:`#000000`,offset:100}],angle:0};function Lf(e,t,n){return Math.max(t,Math.min(n,e))}function Rf(e){var t;return Lf((t=e==null?void 0:e.opacity)==null?1:t,0,1)}function zf(e,t){if(t>=1)return e;let n=e.trim();if(/^#[0-9a-f]{3}$/i.test(n)){let[,e,r,i]=n;return`rgba(${Number.parseInt(e+e,16)}, ${Number.parseInt(r+r,16)}, ${Number.parseInt(i+i,16)}, ${t})`}if(/^#[0-9a-f]{6}$/i.test(n))return`rgba(${Number.parseInt(n.slice(1,3),16)}, ${Number.parseInt(n.slice(3,5),16)}, ${Number.parseInt(n.slice(5,7),16)}, ${t})`;let r=/^rgba?\(([^)]+)\)$/i.exec(n);if(r){let e=r[1].split(`,`).map(e=>e.trim()),n=e[3]===void 0?1:Number.parseFloat(e[3]),i=Number.isFinite(n)?Lf(n*t,0,1):t;return`rgba(${e[0]}, ${e[1]}, ${e[2]}, ${i})`}return e}function Bf(e){return zf(e.color,Rf(e))}function Vf(e){var t,n;return(t=(n=e.angle)==null?If.angle:n)==null?0:t}function Hf(e){return(Vf(e)+90)%360}function Uf(e){var r,i,a;let{className:o,compact:s=!1,value:c=If,onChange:l}=e,{locale:u}=(0,t.useContext)(G),[d,f]=(0,t.useState)(c),[p,m]=(0,t.useState)(0),h=(0,t.useRef)(null),g=(0,t.useRef)(c),_=(0,t.useRef)(null);(0,t.useEffect)(()=>{g.current=d},[d]),(0,t.useEffect)(()=>{f(c)},[c]);let v=e=>{g.current=e,f(e),l==null||l(e)};(0,t.useEffect)(()=>{m(e=>e>=d.stops.length?Math.max(0,d.stops.length-1):e)},[d.stops.length]),(0,t.useEffect)(()=>()=>{var e;(e=_.current)==null||e.call(_)},[]);let y=(0,t.useMemo)(()=>[...d.stops].sort((e,t)=>e.offset-t.offset),[d.stops]),b=e=>{v({...g.current,type:e})},x=e=>{v({...g.current,angle:e==null?0:e})},S=e=>{let t=[...g.current.stops];t[p]={...t[p],color:e},v({...g.current,stops:t})},C=e=>{if(e===null)return;let t=[...g.current.stops];t[p]={...t[p],offset:e},v({...g.current,stops:t})},w=e=>{let t=Lf(e==null?0:e,0,100),n=[...g.current.stops];n[p]={...n[p],opacity:(100-t)/100},v({...g.current,stops:n})},T=e=>{if(!h.current)return;let t=h.current.getBoundingClientRect(),n=Math.round((e.clientX-t.left)/t.width*100),r=[...y].reverse().find(e=>e.offset<=n)||y[0],i={color:r.color,offset:n,opacity:Rf(r)},a=[...g.current.stops,i];v({...g.current,stops:a}),m(a.length-1)},E=()=>{if(d.stops.length<=2)return;let e=g.current.stops.filter((e,t)=>t!==p);v({...g.current,stops:e}),m(0)},D=(0,t.useMemo)(()=>`linear-gradient(to right, ${y.map(e=>`${Bf(e)} ${e.offset}%`).join(`, `)})`,[y]),O=(0,t.useMemo)(()=>{let e=y.map(e=>`${Bf(e)} ${e.offset}%`).join(`, `);switch(d.type){case`linear`:return`linear-gradient(${Hf(d)}deg, ${e})`;case`radial`:return`radial-gradient(circle, ${e})`;case`angular`:return`conic-gradient(from ${Vf(d)}deg, ${e})`;case`diamond`:return`radial-gradient(circle, ${e})`;default:return`linear-gradient(${Hf(d)}deg, ${e})`}},[d,y]),A=d.type===`linear`||d.type===`angular`;return(0,n.jsxs)(`div`,{className:U(s?`univer-flex univer-w-full univer-min-w-0 univer-flex-col univer-gap-3 univer-rounded-md univer-bg-transparent univer-p-0 dark:!univer-bg-transparent`:`univer-flex univer-w-full univer-min-w-0 univer-max-w-80 univer-flex-col univer-gap-4 univer-rounded-lg univer-bg-white univer-p-4 univer-shadow-lg dark:!univer-bg-gray-800`,o),onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:[s?(0,n.jsx)(`div`,{className:`univer-flex univer-min-w-0 univer-items-center univer-gap-4 univer-border-b univer-border-gray-100 dark:!univer-border-gray-700`,children:[{label:u==null?void 0:u.GradientColorPicker.linear,value:`linear`},{label:u==null?void 0:u.GradientColorPicker.radial,value:`radial`},{label:u==null?void 0:u.GradientColorPicker.angular,value:`angular`},{label:u==null?void 0:u.GradientColorPicker.diamond,value:`diamond`}].map(e=>{let t=d.type===e.value;return(0,n.jsxs)(`button`,{type:`button`,className:U(`univer-relative univer-min-w-0 univer-flex-1 univer-cursor-pointer univer-truncate univer-border-none univer-bg-transparent univer-px-0 univer-pb-2 univer-pt-0 univer-text-xs univer-transition-colors`,t?`univer-font-medium univer-text-primary-600 dark:!univer-text-primary-300`:`univer-text-gray-500 hover:univer-text-gray-900 dark:hover:!univer-text-white`),onClick:()=>b(e.value),children:[e.label,t&&(0,n.jsx)(`span`,{className:`univer-absolute univer-inset-x-2 -univer-bottom-px univer-h-0.5 univer-rounded-full univer-bg-primary-600 dark:!univer-bg-primary-300`})]},e.value)})}):(0,n.jsx)(Pf,{className:`univer-w-full univer-min-w-0 univer-gap-1 univer-overflow-hidden`,items:[{label:u==null?void 0:u.GradientColorPicker.linear,value:`linear`},{label:u==null?void 0:u.GradientColorPicker.radial,value:`radial`},{label:u==null?void 0:u.GradientColorPicker.angular,value:`angular`},{label:u==null?void 0:u.GradientColorPicker.diamond,value:`diamond`}],value:d.type,onChange:e=>b(e)}),A&&(0,n.jsxs)(`div`,{"data-u-comp":`gradient-color-picker-angle`,className:`univer-flex univer-items-center univer-justify-between univer-gap-3`,children:[(0,n.jsx)(`span`,{className:`univer-text-xs univer-text-gray-500`,children:u==null?void 0:u.GradientColorPicker.angle}),(0,n.jsx)(Nf,{className:`univer-w-24`,value:Vf(d),min:0,max:360,onChange:x})]}),(0,n.jsx)(`div`,{"data-u-comp":`gradient-color-picker-preview`,className:U(`univer-w-full univer-rounded-md univer-border univer-border-gray-200 dark:!univer-border-gray-600`,s?`univer-h-20`:`univer-h-32`),style:{background:O}}),(0,n.jsxs)(`div`,{className:U(`univer-relative univer-h-6`,s?`univer-mt-1`:`univer-mt-4`),children:[(0,n.jsx)(`div`,{ref:h,"data-u-comp":`gradient-color-picker-bar`,className:`univer-absolute univer-inset-x-0 univer-top-1/2 univer-h-2 -univer-translate-y-1/2 univer-cursor-crosshair univer-rounded-full`,style:{background:D},onClick:T}),d.stops.map((e,t)=>(0,n.jsx)(`div`,{"data-u-comp":`gradient-color-picker-stop`,"data-selected":p===t,className:U(`univer-absolute univer-top-1/2 univer-size-4 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-cursor-pointer univer-rounded-full univer-border-2 univer-border-white univer-shadow-md`,p===t?`univer-z-10 univer-ring-2 univer-ring-primary-500`:`univer-z-0`),style:{left:`${e.offset}%`,backgroundColor:Bf(e)},onClick:e=>{e.stopPropagation(),m(t)},onPointerDown:n=>{n.preventDefault(),n.stopPropagation();let r=n.clientX,i=e.offset;m(t);let a=e=>{if(!h.current)return;e.preventDefault();let n=h.current.getBoundingClientRect(),a=(e.clientX-r)/n.width*100,o=Math.max(0,Math.min(100,Math.round(i+a))),s=[...g.current.stops];s[t]={...s[t],offset:o},v({...g.current,stops:s})},o=()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o),_.current=null};_.current=o,window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o)}},t))]}),(0,n.jsxs)(`div`,{className:`univer-flex univer-items-end univer-gap-2`,children:[(0,n.jsxs)(`div`,{className:`univer-flex-1`,children:[(0,n.jsx)(`div`,{className:`univer-mb-0.5 univer-text-xs univer-text-gray-500`,children:u==null?void 0:u.GradientColorPicker.offset}),(0,n.jsx)(Nf,{value:(r=d.stops[p])==null?void 0:r.offset,min:0,max:100,onChange:C})]}),(0,n.jsxs)(`div`,{className:`univer-flex-1`,children:[(0,n.jsx)(`div`,{className:`univer-mb-0.5 univer-text-xs univer-text-gray-500`,children:(i=u==null?void 0:u.GradientColorPicker.transparency)==null?`Transparency`:i}),(0,n.jsx)(Nf,{value:Math.round((1-Rf(d.stops[p]))*100),min:0,max:100,step:10,formatter:e=>`${e}%`,parser:e=>(e==null?void 0:e.replace(/%/g,``))||``,onChange:w})]}),(0,n.jsx)(`div`,{className:`univer-flex univer-gap-1`,children:(0,n.jsx)(Ff,{title:u==null?void 0:u.GradientColorPicker.delete,children:(0,n.jsx)(Pt,{"data-u-comp":`gradient-color-picker-delete`,variant:`danger`,onClick:E,disabled:d.stops.length<=2,children:(0,n.jsx)(k,{})})})})]}),(0,n.jsx)(`div`,{className:U(`univer-border-t univer-border-gray-100 dark:!univer-border-gray-700`,s?`univer-pt-3`:`univer-pt-4`),children:(0,n.jsx)(vf,{value:(a=d.stops[p])==null?void 0:a.color,onChange:S})})]})}var Wf,Gf=`HoverCard`,[Kf,qf]=Ht(Gf,[Zi]),Jf=Zi(),[Yf,Xf]=Kf(Gf),Zf=e=>{let{__scopeHoverCard:t,children:r,open:i,defaultOpen:a,onOpenChange:o,openDelay:s=700,closeDelay:c=300}=e,l=Jf(t),u=p.useRef(0),d=p.useRef(0),f=p.useRef(!1),m=p.useRef(!1),[h,g]=qt({prop:i,defaultProp:a==null?!1:a,onChange:o,caller:Gf}),_=p.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>g(!0),s)},[s,g]),v=p.useCallback(()=>{clearTimeout(u.current),!f.current&&!m.current&&(d.current=window.setTimeout(()=>g(!1),c))},[c,g]),y=p.useCallback(()=>g(!1),[g]);return p.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),(0,n.jsx)(Yf,{scope:t,open:h,onOpenChange:g,onOpen:_,onClose:v,onDismiss:y,hasSelectionRef:f,isPointerDownOnContentRef:m,children:(0,n.jsx)(pa,{...l,children:r})})};Zf.displayName=Gf;var Qf=`HoverCardTrigger`,$f=p.forwardRef((e,t)=>{let{__scopeHoverCard:r,...i}=e,a=Xf(Qf,r),o=Jf(r);return(0,n.jsx)(ma,{asChild:!0,...o,children:(0,n.jsx)(q.a,{"data-state":a.open?`open`:`closed`,...i,ref:t,onPointerEnter:K(e.onPointerEnter,lp(a.onOpen)),onPointerLeave:K(e.onPointerLeave,lp(a.onClose)),onFocus:K(e.onFocus,a.onOpen),onBlur:K(e.onBlur,a.onClose),onTouchStart:K(e.onTouchStart,e=>e.preventDefault())})})});$f.displayName=Qf;var ep=`HoverCardPortal`,[tp,np]=Kf(ep,{forceMount:void 0}),rp=e=>{let{__scopeHoverCard:t,forceMount:r,children:i,container:a}=e,o=Xf(ep,t);return(0,n.jsx)(tp,{scope:t,forceMount:r,children:(0,n.jsx)(X,{present:r||o.open,children:(0,n.jsx)(va,{asChild:!0,container:a,children:i})})})};rp.displayName=ep;var ip=`HoverCardContent`,ap=p.forwardRef((e,t)=>{let r=np(ip,e.__scopeHoverCard),{forceMount:i=r.forceMount,...a}=e,o=Xf(ip,e.__scopeHoverCard);return(0,n.jsx)(X,{present:i||o.open,children:(0,n.jsx)(op,{"data-state":o.open?`open`:`closed`,...a,onPointerEnter:K(e.onPointerEnter,lp(o.onOpen)),onPointerLeave:K(e.onPointerLeave,lp(o.onClose)),ref:t})})});ap.displayName=ip;var op=p.forwardRef((e,t)=>{let{__scopeHoverCard:r,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,...c}=e,l=Xf(ip,r),u=Jf(r),d=p.useRef(null),f=W(t,d),[m,h]=p.useState(!1);return p.useEffect(()=>{if(m){let e=document.body;return Wf=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=Wf,e.style.webkitUserSelect=Wf}}},[m]),p.useEffect(()=>{if(d.current){let e=()=>{h(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var e;((e=document.getSelection())==null?void 0:e.toString())!==``&&(l.hasSelectionRef.current=!0)})};return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),p.useEffect(()=>{d.current&&up(d.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,n.jsx)(sn,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:K(o,e=>{e.preventDefault()}),onDismiss:l.onDismiss,children:(0,n.jsx)(ha,{...u,...c,onPointerDown:K(c.onPointerDown,e=>{e.currentTarget.contains(e.target)&&h(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:f,style:{...c.style,userSelect:m?`text`:void 0,WebkitUserSelect:m?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})}),sp=`HoverCardArrow`,cp=p.forwardRef((e,t)=>{let{__scopeHoverCard:r,...i}=e,a=Jf(r);return(0,n.jsx)(ga,{...a,...i,ref:t})});cp.displayName=sp;function lp(e){return t=>t.pointerType===`touch`?void 0:e()}function up(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var dp=Zf,fp=$f,pp=rp,mp=ap;let hp=dp,gp=pp,_p=fp,vp=(0,t.forwardRef)(({className:e,align:t=`center`,sideOffset:r=4,...i},a)=>(0,n.jsx)(mp,{ref:a,align:t,sideOffset:r,className:U(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[side=bottom]:univer-slide-in-from-top-2 data-[side=left]:univer-slide-in-from-right-2 data-[side=right]:univer-slide-in-from-left-2 data-[side=top]:univer-slide-in-from-bottom-2 univer-z-[1080] univer-w-64 univer-origin-[--radix-hover-card-content-transform-origin] univer-rounded-md univer-bg-white univer-text-gray-900 univer-shadow-md univer-outline-none dark:!univer-bg-gray-900 dark:!univer-text-white`,Q,e),...i}));vp.displayName=mp.displayName;function yp(e){let{children:r,overlay:i,disabled:a,openDelay:o=200,open:s,onOpenChange:c,...l}=e,[u,d]=(0,t.useState)(!1),f=s!==void 0,p=f?s:u;function m(e){a||(f||d(e),c==null||c(e))}return(0,n.jsxs)(hp,{open:p,onOpenChange:m,openDelay:o,children:[(0,n.jsx)(_p,{asChild:!0,children:r}),(0,n.jsx)(gp,{children:(0,n.jsx)(vp,{...l,children:i})})]})}function bp(e){let{keyboard:t,className:r}=e,i=t.split(`+`);return(0,n.jsx)(`span`,{className:U(`univer-inline-block univer-h-6 univer-select-none univer-whitespace-nowrap univer-rounded-md univer-bg-gray-50 univer-px-2 univer-font-mono univer-text-xs/6 univer-font-medium univer-text-gray-700 dark:!univer-bg-gray-700 dark:!univer-text-white`,Q,r),children:i.map((e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`kbd`,{className:`univer-inline-block univer-h-full`,children:e}),t<i.length-1&&(0,n.jsx)(`span`,{className:`univer-inline-block univer-h-full univer-px-1`,children:`+`})]},t))})}function xp(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}let Sp=e=>{switch(e){case`success`:return Tp;case`info`:return Dp;case`warning`:return Ep;case`error`:return Op;default:return null}},Cp=Array(12).fill(0),wp=({visible:e,className:t})=>p.default.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},p.default.createElement(`div`,{className:`sonner-spinner`},Cp.map((e,t)=>p.default.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Tp=p.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},p.default.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),Ep=p.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},p.default.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),Dp=p.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},p.default.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Op=p.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},p.default.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),kp=p.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},p.default.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),p.default.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),Ap=()=>{let[e,t]=p.default.useState(document.hidden);return p.default.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},jp=1,$=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)==`number`||((t=e.id)==null?void 0:t.length)>0?e.id:jp++,a=this.toasts.find(e=>e.id===i),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(t=>t.id===i?(this.publish({...t,...e,id:i,title:n}),{...t,...e,id:i,dismissible:o,title:n}):t):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],p.default.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(Np(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!p.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||jp++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Mp=(e,t)=>{let n=(t==null?void 0:t.id)||jp++;return $.addToast({title:e,...t,id:n}),n},Np=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,Pp=Object.assign(Mp,{success:$.success,info:$.info,warning:$.warning,error:$.error,custom:$.custom,message:$.message,promise:$.promise,dismiss:$.dismiss,loading:$.loading},{getHistory:()=>$.toasts,getToasts:()=>$.getActiveToasts()});xp(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function Fp(e){return e.label!==void 0}let Ip=4e3;function Lp(...e){return e.filter(Boolean).join(` `)}function Rp(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}let zp=e=>{var t,n,r,i,a,o,s,c,l;let{invert:u,toast:d,unstyled:f,interacting:m,setHeights:h,visibleToasts:g,heights:_,index:v,toasts:y,expanded:b,removeToast:x,defaultRichColors:S,closeButton:C,style:w,cancelButtonStyle:T,actionButtonStyle:E,className:D=``,descriptionClassName:O=``,duration:k,position:A,gap:j,expandByDefault:M,classNames:N,icons:P,closeButtonAriaLabel:F=`Close toast`}=e,[I,L]=p.default.useState(null),[R,z]=p.default.useState(null),[ee,te]=p.default.useState(!1),[ne,re]=p.default.useState(!1),[ie,ae]=p.default.useState(!1),[oe,se]=p.default.useState(!1),[ce,le]=p.default.useState(!1),[ue,de]=p.default.useState(0),[fe,pe]=p.default.useState(0),me=p.default.useRef(d.duration||k||Ip),he=p.default.useRef(null),ge=p.default.useRef(null),_e=v===0,ve=v+1<=g,B=d.type,ye=d.dismissible!==!1,be=d.className||``,xe=d.descriptionClassName||``,Se=p.default.useMemo(()=>_.findIndex(e=>e.toastId===d.id)||0,[_,d.id]),Ce=p.default.useMemo(()=>{var e;return(e=d.closeButton)==null?C:e},[d.closeButton,C]),we=p.default.useMemo(()=>d.duration||k||Ip,[d.duration,k]),Te=p.default.useRef(0),Ee=p.default.useRef(0),De=p.default.useRef(0),Oe=p.default.useRef(null),[ke,Ae]=A.split(`-`),je=p.default.useMemo(()=>_.reduce((e,t,n)=>n>=Se?e:e+t.height,0),[_,Se]),Me=Ap(),Ne=d.invert||u,Pe=B===`loading`;Ee.current=p.default.useMemo(()=>Se*j+je,[Se,je]),p.default.useEffect(()=>{me.current=we},[we]),p.default.useEffect(()=>{te(!0)},[]),p.default.useEffect(()=>{let e=ge.current;if(e){let t=e.getBoundingClientRect().height;return pe(t),h(e=>[{toastId:d.id,height:t,position:d.position},...e]),()=>h(e=>e.filter(e=>e.toastId!==d.id))}},[h,d.id]),p.default.useLayoutEffect(()=>{if(!ee)return;let e=ge.current,t=e.style.height;e.style.height=`auto`;let n=e.getBoundingClientRect().height;e.style.height=t,pe(n),h(e=>e.find(e=>e.toastId===d.id)?e.map(e=>e.toastId===d.id?{...e,height:n}:e):[{toastId:d.id,height:n,position:d.position},...e])},[ee,d.title,d.description,h,d.id,d.jsx,d.action,d.cancel]);let Fe=p.default.useCallback(()=>{re(!0),de(Ee.current),h(e=>e.filter(e=>e.toastId!==d.id)),setTimeout(()=>{x(d)},200)},[d,x,h,Ee]);p.default.useEffect(()=>{if(d.promise&&B===`loading`||d.duration===1/0||d.type===`loading`)return;let e;return b||m||Me?(()=>{if(De.current<Te.current){let e=new Date().getTime()-Te.current;me.current-=e}De.current=new Date().getTime()})():me.current!==1/0&&(Te.current=new Date().getTime(),e=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),Fe()},me.current)),()=>clearTimeout(e)},[b,m,d,B,Me,Fe]),p.default.useEffect(()=>{d.delete&&(Fe(),d.onDismiss==null||d.onDismiss.call(d,d))},[Fe,d.delete]);function Ie(){var e;if(P!=null&&P.loading){var t;return p.default.createElement(`div`,{className:Lp(N==null?void 0:N.loader,d==null||(t=d.classNames)==null?void 0:t.loader,`sonner-loader`),"data-visible":B===`loading`},P.loading)}return p.default.createElement(wp,{className:Lp(N==null?void 0:N.loader,d==null||(e=d.classNames)==null?void 0:e.loader),visible:B===`loading`})}let V=d.icon||(P==null?void 0:P[B])||Sp(B);var Le,Re;return p.default.createElement(`li`,{tabIndex:0,ref:ge,className:Lp(D,be,N==null?void 0:N.toast,d==null||(t=d.classNames)==null?void 0:t.toast,N==null?void 0:N.default,N==null?void 0:N[B],d==null||(n=d.classNames)==null?void 0:n[B]),"data-sonner-toast":``,"data-rich-colors":(Le=d.richColors)==null?S:Le,"data-styled":!(d.jsx||d.unstyled||f),"data-mounted":ee,"data-promise":!!d.promise,"data-swiped":ce,"data-removed":ne,"data-visible":ve,"data-y-position":ke,"data-x-position":Ae,"data-index":v,"data-front":_e,"data-swiping":ie,"data-dismissible":ye,"data-type":B,"data-invert":Ne,"data-swipe-out":oe,"data-swipe-direction":R,"data-expanded":!!(b||M&&ee),"data-testid":d.testId,style:{"--index":v,"--toasts-before":v,"--z-index":y.length-v,"--offset":`${ne?ue:Ee.current}px`,"--initial-height":M?`auto`:`${fe}px`,...w,...d.style},onDragEnd:()=>{ae(!1),L(null),Oe.current=null},onPointerDown:e=>{e.button!==2&&(Pe||!ye||(he.current=new Date,de(Ee.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(ae(!0),Oe.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{var e,t,n;if(oe||!ye)return;Oe.current=null;let r=Number(((e=ge.current)==null?void 0:e.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``))||0),i=Number(((t=ge.current)==null?void 0:t.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``))||0),a=new Date().getTime()-((n=he.current)==null?void 0:n.getTime()),o=I===`x`?r:i,s=Math.abs(o)/a;if(Math.abs(o)>=45||s>.11){de(Ee.current),d.onDismiss==null||d.onDismiss.call(d,d),z(I===`x`?r>0?`right`:`left`:i>0?`down`:`up`),Fe(),se(!0);return}else{var c,l;(c=ge.current)==null||c.style.setProperty(`--swipe-amount-x`,`0px`),(l=ge.current)==null||l.style.setProperty(`--swipe-amount-y`,`0px`)}le(!1),ae(!1),L(null)},onPointerMove:t=>{var n,r,i;if(!Oe.current||!ye||((n=window.getSelection())==null?void 0:n.toString().length)>0)return;let a=t.clientY-Oe.current.y,o=t.clientX-Oe.current.x;var s;let c=(s=e.swipeDirections)==null?Rp(A):s;!I&&(Math.abs(o)>1||Math.abs(a)>1)&&L(Math.abs(o)>Math.abs(a)?`x`:`y`);let l={x:0,y:0},u=e=>1/(1.5+Math.abs(e)/20);if(I===`y`){if(c.includes(`top`)||c.includes(`bottom`))if(c.includes(`top`)&&a<0||c.includes(`bottom`)&&a>0)l.y=a;else{let e=a*u(a);l.y=Math.abs(e)<Math.abs(a)?e:a}}else if(I===`x`&&(c.includes(`left`)||c.includes(`right`)))if(c.includes(`left`)&&o<0||c.includes(`right`)&&o>0)l.x=o;else{let e=o*u(o);l.x=Math.abs(e)<Math.abs(o)?e:o}(Math.abs(l.x)>0||Math.abs(l.y)>0)&&le(!0),(r=ge.current)==null||r.style.setProperty(`--swipe-amount-x`,`${l.x}px`),(i=ge.current)==null||i.style.setProperty(`--swipe-amount-y`,`${l.y}px`)}},Ce&&!d.jsx&&B!==`loading`?p.default.createElement(`button`,{"aria-label":F,"data-disabled":Pe,"data-close-button":!0,onClick:Pe||!ye?()=>{}:()=>{Fe(),d.onDismiss==null||d.onDismiss.call(d,d)},className:Lp(N==null?void 0:N.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(Re=P==null?void 0:P.close)==null?kp:Re):null,(B||d.icon||d.promise)&&d.icon!==null&&((P==null?void 0:P[B])!==null||d.icon)?p.default.createElement(`div`,{"data-icon":``,className:Lp(N==null?void 0:N.icon,d==null||(i=d.classNames)==null?void 0:i.icon)},d.promise||d.type===`loading`&&!d.icon?d.icon||Ie():null,d.type===`loading`?null:V):null,p.default.createElement(`div`,{"data-content":``,className:Lp(N==null?void 0:N.content,d==null||(a=d.classNames)==null?void 0:a.content)},p.default.createElement(`div`,{"data-title":``,className:Lp(N==null?void 0:N.title,d==null||(o=d.classNames)==null?void 0:o.title)},d.jsx?d.jsx:typeof d.title==`function`?d.title():d.title),d.description?p.default.createElement(`div`,{"data-description":``,className:Lp(O,xe,N==null?void 0:N.description,d==null||(s=d.classNames)==null?void 0:s.description)},typeof d.description==`function`?d.description():d.description):null),p.default.isValidElement(d.cancel)?d.cancel:d.cancel&&Fp(d.cancel)?p.default.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||T,onClick:e=>{Fp(d.cancel)&&ye&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,e),Fe())},className:Lp(N==null?void 0:N.cancelButton,d==null||(c=d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,p.default.isValidElement(d.action)?d.action:d.action&&Fp(d.action)?p.default.createElement(`button`,{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||E,onClick:e=>{Fp(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,e),!e.defaultPrevented&&Fe())},className:Lp(N==null?void 0:N.actionButton,d==null||(l=d.classNames)==null?void 0:l.actionButton)},d.action.label):null)};function Bp(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function Vp(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?`16px`:`24px`;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}let Hp=p.default.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:h,style:g,visibleToasts:_=3,toastOptions:v,dir:y=Bp(),gap:b=14,icons:x,containerAriaLabel:S=`Notifications`}=e,[C,w]=p.default.useState([]),T=p.default.useMemo(()=>n?C.filter(e=>e.toasterId===n):C.filter(e=>!e.toasterId),[C,n]),E=p.default.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[D,O]=p.default.useState([]),[k,A]=p.default.useState(!1),[j,M]=p.default.useState(!1),[N,P]=p.default.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),F=p.default.useRef(null),I=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),L=p.default.useRef(null),R=p.default.useRef(!1),z=p.default.useCallback(e=>{w(t=>{var n;return(n=t.find(t=>t.id===e.id))!=null&&n.delete||$.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return p.default.useEffect(()=>$.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{m.default.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[C]),p.default.useEffect(()=>{if(d!==`system`){P(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?P(`dark`):P(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{P(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{P(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),p.default.useEffect(()=>{C.length<=1&&A(!1)},[C]),p.default.useEffect(()=>{let e=e=>{var t;if(a.every(t=>e[t]||e.code===t)){var n;A(!0),(n=F.current)==null||n.focus()}e.code===`Escape`&&(document.activeElement===F.current||(t=F.current)!=null&&t.contains(document.activeElement))&&A(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),p.default.useEffect(()=>{if(F.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,R.current=!1)}},[F.current]),p.default.createElement(`section`,{ref:t,"aria-label":`${S} ${I}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},E.map((t,n)=>{var i;let[a,d]=t.split(`-`);return T.length?p.default.createElement(`ol`,{key:t,dir:y===`auto`?Bp():y,tabIndex:-1,ref:F,className:c,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":a,"data-x-position":d,style:{"--front-toast-height":`${((i=D[0])==null?void 0:i.height)||0}px`,"--width":`356px`,"--gap":`${b}px`,...g,...Vp(l,u)},onBlur:e=>{R.current&&!e.currentTarget.contains(e.relatedTarget)&&(R.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||R.current||(R.current=!0,L.current=e.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{j||A(!1)},onDragEnd:()=>A(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||M(!0)},onPointerUp:()=>M(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>{var a,c;return p.default.createElement(zp,{key:n.id,icons:x,index:i,toast:n,defaultRichColors:f,duration:(a=v==null?void 0:v.duration)==null?h:a,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:_,closeButton:(c=v==null?void 0:v.closeButton)==null?s:c,interacting:j,position:t,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:z,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:O,expandByDefault:o,gap:b,expanded:k,swipeDirections:e.swipeDirections})})):null}))}),Up=function(e){return e.Success=`success`,e.Info=`info`,e.Warning=`warning`,e.Error=`error`,e.Loading=`loading`,e}({}),Wp=`univer-message-toaster`,Gp=3e3,Kp=new Set,qp=(0,n.jsx)(_e,{className:`univer-animate-spin univer-text-violet-500`}),Jp=0,Yp={success:(0,n.jsx)(le,{className:`univer-text-green-500`}),info:(0,n.jsx)(L,{className:`univer-text-sky-500 dark:!univer-text-sky-400`}),warning:(0,n.jsx)(de,{className:`univer-text-amber-500`}),error:(0,n.jsx)(F,{className:`univer-text-red-500`}),loading:qp},Xp={success:`[&_[data-icon]]:univer-text-green-500`,info:`[&_[data-icon]]:univer-text-sky-500`,warning:`[&_[data-icon]]:univer-text-amber-500`,error:`[&_[data-icon]]:univer-text-red-500`,loading:`[&_[data-icon]]:univer-text-violet-500`},Zp=e=>{switch(e){case`success`:return Pp.success;case`warning`:return Pp.warning;case`error`:return Pp.error;case`loading`:return Pp.loading;default:return Pp.info}},Qp=()=>{let e=`univer-message-${Jp}`;return Jp+=1,e},$p=({className:e,...t})=>(0,n.jsx)(Hp,{id:Wp,position:`top-center`,visibleToasts:4,closeButton:!1,expand:!1,icons:{loading:qp},offset:{top:16},className:U(`[&_[data-sonner-toast]]:univer-bg-white/95 dark:[&_[data-sonner-toast]]:!univer-bg-gray-800/95 [&_[data-sonner-toast]]:univer-rounded-2xl [&_[data-sonner-toast]]:univer-border [&_[data-sonner-toast]]:univer-border-solid [&_[data-sonner-toast]]:univer-border-gray-200 [&_[data-sonner-toast]]:univer-shadow-[0_16px_40px_-20px_rgba(15,23,42,0.55)] [&_[data-sonner-toast]]:univer-backdrop-blur-sm dark:[&_[data-sonner-toast]]:!univer-border-gray-600`,e),toastOptions:{duration:Gp,classNames:{toast:`
|
|
52
|
+
`;function yf(e){let{className:i,images:a,open:o,onOpenChange:s}=e,[c,l]=(0,t.useState)(!1),[u,d]=(0,t.useState)(0),[f,p]=(0,t.useState)(1),{direction:m}=(0,t.useContext)(G),h=(0,t.useRef)(null),g=(0,t.useMemo)(()=>a[u],[u,a]);if((0,t.useEffect)(()=>{o&&h.current&&h.current.focus()},[o]),(0,t.useEffect)(()=>{if(!o)return;let e=e=>{e.key===`Escape`&&(s==null||s(!1))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[o,s]),(0,t.useEffect)(()=>{if(o)l(!0);else{let e=setTimeout(()=>{l(!1)},150);return()=>clearTimeout(e)}},[o]),(0,t.useEffect)(()=>{if(!o)return;let e=e=>{e.preventDefault();let t=-e.deltaY*.001;p(e=>Math.min(Math.max(.5,e+t),2))};return window.addEventListener(`wheel`,e,{passive:!1}),()=>{window.removeEventListener(`wheel`,e)}},[o]),!o&&!c)return null;function _(e){if(e===`reset`){p(1);return}let t=f+e;t<.5||t>2||p(t)}return(0,r.createPortal)((0,n.jsxs)(`div`,{"data-u-comp":`gallery`,dir:m,role:`dialog`,"aria-modal":`true`,"aria-label":`Image gallery`,tabIndex:-1,ref:h,className:U(`univer-fixed univer-inset-0 univer-z-[1080] univer-flex univer-h-screen univer-w-screen univer-select-none univer-items-center univer-justify-center`,{"univer-animate-in univer-fade-in":o,"univer-animate-out univer-fade-out":!o},i),children:[(0,n.jsx)(`div`,{className:`univer-absolute univer-inset-0 univer-size-full univer-bg-gray-900 univer-opacity-80`,"aria-hidden":`true`,onClick:()=>s==null?void 0:s(!1)}),(0,n.jsx)(`div`,{className:`univer-relative univer-flex univer-w-fit univer-items-center univer-justify-center`,children:g&&(0,n.jsx)(`img`,{className:`univer-h-full univer-w-full univer-object-contain univer-transition-transform univer-duration-300 univer-ease-out`,style:{transform:`scale(${f})`},src:g,alt:`Image ${u+1} of ${a.length}`,draggable:!1})}),(0,n.jsxs)(`footer`,{className:`univer-absolute univer-bottom-6 univer-left-1/2 univer-flex -univer-translate-x-1/2 univer-items-center univer-gap-3 univer-rounded-full univer-bg-gray-800 univer-px-6 univer-py-3 univer-text-gray-400`,children:[(0,n.jsx)(_f,{className:`!univer-text-gray-400 [&_[data-u-comp=pager-left-arrow]:hover]:!univer-bg-gray-600 [&_[data-u-comp=pager-right-arrow]:hover]:!univer-bg-gray-600`,value:u+1,total:a.length,onChange:e=>d(e-1)}),(0,n.jsx)(`button`,{type:`button`,"aria-label":`Zoom in`,className:vf,onClick:()=>_(.25),children:(0,n.jsx)(pe,{"aria-hidden":`true`})}),(0,n.jsx)(`button`,{type:`button`,"aria-label":`Zoom out`,className:vf,onClick:()=>_(-.25),children:(0,n.jsx)(he,{"aria-hidden":`true`})}),(0,n.jsx)(`button`,{type:`button`,"aria-label":`Reset zoom`,className:vf,onClick:()=>_(`reset`),children:(0,n.jsx)(se,{"aria-hidden":`true`})})]})]}),document.body)}let bf=mt(`univer-box-border univer-w-full univer-rounded-md univer-bg-white univer-transition-colors univer-duration-200 placeholder:univer-text-gray-400 focus:univer-border-primary-600 focus:univer-outline-none focus:univer-ring-2 focus:univer-ring-primary-50 dark:!univer-bg-gray-700 dark:!univer-text-white dark:focus:!univer-ring-primary-900`,{variants:{size:{mini:`univer-h-7 univer-px-1.5 univer-text-sm`,small:`univer-h-8 univer-px-2 univer-text-sm`,middle:`univer-h-10 univer-px-3 univer-text-base`,large:`univer-h-12 univer-px-4 univer-text-lg`}},defaultVariants:{size:`small`}}),xf=(0,t.forwardRef)(({autoFocus:e=!1,className:r,style:i,type:a=`text`,placeholder:o,value:s,size:c=`small`,allowClear:l=!1,disabled:u=!1,onClick:d,onKeyDown:f,onChange:p,onFocus:m,onBlur:h,slot:g,inputClass:_,inputStyle:v,...y},b)=>{let{direction:x}=(0,t.useContext)(G),S=e=>{e.stopPropagation(),p==null||p(``)},C=e=>{p==null||p(e.target.value)},w=(0,t.useMemo)(()=>l&&s&&!u||g,[l,u,g,s]),[T,E]=(0,t.useState)(0),O=(0,t.useRef)(null);(0,t.useEffect)(()=>{let e=null;return g&&O.current&&(e=new MutationObserver(()=>{O.current&&E(O.current.offsetWidth+8)}),e.observe(O.current,{childList:!0,subtree:!0}),E(O.current.offsetWidth+8)),()=>e==null?void 0:e.disconnect()},[O.current]),(0,t.useEffect)(()=>{l&&!(g&&O.current)&&E(26)},[]);let k=x===`rtl`&&T===0?v:{...v,paddingRight:T};return(0,n.jsxs)(`div`,{"data-u-comp":`input`,className:U(`univer-relative univer-inline-flex univer-w-full univer-items-center univer-rounded-md`,u&&`univer-cursor-not-allowed`,r),style:i,children:[(0,n.jsx)(`input`,{ref:b,type:a,className:U(bf({size:c}),Q,u&&`univer-cursor-not-allowed univer-bg-gray-50 univer-text-gray-400 dark:!univer-text-gray-500`,l&&!g&&`univer-pr-8`,_),placeholder:o,value:s,disabled:u,autoFocus:e,onClick:d,onKeyDown:f,onChange:C,onFocus:m,onBlur:h,style:k,...y}),w&&(0,n.jsxs)(`div`,{className:`univer-absolute univer-right-2 univer-flex univer-items-center univer-gap-1 univer-rounded-full`,ref:O,children:[g,l&&s&&!u&&(0,n.jsx)(`button`,{type:`button`,onClick:S,className:`univer-flex univer-size-4 univer-cursor-pointer univer-items-center univer-rounded-full univer-border-none univer-bg-transparent univer-p-1 univer-text-gray-400 univer-transition-colors univer-duration-200 hover:univer-text-gray-500 focus:univer-outline-none`,children:(0,n.jsx)(D,{className:`univer-size-3`})})]})]})}),Sf=(0,t.forwardRef)(({value:e,defaultValue:r,size:i=`small`,min:a=-(2**53-1),max:o=2**53-1,step:s=1,precision:c,formatter:l,parser:u,controls:d=!0,className:f,inputClassName:p,controlsClassName:m,disabled:h,onChange:g,onKeyDown:_,onPressEnter:v,onFocus:y,onBlur:b,allowEmpty:x=!1},S)=>{let[C,w]=(0,t.useState)(e===void 0?r===void 0?null:r:e),T=(0,t.useRef)(C),[E,D]=(0,t.useState)(M(C)),O=(0,t.useRef)(null),k=(0,t.useRef)(null),A=(0,t.useRef)(null),j=e=>{S&&(typeof S==`function`?S(e):S.current=e),O.current=e};(0,t.useEffect)(()=>{e!==void 0&&e!==C&&(w(e),T.current=e,D(M(e)))},[e]),(0,t.useEffect)(()=>{C!==null&&(T.current=C)},[C]),(0,t.useEffect)(()=>()=>{k.current&&clearTimeout(k.current),A.current&&clearInterval(A.current)},[]);function M(e){if(e==null)return``;let t=e;return c!==void 0&&(t=Number(e).toFixed(c)),l?l(t):String(t)}function N(e){if(!e)return null;let t=e;u&&(t=u(e));try{let e=t.replace(/[^\d.-]/g,``).split(`.`),n=e[0],r=e.length>1?e.slice(1).join(``):``,i=n+(r?`.${r}`:``),a=Number(i);if(Number.isNaN(a))return null;let o;if(c!==void 0){let e=10**c,t=Math.round(a*e)/e;o=t.toString().includes(`e`)?Number.parseFloat(t.toFixed(c)):t}else o=a.toString().includes(`e`)?Number.parseFloat(a.toFixed(16).replace(/\.?0+$/,``)):a;return o}catch{return null}}function P(e){return e===null?null:o!==void 0&&e>o?o:a!==void 0&&e<a?a:e}function F(e){if(x&&e===``){D(e),w(null),g==null||g(null);return}let t=N(e),n=P(t);D(t!==null&&n!==t?M(n):e),w(n),g==null||g(n)}function I(e){if(C===null){if(E===``&&x)g&&g(null);else{let e=T.current;w(e),D(M(e)),g&&g(e)}b==null||b(e);return}let t=C;o!==void 0&&t>o&&(t=o),a!==void 0&&t<a&&(t=a),t===C?D(M(C)):(w(t),D(M(t)),g==null||g(t)),b==null||b(e)}function L(e){if(h)return;let t=e?s:-s,n;n=C===null?T.current===null?a>0?a:0:T.current:C;let r=n+t;o!==void 0&&r>o&&(r=o),a!==void 0&&r<a&&(r=a),r!==n&&(w(r),T.current=r,D(M(r)),g==null||g(r))}function R(e){h||(_==null||_(e),e.key===`ArrowUp`?(e.preventDefault(),L(!0)):e.key===`ArrowDown`?(e.preventDefault(),L(!1)):e.key===`Enter`&&(v==null||v(e)))}function z(e){var t;h||(L(e),(t=O.current)==null||t.focus())}let ee=h||o!==void 0&&C!==null&&C>=o,te=h||a!==void 0&&C!==null&&C<=a;return(0,n.jsx)(`div`,{className:U(`univer-inline-block`,f),children:(0,n.jsxs)(`div`,{className:`univer-relative univer-w-full`,children:[(0,n.jsx)(xf,{ref:j,className:U(`univer-box-border`,p),size:i,value:E,disabled:h,onChange:F,onFocus:y,onBlur:I,onKeyDown:R}),d&&(0,n.jsxs)(`div`,{className:U(`univer-absolute univer-right-px univer-top-px univer-flex univer-h-[calc(100%-2px)] univer-flex-col univer-overflow-hidden univer-rounded-r-md before:univer-absolute before:univer-top-1/2 before:univer-block before:univer-h-px before:univer-w-full before:-univer-translate-y-1/2 before:univer-bg-gray-200 before:univer-content-[""] rtl:univer-left-px rtl:univer-right-auto rtl:univer-rounded-l-md rtl:univer-rounded-r-none dark:before:!univer-bg-gray-600`,Kl,ql,m),children:[(0,n.jsx)(`span`,{className:U(`univer-box-border univer-flex univer-h-1/2 univer-w-5 univer-cursor-pointer univer-items-center univer-justify-center univer-border-none univer-bg-transparent univer-p-0 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-600`,ee&&`univer-cursor-not-allowed univer-opacity-60`),role:`button`,"aria-label":`increment`,"aria-disabled":ee,tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:()=>{ee||z(!0)},children:`+`}),(0,n.jsx)(`span`,{className:U(`univer-box-border univer-flex univer-h-1/2 univer-w-5 univer-cursor-pointer univer-items-center univer-justify-center univer-border-none univer-bg-transparent univer-p-0 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-600`,te&&`univer-cursor-not-allowed univer-opacity-60`),role:`button`,"aria-label":`decrement`,"aria-disabled":te,tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:()=>{te||z(!1)},children:`-`})]})]})})});function Cf({items:e,value:r,defaultValue:i,onChange:a,className:o=``}){let[s,c]=(0,t.useState)(r===void 0?i||e[0].value:r),[l,u]=(0,t.useState)({}),d=(0,t.useRef)(new Map),f=(0,t.useRef)(null);(0,t.useEffect)(()=>{r!==void 0&&r!==s&&c(r)},[r]);let p=(e,t)=>{let n=d.current.get(e),r=t?d.current.get(t):null;if(n&&f.current){let e=f.current.getBoundingClientRect(),t=n.getBoundingClientRect(),i=t.left-e.left-4;u(r?{"--slide-from":`${r.getBoundingClientRect().left-e.left-4}px`,"--slide-to":`${i}px`,width:`${t.width}px`,transform:`translateX(${i}px)`}:{width:`${t.width}px`,transform:`translateX(${i}px)`})}};(0,t.useEffect)(()=>{p(s)},[s]);let m=e=>{let t=s;c(e),a==null||a(e),p(e,t)};return(0,n.jsxs)(`div`,{"data-u-comp":`segmented`,ref:f,className:U(`univer-relative univer-box-border univer-flex univer-min-w-0 univer-gap-1 univer-rounded-lg univer-bg-gray-100 univer-p-1 dark:!univer-bg-gray-800`,o),children:[(0,n.jsx)(`div`,{className:`univer-animate-univer-slide univer-absolute univer-h-6 univer-rounded-md univer-bg-white univer-shadow-sm univer-transition-all univer-duration-200 dark:!univer-bg-gray-700 dark:!univer-text-gray-400`,style:l}),e.map(e=>(0,n.jsx)(`button`,{ref:t=>{t&&d.current.set(e.value,t)},className:U(`univer-relative univer-box-border univer-min-w-0 univer-flex-1 univer-cursor-pointer univer-truncate univer-border-none univer-bg-transparent univer-px-3 univer-py-1 univer-text-xs univer-font-medium univer-transition-colors`,{"univer-text-gray-900 dark:!univer-text-white":s===e.value,"univer-text-gray-500 hover:univer-text-gray-900 dark:hover:!univer-text-white":s!==e.value}),type:`button`,onClick:()=>m(e.value),children:e.label},String(e.value)))]})}function wf(e){let{children:i,className:a,asChild:o=!0,title:s,placement:c=`bottom`,showIfEllipsis:l=!1,visible:u,onVisibleChange:d}=e,{direction:f}=(0,t.useContext)(G),[p,m]=(0,t.useState)(!1),h=u!==void 0,g=h?u:p,_=(0,t.useRef)(null),v=(0,t.useRef)(null),y=(0,t.useRef)(null),[b,x]=(0,t.useState)(null),[S,C]=(0,t.useState)(c);function w(e){return Math.abs(e.scrollWidth-e.clientWidth)>1}function T(){h?d==null||d(!0):m(!0)}function E(){h?d==null||d(!1):m(!1)}(0,t.useLayoutEffect)(()=>{if(!g)return;let e=_.current,t=v.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.innerWidth,a=window.innerHeight,o=[c,`bottom`,`top`,`right`,`left`],s=c,l=0,u=0,d=e=>{let t=0,i=0;return e===`bottom`?(t=n.bottom+8,i=n.left+n.width/2-r.width/2):e===`top`?(t=n.top-r.height-8,i=n.left+n.width/2-r.width/2):e===`left`?(t=n.top+n.height/2-r.height/2,i=n.left-r.width-8):(t=n.top+n.height/2-r.height/2,i=n.right+8),{t,l:i}};for(let e of o){let{t,l:n}=d(e),o=n>=0&&n+r.width<=i,c=t>=0&&t+r.height<=a;if(o&&c){s=e,l=t,u=n;break}}if(!l&&!u){let e=d(c);l=Math.min(Math.max(0,e.t),a-r.height),u=Math.min(Math.max(0,e.l),i-r.width)}C(s),x({top:Math.round(l+window.scrollY),left:Math.round(u+window.scrollX)})},[g,c]),(0,t.useEffect)(()=>{if(!g)return;let e=()=>{if(!_.current||!v.current)return;let e=_.current.getBoundingClientRect(),t=v.current.getBoundingClientRect(),n=0,r=0;S===`bottom`?(n=e.bottom+8,r=e.left+e.width/2-t.width/2):S===`top`?(n=e.top-t.height-8,r=e.left+e.width/2-t.width/2):S===`left`?(n=e.top+e.height/2-t.height/2,r=e.left-t.width-8):(n=e.top+e.height/2-t.height/2,r=e.right+8),x({top:Math.round(n+window.scrollY),left:Math.round(r+window.scrollX)})};return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[g,S]);let D={ref:e=>_.current=e,onMouseEnter:()=>{l&&_.current&&!w(_.current)||T()},onMouseLeave:()=>E(),onFocus:()=>T(),onBlur:()=>E()},O=o?(0,n.jsx)(`span`,{...D,className:`univer-inline-flex univer-max-w-full univer-items-center univer-truncate`,children:i}):(0,n.jsx)(`button`,{type:`button`,...D,children:i}),k=null;if(typeof document<`u`&&g&&s&&document.body){var A,j;k=(0,r.createPortal)((0,n.jsxs)(`div`,{ref:v,dir:f,role:`tooltip`,className:U(`univer-animate-in univer-fade-in-0 univer-zoom-in-95 univer-pointer-events-auto univer-absolute univer-z-[1081] univer-box-border univer-w-fit univer-max-w-sm univer-text-balance univer-rounded-lg univer-bg-gray-700 univer-px-2.5 univer-py-2 univer-text-xs univer-font-medium univer-text-white univer-shadow-lg univer-drop-shadow-sm dark:!univer-bg-gray-100 dark:!univer-text-gray-900`,a),style:{top:(A=b==null?void 0:b.top)==null?-9999:A,left:(j=b==null?void 0:b.left)==null?-9999:j},onMouseEnter:()=>T(),onMouseLeave:()=>E(),children:[(0,n.jsx)(`div`,{className:`univer-break-words`,children:s}),(0,n.jsx)(`div`,{ref:y,className:`univer-absolute univer-size-2.5 univer-rotate-45 univer-rounded-sm univer-bg-gray-700 dark:!univer-bg-gray-100`,style:{...S===`bottom`&&{top:-5,left:`50%`,transform:`translateX(-50%) rotate(45deg)`},...S===`top`&&{bottom:-5,left:`50%`,transform:`translateX(-50%) rotate(45deg)`},...S===`left`&&{right:-5,top:`50%`,transform:`translateY(-50%) rotate(45deg)`},...S===`right`&&{left:-5,top:`50%`,transform:`translateY(-50%) rotate(45deg)`}}})]}),document.body)}return(0,n.jsxs)(n.Fragment,{children:[O,k]})}let Tf={type:`linear`,stops:[{color:`#ffffff`,offset:0},{color:`#000000`,offset:100}],angle:0};function Ef(e,t,n){return Math.max(t,Math.min(n,e))}function Df(e){var t;return Ef((t=e==null?void 0:e.opacity)==null?1:t,0,1)}function Of(e,t){if(t>=1)return e;let n=e.trim();if(/^#[0-9a-f]{3}$/i.test(n)){let[,e,r,i]=n;return`rgba(${Number.parseInt(e+e,16)}, ${Number.parseInt(r+r,16)}, ${Number.parseInt(i+i,16)}, ${t})`}if(/^#[0-9a-f]{6}$/i.test(n))return`rgba(${Number.parseInt(n.slice(1,3),16)}, ${Number.parseInt(n.slice(3,5),16)}, ${Number.parseInt(n.slice(5,7),16)}, ${t})`;let r=/^rgba?\(([^)]+)\)$/i.exec(n);if(r){let e=r[1].split(`,`).map(e=>e.trim()),n=e[3]===void 0?1:Number.parseFloat(e[3]),i=Number.isFinite(n)?Ef(n*t,0,1):t;return`rgba(${e[0]}, ${e[1]}, ${e[2]}, ${i})`}return e}function kf(e){return Of(e.color,Df(e))}function Af(e){var t,n;return(t=(n=e.angle)==null?Tf.angle:n)==null?0:t}function jf(e){return(Af(e)+90)%360}function Mf(e){var r,i,a;let{className:o,compact:s=!1,value:c=Tf,onChange:l}=e,{locale:u}=(0,t.useContext)(G),[d,f]=(0,t.useState)(c),[p,m]=(0,t.useState)(0),h=(0,t.useRef)(null),g=(0,t.useRef)(c),_=(0,t.useRef)(null);(0,t.useEffect)(()=>{g.current=d},[d]),(0,t.useEffect)(()=>{f(c)},[c]);let v=e=>{g.current=e,f(e),l==null||l(e)};(0,t.useEffect)(()=>{m(e=>e>=d.stops.length?Math.max(0,d.stops.length-1):e)},[d.stops.length]),(0,t.useEffect)(()=>()=>{var e;(e=_.current)==null||e.call(_)},[]);let y=(0,t.useMemo)(()=>[...d.stops].sort((e,t)=>e.offset-t.offset),[d.stops]),b=e=>{v({...g.current,type:e})},x=e=>{v({...g.current,angle:e==null?0:e})},S=e=>{let t=[...g.current.stops];t[p]={...t[p],color:e},v({...g.current,stops:t})},C=e=>{if(e===null)return;let t=[...g.current.stops];t[p]={...t[p],offset:e},v({...g.current,stops:t})},w=e=>{let t=Ef(e==null?0:e,0,100),n=[...g.current.stops];n[p]={...n[p],opacity:(100-t)/100},v({...g.current,stops:n})},T=e=>{if(!h.current)return;let t=h.current.getBoundingClientRect(),n=Math.round((e.clientX-t.left)/t.width*100),r=[...y].reverse().find(e=>e.offset<=n)||y[0],i={color:r.color,offset:n,opacity:Df(r)},a=[...g.current.stops,i];v({...g.current,stops:a}),m(a.length-1)},E=()=>{if(d.stops.length<=2)return;let e=g.current.stops.filter((e,t)=>t!==p);v({...g.current,stops:e}),m(0)},D=(0,t.useMemo)(()=>`linear-gradient(to right, ${y.map(e=>`${kf(e)} ${e.offset}%`).join(`, `)})`,[y]),O=(0,t.useMemo)(()=>{let e=y.map(e=>`${kf(e)} ${e.offset}%`).join(`, `);switch(d.type){case`linear`:return`linear-gradient(${jf(d)}deg, ${e})`;case`radial`:return`radial-gradient(circle, ${e})`;case`angular`:return`conic-gradient(from ${Af(d)}deg, ${e})`;case`diamond`:return`radial-gradient(circle, ${e})`;default:return`linear-gradient(${jf(d)}deg, ${e})`}},[d,y]),A=d.type===`linear`||d.type===`angular`;return(0,n.jsxs)(`div`,{className:U(s?`univer-flex univer-w-full univer-min-w-0 univer-flex-col univer-gap-3 univer-rounded-md univer-bg-transparent univer-p-0 dark:!univer-bg-transparent`:`univer-flex univer-w-full univer-min-w-0 univer-max-w-80 univer-flex-col univer-gap-4 univer-rounded-lg univer-bg-white univer-p-4 univer-shadow-lg dark:!univer-bg-gray-800`,o),onClick:e=>e.stopPropagation(),onPointerDown:e=>e.stopPropagation(),children:[s?(0,n.jsx)(`div`,{className:`univer-flex univer-min-w-0 univer-items-center univer-gap-4 univer-border-b univer-border-gray-100 dark:!univer-border-gray-700`,children:[{label:u==null?void 0:u.GradientColorPicker.linear,value:`linear`},{label:u==null?void 0:u.GradientColorPicker.radial,value:`radial`},{label:u==null?void 0:u.GradientColorPicker.angular,value:`angular`},{label:u==null?void 0:u.GradientColorPicker.diamond,value:`diamond`}].map(e=>{let t=d.type===e.value;return(0,n.jsxs)(`button`,{type:`button`,className:U(`univer-relative univer-min-w-0 univer-flex-1 univer-cursor-pointer univer-truncate univer-border-none univer-bg-transparent univer-px-0 univer-pb-2 univer-pt-0 univer-text-xs univer-transition-colors`,t?`univer-font-medium univer-text-primary-600 dark:!univer-text-primary-300`:`univer-text-gray-500 hover:univer-text-gray-900 dark:hover:!univer-text-white`),onClick:()=>b(e.value),children:[e.label,t&&(0,n.jsx)(`span`,{className:`univer-absolute univer-inset-x-2 -univer-bottom-px univer-h-0.5 univer-rounded-full univer-bg-primary-600 dark:!univer-bg-primary-300`})]},e.value)})}):(0,n.jsx)(Cf,{className:`univer-w-full univer-min-w-0 univer-gap-1 univer-overflow-hidden`,items:[{label:u==null?void 0:u.GradientColorPicker.linear,value:`linear`},{label:u==null?void 0:u.GradientColorPicker.radial,value:`radial`},{label:u==null?void 0:u.GradientColorPicker.angular,value:`angular`},{label:u==null?void 0:u.GradientColorPicker.diamond,value:`diamond`}],value:d.type,onChange:e=>b(e)}),A&&(0,n.jsxs)(`div`,{"data-u-comp":`gradient-color-picker-angle`,className:`univer-flex univer-items-center univer-justify-between univer-gap-3`,children:[(0,n.jsx)(`span`,{className:`univer-text-xs univer-text-gray-500`,children:u==null?void 0:u.GradientColorPicker.angle}),(0,n.jsx)(Sf,{className:`univer-w-24`,value:Af(d),min:0,max:360,onChange:x})]}),(0,n.jsx)(`div`,{"data-u-comp":`gradient-color-picker-preview`,className:U(`univer-w-full univer-rounded-md univer-border univer-border-gray-200 dark:!univer-border-gray-600`,s?`univer-h-20`:`univer-h-32`),style:{background:O}}),(0,n.jsxs)(`div`,{className:U(`univer-relative univer-h-6`,s?`univer-mt-1`:`univer-mt-4`),children:[(0,n.jsx)(`div`,{ref:h,"data-u-comp":`gradient-color-picker-bar`,className:`univer-absolute univer-inset-x-0 univer-top-1/2 univer-h-2 -univer-translate-y-1/2 univer-cursor-crosshair univer-rounded-full`,style:{background:D},onClick:T}),d.stops.map((e,t)=>(0,n.jsx)(`div`,{"data-u-comp":`gradient-color-picker-stop`,"data-selected":p===t,className:U(`univer-absolute univer-top-1/2 univer-size-4 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-cursor-pointer univer-rounded-full univer-border-2 univer-border-white univer-shadow-md`,p===t?`univer-z-10 univer-ring-2 univer-ring-primary-500`:`univer-z-0`),style:{left:`${e.offset}%`,backgroundColor:kf(e)},onClick:e=>{e.stopPropagation(),m(t)},onPointerDown:n=>{n.preventDefault(),n.stopPropagation();let r=n.clientX,i=e.offset;m(t);let a=e=>{if(!h.current)return;e.preventDefault();let n=h.current.getBoundingClientRect(),a=(e.clientX-r)/n.width*100,o=Math.max(0,Math.min(100,Math.round(i+a))),s=[...g.current.stops];s[t]={...s[t],offset:o},v({...g.current,stops:s})},o=()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o),_.current=null};_.current=o,window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o)}},t))]}),(0,n.jsxs)(`div`,{className:`univer-flex univer-items-end univer-gap-2`,children:[(0,n.jsxs)(`div`,{className:`univer-flex-1`,children:[(0,n.jsx)(`div`,{className:`univer-mb-0.5 univer-text-xs univer-text-gray-500`,children:u==null?void 0:u.GradientColorPicker.offset}),(0,n.jsx)(Sf,{value:(r=d.stops[p])==null?void 0:r.offset,min:0,max:100,onChange:C})]}),(0,n.jsxs)(`div`,{className:`univer-flex-1`,children:[(0,n.jsx)(`div`,{className:`univer-mb-0.5 univer-text-xs univer-text-gray-500`,children:(i=u==null?void 0:u.GradientColorPicker.transparency)==null?`Transparency`:i}),(0,n.jsx)(Sf,{value:Math.round((1-Df(d.stops[p]))*100),min:0,max:100,step:10,formatter:e=>`${e}%`,parser:e=>(e==null?void 0:e.replace(/%/g,``))||``,onChange:w})]}),(0,n.jsx)(`div`,{className:`univer-flex univer-gap-1`,children:(0,n.jsx)(wf,{title:u==null?void 0:u.GradientColorPicker.delete,children:(0,n.jsx)(Pt,{"data-u-comp":`gradient-color-picker-delete`,variant:`danger`,onClick:E,disabled:d.stops.length<=2,children:(0,n.jsx)(k,{})})})})]}),(0,n.jsx)(`div`,{className:U(`univer-border-t univer-border-gray-100 dark:!univer-border-gray-700`,s?`univer-pt-3`:`univer-pt-4`),children:(0,n.jsx)(sf,{value:(a=d.stops[p])==null?void 0:a.color,onChange:S})})]})}var Nf,Pf=`HoverCard`,[Ff,If]=Vt(Pf,[$i]),Lf=$i(),[Rf,zf]=Ff(Pf),Bf=e=>{let{__scopeHoverCard:t,children:r,open:i,defaultOpen:a,onOpenChange:o,openDelay:s=700,closeDelay:c=300}=e,l=Lf(t),u=p.useRef(0),d=p.useRef(0),f=p.useRef(!1),m=p.useRef(!1),[h,g]=Yt({prop:i,defaultProp:a==null?!1:a,onChange:o,caller:Pf}),_=p.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>g(!0),s)},[s,g]),v=p.useCallback(()=>{clearTimeout(u.current),!f.current&&!m.current&&(d.current=window.setTimeout(()=>g(!1),c))},[c,g]),y=p.useCallback(()=>g(!1),[g]);return p.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),(0,n.jsx)(Rf,{scope:t,open:h,onOpenChange:g,onOpen:_,onClose:v,onDismiss:y,hasSelectionRef:f,isPointerDownOnContentRef:m,children:(0,n.jsx)(ha,{...l,children:r})})};Bf.displayName=Pf;var Vf=`HoverCardTrigger`,Hf=p.forwardRef((e,t)=>{let{__scopeHoverCard:r,...i}=e,a=zf(Vf,r),o=Lf(r);return(0,n.jsx)(ga,{asChild:!0,...o,children:(0,n.jsx)(q.a,{"data-state":a.open?`open`:`closed`,...i,ref:t,onPointerEnter:K(e.onPointerEnter,Qf(a.onOpen)),onPointerLeave:K(e.onPointerLeave,Qf(a.onClose)),onFocus:K(e.onFocus,a.onOpen),onBlur:K(e.onBlur,a.onClose),onTouchStart:K(e.onTouchStart,e=>e.preventDefault())})})});Hf.displayName=Vf;var Uf=`HoverCardPortal`,[Wf,Gf]=Ff(Uf,{forceMount:void 0}),Kf=e=>{let{__scopeHoverCard:t,forceMount:r,children:i,container:a}=e,o=zf(Uf,t);return(0,n.jsx)(Wf,{scope:t,forceMount:r,children:(0,n.jsx)(X,{present:r||o.open,children:(0,n.jsx)(ba,{asChild:!0,container:a,children:i})})})};Kf.displayName=Uf;var qf=`HoverCardContent`,Jf=p.forwardRef((e,t)=>{let r=Gf(qf,e.__scopeHoverCard),{forceMount:i=r.forceMount,...a}=e,o=zf(qf,e.__scopeHoverCard);return(0,n.jsx)(X,{present:i||o.open,children:(0,n.jsx)(Yf,{"data-state":o.open?`open`:`closed`,...a,onPointerEnter:K(e.onPointerEnter,Qf(o.onOpen)),onPointerLeave:K(e.onPointerLeave,Qf(o.onClose)),ref:t})})});Jf.displayName=qf;var Yf=p.forwardRef((e,t)=>{let{__scopeHoverCard:r,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,...c}=e,l=zf(qf,r),u=Lf(r),d=p.useRef(null),f=W(t,d),[m,h]=p.useState(!1);return p.useEffect(()=>{if(m){let e=document.body;return Nf=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect=`none`,e.style.webkitUserSelect=`none`,()=>{e.style.userSelect=Nf,e.style.webkitUserSelect=Nf}}},[m]),p.useEffect(()=>{if(d.current){let e=()=>{h(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var e;((e=document.getSelection())==null?void 0:e.toString())!==``&&(l.hasSelectionRef.current=!0)})};return document.addEventListener(`pointerup`,e),()=>{document.removeEventListener(`pointerup`,e),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),p.useEffect(()=>{d.current&&$f(d.current).forEach(e=>e.setAttribute(`tabindex`,`-1`))}),(0,n.jsx)(cn,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:K(o,e=>{e.preventDefault()}),onDismiss:l.onDismiss,children:(0,n.jsx)(_a,{...u,...c,onPointerDown:K(c.onPointerDown,e=>{e.currentTarget.contains(e.target)&&h(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:f,style:{...c.style,userSelect:m?`text`:void 0,WebkitUserSelect:m?`text`:void 0,"--radix-hover-card-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-hover-card-content-available-width":`var(--radix-popper-available-width)`,"--radix-hover-card-content-available-height":`var(--radix-popper-available-height)`,"--radix-hover-card-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-hover-card-trigger-height":`var(--radix-popper-anchor-height)`}})})}),Xf=`HoverCardArrow`,Zf=p.forwardRef((e,t)=>{let{__scopeHoverCard:r,...i}=e,a=Lf(r);return(0,n.jsx)(va,{...a,...i,ref:t})});Zf.displayName=Xf;function Qf(e){return t=>t.pointerType===`touch`?void 0:e()}function $f(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var ep=Bf,tp=Hf,np=Kf,rp=Jf;let ip=ep,ap=np,op=tp,sp=(0,t.forwardRef)(({className:e,align:t=`center`,sideOffset:r=4,...i},a)=>(0,n.jsx)(rp,{ref:a,align:t,sideOffset:r,className:U(`data-[state=open]:univer-animate-in data-[state=open]:univer-fade-in-0 data-[state=open]:univer-zoom-in-95 data-[state=closed]:univer-animate-out data-[state=closed]:univer-fade-out-0 data-[state=closed]:univer-zoom-out-95 data-[side=bottom]:univer-slide-in-from-top-2 data-[side=left]:univer-slide-in-from-right-2 data-[side=right]:univer-slide-in-from-left-2 data-[side=top]:univer-slide-in-from-bottom-2 univer-z-[1080] univer-w-64 univer-origin-[--radix-hover-card-content-transform-origin] univer-rounded-md univer-bg-white univer-text-gray-900 univer-shadow-md univer-outline-none dark:!univer-bg-gray-900 dark:!univer-text-white`,Q,e),...i}));sp.displayName=rp.displayName;function cp(e){let{children:r,overlay:i,disabled:a,openDelay:o=200,open:s,onOpenChange:c,...l}=e,[u,d]=(0,t.useState)(!1),f=s!==void 0,p=f?s:u;function m(e){a||(f||d(e),c==null||c(e))}return(0,n.jsxs)(ip,{open:p,onOpenChange:m,openDelay:o,children:[(0,n.jsx)(op,{asChild:!0,children:r}),(0,n.jsx)(ap,{children:(0,n.jsx)(sp,{...l,children:i})})]})}function lp(e){let{keyboard:t,className:r}=e,i=t.split(`+`);return(0,n.jsx)(`span`,{className:U(`univer-inline-block univer-h-6 univer-select-none univer-whitespace-nowrap univer-rounded-md univer-bg-gray-50 univer-px-2 univer-font-mono univer-text-xs/6 univer-font-medium univer-text-gray-700 dark:!univer-bg-gray-700 dark:!univer-text-white`,Q,r),children:i.map((e,t)=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`kbd`,{className:`univer-inline-block univer-h-full`,children:e}),t<i.length-1&&(0,n.jsx)(`span`,{className:`univer-inline-block univer-h-full univer-px-1`,children:`+`})]},t))})}function up(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}let dp=e=>{switch(e){case`success`:return mp;case`info`:return gp;case`warning`:return hp;case`error`:return _p;default:return null}},fp=Array(12).fill(0),pp=({visible:e,className:t})=>p.default.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},p.default.createElement(`div`,{className:`sonner-spinner`},fp.map((e,t)=>p.default.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),mp=p.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},p.default.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),hp=p.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},p.default.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),gp=p.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},p.default.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),_p=p.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},p.default.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),vp=p.default.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},p.default.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),p.default.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),yp=()=>{let[e,t]=p.default.useState(document.hidden);return p.default.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},bp=1,$=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)==`number`||((t=e.id)==null?void 0:t.length)>0?e.id:bp++,a=this.toasts.find(e=>e.id===i),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(t=>t.id===i?(this.publish({...t,...e,id:i,title:n}),{...t,...e,id:i,dismissible:o,title:n}):t):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],p.default.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(Sp(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!p.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!p.default.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||bp++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},xp=(e,t)=>{let n=(t==null?void 0:t.id)||bp++;return $.addToast({title:e,...t,id:n}),n},Sp=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,Cp=Object.assign(xp,{success:$.success,info:$.info,warning:$.warning,error:$.error,custom:$.custom,message:$.message,promise:$.promise,dismiss:$.dismiss,loading:$.loading},{getHistory:()=>$.toasts,getToasts:()=>$.getActiveToasts()});up(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function wp(e){return e.label!==void 0}let Tp=4e3;function Ep(...e){return e.filter(Boolean).join(` `)}function Dp(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}let Op=e=>{var t,n,r,i,a,o,s,c,l;let{invert:u,toast:d,unstyled:f,interacting:m,setHeights:h,visibleToasts:g,heights:_,index:v,toasts:y,expanded:b,removeToast:x,defaultRichColors:S,closeButton:C,style:w,cancelButtonStyle:T,actionButtonStyle:E,className:D=``,descriptionClassName:O=``,duration:k,position:A,gap:j,expandByDefault:M,classNames:N,icons:P,closeButtonAriaLabel:F=`Close toast`}=e,[I,L]=p.default.useState(null),[R,z]=p.default.useState(null),[ee,te]=p.default.useState(!1),[ne,re]=p.default.useState(!1),[ie,ae]=p.default.useState(!1),[oe,se]=p.default.useState(!1),[ce,le]=p.default.useState(!1),[ue,de]=p.default.useState(0),[fe,pe]=p.default.useState(0),me=p.default.useRef(d.duration||k||Tp),he=p.default.useRef(null),ge=p.default.useRef(null),_e=v===0,ve=v+1<=g,B=d.type,ye=d.dismissible!==!1,be=d.className||``,xe=d.descriptionClassName||``,Se=p.default.useMemo(()=>_.findIndex(e=>e.toastId===d.id)||0,[_,d.id]),Ce=p.default.useMemo(()=>{var e;return(e=d.closeButton)==null?C:e},[d.closeButton,C]),we=p.default.useMemo(()=>d.duration||k||Tp,[d.duration,k]),Te=p.default.useRef(0),Ee=p.default.useRef(0),De=p.default.useRef(0),Oe=p.default.useRef(null),[ke,Ae]=A.split(`-`),je=p.default.useMemo(()=>_.reduce((e,t,n)=>n>=Se?e:e+t.height,0),[_,Se]),Me=yp(),Ne=d.invert||u,Pe=B===`loading`;Ee.current=p.default.useMemo(()=>Se*j+je,[Se,je]),p.default.useEffect(()=>{me.current=we},[we]),p.default.useEffect(()=>{te(!0)},[]),p.default.useEffect(()=>{let e=ge.current;if(e){let t=e.getBoundingClientRect().height;return pe(t),h(e=>[{toastId:d.id,height:t,position:d.position},...e]),()=>h(e=>e.filter(e=>e.toastId!==d.id))}},[h,d.id]),p.default.useLayoutEffect(()=>{if(!ee)return;let e=ge.current,t=e.style.height;e.style.height=`auto`;let n=e.getBoundingClientRect().height;e.style.height=t,pe(n),h(e=>e.find(e=>e.toastId===d.id)?e.map(e=>e.toastId===d.id?{...e,height:n}:e):[{toastId:d.id,height:n,position:d.position},...e])},[ee,d.title,d.description,h,d.id,d.jsx,d.action,d.cancel]);let Fe=p.default.useCallback(()=>{re(!0),de(Ee.current),h(e=>e.filter(e=>e.toastId!==d.id)),setTimeout(()=>{x(d)},200)},[d,x,h,Ee]);p.default.useEffect(()=>{if(d.promise&&B===`loading`||d.duration===1/0||d.type===`loading`)return;let e;return b||m||Me?(()=>{if(De.current<Te.current){let e=new Date().getTime()-Te.current;me.current-=e}De.current=new Date().getTime()})():me.current!==1/0&&(Te.current=new Date().getTime(),e=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),Fe()},me.current)),()=>clearTimeout(e)},[b,m,d,B,Me,Fe]),p.default.useEffect(()=>{d.delete&&(Fe(),d.onDismiss==null||d.onDismiss.call(d,d))},[Fe,d.delete]);function Ie(){var e;if(P!=null&&P.loading){var t;return p.default.createElement(`div`,{className:Ep(N==null?void 0:N.loader,d==null||(t=d.classNames)==null?void 0:t.loader,`sonner-loader`),"data-visible":B===`loading`},P.loading)}return p.default.createElement(pp,{className:Ep(N==null?void 0:N.loader,d==null||(e=d.classNames)==null?void 0:e.loader),visible:B===`loading`})}let V=d.icon||(P==null?void 0:P[B])||dp(B);var Le,Re;return p.default.createElement(`li`,{tabIndex:0,ref:ge,className:Ep(D,be,N==null?void 0:N.toast,d==null||(t=d.classNames)==null?void 0:t.toast,N==null?void 0:N.default,N==null?void 0:N[B],d==null||(n=d.classNames)==null?void 0:n[B]),"data-sonner-toast":``,"data-rich-colors":(Le=d.richColors)==null?S:Le,"data-styled":!(d.jsx||d.unstyled||f),"data-mounted":ee,"data-promise":!!d.promise,"data-swiped":ce,"data-removed":ne,"data-visible":ve,"data-y-position":ke,"data-x-position":Ae,"data-index":v,"data-front":_e,"data-swiping":ie,"data-dismissible":ye,"data-type":B,"data-invert":Ne,"data-swipe-out":oe,"data-swipe-direction":R,"data-expanded":!!(b||M&&ee),"data-testid":d.testId,style:{"--index":v,"--toasts-before":v,"--z-index":y.length-v,"--offset":`${ne?ue:Ee.current}px`,"--initial-height":M?`auto`:`${fe}px`,...w,...d.style},onDragEnd:()=>{ae(!1),L(null),Oe.current=null},onPointerDown:e=>{e.button!==2&&(Pe||!ye||(he.current=new Date,de(Ee.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(ae(!0),Oe.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{var e,t,n;if(oe||!ye)return;Oe.current=null;let r=Number(((e=ge.current)==null?void 0:e.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``))||0),i=Number(((t=ge.current)==null?void 0:t.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``))||0),a=new Date().getTime()-((n=he.current)==null?void 0:n.getTime()),o=I===`x`?r:i,s=Math.abs(o)/a;if(Math.abs(o)>=45||s>.11){de(Ee.current),d.onDismiss==null||d.onDismiss.call(d,d),z(I===`x`?r>0?`right`:`left`:i>0?`down`:`up`),Fe(),se(!0);return}else{var c,l;(c=ge.current)==null||c.style.setProperty(`--swipe-amount-x`,`0px`),(l=ge.current)==null||l.style.setProperty(`--swipe-amount-y`,`0px`)}le(!1),ae(!1),L(null)},onPointerMove:t=>{var n,r,i;if(!Oe.current||!ye||((n=window.getSelection())==null?void 0:n.toString().length)>0)return;let a=t.clientY-Oe.current.y,o=t.clientX-Oe.current.x;var s;let c=(s=e.swipeDirections)==null?Dp(A):s;!I&&(Math.abs(o)>1||Math.abs(a)>1)&&L(Math.abs(o)>Math.abs(a)?`x`:`y`);let l={x:0,y:0},u=e=>1/(1.5+Math.abs(e)/20);if(I===`y`){if(c.includes(`top`)||c.includes(`bottom`))if(c.includes(`top`)&&a<0||c.includes(`bottom`)&&a>0)l.y=a;else{let e=a*u(a);l.y=Math.abs(e)<Math.abs(a)?e:a}}else if(I===`x`&&(c.includes(`left`)||c.includes(`right`)))if(c.includes(`left`)&&o<0||c.includes(`right`)&&o>0)l.x=o;else{let e=o*u(o);l.x=Math.abs(e)<Math.abs(o)?e:o}(Math.abs(l.x)>0||Math.abs(l.y)>0)&&le(!0),(r=ge.current)==null||r.style.setProperty(`--swipe-amount-x`,`${l.x}px`),(i=ge.current)==null||i.style.setProperty(`--swipe-amount-y`,`${l.y}px`)}},Ce&&!d.jsx&&B!==`loading`?p.default.createElement(`button`,{"aria-label":F,"data-disabled":Pe,"data-close-button":!0,onClick:Pe||!ye?()=>{}:()=>{Fe(),d.onDismiss==null||d.onDismiss.call(d,d)},className:Ep(N==null?void 0:N.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(Re=P==null?void 0:P.close)==null?vp:Re):null,(B||d.icon||d.promise)&&d.icon!==null&&((P==null?void 0:P[B])!==null||d.icon)?p.default.createElement(`div`,{"data-icon":``,className:Ep(N==null?void 0:N.icon,d==null||(i=d.classNames)==null?void 0:i.icon)},d.promise||d.type===`loading`&&!d.icon?d.icon||Ie():null,d.type===`loading`?null:V):null,p.default.createElement(`div`,{"data-content":``,className:Ep(N==null?void 0:N.content,d==null||(a=d.classNames)==null?void 0:a.content)},p.default.createElement(`div`,{"data-title":``,className:Ep(N==null?void 0:N.title,d==null||(o=d.classNames)==null?void 0:o.title)},d.jsx?d.jsx:typeof d.title==`function`?d.title():d.title),d.description?p.default.createElement(`div`,{"data-description":``,className:Ep(O,xe,N==null?void 0:N.description,d==null||(s=d.classNames)==null?void 0:s.description)},typeof d.description==`function`?d.description():d.description):null),p.default.isValidElement(d.cancel)?d.cancel:d.cancel&&wp(d.cancel)?p.default.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||T,onClick:e=>{wp(d.cancel)&&ye&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,e),Fe())},className:Ep(N==null?void 0:N.cancelButton,d==null||(c=d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,p.default.isValidElement(d.action)?d.action:d.action&&wp(d.action)?p.default.createElement(`button`,{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||E,onClick:e=>{wp(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,e),!e.defaultPrevented&&Fe())},className:Ep(N==null?void 0:N.actionButton,d==null||(l=d.classNames)==null?void 0:l.actionButton)},d.action.label):null)};function kp(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function Ap(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?`16px`:`24px`;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}let jp=p.default.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:h,style:g,visibleToasts:_=3,toastOptions:v,dir:y=kp(),gap:b=14,icons:x,containerAriaLabel:S=`Notifications`}=e,[C,w]=p.default.useState([]),T=p.default.useMemo(()=>n?C.filter(e=>e.toasterId===n):C.filter(e=>!e.toasterId),[C,n]),E=p.default.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[D,O]=p.default.useState([]),[k,A]=p.default.useState(!1),[j,M]=p.default.useState(!1),[N,P]=p.default.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),F=p.default.useRef(null),I=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),L=p.default.useRef(null),R=p.default.useRef(!1),z=p.default.useCallback(e=>{w(t=>{var n;return(n=t.find(t=>t.id===e.id))!=null&&n.delete||$.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return p.default.useEffect(()=>$.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{m.default.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[C]),p.default.useEffect(()=>{if(d!==`system`){P(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?P(`dark`):P(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{P(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{P(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),p.default.useEffect(()=>{C.length<=1&&A(!1)},[C]),p.default.useEffect(()=>{let e=e=>{var t;if(a.every(t=>e[t]||e.code===t)){var n;A(!0),(n=F.current)==null||n.focus()}e.code===`Escape`&&(document.activeElement===F.current||(t=F.current)!=null&&t.contains(document.activeElement))&&A(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),p.default.useEffect(()=>{if(F.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,R.current=!1)}},[F.current]),p.default.createElement(`section`,{ref:t,"aria-label":`${S} ${I}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},E.map((t,n)=>{var i;let[a,d]=t.split(`-`);return T.length?p.default.createElement(`ol`,{key:t,dir:y===`auto`?kp():y,tabIndex:-1,ref:F,className:c,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":a,"data-x-position":d,style:{"--front-toast-height":`${((i=D[0])==null?void 0:i.height)||0}px`,"--width":`356px`,"--gap":`${b}px`,...g,...Ap(l,u)},onBlur:e=>{R.current&&!e.currentTarget.contains(e.relatedTarget)&&(R.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||R.current||(R.current=!0,L.current=e.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{j||A(!1)},onDragEnd:()=>A(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||M(!0)},onPointerUp:()=>M(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>{var a,c;return p.default.createElement(Op,{key:n.id,icons:x,index:i,toast:n,defaultRichColors:f,duration:(a=v==null?void 0:v.duration)==null?h:a,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:_,closeButton:(c=v==null?void 0:v.closeButton)==null?s:c,interacting:j,position:t,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:z,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:O,expandByDefault:o,gap:b,expanded:k,swipeDirections:e.swipeDirections})})):null}))}),Mp=function(e){return e.Success=`success`,e.Info=`info`,e.Warning=`warning`,e.Error=`error`,e.Loading=`loading`,e}({}),Np=`univer-message-toaster`,Pp=3e3,Fp=new Set,Ip=(0,n.jsx)(_e,{className:`univer-animate-spin univer-text-violet-500`}),Lp=0,Rp={success:(0,n.jsx)(le,{className:`univer-text-green-500`}),info:(0,n.jsx)(L,{className:`univer-text-sky-500 dark:!univer-text-sky-400`}),warning:(0,n.jsx)(de,{className:`univer-text-amber-500`}),error:(0,n.jsx)(F,{className:`univer-text-red-500`}),loading:Ip},zp={success:`[&_[data-icon]]:univer-text-green-500`,info:`[&_[data-icon]]:univer-text-sky-500`,warning:`[&_[data-icon]]:univer-text-amber-500`,error:`[&_[data-icon]]:univer-text-red-500`,loading:`[&_[data-icon]]:univer-text-violet-500`},Bp=e=>{switch(e){case`success`:return Cp.success;case`warning`:return Cp.warning;case`error`:return Cp.error;case`loading`:return Cp.loading;default:return Cp.info}},Vp=()=>{let e=`univer-message-${Lp}`;return Lp+=1,e},Hp=({className:e,...t})=>(0,n.jsx)(jp,{id:Np,position:`top-center`,visibleToasts:4,closeButton:!1,expand:!1,icons:{loading:Ip},offset:{top:16},className:U(`[&_[data-sonner-toast]]:univer-bg-white/95 dark:[&_[data-sonner-toast]]:!univer-bg-gray-800/95 [&_[data-sonner-toast]]:univer-rounded-2xl [&_[data-sonner-toast]]:univer-border [&_[data-sonner-toast]]:univer-border-solid [&_[data-sonner-toast]]:univer-border-gray-200 [&_[data-sonner-toast]]:univer-shadow-[0_16px_40px_-20px_rgba(15,23,42,0.55)] [&_[data-sonner-toast]]:univer-backdrop-blur-sm dark:[&_[data-sonner-toast]]:!univer-border-gray-600`,e),toastOptions:{duration:Pp,classNames:{toast:`
|
|
57
53
|
univer-group univer-min-h-0 univer-min-w-[320px] univer-max-w-[520px] univer-px-3.5 univer-py-3
|
|
58
54
|
univer-font-sans univer-transition-all univer-duration-300
|
|
59
55
|
`,title:`
|
|
60
56
|
univer-m-0 univer-font-sans univer-text-sm univer-font-medium univer-leading-5 univer-text-gray-700
|
|
61
57
|
dark:!univer-text-gray-100
|
|
62
|
-
`,content:`univer-gap-2.5`,icon:`[&>svg]:univer-block [&>svg]:univer-size-4`,success:Xp.success,info:Xp.info,warning:Xp.warning,error:Xp.error,loading:Xp.loading}},...t}),em=({content:e,duration:t,id:n,onClose:r,type:i=`info`})=>{let a=n==null?Qp():n,o=Zp(i),s=!1,c=()=>{s||(s=!0,Kp.delete(a),r==null||r())};return o(e,{id:a,toasterId:Wp,duration:t==null?Gp:t,icon:i===`loading`?void 0:Yp[i],onDismiss:c,onAutoClose:c}),Kp.add(a),a},tm=e=>{if(e!==void 0){Pp.dismiss(e),Kp.delete(e);return}Kp.forEach(e=>{Pp.dismiss(e)}),Kp.clear()};function nm(e){let{children:t,className:r,style:i}=e;return(0,n.jsx)(`div`,{"data-u-comp":`panel`,className:U(`univer-flex univer-flex-col univer-gap-5 univer-py-2`,r),style:i,children:t})}function rm(e){let{title:r,children:i,className:a,defaultExpanded:o=!0,collapsible:s=!0}=e,[c,l]=(0,t.useState)(o),u=(0,t.useId)(),d=(0,t.useId)();return(0,n.jsxs)(`div`,{"data-u-comp":`panel-section`,className:U(`univer-flex univer-flex-col`,a),children:[(0,n.jsxs)(`button`,{id:d,type:`button`,"aria-expanded":c,"aria-controls":u,disabled:!s,className:U(`univer-box-border univer-flex univer-w-full univer-items-center univer-gap-1.5 univer-border-none univer-bg-transparent univer-p-0 univer-pb-2.5 univer-text-left univer-text-sm univer-font-medium univer-text-gray-700 dark:!univer-text-gray-200`,{"univer-cursor-pointer":s,"univer-cursor-default":!s}),onClick:()=>s&&l(e=>!e),children:[s&&(0,n.jsx)(j,{className:U(`univer-size-2.5 univer-flex-shrink-0 univer-transition-transform`,{"-univer-rotate-90":!c,"univer-rotate-0":c})}),(0,n.jsx)(`span`,{children:r})]}),(0,n.jsx)(`div`,{id:u,role:`region`,"aria-labelledby":d,className:U(`univer-overflow-hidden univer-transition-[max-height,opacity] univer-duration-300 univer-ease-in-out`,{"univer-max-h-[1000px] univer-opacity-100":c,"univer-max-h-0 univer-opacity-0":!c}),children:(0,n.jsx)(`div`,{className:`univer-box-border univer-flex univer-flex-col univer-gap-3 univer-py-1`,children:i})})]})}function im(e){let{label:t,children:r,className:i,required:a,error:o}=e;return(0,n.jsxs)(`div`,{"data-u-comp":`panel-field`,className:U(`univer-flex univer-flex-col univer-gap-1.5`,i),children:[(0,n.jsxs)(`div`,{className:`univer-flex univer-items-center univer-gap-1`,children:[(0,n.jsx)(`span`,{className:`univer-text-xs univer-text-gray-600 dark:!univer-text-gray-300`,children:t}),a&&(0,n.jsx)(`span`,{className:`univer-text-xs univer-text-red-500`,children:`*`})]}),(0,n.jsx)(`div`,{className:`univer-w-full`,children:r}),o&&(0,n.jsx)(`span`,{className:`univer-text-xs univer-text-red-500`,children:o})]})}function am(){return am=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},am.apply(null,arguments)}function om(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function sm(e,t){return sm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sm(e,t)}function cm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,sm(e,t)}function lm(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function um(e,t){e.classList?e.classList.add(t):lm(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function dm(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function fm(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=dm(e.className,t):e.setAttribute(`class`,dm(e.className&&e.className.baseVal||``,t))}var pm={disabled:!1},mm=t.default.createContext(null),hm=function(e){return e.scrollTop},gm=`unmounted`,_m=`exited`,vm=`entering`,ym=`entered`,bm=`exiting`,xm=function(e){cm(n,e);function n(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=_m,r.appearStatus=vm):o=ym:o=t.unmountOnExit||t.mountOnEnter?gm:_m,r.state={status:o},r.nextCallback=null,r}n.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:_m}:null};var i=n.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=vm):(n===`entering`||n===`entered`)&&(t=bm)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},i.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:r.default.findDOMNode(this);n&&hm(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:gm})},i.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,a=this.props.nodeRef?[i]:[r.default.findDOMNode(this),i],o=a[0],s=a[1],c=this.getTimeouts(),l=i?c.appear:c.enter;if(!e&&!n||pm.disabled){this.safeSetState({status:ym},function(){t.props.onEntered(o)});return}this.props.onEnter(o,s),this.safeSetState({status:vm},function(){t.props.onEntering(o,s),t.onTransitionEnd(l,function(){t.safeSetState({status:ym},function(){t.props.onEntered(o,s)})})})},i.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:r.default.findDOMNode(this);if(!t||pm.disabled){this.safeSetState({status:_m},function(){e.props.onExited(i)});return}this.props.onExit(i),this.safeSetState({status:bm},function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:_m},function(){e.props.onExited(i)})})})},i.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:r.default.findDOMNode(this),i=e==null&&!this.props.addEndListener;if(!n||i){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=a[0],s=a[1];this.props.addEndListener(o,s)}e!=null&&setTimeout(this.nextCallback,e)},i.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var n=this.props,r=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var i=om(n,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return t.default.createElement(mm.Provider,{value:null},typeof r==`function`?r(e,i):t.default.cloneElement(t.default.Children.only(r),i))},n}(t.default.Component);xm.contextType=mm,xm.propTypes={};function Sm(){}xm.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Sm,onEntering:Sm,onEntered:Sm,onExit:Sm,onExiting:Sm,onExited:Sm},xm.UNMOUNTED=gm,xm.EXITED=_m,xm.ENTERING=vm,xm.ENTERED=ym,xm.EXITING=bm;var Cm=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return um(e,t)})},wm=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return fm(e,t)})},Tm=function(e){cm(n,e);function n(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var r=n.prototype;return r.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&hm(e),r&&(this.appliedClasses[t][n]=r,Cm(e,r))},r.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&wm(e,r),i&&wm(e,i),a&&wm(e,a)},r.render=function(){var e=this.props;e.classNames;var n=om(e,[`classNames`]);return t.default.createElement(xm,am({},n,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},n}(t.default.Component);Tm.defaultProps={classNames:``},Tm.propTypes={};let Em=[-9999,-9999];function Dm(e){let{children:i,visible:a=!1,offset:o=[0,0],overflowVisible:s=!1,placementY:c=`below`}=e,l=(0,t.useRef)(null),[u,d]=(0,t.useState)(Em),{mountContainer:f,direction:p}=(0,t.useContext)(G),m=()=>{let e=l.current;if(!e)return null;let[t,n]=o,{clientWidth:r,clientHeight:i}=e,{innerWidth:a,innerHeight:s}=window,u=Math.max(0,a-r-2),d=Math.max(0,s-i-2),f=Math.min(Math.max(t,0),u),p=c===`above`?n-i:n;return[f,Math.min(Math.max(p,0),d)]};(0,t.useLayoutEffect)(()=>{if(!a){d(Em);return}let e=m();e&&d(e)},[o,c,a]),(0,t.useEffect)(()=>{if(!a)return;let e=()=>{let e=m();e&&d(e)};return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[o,c,a]);function h(e){e.preventDefault()}return(0,r.createPortal)((0,n.jsx)(Tm,{in:a,nodeRef:l,timeout:500,classNames:{enter:`univer-popup-enter`,enterActive:`univer-popup-enter-active`,enterDone:`univer-popup-enter-done`,exitActive:`univer-popup-exit`,exitDone:`univer-popup-exit-active`},children:(0,n.jsx)(`section`,{ref:l,dir:p,className:`univer-popup`,style:{left:u[0]+2,top:u[1]+2,overflow:s?`visible`:void 0},onContextMenu:h,children:i})}),f)}function Om(e){let{children:r,className:i,style:a,value:o,disabled:s=!1,direction:c=`horizontal`,onChange:l}=e,u=e=>{l(e)};return(0,n.jsx)(`div`,{className:U(`univer-flex univer-gap-2`,{"univer-flex-col":c===`vertical`},i),style:a,children:t.Children.map(r,(e,n)=>(0,t.isValidElement)(e)?(0,t.cloneElement)(e,{key:n,children:e.props.children,value:e.props.value,checked:o===e.props.value,disabled:s==null?e.props.disabled:s,onChange:u}):e)})}function km(e){let{children:r,checked:i,value:a,disabled:o=!1,onChange:s}=e,c=(0,t.useRef)(null);function l(e){if(e.stopPropagation(),!(!s||o))if(a!==void 0)s&&s(a);else{let e=c.current.checked;s&&s(e)}}return(0,n.jsxs)(`label`,{"data-u-comp":`radio`,className:U(`univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-text-sm`,{"univer-cursor-pointer univer-text-gray-900 dark:!univer-text-white":!o,"univer-text-gray-400":o}),children:[(0,n.jsxs)(`span`,{className:`univer-relative univer-block`,children:[(0,n.jsx)(`input`,{ref:c,className:`univer-absolute univer-size-0 univer-opacity-0`,type:`radio`,checked:i,disabled:o,onChange:l}),(0,n.jsx)(`span`,{className:U(`univer-relative univer-box-border univer-flex univer-size-4 univer-items-center univer-justify-center univer-overflow-hidden univer-rounded-full univer-border univer-border-solid univer-transition-colors`,{"univer-opacity-50":o,"univer-border-primary-600 univer-bg-primary-600 dark:!univer-bg-primary-600":i,"univer-border-gray-300 univer-bg-gray-50 dark:!univer-border-gray-500 dark:!univer-bg-gray-600":!i}),children:i&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-size-2 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded-full univer-bg-white`})})]}),(0,n.jsx)(`span`,{children:r})]})}function Am(e){let{value:t,options:r=[],hideCheckMark:i=!1,onChange:a,multiple:o,className:s,optionClassName:c}=e,l=Array.isArray(t)?t:[t];function u(e){let t=l.indexOf(e);a(o?t>-1?l.filter(t=>t===e):[...l,e]:t>-1?void 0:e)}return(0,n.jsx)(`ul`,{className:U(`univer-m-0 univer-grid univer-max-h-80 univer-list-none univer-gap-1 univer-overflow-y-auto univer-rounded univer-p-1.5`,Q,Vl,s),children:r.map((e,t)=>{let r=l.indexOf(e.value)>-1;return(0,n.jsx)(`li`,{children:(0,n.jsxs)(`a`,{className:U(`univer-relative univer-block univer-cursor-pointer univer-select-none univer-rounded univer-py-1.5 univer-pl-8 univer-pr-2 univer-text-sm univer-text-gray-900 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-600`,c,{"univer-bg-gray-200 dark:!univer-bg-gray-500":r}),onClick:()=>u(e.value),children:[!i&&r&&(0,n.jsx)(C,{className:`univer-absolute univer-left-0 univer-top-1/2 -univer-translate-y-1/2 univer-pl-2 univer-text-primary-600`}),(0,n.jsx)(`span`,{style:{color:e.color},children:e.label})]})},t)})})}let jm=U(`univer-box-border univer-inline-flex univer-h-8 univer-min-w-36 univer-items-center univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200 dark:!univer-bg-gray-700 dark:!univer-text-white`,Q);function Mm(e){let{className:r,value:i,disabled:a=!1,options:o=[],borderless:s=!1,onChange:c}=e,[l,u]=(0,t.useState)(!1);function d(e){u(e)}let f=(0,t.useMemo)(()=>{let e=[];for(let t of o)t.options?(t.options.forEach(t=>{e.push({label:t.label,value:t.value,disabled:t.disabled})}),e.push({type:`separator`})):e.push({label:t.label,value:t.value,disabled:t.disabled});return[{type:`radio`,value:i,hideIndicator:!0,options:e,onSelect:e=>{c(e)}}]},[o]),p=(0,t.useMemo)(()=>{let e=null;for(let t of o)if(t.options){for(let n of t.options)if(n.value===i){e=n.label;break}}else if(t.value===i){e=t.label;break}return e||i},[o,i]);return(0,n.jsx)(su,{className:`univer-max-h-80 univer-w-[--radix-popper-anchor-width] univer-min-w-36 univer-overflow-auto`,align:`start`,open:l,items:f,disabled:a,onOpenChange:d,children:(0,n.jsxs)(`div`,{"data-u-comp":`select`,className:U(jm,{"univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50 dark:!univer-ring-primary-900":l&&!s,"univer-border-transparent univer-bg-transparent hover:univer-border-transparent":s,"univer-cursor-not-allowed":a,"hover:univer-border-primary-600":!a&&!s,"univer-cursor-pointer":!a&&!l},r),children:[(0,n.jsx)(`div`,{className:`univer-flex-1 univer-truncate univer-text-sm univer-text-gray-500 dark:!univer-text-white`,children:p}),(0,n.jsx)(z,{className:`univer-flex-shrink-0 dark:!univer-text-white`})]})})}function Nm(e){let{className:r,value:i=[],disabled:a=!1,options:o=[],borderless:s=!1,onChange:c}=e,[l,u]=(0,t.useState)(!1);function d(e){u(e)}let f=(0,t.useMemo)(()=>o.map(e=>({type:`checkbox`,value:e.value,label:e.label,disabled:e.disabled,checked:i.includes(e.value),onSelect:e=>{c(i.includes(e)?i.filter(t=>t!==e):[...i,e])}})),[o]);function p(e){c(i.filter(t=>t!==e))}let m=(0,t.useMemo)(()=>o.filter(e=>i.includes(e.value)).map((e,t)=>(0,n.jsx)(_t,{className:`univer-max-w-32`,closable:!0,onClose:()=>p(e.value),children:e.label},t)),[o,i]);return(0,n.jsx)(su,{className:`univer-w-[--radix-popper-anchor-width] univer-min-w-36`,align:`start`,open:l,items:f,disabled:a,onOpenChange:d,children:(0,n.jsxs)(`div`,{"data-u-comp":`multiple-select`,className:U(jm,{"univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50 dark:!univer-ring-primary-900":l&&!s,"univer-border-transparent univer-bg-transparent hover:univer-border-transparent":s,"univer-cursor-not-allowed":a,"hover:univer-border-primary-600":!a&&!s,"univer-cursor-pointer":!a&&!l},r),children:[(0,n.jsx)(`div`,{className:`univer-box-border univer-flex univer-w-[calc(100%-16px)] univer-gap-2 univer-pr-2`,children:m}),(0,n.jsx)(z,{className:`univer-flex-shrink-0 dark:!univer-text-white`})]})})}var Pm=`Separator`,Fm=`horizontal`,Im=[`horizontal`,`vertical`],Lm=p.forwardRef((e,t)=>{let{decorative:r,orientation:i=Fm,...a}=e,o=Rm(i)?i:Fm,s=r?{role:`none`}:{"aria-orientation":o===`vertical`?o:void 0,role:`separator`};return(0,n.jsx)(q.div,{"data-orientation":o,...s,...a,ref:t})});Lm.displayName=Pm;function Rm(e){return Im.includes(e)}var zm=Lm;function Bm({className:e,orientation:t=`horizontal`,decorative:r=!0,...i}){return(0,n.jsx)(zm,{"data-u-comp":`separator`,"data-slot":`separator-root`,decorative:r,orientation:t,className:U(`univer-shrink-0 univer-bg-gray-200 data-[orientation=horizontal]:univer-h-px data-[orientation=vertical]:univer-h-full data-[orientation=horizontal]:univer-w-full data-[orientation=vertical]:univer-w-px dark:!univer-bg-gray-600`,e),...i})}let Vm=e=>{let{defaultChecked:r=!1,onChange:i}=e,[a,o]=(0,t.useState)(r);return(0,t.useEffect)(()=>{o(r)},[r]),(0,n.jsx)(`div`,{className:`univer-h-4`,children:(0,n.jsxs)(`label`,{className:`univer-relative univer-inline-block univer-h-4 univer-w-7`,children:[(0,n.jsx)(`input`,{className:`univer-size-0 univer-opacity-0`,type:`checkbox`,checked:a,onChange:()=>{o(!a),i==null||i(!a)}}),(0,n.jsx)(`span`,{className:U(`univer-absolute univer-inset-0 univer-cursor-pointer univer-rounded-2xl univer-transition-colors univer-duration-200`,{"univer-bg-primary-600":a,"univer-bg-gray-200 dark:!univer-bg-gray-600":!a}),children:(0,n.jsx)(`span`,{className:U(`univer-absolute univer-bottom-0.5 univer-left-0.5 univer-size-3 univer-rounded-full univer-bg-white univer-transition-transform univer-duration-200`,{"univer-translate-x-3":a})})})]})})},Hm=(0,t.forwardRef)((e,r)=>{let i=(0,t.useRef)(null),a=(0,t.useRef)({width:0,height:0}),{className:o,onResize:s,onValueChange:c,...l}=e;(0,t.useImperativeHandle)(r,()=>i.current,[]),(0,t.useLayoutEffect)(()=>{let e=i.current;if(e&&s){let t=new ResizeObserver(e=>{let{width:t,height:n}=e[0].target.getBoundingClientRect();t===0||n===0||(a.current.width!==t||a.current.height!==n)&&(a.current={width:t,height:n},s(t,n))});return t.observe(e),()=>{t.unobserve(e),t.disconnect()}}},[s]);function u(e){let t=e.target.value;c==null||c(t)}return(0,n.jsx)(`textarea`,{ref:i,"data-u-comp":`textarea`,"data-slot":`textarea`,className:U(`univer-box-border univer-flex univer-w-full univer-resize univer-rounded-md univer-bg-transparent univer-p-2 univer-text-base univer-text-gray-900 univer-outline-none univer-transition-[color,box-shadow] placeholder:univer-text-gray-200 disabled:univer-cursor-not-allowed disabled:univer-opacity-50 dark:!univer-text-white`,Q,Vl,o),onChange:u,...l})});function Um({visibleToasts:e,...t}){return(0,n.jsx)(Hp,{className:`dark:![&_[data-description]]:univer-text-gray-200 [&_[data-description]]:univer-text-sm [&_[data-description]]:univer-text-gray-600 [&_[data-icon]>svg]:univer-relative [&_[data-icon]>svg]:univer-top-1 [&_[data-icon]]:univer-self-baseline [&_[data-sonner-toast]]:univer-shadow-md [&_[data-title]]:univer-text-sm [&_[data-title]]:univer-text-gray-900`,toastOptions:{classNames:{content:`univer-leading-normal`,success:`[&_[data-icon]]:univer-text-green-500`,info:`[&_[data-icon]]:univer-text-primary-600`,error:`[&_[data-icon]]:univer-text-red-500`,warning:`[&_[data-icon]]:univer-text-yellow-500`}},visibleToasts:e==null?5:e,...t})}let Wm=(e,t)=>{let n=[],r=e=>{var i;if(n.push(e.key),t===e.key||(i=e.children)!=null&&i.length&&e.children.some(r))return!0;n.pop()};return e.some(r),n},Gm=(e,t)=>{let n=t==null?new Map:t,r=e;return{findNodePathFromTreeWithCache:e=>{let t=n.get(e);if(t)return t;let i=Wm(r,e);return i.map((e,t,n)=>{let r=[];for(let e=0;e<=t;e++)r.push(n[e]);return r}).reverse().forEach(e=>{let t=e[e.length-1];n.set(t,e)}),i},reset:e=>{n.clear(),e&&(r=e)}}},Km=(e,t)=>t.length?t.reduce((e,t)=>{let n=e.find(e=>e.key===t);return(n==null?void 0:n.children)||[]},e):e,qm=(e,t)=>{let n=t.slice(0),r=n.pop();return Km(e,n).find(e=>e.key===r)},Jm=(e,t,n)=>{let r=new Set(t),i=n[n.length-1],a=Km(e,n);if(r.has(i)){if(a.length){let e=t=>{r.delete(t.key),t.children&&t.children.forEach(t=>e(t))};a.forEach(e)}n.map((e,t,n)=>{let r=[];for(let e=0;e<=t;e++)r.push(n[e]);return r}).reverse().some(t=>{let n=Km(e,t),i=t[t.length-1];if(n.every(e=>!r.has(e.key)))r.delete(i);else return!0;return!1})}else{let e=t=>{r.add(t.key),t.children&&t.children.forEach(t=>e(t))};n.forEach(e=>r.add(e)),a.length&&a.forEach(e)}return[...r]},Ym=(e,t)=>{let n=t.children||[],r=t=>{var n;return(n=t.children)!=null&&n.length?!!t.children.every(r):e.has(t.key)};return n.length?n.some(e=>!r(e)):!1},Xm=(e,t)=>{let n=[],r=Gm(e);return t.forEach(t=>{let i=qm(e,r.findNodePathFromTreeWithCache(t));if(i){var a;(a=i.children)!=null&&a.length||n.push(i)}}),n},Zm=function(e){return e[e.ONLY_LEAF_NODE=0]=`ONLY_LEAF_NODE`,e[e.ALL=1]=`ALL`,e}({});function Qm(e,t,n=1){let r=[];return e.forEach(e=>{r.push({...e,level:n}),e.children&&t.has(e.key)&&r.push(...Qm(e.children,t,n+1))}),r}function $m(e){let{data:r=[],defaultCache:i,style:a,defaultExpandAll:o=!1,selectionMode:s=1,valueGroup:c=[],onChange:l,onExpend:u,height:d=200,itemHeight:f=32,attachRender:p}=e,[m,h]=(0,t.useState)({}),g=(0,t.useMemo)(()=>new Set,[]),_=(0,t.useMemo)(()=>Gm(r,i),[r,i]),v=(0,t.useMemo)(()=>{let e=new Set;return c.forEach(t=>{_.findNodePathFromTreeWithCache(t).forEach(t=>e.add(t))}),e},[c,_]);(0,t.useEffect)(()=>{function e(t){var n;g.add(t.key),(n=t.children)==null||n.forEach(e)}o&&r.forEach(e),h({})},[o,r]);let y=(0,t.useMemo)(()=>Qm(r,g),[r,m,g]);function b(e){var t;(t=e.children)!=null&&t.length&&(g.has(e.key)?g.delete(e.key):g.add(e.key),h({})),!(s===0&&e.children)&&(u==null||u(e.key))}function x(t){let{title:r,key:i,level:a=0}=t,o=e.treeNodeClassName,s=g.has(i),c=v.has(i),u=Ym(v,t);return(0,n.jsx)(`div`,{className:U(`univer-relative univer-text-[13px]`,o),style:{paddingLeft:`${a*20}px`},children:(0,n.jsxs)(`div`,{className:`univer-relative univer-my-1 univer-flex univer-w-full univer-items-center`,children:[t.children&&t.children.length>0&&(0,n.jsx)(`span`,{className:U(`univer-absolute univer-left-[-16px] univer-top-1/2 univer-flex univer--translate-y-1/2 univer-items-center univer-justify-center univer-text-[8px]`,{"univer-rotate-[-90deg]":!s}),onClick:e=>{e.stopPropagation(),b(t)},children:(0,n.jsx)(N,{})}),(0,n.jsx)($u,{checked:c&&!u,indeterminate:c&&u,onChange:()=>{l==null||l(t)}}),(0,n.jsx)(`div`,{className:`univer-mx-1 univer-flex univer-h-full univer-shrink univer-items-center univer-overflow-hidden univer-text-ellipsis univer-whitespace-nowrap`,onClick:e=>{e.stopPropagation(),b(t)},children:(0,n.jsx)(Ff,{className:`univer-block`,showIfEllipsis:!0,placement:`top`,title:r,children:(0,n.jsx)(`span`,{className:`univer-block`,children:r})})}),p&&p(t)]})},i)}return(0,n.jsx)(`section`,{className:`univer-relative univer-select-none univer-text-gray-900 dark:!univer-text-white`,children:(0,n.jsx)(`div`,{className:`univer-m-0 univer-h-full univer-list-none univer-p-0`,style:a,children:(0,n.jsx)(Gu,{data:y,itemKey:e=>e.key,height:d,itemHeight:f,children:e=>x(e)})})})}let eh=new WeakMap;function th(e,t){let n=eh.get(t);n||(n=(0,i.createRoot)(t),eh.set(t,n)),n.render(e)}function nh(e){let t=eh.get(e);t&&(t.unmount(),eh.delete(e))}let rh=new Set,ih;function ah(e){return ih||(ih=new ResizeObserver((...e)=>{rh.forEach(t=>t(...e))})),{observe(t,n){rh.add(e),ih.observe(t,n)},unobserve(t){rh.delete(e),ih.unobserve(t)}}}e.Accordion=dt,e.Avatar=gt,e.Badge=_t,e.Button=Pt,e.ButtonGroup=Ft,e.Calendar=Yu,e.CascaderList=Zu,e.Checkbox=$u,e.CheckboxGroup=Qu,e.ColorPicker=vf,e.ColorPresets=uf,e.ConfigContext=G,e.ConfigProvider=Bt,e.Confirm=bf,e.DatePicker=xf,e.DateRangePicker=Sf,e.Dialog=Xd,e.DraggableList=wf,e.Dropdown=Vu,e.DropdownMenu=su,e.FormDualColumnLayout=Df,e.FormLayout=Ef,e.Gallery=Af,e.GradientColorPicker=Uf,e.HoverCard=yp,e.Input=Mf,e.InputNumber=Nf,e.KBD=bp,e.MessageType=Up,e.Messager=$p,e.MultipleSelect=Nm,e.Pager=Of,e.Panel=nm,e.PanelField=im,e.PanelSection=rm,e.Popup=Dm,e.Radio=km,e.RadioGroup=Om,e.Segmented=Pf,e.Select=Mm,e.SelectList=Am,e.Separator=Bm,e.Switch=Vm,e.Textarea=Hm,e.TimeInput=Wu,e.Toaster=Um,e.Tooltip=Ff,e.Tree=$m,e.TreeSelectionMode=Zm,e.borderBottomClassName=ql,e.borderClassName=Q,e.borderLeftBottomClassName=Ul,e.borderLeftClassName=Wl,e.borderRightClassName=Jl,e.borderTopClassName=Kl,e.clsx=U,e.cva=mt,e.divideXClassName=`univer-divide-gray-200 dark:!univer-divide-gray-600 univer-divide-x univer-divide-y-0 univer-divide-solid`,e.divideYClassName=`univer-divide-gray-200 dark:!univer-divide-gray-600 univer-divide-y univer-divide-x-0 univer-divide-solid`,e.filterLeafNode=Xm,e.findNodePathFromTree=Wm,e.findSubTreeFromPath=Km,e.isBrowser=zt,e.mergeTreeSelected=Jm,e.message=em,e.removeMessage=tm,e.render=th,e.resetButtonClassName=`univer-m-0 univer-flex univer-appearance-none univer-items-center univer-justify-center univer-border-0 univer-bg-transparent univer-p-0 univer-leading-none univer-outline-none univer-cursor-pointer`,e.resizeObserverCtor=ah,e.scrollbarClassName=Vl,e.toast=Pp,e.unmount=nh});
|
|
58
|
+
`,content:`univer-gap-2.5`,icon:`[&>svg]:univer-block [&>svg]:univer-size-4`,success:zp.success,info:zp.info,warning:zp.warning,error:zp.error,loading:zp.loading}},...t}),Up=({content:e,duration:t,id:n,onClose:r,type:i=`info`})=>{let a=n==null?Vp():n,o=Bp(i),s=!1,c=()=>{s||(s=!0,Fp.delete(a),r==null||r())};return o(e,{id:a,toasterId:Np,duration:t==null?Pp:t,icon:i===`loading`?void 0:Rp[i],onDismiss:c,onAutoClose:c}),Fp.add(a),a},Wp=e=>{if(e!==void 0){Cp.dismiss(e),Fp.delete(e);return}Fp.forEach(e=>{Cp.dismiss(e)}),Fp.clear()};function Gp(e){let{children:t,className:r,style:i}=e;return(0,n.jsx)(`div`,{"data-u-comp":`panel`,className:U(`univer-flex univer-flex-col univer-gap-5 univer-py-2`,r),style:i,children:t})}function Kp(e){let{title:r,children:i,className:a,defaultExpanded:o=!0,collapsible:s=!0}=e,[c,l]=(0,t.useState)(o),u=(0,t.useId)(),d=(0,t.useId)();return(0,n.jsxs)(`div`,{"data-u-comp":`panel-section`,className:U(`univer-flex univer-flex-col`,a),children:[(0,n.jsxs)(`button`,{id:d,type:`button`,"aria-expanded":c,"aria-controls":u,disabled:!s,className:U(`univer-box-border univer-flex univer-w-full univer-items-center univer-gap-1.5 univer-border-none univer-bg-transparent univer-p-0 univer-pb-2.5 univer-text-left univer-text-sm univer-font-medium univer-text-gray-700 dark:!univer-text-gray-200`,{"univer-cursor-pointer":s,"univer-cursor-default":!s}),onClick:()=>s&&l(e=>!e),children:[s&&(0,n.jsx)(j,{className:U(`univer-size-2.5 univer-flex-shrink-0 univer-transition-transform`,{"-univer-rotate-90":!c,"univer-rotate-0":c})}),(0,n.jsx)(`span`,{children:r})]}),(0,n.jsx)(`div`,{id:u,role:`region`,"aria-labelledby":d,className:U(`univer-overflow-hidden univer-transition-[max-height,opacity] univer-duration-300 univer-ease-in-out`,{"univer-max-h-[1000px] univer-opacity-100":c,"univer-max-h-0 univer-opacity-0":!c}),children:(0,n.jsx)(`div`,{className:`univer-box-border univer-flex univer-flex-col univer-gap-3 univer-py-1`,children:i})})]})}function qp(e){let{label:t,children:r,className:i,required:a,error:o}=e;return(0,n.jsxs)(`div`,{"data-u-comp":`panel-field`,className:U(`univer-flex univer-flex-col univer-gap-1.5`,i),children:[(0,n.jsxs)(`div`,{className:`univer-flex univer-items-center univer-gap-1`,children:[(0,n.jsx)(`span`,{className:`univer-text-xs univer-text-gray-600 dark:!univer-text-gray-300`,children:t}),a&&(0,n.jsx)(`span`,{className:`univer-text-xs univer-text-red-500`,children:`*`})]}),(0,n.jsx)(`div`,{className:`univer-w-full`,children:r}),o&&(0,n.jsx)(`span`,{className:`univer-text-xs univer-text-red-500`,children:o})]})}function Jp(){return Jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jp.apply(null,arguments)}function Yp(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Xp(e,t){return Xp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xp(e,t)}function Zp(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Xp(e,t)}function Qp(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function $p(e,t){e.classList?e.classList.add(t):Qp(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function em(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function tm(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=em(e.className,t):e.setAttribute(`class`,em(e.className&&e.className.baseVal||``,t))}var nm={disabled:!1},rm=t.default.createContext(null),im=function(e){return e.scrollTop},am=`unmounted`,om=`exited`,sm=`entering`,cm=`entered`,lm=`exiting`,um=function(e){Zp(n,e);function n(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=om,r.appearStatus=sm):o=cm:o=t.unmountOnExit||t.mountOnEnter?am:om,r.state={status:o},r.nextCallback=null,r}n.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:om}:null};var i=n.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=sm):(n===`entering`||n===`entered`)&&(t=lm)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},i.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:r.default.findDOMNode(this);n&&im(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:am})},i.performEnter=function(e){var t=this,n=this.props.enter,i=this.context?this.context.isMounting:e,a=this.props.nodeRef?[i]:[r.default.findDOMNode(this),i],o=a[0],s=a[1],c=this.getTimeouts(),l=i?c.appear:c.enter;if(!e&&!n||nm.disabled){this.safeSetState({status:cm},function(){t.props.onEntered(o)});return}this.props.onEnter(o,s),this.safeSetState({status:sm},function(){t.props.onEntering(o,s),t.onTransitionEnd(l,function(){t.safeSetState({status:cm},function(){t.props.onEntered(o,s)})})})},i.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),i=this.props.nodeRef?void 0:r.default.findDOMNode(this);if(!t||nm.disabled){this.safeSetState({status:om},function(){e.props.onExited(i)});return}this.props.onExit(i),this.safeSetState({status:lm},function(){e.props.onExiting(i),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:om},function(){e.props.onExited(i)})})})},i.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},i.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},i.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:r.default.findDOMNode(this),i=e==null&&!this.props.addEndListener;if(!n||i){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var a=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=a[0],s=a[1];this.props.addEndListener(o,s)}e!=null&&setTimeout(this.nextCallback,e)},i.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var n=this.props,r=n.children;n.in,n.mountOnEnter,n.unmountOnExit,n.appear,n.enter,n.exit,n.timeout,n.addEndListener,n.onEnter,n.onEntering,n.onEntered,n.onExit,n.onExiting,n.onExited,n.nodeRef;var i=Yp(n,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return t.default.createElement(rm.Provider,{value:null},typeof r==`function`?r(e,i):t.default.cloneElement(t.default.Children.only(r),i))},n}(t.default.Component);um.contextType=rm,um.propTypes={};function dm(){}um.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:dm,onEntering:dm,onEntered:dm,onExit:dm,onExiting:dm,onExited:dm},um.UNMOUNTED=am,um.EXITED=om,um.ENTERING=sm,um.ENTERED=cm,um.EXITING=lm;var fm=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return $p(e,t)})},pm=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return tm(e,t)})},mm=function(e){Zp(n,e);function n(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var r=n.prototype;return r.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&im(e),r&&(this.appliedClasses[t][n]=r,fm(e,r))},r.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&pm(e,r),i&&pm(e,i),a&&pm(e,a)},r.render=function(){var e=this.props;e.classNames;var n=Yp(e,[`classNames`]);return t.default.createElement(um,Jp({},n,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},n}(t.default.Component);mm.defaultProps={classNames:``},mm.propTypes={};let hm=[-9999,-9999];function gm(e){let{children:i,visible:a=!1,offset:o=[0,0],overflowVisible:s=!1,placementY:c=`below`}=e,l=(0,t.useRef)(null),[u,d]=(0,t.useState)(hm),{mountContainer:f,direction:p}=(0,t.useContext)(G),m=()=>{let e=l.current;if(!e)return null;let[t,n]=o,{clientWidth:r,clientHeight:i}=e,{innerWidth:a,innerHeight:s}=window,u=Math.max(0,a-r-2),d=Math.max(0,s-i-2),f=Math.min(Math.max(t,0),u),p=c===`above`?n-i:n;return[f,Math.min(Math.max(p,0),d)]};(0,t.useLayoutEffect)(()=>{if(!a){d(hm);return}let e=m();e&&d(e)},[o,c,a]),(0,t.useEffect)(()=>{if(!a)return;let e=()=>{let e=m();e&&d(e)};return window.addEventListener(`resize`,e),()=>{window.removeEventListener(`resize`,e)}},[o,c,a]);function h(e){e.preventDefault()}return(0,r.createPortal)((0,n.jsx)(mm,{in:a,nodeRef:l,timeout:500,classNames:{enter:`univer-popup-enter`,enterActive:`univer-popup-enter-active`,enterDone:`univer-popup-enter-done`,exitActive:`univer-popup-exit`,exitDone:`univer-popup-exit-active`},children:(0,n.jsx)(`section`,{ref:l,dir:p,className:`univer-popup`,style:{left:u[0]+2,top:u[1]+2,overflow:s?`visible`:void 0},onContextMenu:h,children:i})}),f)}function _m(e){let{children:r,className:i,style:a,value:o,disabled:s=!1,direction:c=`horizontal`,onChange:l}=e,u=e=>{l(e)};return(0,n.jsx)(`div`,{className:U(`univer-flex univer-gap-2`,{"univer-flex-col":c===`vertical`},i),style:a,children:t.Children.map(r,(e,n)=>(0,t.isValidElement)(e)?(0,t.cloneElement)(e,{key:n,children:e.props.children,value:e.props.value,checked:o===e.props.value,disabled:s==null?e.props.disabled:s,onChange:u}):e)})}function vm(e){let{children:r,checked:i,value:a,disabled:o=!1,onChange:s}=e,c=(0,t.useRef)(null);function l(e){if(e.stopPropagation(),!(!s||o))if(a!==void 0)s&&s(a);else{let e=c.current.checked;s&&s(e)}}return(0,n.jsxs)(`label`,{"data-u-comp":`radio`,className:U(`univer-box-border univer-inline-flex univer-items-center univer-gap-2 univer-text-sm`,{"univer-cursor-pointer univer-text-gray-900 dark:!univer-text-white":!o,"univer-text-gray-400":o}),children:[(0,n.jsxs)(`span`,{className:`univer-relative univer-block`,children:[(0,n.jsx)(`input`,{ref:c,className:`univer-absolute univer-size-0 univer-opacity-0`,type:`radio`,checked:i,disabled:o,onChange:l}),(0,n.jsx)(`span`,{className:U(`univer-relative univer-box-border univer-flex univer-size-4 univer-items-center univer-justify-center univer-overflow-hidden univer-rounded-full univer-border univer-border-solid univer-transition-colors`,{"univer-opacity-50":o,"univer-border-primary-600 univer-bg-primary-600 dark:!univer-bg-primary-600":i,"univer-border-gray-300 univer-bg-gray-50 dark:!univer-border-gray-500 dark:!univer-bg-gray-600":!i}),children:i&&(0,n.jsx)(`span`,{className:`univer-absolute univer-left-1/2 univer-top-1/2 univer-block univer-size-2 -univer-translate-x-1/2 -univer-translate-y-1/2 univer-rounded-full univer-bg-white`})})]}),(0,n.jsx)(`span`,{children:r})]})}function ym(e){let{value:t,options:r=[],hideCheckMark:i=!1,onChange:a,multiple:o,className:s,optionClassName:c}=e,l=Array.isArray(t)?t:[t];function u(e){let t=l.indexOf(e);a(o?t>-1?l.filter(t=>t===e):[...l,e]:t>-1?void 0:e)}return(0,n.jsx)(`ul`,{className:U(`univer-m-0 univer-grid univer-max-h-80 univer-list-none univer-gap-1 univer-overflow-y-auto univer-rounded univer-p-1.5`,Q,Ul,s),children:r.map((e,t)=>{let r=l.indexOf(e.value)>-1;return(0,n.jsx)(`li`,{children:(0,n.jsxs)(`a`,{className:U(`univer-relative univer-block univer-cursor-pointer univer-select-none univer-rounded univer-py-1.5 univer-pl-8 univer-pr-2 univer-text-sm univer-text-gray-900 univer-transition-colors hover:univer-bg-gray-100 dark:!univer-text-white dark:hover:!univer-bg-gray-600`,c,{"univer-bg-gray-200 dark:!univer-bg-gray-500":r}),onClick:()=>u(e.value),children:[!i&&r&&(0,n.jsx)(C,{className:`univer-absolute univer-left-0 univer-top-1/2 -univer-translate-y-1/2 univer-pl-2 univer-text-primary-600`}),(0,n.jsx)(`span`,{style:{color:e.color},children:e.label})]})},t)})})}let bm=U(`univer-box-border univer-inline-flex univer-h-8 univer-min-w-36 univer-items-center univer-justify-between univer-gap-2 univer-rounded-lg univer-bg-white univer-px-2.5 univer-transition-colors univer-duration-200 dark:!univer-bg-gray-700 dark:!univer-text-white`,Q);function xm(e){let{className:r,value:i,disabled:a=!1,options:o=[],borderless:s=!1,onChange:c}=e,[l,u]=(0,t.useState)(!1);function d(e){u(e)}let f=(0,t.useMemo)(()=>{let e=[];for(let t of o)t.options?(t.options.forEach(t=>{e.push({label:t.label,value:t.value,disabled:t.disabled})}),e.push({type:`separator`})):e.push({label:t.label,value:t.value,disabled:t.disabled});return[{type:`radio`,value:i,hideIndicator:!0,options:e,onSelect:e=>{c(e)}}]},[o]),p=(0,t.useMemo)(()=>{let e=null;for(let t of o)if(t.options){for(let n of t.options)if(n.value===i){e=n.label;break}}else if(t.value===i){e=t.label;break}return e||i},[o,i]);return(0,n.jsx)(lu,{className:`univer-max-h-80 univer-w-[--radix-popper-anchor-width] univer-min-w-36 univer-overflow-auto`,align:`start`,open:l,items:f,disabled:a,onOpenChange:d,children:(0,n.jsxs)(`div`,{"data-u-comp":`select`,className:U(bm,{"univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50 dark:!univer-ring-primary-900":l&&!s,"univer-border-transparent univer-bg-transparent hover:univer-border-transparent":s,"univer-cursor-not-allowed":a,"hover:univer-border-primary-600":!a&&!s,"univer-cursor-pointer":!a&&!l},r),children:[(0,n.jsx)(`div`,{className:`univer-flex-1 univer-truncate univer-text-sm univer-text-gray-500 dark:!univer-text-white`,children:p}),(0,n.jsx)(z,{className:`univer-flex-shrink-0 dark:!univer-text-white`})]})})}function Sm(e){let{className:r,value:i=[],disabled:a=!1,options:o=[],borderless:s=!1,onChange:c}=e,[l,u]=(0,t.useState)(!1);function d(e){u(e)}let f=(0,t.useMemo)(()=>o.map(e=>({type:`checkbox`,value:e.value,label:e.label,disabled:e.disabled,checked:i.includes(e.value),onSelect:e=>{c(i.includes(e)?i.filter(t=>t!==e):[...i,e])}})),[o]);function p(e){c(i.filter(t=>t!==e))}let m=(0,t.useMemo)(()=>o.filter(e=>i.includes(e.value)).map((e,t)=>(0,n.jsx)(_t,{className:`univer-max-w-32`,closable:!0,onClose:()=>p(e.value),children:e.label},t)),[o,i]);return(0,n.jsx)(lu,{className:`univer-w-[--radix-popper-anchor-width] univer-min-w-36`,align:`start`,open:l,items:f,disabled:a,onOpenChange:d,children:(0,n.jsxs)(`div`,{"data-u-comp":`multiple-select`,className:U(bm,{"univer-border-primary-600 univer-outline-none univer-ring-2 univer-ring-primary-50 dark:!univer-ring-primary-900":l&&!s,"univer-border-transparent univer-bg-transparent hover:univer-border-transparent":s,"univer-cursor-not-allowed":a,"hover:univer-border-primary-600":!a&&!s,"univer-cursor-pointer":!a&&!l},r),children:[(0,n.jsx)(`div`,{className:`univer-box-border univer-flex univer-w-[calc(100%-16px)] univer-gap-2 univer-pr-2`,children:m}),(0,n.jsx)(z,{className:`univer-flex-shrink-0 dark:!univer-text-white`})]})})}var Cm=`Separator`,wm=`horizontal`,Tm=[`horizontal`,`vertical`],Em=p.forwardRef((e,t)=>{let{decorative:r,orientation:i=wm,...a}=e,o=Dm(i)?i:wm,s=r?{role:`none`}:{"aria-orientation":o===`vertical`?o:void 0,role:`separator`};return(0,n.jsx)(q.div,{"data-orientation":o,...s,...a,ref:t})});Em.displayName=Cm;function Dm(e){return Tm.includes(e)}var Om=Em;function km({className:e,orientation:t=`horizontal`,decorative:r=!0,...i}){return(0,n.jsx)(Om,{"data-u-comp":`separator`,"data-slot":`separator-root`,decorative:r,orientation:t,className:U(`univer-shrink-0 univer-bg-gray-200 data-[orientation=horizontal]:univer-h-px data-[orientation=vertical]:univer-h-full data-[orientation=horizontal]:univer-w-full data-[orientation=vertical]:univer-w-px dark:!univer-bg-gray-600`,e),...i})}let Am=e=>{let{defaultChecked:r=!1,onChange:i}=e,[a,o]=(0,t.useState)(r);return(0,t.useEffect)(()=>{o(r)},[r]),(0,n.jsx)(`div`,{className:`univer-h-4`,children:(0,n.jsxs)(`label`,{className:`univer-relative univer-inline-block univer-h-4 univer-w-7`,children:[(0,n.jsx)(`input`,{className:`univer-size-0 univer-opacity-0`,type:`checkbox`,checked:a,onChange:()=>{o(!a),i==null||i(!a)}}),(0,n.jsx)(`span`,{className:U(`univer-absolute univer-inset-0 univer-cursor-pointer univer-rounded-2xl univer-transition-colors univer-duration-200`,{"univer-bg-primary-600":a,"univer-bg-gray-200 dark:!univer-bg-gray-600":!a}),children:(0,n.jsx)(`span`,{className:U(`univer-absolute univer-bottom-0.5 univer-left-0.5 univer-size-3 univer-rounded-full univer-bg-white univer-transition-transform univer-duration-200`,{"univer-translate-x-3":a})})})]})})},jm=(0,t.forwardRef)((e,r)=>{let i=(0,t.useRef)(null),a=(0,t.useRef)({width:0,height:0}),{className:o,onResize:s,onValueChange:c,...l}=e;(0,t.useImperativeHandle)(r,()=>i.current,[]),(0,t.useLayoutEffect)(()=>{let e=i.current;if(e&&s){let t=new ResizeObserver(e=>{let{width:t,height:n}=e[0].target.getBoundingClientRect();t===0||n===0||(a.current.width!==t||a.current.height!==n)&&(a.current={width:t,height:n},s(t,n))});return t.observe(e),()=>{t.unobserve(e),t.disconnect()}}},[s]);function u(e){let t=e.target.value;c==null||c(t)}return(0,n.jsx)(`textarea`,{ref:i,"data-u-comp":`textarea`,"data-slot":`textarea`,className:U(`univer-box-border univer-flex univer-w-full univer-resize univer-rounded-md univer-bg-transparent univer-p-2 univer-text-base univer-text-gray-900 univer-outline-none univer-transition-[color,box-shadow] placeholder:univer-text-gray-200 disabled:univer-cursor-not-allowed disabled:univer-opacity-50 dark:!univer-text-white`,Q,Ul,o),onChange:u,...l})});function Mm({visibleToasts:e,...t}){return(0,n.jsx)(jp,{className:`dark:![&_[data-description]]:univer-text-gray-200 [&_[data-description]]:univer-text-sm [&_[data-description]]:univer-text-gray-600 [&_[data-icon]>svg]:univer-relative [&_[data-icon]>svg]:univer-top-1 [&_[data-icon]]:univer-self-baseline [&_[data-sonner-toast]]:univer-shadow-md [&_[data-title]]:univer-text-sm [&_[data-title]]:univer-text-gray-900`,toastOptions:{classNames:{content:`univer-leading-normal`,success:`[&_[data-icon]]:univer-text-green-500`,info:`[&_[data-icon]]:univer-text-primary-600`,error:`[&_[data-icon]]:univer-text-red-500`,warning:`[&_[data-icon]]:univer-text-yellow-500`}},visibleToasts:e==null?5:e,...t})}let Nm=(e,t)=>{let n=[],r=e=>{var i;if(n.push(e.key),t===e.key||(i=e.children)!=null&&i.length&&e.children.some(r))return!0;n.pop()};return e.some(r),n},Pm=(e,t)=>{let n=t==null?new Map:t,r=e;return{findNodePathFromTreeWithCache:e=>{let t=n.get(e);if(t)return t;let i=Nm(r,e);return i.map((e,t,n)=>{let r=[];for(let e=0;e<=t;e++)r.push(n[e]);return r}).reverse().forEach(e=>{let t=e[e.length-1];n.set(t,e)}),i},reset:e=>{n.clear(),e&&(r=e)}}},Fm=(e,t)=>t.length?t.reduce((e,t)=>{let n=e.find(e=>e.key===t);return(n==null?void 0:n.children)||[]},e):e,Im=(e,t)=>{let n=t.slice(0),r=n.pop();return Fm(e,n).find(e=>e.key===r)},Lm=(e,t,n)=>{let r=new Set(t),i=n[n.length-1],a=Fm(e,n);if(r.has(i)){if(a.length){let e=t=>{r.delete(t.key),t.children&&t.children.forEach(t=>e(t))};a.forEach(e)}n.map((e,t,n)=>{let r=[];for(let e=0;e<=t;e++)r.push(n[e]);return r}).reverse().some(t=>{let n=Fm(e,t),i=t[t.length-1];if(n.every(e=>!r.has(e.key)))r.delete(i);else return!0;return!1})}else{let e=t=>{r.add(t.key),t.children&&t.children.forEach(t=>e(t))};n.forEach(e=>r.add(e)),a.length&&a.forEach(e)}return[...r]},Rm=(e,t)=>{let n=t.children||[],r=t=>{var n;return(n=t.children)!=null&&n.length?!!t.children.every(r):e.has(t.key)};return n.length?n.some(e=>!r(e)):!1},zm=(e,t)=>{let n=[],r=Pm(e);return t.forEach(t=>{let i=Im(e,r.findNodePathFromTreeWithCache(t));if(i){var a;(a=i.children)!=null&&a.length||n.push(i)}}),n},Bm=function(e){return e[e.ONLY_LEAF_NODE=0]=`ONLY_LEAF_NODE`,e[e.ALL=1]=`ALL`,e}({});function Vm(e,t,n=1){let r=[];return e.forEach(e=>{r.push({...e,level:n}),e.children&&t.has(e.key)&&r.push(...Vm(e.children,t,n+1))}),r}function Hm(e){let{data:r=[],defaultCache:i,style:a,defaultExpandAll:o=!1,selectionMode:s=1,valueGroup:c=[],onChange:l,onExpend:u,height:d=200,itemHeight:f=32,attachRender:p}=e,[m,h]=(0,t.useState)({}),g=(0,t.useMemo)(()=>new Set,[]),_=(0,t.useMemo)(()=>Pm(r,i),[r,i]),v=(0,t.useMemo)(()=>{let e=new Set;return c.forEach(t=>{_.findNodePathFromTreeWithCache(t).forEach(t=>e.add(t))}),e},[c,_]);(0,t.useEffect)(()=>{function e(t){var n;g.add(t.key),(n=t.children)==null||n.forEach(e)}o&&r.forEach(e),h({})},[o,r]);let y=(0,t.useMemo)(()=>Vm(r,g),[r,m,g]);function b(e){var t;(t=e.children)!=null&&t.length&&(g.has(e.key)?g.delete(e.key):g.add(e.key),h({})),!(s===0&&e.children)&&(u==null||u(e.key))}function x(t){let{title:r,key:i,level:a=0}=t,o=e.treeNodeClassName,s=g.has(i),c=v.has(i),u=Rm(v,t);return(0,n.jsx)(`div`,{className:U(`univer-relative univer-text-[13px]`,o),style:{paddingLeft:`${a*20}px`},children:(0,n.jsxs)(`div`,{className:`univer-relative univer-my-1 univer-flex univer-w-full univer-items-center`,children:[t.children&&t.children.length>0&&(0,n.jsx)(`span`,{className:U(`univer-absolute univer-left-[-16px] univer-top-1/2 univer-flex univer--translate-y-1/2 univer-items-center univer-justify-center univer-text-[8px]`,{"univer-rotate-[-90deg]":!s}),onClick:e=>{e.stopPropagation(),b(t)},children:(0,n.jsx)(N,{})}),(0,n.jsx)(td,{checked:c&&!u,indeterminate:c&&u,onChange:()=>{l==null||l(t)}}),(0,n.jsx)(`div`,{className:`univer-mx-1 univer-flex univer-h-full univer-shrink univer-items-center univer-overflow-hidden univer-text-ellipsis univer-whitespace-nowrap`,onClick:e=>{e.stopPropagation(),b(t)},children:(0,n.jsx)(wf,{className:`univer-block`,showIfEllipsis:!0,placement:`top`,title:r,children:(0,n.jsx)(`span`,{className:`univer-block`,children:r})})}),p&&p(t)]})},i)}return(0,n.jsx)(`section`,{className:`univer-relative univer-select-none univer-text-gray-900 dark:!univer-text-white`,children:(0,n.jsx)(`div`,{className:`univer-m-0 univer-h-full univer-list-none univer-p-0`,style:a,children:(0,n.jsx)(qu,{data:y,itemKey:e=>e.key,height:d,itemHeight:f,children:e=>x(e)})})})}let Um=new WeakMap;function Wm(e,t){let n=Um.get(t);n||(n=(0,i.createRoot)(t),Um.set(t,n)),n.render(e)}function Gm(e){let t=Um.get(e);t&&(t.unmount(),Um.delete(e))}let Km=new Set,qm;function Jm(e){return qm||(qm=new ResizeObserver((...e)=>{Km.forEach(t=>t(...e))})),{observe(t,n){Km.add(e),qm.observe(t,n)},unobserve(t){Km.delete(e),qm.unobserve(t)}}}e.Accordion=dt,e.Avatar=gt,e.Badge=_t,e.Button=Pt,e.ButtonGroup=Bt,e.Calendar=Zu,e.CascaderList=$u,e.Checkbox=td,e.CheckboxGroup=ed,e.ColorPicker=sf,e.ColorPresets=Qd,e.ConfigContext=G,e.ConfigProvider=zt,e.Confirm=lf,e.DatePicker=uf,e.DateRangePicker=df,e.Dialog=zd,e.DraggableList=pf,e.Dropdown=Uu,e.DropdownMenu=lu,e.FormDualColumnLayout=gf,e.FormLayout=hf,e.Gallery=yf,e.GradientColorPicker=Mf,e.HoverCard=cp,e.Input=xf,e.InputNumber=Sf,e.KBD=lp,e.MessageType=Mp,e.Messager=Hp,e.MultipleSelect=Sm,e.Pager=_f,e.Panel=Gp,e.PanelField=qp,e.PanelSection=Kp,e.Popup=gm,e.Radio=vm,e.RadioGroup=_m,e.Segmented=Cf,e.Select=xm,e.SelectList=ym,e.Separator=km,e.Switch=Am,e.Textarea=jm,e.TimeInput=Ku,e.Toaster=Mm,e.Tooltip=wf,e.Tree=Hm,e.TreeSelectionMode=Bm,e.borderBottomClassName=Yl,e.borderClassName=Q,e.borderLeftBottomClassName=Gl,e.borderLeftClassName=Kl,e.borderRightClassName=Xl,e.borderTopClassName=Jl,e.clsx=U,e.cva=mt,e.divideXClassName=`univer-divide-gray-200 dark:!univer-divide-gray-600 univer-divide-x univer-divide-y-0 univer-divide-solid`,e.divideYClassName=`univer-divide-gray-200 dark:!univer-divide-gray-600 univer-divide-y univer-divide-x-0 univer-divide-solid`,e.filterLeafNode=zm,e.findNodePathFromTree=Nm,e.findSubTreeFromPath=Fm,e.isBrowser=Rt,e.mergeTreeSelected=Lm,e.message=Up,e.removeMessage=Wp,e.render=Wm,e.resetButtonClassName=`univer-m-0 univer-flex univer-appearance-none univer-items-center univer-justify-center univer-border-0 univer-bg-transparent univer-p-0 univer-leading-none univer-outline-none univer-cursor-pointer`,e.resizeObserverCtor=Jm,e.scrollbarClassName=Ul,e.toast=Cp,e.unmount=Gm});
|