@galacean/cli 2.0.0-alpha.26 → 2.0.0-alpha.28
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/dist/cli.bundle.cjs +55252 -18754
- package/dist/preview-client/_static/{Accordion-2cd014f1.js → Accordion-6f002a96.js} +1 -1
- package/dist/preview-client/_static/{AmbientLightAsset-be9e872c.js → AmbientLightAsset-57a59fc2.js} +2 -2
- package/dist/preview-client/_static/{AnimationClipAsset-d7b37af0.js → AnimationClipAsset-0a1f63eb.js} +1 -1
- package/dist/preview-client/_static/{AnimatorControllerAsset-2716497a.js → AnimatorControllerAsset-9192e596.js} +1 -1
- package/dist/preview-client/_static/{AnimatorStore-883a28ad.js → AnimatorStore-484b10cf.js} +1 -1
- package/dist/preview-client/_static/{AssetViewer-3847c058.js → AssetViewer-9f395efb.js} +1 -1
- package/dist/preview-client/_static/{AudioAsset-c28f33ab.js → AudioAsset-0ea4ba7b.js} +1 -1
- package/dist/preview-client/_static/{AudioComponent-3d6c73ce.js → AudioComponent-9bf5944c.js} +1 -1
- package/dist/preview-client/_static/{Callout-e2a89f6f.js → Callout-45631a14.js} +1 -1
- package/dist/preview-client/_static/{CameraComponent-3dc63451.js → CameraComponent-039457d1.js} +1 -1
- package/dist/preview-client/_static/{Component-0f881fc1.js → Component-c3c0c167.js} +1 -1
- package/dist/preview-client/_static/{DirectLight-96dbba47.js → DirectLight-7b1f4b9f.js} +1 -1
- package/dist/preview-client/_static/{FontAsset-d34b5378.js → FontAsset-10273d05.js} +2 -2
- package/dist/preview-client/_static/{FormItemArray-b8cda1d2.js → FormItemArray-9d4196d8.js} +2 -2
- package/dist/preview-client/_static/{GlTFAsset-5970e707.js → GlTFAsset-917bf1ee.js} +5 -5
- package/dist/preview-client/_static/{IconPlus-def01e2b.js → IconPlus-2bfc60da.js} +1 -1
- package/dist/preview-client/_static/{IconPointFilled-62d3c3b2.js → IconPointFilled-192e99c9.js} +1 -1
- package/dist/preview-client/_static/{LightBaseComponent-d651a276.js → LightBaseComponent-948d3192.js} +1 -1
- package/dist/preview-client/_static/{LottieAnimationComponent-f10dc558.js → LottieAnimationComponent-da226765.js} +1 -1
- package/dist/preview-client/_static/{MarkdownAsset-b2a3fad5.js → MarkdownAsset-602f93bf.js} +1 -1
- package/dist/preview-client/_static/MaterialAsset-aa93db51.js +1 -0
- package/dist/preview-client/_static/{MaterialInspector-8d466d59.js → MaterialInspector-45e208c7.js} +1 -1
- package/dist/preview-client/_static/Menu-beacc39d.js +17 -0
- package/dist/preview-client/_static/MeshAsset-585f4b18.js +1 -0
- package/dist/preview-client/_static/{MeshRendererBaseComponent-fde6b6a5.js → MeshRendererBaseComponent-0bc9f5b3.js} +1 -1
- package/dist/preview-client/_static/{MeshRendererComponent-430774ef.js → MeshRendererComponent-84208d23.js} +1 -1
- package/dist/preview-client/_static/{MeshThumbnail-07ffa076.js → MeshThumbnail-9bbe01dc.js} +1 -1
- package/dist/preview-client/_static/ParticleRendererComponent-f3ac8d1b.js +26 -0
- package/dist/preview-client/_static/{PhysicsMaterialAsset-a2f73b5c.js → PhysicsMaterialAsset-2dd013f8.js} +1 -1
- package/dist/preview-client/_static/{PhysicsStore-818c2f61.js → PhysicsStore-fcb01282.js} +1 -1
- package/dist/preview-client/_static/{PointLight-add790ea.js → PointLight-d9ace100.js} +1 -1
- package/dist/preview-client/_static/{PostProcessComponent-af270a77.js → PostProcessComponent-2b5255d9.js} +3 -3
- package/dist/preview-client/_static/PrefabAsset-8c923465.js +1 -0
- package/dist/preview-client/_static/{PrimitiveMesh-075dda8a.js → PrimitiveMesh-fde624a6.js} +1 -1
- package/dist/preview-client/_static/{ReferencedMaterial-d11151b5.js → ReferencedMaterial-890492a2.js} +1 -1
- package/dist/preview-client/_static/{RenderTargetAsset-b3cd1c49.js → RenderTargetAsset-bf38a725.js} +1 -1
- package/dist/preview-client/_static/SceneAsset-7a9dbdd8.js +1 -0
- package/dist/preview-client/_static/{ShaderAsset-a9d667f5.js → ShaderAsset-2f2c1e95.js} +12 -12
- package/dist/preview-client/_static/{ShaderChunkAsset-e43dde8a.js → ShaderChunkAsset-a3ff3959.js} +2 -2
- package/dist/preview-client/_static/{ShaderUIScriptAsset-e1cd0b8b.js → ShaderUIScriptAsset-d3a2d680.js} +1 -1
- package/dist/preview-client/_static/{SkinnedMeshRendererComponent-9756bd5f.js → SkinnedMeshRendererComponent-96740600.js} +1 -1
- package/dist/preview-client/_static/{SpineAnimationComponent-f3e0ff44.js → SpineAnimationComponent-3d4eec48.js} +1 -1
- package/dist/preview-client/_static/{SpineSkeletonDataAsset-43b731f1.js → SpineSkeletonDataAsset-a8598103.js} +1 -1
- package/dist/preview-client/_static/{SpotLight-649b0e21.js → SpotLight-680a6e17.js} +1 -1
- package/dist/preview-client/_static/{SpriteBaseComponent-d2a7ab4c.js → SpriteBaseComponent-96a500d7.js} +1 -1
- package/dist/preview-client/_static/{SpriteMaskComponent-2c1cef5e.js → SpriteMaskComponent-58c35ea2.js} +1 -1
- package/dist/preview-client/_static/{SpriteRendererComponent-33b71997.js → SpriteRendererComponent-5c89f7dd.js} +1 -1
- package/dist/preview-client/_static/{TextBaseComponent-9310e0c6.js → TextBaseComponent-248ea222.js} +3 -3
- package/dist/preview-client/_static/{TextRendererComponent-8dc0d7fb.js → TextRendererComponent-78458825.js} +1 -1
- package/dist/preview-client/_static/{TextureAsset-a7ff39b1.js → TextureAsset-bf69040b.js} +4 -4
- package/dist/preview-client/_static/Tooltip-0268ffac.js +1 -0
- package/dist/preview-client/_static/{TrailRendererComponent-c4635fab.js → TrailRendererComponent-838e0118.js} +1 -1
- package/dist/preview-client/_static/{TransformBaseComponent-1473deaa.js → TransformBaseComponent-c92aa259.js} +1 -1
- package/dist/preview-client/_static/{TransformComponent-e544f7ac.js → TransformComponent-d28b4035.js} +1 -1
- package/dist/preview-client/_static/{XRReferenceImageAsset-96f516ba.js → XRReferenceImageAsset-16071f5c.js} +1 -1
- package/dist/preview-client/_static/{audio-b5fbde34.js → audio-1d573775.js} +1 -1
- package/dist/preview-client/_static/{createOnModelChange-370b83da.js → createOnModelChange-38471bb6.js} +1 -1
- package/dist/preview-client/_static/{createReactComponent-58d9f0dd.js → createReactComponent-3e49f864.js} +1 -1
- package/dist/preview-client/_static/index-0a57ae09.js +1 -0
- package/dist/preview-client/_static/{index-74bcfad9.js → index-1d0ae2e4.js} +1 -1
- package/dist/preview-client/_static/{index-dd0763bf.js → index-1fa3ba70.js} +1 -1
- package/dist/preview-client/_static/index-2c567b8d.js +1 -0
- package/dist/preview-client/_static/{index-da16047f.js → index-2f54d4c9.js} +1 -1
- package/dist/preview-client/_static/{index-0dd5bb36.js → index-4084db44.js} +1 -1
- package/dist/preview-client/_static/index-5c27dafa.js +1 -0
- package/dist/preview-client/_static/{index-88650db7.js → index-65c6af4a.js} +3 -3
- package/dist/preview-client/_static/{index-05b76766.js → index-68806c86.js} +1 -1
- package/dist/preview-client/_static/{index-cdbb2f4d.js → index-8a22fe59.js} +1 -1
- package/dist/preview-client/_static/index-9e3daa94.js +1 -0
- package/dist/preview-client/_static/index-bdda02cf.js +1 -0
- package/dist/preview-client/_static/index-c88f78ce.js +1 -0
- package/dist/preview-client/_static/{index-ab8556cb.js → index-ce381b62.js} +3 -3
- package/dist/preview-client/_static/{index-c3dec278.js → index-d497fb6d.js} +214 -175
- package/dist/preview-client/_static/index-e4fb05d8.js +1 -0
- package/dist/preview-client/_static/{ktx2-encoder-db93524f.js → ktx2-encoder-772f6c33.js} +1 -1
- package/dist/preview-client/_static/{module-ec094ef6.js → module-136992e3.js} +1 -1
- package/dist/preview-client/_static/{module-ada3dced.js → module-1470d524.js} +1 -1
- package/dist/preview-client/_static/{module-de7ee724.js → module-77c2ea8c.js} +1 -1
- package/dist/preview-client/_static/{postmen-2853c0e6.js → postmen-0413c689.js} +2 -2
- package/dist/preview-client/_static/{shader-data-utils-f0e4f5a3.js → shader-data-utils-e38a959d.js} +1 -1
- package/dist/preview-client/index.html +1 -1
- package/package.json +29 -24
- package/dist/preview-client/_static/MaterialAsset-5353c4cb.js +0 -1
- package/dist/preview-client/_static/Menu-c8e6194b.js +0 -17
- package/dist/preview-client/_static/MeshAsset-c2bf60c5.js +0 -1
- package/dist/preview-client/_static/ParticleRendererComponent-e106bd8c.js +0 -26
- package/dist/preview-client/_static/PrefabAsset-59743dbb.js +0 -1
- package/dist/preview-client/_static/SceneAsset-08752701.js +0 -1
- package/dist/preview-client/_static/Tooltip-b5be390f.js +0 -1
- package/dist/preview-client/_static/index-29c59aff.js +0 -1
- package/dist/preview-client/_static/index-3680d0e0.js +0 -1
- package/dist/preview-client/_static/index-42aa3a49.js +0 -1
- package/dist/preview-client/_static/index-496f331d.js +0 -1
- package/dist/preview-client/_static/index-9f0122f0.js +0 -1
- package/dist/preview-client/_static/index-c6b7045c.js +0 -1
- package/dist/preview-client/_static/index-dddcae01.js +0 -1
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import{f0 as Or,av as i,aH as T,aM as a,gw as dt,ev as Nc,b7 as pe,gx as $c,gy as Oc,gz as Dc,gA as jc,gB as Lc,gC as kc,gD as Fc,gE as Uc,gF as Gc,gG as Kc,d3 as k,d5 as me,ba as Ne,b8 as $e,bd as ee,gH as ln,gI as Dr,gJ as Bc,gK as Wc,gL as Vc,gM as Hc,b9 as U,d2 as jr,bc as F,bb as y,d4 as xt,d6 as Lr,d7 as Mt,gN as kr,gO as Fr,gP as Ur,gQ as J,gR as Gr,gS as Kr,gT as Br,gU as Wr,gV as Vr,gW as Hr,b4 as dn,b5 as fn,d8 as wt,gX as Oe,d9 as Yr,da as ge,gY as pn,db as Xr,gZ as mn,dc as zr,dd as St,g_ as Yc,g$ as $t,h0 as Ot,h1 as Dt,h2 as Re,h3 as nr,h4 as jt,h5 as Lt,h6 as kt,h7 as Ft,h8 as Ut,h9 as rr,bi as Xc,ha as zc}from"./index-c3dec278.js";/**
|
|
2
|
-
* @license @tabler/icons-react v3.24.0 - MIT
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/var Zc=Or("outline","hand-finger","IconHandFinger",[["path",{d:"M8 13v-8.5a1.5 1.5 0 0 1 3 0v7.5",key:"svg-0"}],["path",{d:"M11 11.5v-2a1.5 1.5 0 1 1 3 0v2.5",key:"svg-1"}],["path",{d:"M14 10.5a1.5 1.5 0 0 1 3 0v1.5",key:"svg-2"}],["path",{d:"M17 11.5a1.5 1.5 0 0 1 3 0v4.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47",key:"svg-3"}]]);/**
|
|
7
|
-
* @license @tabler/icons-react v3.24.0 - MIT
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var qc=Or("outline","hand-two-fingers","IconHandTwoFingers",[["path",{d:"M8 13v-8.5a1.5 1.5 0 0 1 3 0v7.5",key:"svg-0"}],["path",{d:"M17 11.5a1.5 1.5 0 0 1 3 0v4.5a6 6 0 0 1 -6 6h-2h.208a6 6 0 0 1 -5.012 -2.7a69.74 69.74 0 0 1 -.196 -.3c-.312 -.479 -1.407 -2.388 -3.286 -5.728a1.5 1.5 0 0 1 .536 -2.022a1.867 1.867 0 0 1 2.28 .28l1.47 1.47",key:"svg-1"}],["path",{d:"M14 10.5a1.5 1.5 0 0 1 3 0v1.5",key:"svg-2"}],["path",{d:"M11 5.5v-2a1.5 1.5 0 1 1 3 0v8.5",key:"svg-3"}]]);const Qc=e=>i.jsxs("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[i.jsx("path",{d:"M6 7C6 5.93913 6.42143 4.92172 7.17157 4.17157C7.92172 3.42143 8.93913 3 10 3H14C15.0609 3 16.0783 3.42143 16.8284 4.17157C17.5786 4.92172 18 5.93913 18 7M6 7V17C6 18.0609 6.42143 19.0783 7.17157 19.8284C7.92172 20.5786 8.93913 21 10 21H14C15.0609 21 16.0783 20.5786 16.8284 19.8284C17.5786 19.0783 18 18.0609 18 17V7M6 7V9H18V7"}),i.jsx("path",{d:"M7.17157 4.17157C6.42143 4.92172 6 5.93913 6 7V9H18V7C18 5.93913 17.5786 4.92172 16.8284 4.17157C16.0783 3.42143 15.0609 3 14 3H10C8.93913 3 7.92172 3.42143 7.17157 4.17157Z"})]}),Jc=e=>i.jsxs("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[i.jsx("path",{d:"M6 7C6 5.93913 6.42143 4.92172 7.17157 4.17157C7.92172 3.42143 8.93913 3 10 3H11M6 7V17C6 18.0609 6.42143 19.0783 7.17157 19.8284C7.92172 20.5786 8.93913 21 10 21H14C15.0609 21 16.0783 20.5786 16.8284 19.8284C17.5786 19.0783 18 18.0609 18 17V7C18 5.93913 17.5786 4.92172 16.8284 4.17157C16.0783 3.42143 15.0609 3 14 3H11M6 7V10H11V3",fill:"var(--colors-grayA2)"}),i.jsx("path",{d:"M7.17157 4.17157C6.42143 4.92172 6 5.93913 6 7V10H11V3H10C8.93913 3 7.92172 3.42143 7.17157 4.17157Z"})]}),ei=e=>i.jsxs("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[i.jsx("path",{d:"M18 7C18 5.93913 17.5786 4.92172 16.8284 4.17157C16.0783 3.42143 15.0609 3 14 3H13M18 7V17C18 18.0609 17.5786 19.0783 16.8284 19.8284C16.0783 20.5786 15.0609 21 14 21H10C8.93913 21 7.92172 20.5786 7.17157 19.8284C6.42143 19.0783 6 18.0609 6 17V7C6 5.93913 6.42143 4.92172 7.17157 4.17157C7.92172 3.42143 8.93913 3 10 3H13M18 7V10H13V3",fill:"var(--colors-grayA2)"}),i.jsx("path",{d:"M16.8284 4.17157C16.0783 3.42143 15.0609 3 14 3H13V10H18V7C18 5.93913 17.5786 4.92172 16.8284 4.17157Z"})]}),or={backspace:"⌫",delete:"Del",cmd:"⌘",alt:"⌥",option:"⌥",enter:"↩",ctrl:"⌃",shift:"⇧",tab:"⇥",capslock:"⇪"},ti=["OF","TF","MLD","MRD","MDD"],ni={OF:i.jsx(Zc,{width:"16px",height:"18px",stroke:"var(--colors-gray8)",strokeWidth:1.2,fill:"var(--colors-grayA2)",style:{marginLeft:"2px"}}),TF:i.jsx(qc,{width:"16px",height:"18px",stroke:"var(--colors-gray8)",strokeWidth:1.2,fill:"var(--colors-grayA2)",style:{marginLeft:"2px"}}),MLD:i.jsx(Jc,{width:"18px",height:"18px",stroke:"var(--colors-gray8)",fill:"var(--colors-gray8)",strokeWidth:1.2}),MRD:i.jsx(ei,{width:"18px",height:"18px",stroke:"var(--colors-gray8)",fill:"var(--colors-gray8)",strokeWidth:1.2}),MDD:i.jsx(Qc,{width:"18px",height:"18px",stroke:"var(--colors-gray8)",fill:"var(--colors-gray8)",strokeWidth:1.2})},ri=T("span",{display:"inline-block",marginLeft:"-1",height:"18px",width:"18px",variants:{half:{true:{marginLeft:"-0_5"}}}}),oi=T("kbd",{display:"inline-block",background:"$gray3",fontSize:"10px",minWidth:"$3",height:"$4",lineHeight:"14px",borderRadius:"$2",backgroundColor:"$grayA2",border:"1px solid $grayA4",padding:"0 $1",marginRight:"$1",color:"currentColor",userSelect:"none",variants:{size:{xs:{minWidth:"$3",height:"$3",fontSize:"10px",borderRadius:"$1",padding:"0 $0_5"},sm:{minWidth:"$4",height:"$4",fontSize:"10px"},md:{minWidth:"$5",height:"$5",fontSize:"$1",lineHeight:"$lineHeights$1",borderRadius:"$2",padding:"0 $1_5"}},uppercase:{true:{textTransform:"uppercase"}},lowercase:{true:{textTransform:"lowercase"}}},defaultVariants:{uppercase:!0}}),ar=T("div",{display:"inline-flex",alignItems:"center","& > kbd:last-child":{marginRight:0}}),sr=oi;function ai(e){const{shortcuts:t,uppercase:n=!0,size:r="sm"}=e;if(!t)return null;if(Array.isArray(t))return i.jsx(ar,{children:t.map((s,u)=>ti.indexOf(s)!==-1?i.jsx(ri,{children:ni[s]},u):i.jsx(sr,{uppercase:n,size:r,children:or[s]??s},u))});const o=t.split(/[,+]/).map(s=>or[s]??s);return i.jsx(ar,{children:o.map((s,u)=>i.jsx(sr,{uppercase:n,size:r,children:s},u))})}function D(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function cr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function hn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=cr(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():cr(e[o],null)}}}}function ce(...e){return a.useCallback(hn(...e),e)}function Ve(e,t=[]){let n=[];function r(s,u){const c=a.createContext(u),f=n.length;n=[...n,u];const p=l=>{var x;const{scope:m,children:v,...g}=l,h=((x=m==null?void 0:m[e])==null?void 0:x[f])||c,b=a.useMemo(()=>g,Object.values(g));return i.jsx(h.Provider,{value:b,children:v})};p.displayName=s+"Provider";function d(l,m){var h;const v=((h=m==null?void 0:m[e])==null?void 0:h[f])||c,g=a.useContext(v);if(g)return g;if(u!==void 0)return u;throw new Error(`\`${l}\` must be used within \`${s}\``)}return[p,d]}const o=()=>{const s=n.map(u=>a.createContext(u));return function(c){const f=(c==null?void 0:c[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return o.scopeName=e,[r,si(o,...t)]}function si(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const u=r.reduce((c,{useScope:f,scopeName:p})=>{const l=f(s)[`__scope${p}`];return{...c,...l}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var ci=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ie=ci.reduce((e,t)=>{const n=a.forwardRef((r,o)=>{const{asChild:s,...u}=r,c=s?dt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),i.jsx(c,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ii(e,t){e&&Nc.flushSync(()=>e.dispatchEvent(t))}function Zr(e){const t=e+"CollectionProvider",[n,r]=Ve(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=v=>{const{scope:g,children:h}=v,b=pe.useRef(null),x=pe.useRef(new Map).current;return i.jsx(o,{scope:g,itemMap:x,collectionRef:b,children:h})};u.displayName=t;const c=e+"CollectionSlot",f=pe.forwardRef((v,g)=>{const{scope:h,children:b}=v,x=s(c,h),M=ce(g,x.collectionRef);return i.jsx(dt,{ref:M,children:b})});f.displayName=c;const p=e+"CollectionItemSlot",d="data-radix-collection-item",l=pe.forwardRef((v,g)=>{const{scope:h,children:b,...x}=v,M=pe.useRef(null),w=ce(g,M),S=s(p,h);return pe.useEffect(()=>(S.itemMap.set(M,{ref:M,...x}),()=>void S.itemMap.delete(M))),i.jsx(dt,{[d]:"",ref:w,children:b})});l.displayName=p;function m(v){const g=s(e+"CollectionConsumer",v);return pe.useCallback(()=>{const b=g.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((S,R)=>x.indexOf(S.ref.current)-x.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:u,Slot:f,ItemSlot:l},m,r]}var ui="Arrow",qr=a.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return i.jsx(ie.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:i.jsx("polygon",{points:"0,0 30,0 15,10"})})});qr.displayName=ui;var li=qr,vn="Popper",[Qr,Jr]=Ve(vn),[di,eo]=Qr(vn),to=e=>{const{__scopePopper:t,children:n}=e,[r,o]=a.useState(null);return i.jsx(di,{scope:t,anchor:r,onAnchorChange:o,children:n})};to.displayName=vn;var no="PopperAnchor",ro=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=eo(no,n),u=a.useRef(null),c=ce(t,u);return a.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||u.current)}),r?null:i.jsx(ie.div,{...o,ref:c})});ro.displayName=no;var gn="PopperContent",[fi,pi]=Qr(gn),oo=a.forwardRef((e,t)=>{var G,ae,O,se,Jn,er;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:u=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:p=[],collisionPadding:d=0,sticky:l="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:g,...h}=e,b=eo(gn,n),[x,M]=a.useState(null),w=ce(t,De=>M(De)),[S,R]=a.useState(null),I=$c(S),E=(I==null?void 0:I.width)??0,_=(I==null?void 0:I.height)??0,P=r+(s!=="center"?"-"+s:""),N=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},K=Array.isArray(p)?p:[p],W=K.length>0,X={padding:N,boundary:K.filter(hi),altBoundary:W},{refs:Z,floatingStyles:ue,placement:z,isPositioned:le,middlewareData:L}=Oc({strategy:"fixed",placement:P,whileElementsMounted:(...De)=>Dc(...De,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[jc({mainAxis:o+_,alignmentAxis:u}),f&&Lc({mainAxis:!0,crossAxis:!1,limiter:l==="partial"?kc():void 0,...X}),f&&Fc({...X}),Uc({...X,apply:({elements:De,rects:tr,availableWidth:_c,availableHeight:Ic})=>{const{width:Tc,height:Ac}=tr.reference,rt=De.floating.style;rt.setProperty("--radix-popper-available-width",`${_c}px`),rt.setProperty("--radix-popper-available-height",`${Ic}px`),rt.setProperty("--radix-popper-anchor-width",`${Tc}px`),rt.setProperty("--radix-popper-anchor-height",`${Ac}px`)}}),S&&Gc({element:S,padding:c}),vi({arrowWidth:E,arrowHeight:_}),m&&Kc({strategy:"referenceHidden",...X})]}),[C,A]=co(z),$=k(g);me(()=>{le&&($==null||$())},[le,$]);const j=(G=L.arrow)==null?void 0:G.x,q=(ae=L.arrow)==null?void 0:ae.y,Q=((O=L.arrow)==null?void 0:O.centerOffset)!==0,[de,B]=a.useState();return me(()=>{x&&B(window.getComputedStyle(x).zIndex)},[x]),i.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...ue,transform:le?ue.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[(se=L.transformOrigin)==null?void 0:se.x,(Jn=L.transformOrigin)==null?void 0:Jn.y].join(" "),...((er=L.hide)==null?void 0:er.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:i.jsx(fi,{scope:n,placedSide:C,onArrowChange:R,arrowX:j,arrowY:q,shouldHideArrow:Q,children:i.jsx(ie.div,{"data-side":C,"data-align":A,...h,ref:w,style:{...h.style,animation:le?void 0:"none"}})})})});oo.displayName=gn;var ao="PopperArrow",mi={top:"bottom",right:"left",bottom:"top",left:"right"},so=a.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=pi(ao,r),u=mi[s.placedSide];return i.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:i.jsx(li,{...o,ref:n,style:{...o.style,display:"block"}})})});so.displayName=ao;function hi(e){return e!==null}var vi=e=>({name:"transformOrigin",options:e,fn(t){var b,x,M;const{placement:n,rects:r,middlewareData:o}=t,u=((b=o.arrow)==null?void 0:b.centerOffset)!==0,c=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,d]=co(n),l={start:"0%",center:"50%",end:"100%"}[d],m=(((x=o.arrow)==null?void 0:x.x)??0)+c/2,v=(((M=o.arrow)==null?void 0:M.y)??0)+f/2;let g="",h="";return p==="bottom"?(g=u?l:`${m}px`,h=`${-f}px`):p==="top"?(g=u?l:`${m}px`,h=`${r.floating.height+f}px`):p==="right"?(g=`${-f}px`,h=u?l:`${v}px`):p==="left"&&(g=`${r.floating.width+f}px`,h=u?l:`${v}px`),{data:{x:g,y:h}}}});function co(e){const[t,n="center"]=e.split("-");return[t,n]}var io=to,gi=ro,Ci=oo,bi=so;function xi(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var He=e=>{const{present:t,children:n}=e,r=Mi(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),s=ce(r.ref,wi(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:s}):null};He.displayName="Presence";function Mi(e){const[t,n]=a.useState(),r=a.useRef({}),o=a.useRef(e),s=a.useRef("none"),u=e?"mounted":"unmounted",[c,f]=xi(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const p=ot(r.current);s.current=c==="mounted"?p:"none"},[c]),me(()=>{const p=r.current,d=o.current;if(d!==e){const m=s.current,v=ot(p);e?f("MOUNT"):v==="none"||(p==null?void 0:p.display)==="none"?f("UNMOUNT"):f(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),me(()=>{if(t){let p;const d=t.ownerDocument.defaultView??window,l=v=>{const h=ot(r.current).includes(v.animationName);if(v.target===t&&h&&(f("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",p=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=v=>{v.target===t&&(s.current=ot(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{d.clearTimeout(p),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:a.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function ot(e){return(e==null?void 0:e.animationName)||"none"}function wi(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gt="rovingFocusGroup.onEntryFocus",Si={bubbles:!1,cancelable:!0},Et="RovingFocusGroup",[zt,uo,Ei]=Zr(Et),[yi,lo]=Ve(Et,[Ei]),[Ri,Pi]=yi(Et),fo=a.forwardRef((e,t)=>i.jsx(zt.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(zt.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(_i,{...e,ref:t})})}));fo.displayName=Et;var _i=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:u,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:f,onEntryFocus:p,preventScrollOnEntryFocus:d=!1,...l}=e,m=a.useRef(null),v=ce(t,m),g=Ne(s),[h=null,b]=$e({prop:u,defaultProp:c,onChange:f}),[x,M]=a.useState(!1),w=k(p),S=uo(n),R=a.useRef(!1),[I,E]=a.useState(0);return a.useEffect(()=>{const _=m.current;if(_)return _.addEventListener(Gt,w),()=>_.removeEventListener(Gt,w)},[w]),i.jsx(Ri,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:h,onItemFocus:a.useCallback(_=>b(_),[b]),onItemShiftTab:a.useCallback(()=>M(!0),[]),onFocusableItemAdd:a.useCallback(()=>E(_=>_+1),[]),onFocusableItemRemove:a.useCallback(()=>E(_=>_-1),[]),children:i.jsx(ie.div,{tabIndex:x||I===0?-1:0,"data-orientation":r,...l,ref:v,style:{outline:"none",...e.style},onMouseDown:D(e.onMouseDown,()=>{R.current=!0}),onFocus:D(e.onFocus,_=>{const P=!R.current;if(_.target===_.currentTarget&&P&&!x){const N=new CustomEvent(Gt,Si);if(_.currentTarget.dispatchEvent(N),!N.defaultPrevented){const K=S().filter(z=>z.focusable),W=K.find(z=>z.active),X=K.find(z=>z.id===h),ue=[W,X,...K].filter(Boolean).map(z=>z.ref.current);ho(ue,d)}}R.current=!1}),onBlur:D(e.onBlur,()=>M(!1))})})}),po="RovingFocusGroupItem",mo=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...u}=e,c=ee(),f=s||c,p=Pi(po,n),d=p.currentTabStopId===f,l=uo(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=p;return a.useEffect(()=>{if(r)return m(),()=>v()},[r,m,v]),i.jsx(zt.ItemSlot,{scope:n,id:f,focusable:r,active:o,children:i.jsx(ie.span,{tabIndex:d?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:D(e.onMouseDown,g=>{r?p.onItemFocus(f):g.preventDefault()}),onFocus:D(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:D(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){p.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const h=Ai(g,p.orientation,p.dir);if(h!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=l().filter(M=>M.focusable).map(M=>M.ref.current);if(h==="last")x.reverse();else if(h==="prev"||h==="next"){h==="prev"&&x.reverse();const M=x.indexOf(g.currentTarget);x=p.loop?Ni(x,M+1):x.slice(M+1)}setTimeout(()=>ho(x))}})})})});mo.displayName=po;var Ii={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ti(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ai(e,t,n){const r=Ti(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ii[r]}function ho(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Ni(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $i=fo,Oi=mo,Zt=["Enter"," "],Di=["ArrowDown","PageUp","Home"],vo=["ArrowUp","PageDown","End"],ji=[...Di,...vo],Li={ltr:[...Zt,"ArrowRight"],rtl:[...Zt,"ArrowLeft"]},ki={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ye="Menu",[Fe,Fi,Ui]=Zr(Ye),[Se,go]=Ve(Ye,[Ui,Jr,lo]),Xe=Jr(),Co=lo(),[bo,Ce]=Se(Ye),[Gi,ze]=Se(Ye),xo=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:u=!0}=e,c=Xe(t),[f,p]=a.useState(null),d=a.useRef(!1),l=k(s),m=Ne(o);return a.useEffect(()=>{const v=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),i.jsx(io,{...c,children:i.jsx(bo,{scope:t,open:n,onOpenChange:l,content:f,onContentChange:p,children:i.jsx(Gi,{scope:t,onClose:a.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:d,dir:m,modal:u,children:r})})})};xo.displayName=Ye;var Ki="MenuAnchor",Cn=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xe(n);return i.jsx(gi,{...o,...r,ref:t})});Cn.displayName=Ki;var bn="MenuPortal",[Bi,Mo]=Se(bn,{forceMount:void 0}),wo=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ce(bn,t);return i.jsx(Bi,{scope:t,forceMount:n,children:i.jsx(He,{present:n||s.open,children:i.jsx(Hc,{asChild:!0,container:o,children:r})})})};wo.displayName=bn;var te="MenuContent",[Wi,xn]=Se(te),So=a.forwardRef((e,t)=>{const n=Mo(te,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ce(te,e.__scopeMenu),u=ze(te,e.__scopeMenu);return i.jsx(Fe.Provider,{scope:e.__scopeMenu,children:i.jsx(He,{present:r||s.open,children:i.jsx(Fe.Slot,{scope:e.__scopeMenu,children:u.modal?i.jsx(Vi,{...o,ref:t}):i.jsx(Hi,{...o,ref:t})})})})}),Vi=a.forwardRef((e,t)=>{const n=Ce(te,e.__scopeMenu),r=a.useRef(null),o=ce(t,r);return a.useEffect(()=>{const s=r.current;if(s)return ln(s)},[]),i.jsx(Mn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:D(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Hi=a.forwardRef((e,t)=>{const n=Ce(te,e.__scopeMenu);return i.jsx(Mn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Mn=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:c,onEntryFocus:f,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:m,onDismiss:v,disableOutsideScroll:g,...h}=e,b=Ce(te,n),x=ze(te,n),M=Xe(n),w=Co(n),S=Fi(n),[R,I]=a.useState(null),E=a.useRef(null),_=ce(t,E,b.onContentChange),P=a.useRef(0),N=a.useRef(""),K=a.useRef(0),W=a.useRef(null),X=a.useRef("right"),Z=a.useRef(0),ue=g?Vc:a.Fragment,z=g?{as:dt,allowPinchZoom:!0}:void 0,le=C=>{var G,ae;const A=N.current+C,$=S().filter(O=>!O.disabled),j=document.activeElement,q=(G=$.find(O=>O.ref.current===j))==null?void 0:G.textValue,Q=$.map(O=>O.textValue),de=ou(Q,A,q),B=(ae=$.find(O=>O.textValue===de))==null?void 0:ae.ref.current;(function O(se){N.current=se,window.clearTimeout(P.current),se!==""&&(P.current=window.setTimeout(()=>O(""),1e3))})(A),B&&setTimeout(()=>B.focus())};a.useEffect(()=>()=>window.clearTimeout(P.current),[]),Dr();const L=a.useCallback(C=>{var $,j;return X.current===(($=W.current)==null?void 0:$.side)&&su(C,(j=W.current)==null?void 0:j.area)},[]);return i.jsx(Wi,{scope:n,searchRef:N,onItemEnter:a.useCallback(C=>{L(C)&&C.preventDefault()},[L]),onItemLeave:a.useCallback(C=>{var A;L(C)||((A=E.current)==null||A.focus(),I(null))},[L]),onTriggerLeave:a.useCallback(C=>{L(C)&&C.preventDefault()},[L]),pointerGraceTimerRef:K,onPointerGraceIntentChange:a.useCallback(C=>{W.current=C},[]),children:i.jsx(ue,{...z,children:i.jsx(Bc,{asChild:!0,trapped:o,onMountAutoFocus:D(s,C=>{var A;C.preventDefault(),(A=E.current)==null||A.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:i.jsx(Wc,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:m,onDismiss:v,children:i.jsx($i,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:I,onEntryFocus:D(f,C=>{x.isUsingKeyboardRef.current||C.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(Ci,{role:"menu","aria-orientation":"vertical","data-state":Uo(b.open),"data-radix-menu-content":"",dir:x.dir,...M,...h,ref:_,style:{outline:"none",...h.style},onKeyDown:D(h.onKeyDown,C=>{const $=C.target.closest("[data-radix-menu-content]")===C.currentTarget,j=C.ctrlKey||C.altKey||C.metaKey,q=C.key.length===1;$&&(C.key==="Tab"&&C.preventDefault(),!j&&q&&le(C.key));const Q=E.current;if(C.target!==Q||!ji.includes(C.key))return;C.preventDefault();const B=S().filter(G=>!G.disabled).map(G=>G.ref.current);vo.includes(C.key)&&B.reverse(),nu(B)}),onBlur:D(e.onBlur,C=>{C.currentTarget.contains(C.target)||(window.clearTimeout(P.current),N.current="")}),onPointerMove:D(e.onPointerMove,Ue(C=>{const A=C.target,$=Z.current!==C.clientX;if(C.currentTarget.contains(A)&&$){const j=C.clientX>Z.current?"right":"left";X.current=j,Z.current=C.clientX}}))})})})})})})});So.displayName=te;var Yi="MenuGroup",wn=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(ie.div,{role:"group",...r,ref:t})});wn.displayName=Yi;var Xi="MenuLabel",Eo=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(ie.div,{...r,ref:t})});Eo.displayName=Xi;var ft="MenuItem",ir="menu.itemSelect",yt=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=a.useRef(null),u=ze(ft,e.__scopeMenu),c=xn(ft,e.__scopeMenu),f=ce(t,s),p=a.useRef(!1),d=()=>{const l=s.current;if(!n&&l){const m=new CustomEvent(ir,{bubbles:!0,cancelable:!0});l.addEventListener(ir,v=>r==null?void 0:r(v),{once:!0}),ii(l,m),m.defaultPrevented?p.current=!1:u.onClose()}};return i.jsx(yo,{...o,ref:f,disabled:n,onClick:D(e.onClick,d),onPointerDown:l=>{var m;(m=e.onPointerDown)==null||m.call(e,l),p.current=!0},onPointerUp:D(e.onPointerUp,l=>{var m;p.current||(m=l.currentTarget)==null||m.click()}),onKeyDown:D(e.onKeyDown,l=>{const m=c.searchRef.current!=="";n||m&&l.key===" "||Zt.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});yt.displayName=ft;var yo=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,u=xn(ft,n),c=Co(n),f=a.useRef(null),p=ce(t,f),[d,l]=a.useState(!1),[m,v]=a.useState("");return a.useEffect(()=>{const g=f.current;g&&v((g.textContent??"").trim())},[s.children]),i.jsx(Fe.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:i.jsx(Oi,{asChild:!0,...c,focusable:!r,children:i.jsx(ie.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:p,onPointerMove:D(e.onPointerMove,Ue(g=>{r?u.onItemLeave(g):(u.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:D(e.onPointerLeave,Ue(g=>u.onItemLeave(g))),onFocus:D(e.onFocus,()=>l(!0)),onBlur:D(e.onBlur,()=>l(!1))})})})}),zi="MenuCheckboxItem",Ro=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return i.jsx(Ao,{scope:e.__scopeMenu,checked:n,children:i.jsx(yt,{role:"menuitemcheckbox","aria-checked":pt(n)?"mixed":n,...o,ref:t,"data-state":yn(n),onSelect:D(o.onSelect,()=>r==null?void 0:r(pt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ro.displayName=zi;var Po="MenuRadioGroup",[Zi,qi]=Se(Po,{value:void 0,onValueChange:()=>{}}),_o=a.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=k(r);return i.jsx(Zi,{scope:e.__scopeMenu,value:n,onValueChange:s,children:i.jsx(wn,{...o,ref:t})})});_o.displayName=Po;var Io="MenuRadioItem",To=a.forwardRef((e,t)=>{const{value:n,...r}=e,o=qi(Io,e.__scopeMenu),s=n===o.value;return i.jsx(Ao,{scope:e.__scopeMenu,checked:s,children:i.jsx(yt,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":yn(s),onSelect:D(r.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});To.displayName=Io;var Sn="MenuItemIndicator",[Ao,Qi]=Se(Sn,{checked:!1}),No=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Qi(Sn,n);return i.jsx(He,{present:r||pt(s.checked)||s.checked===!0,children:i.jsx(ie.span,{...o,ref:t,"data-state":yn(s.checked)})})});No.displayName=Sn;var Ji="MenuSeparator",$o=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(ie.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});$o.displayName=Ji;var eu="MenuArrow",Oo=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xe(n);return i.jsx(bi,{...o,...r,ref:t})});Oo.displayName=eu;var En="MenuSub",[tu,Do]=Se(En),jo=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=Ce(En,t),u=Xe(t),[c,f]=a.useState(null),[p,d]=a.useState(null),l=k(o);return a.useEffect(()=>(s.open===!1&&l(!1),()=>l(!1)),[s.open,l]),i.jsx(io,{...u,children:i.jsx(bo,{scope:t,open:r,onOpenChange:l,content:p,onContentChange:d,children:i.jsx(tu,{scope:t,contentId:ee(),triggerId:ee(),trigger:c,onTriggerChange:f,children:n})})})};jo.displayName=En;var je="MenuSubTrigger",Lo=a.forwardRef((e,t)=>{const n=Ce(je,e.__scopeMenu),r=ze(je,e.__scopeMenu),o=Do(je,e.__scopeMenu),s=xn(je,e.__scopeMenu),u=a.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:f}=s,p={__scopeMenu:e.__scopeMenu},d=a.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return a.useEffect(()=>d,[d]),a.useEffect(()=>{const l=c.current;return()=>{window.clearTimeout(l),f(null)}},[c,f]),i.jsx(Cn,{asChild:!0,...p,children:i.jsx(yo,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Uo(n.open),...e,ref:hn(t,o.onTriggerChange),onClick:l=>{var m;(m=e.onClick)==null||m.call(e,l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:D(e.onPointerMove,Ue(l=>{s.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(s.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:D(e.onPointerLeave,Ue(l=>{var v,g;d();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const h=(g=n.content)==null?void 0:g.dataset.side,b=h==="right",x=b?-5:5,M=m[b?"left":"right"],w=m[b?"right":"left"];s.onPointerGraceIntentChange({area:[{x:l.clientX+x,y:l.clientY},{x:M,y:m.top},{x:w,y:m.top},{x:w,y:m.bottom},{x:M,y:m.bottom}],side:h}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(l),l.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:D(e.onKeyDown,l=>{var v;const m=s.searchRef.current!=="";e.disabled||m&&l.key===" "||Li[r.dir].includes(l.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),l.preventDefault())})})})});Lo.displayName=je;var ko="MenuSubContent",Fo=a.forwardRef((e,t)=>{const n=Mo(te,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ce(te,e.__scopeMenu),u=ze(te,e.__scopeMenu),c=Do(ko,e.__scopeMenu),f=a.useRef(null),p=ce(t,f);return i.jsx(Fe.Provider,{scope:e.__scopeMenu,children:i.jsx(He,{present:r||s.open,children:i.jsx(Fe.Slot,{scope:e.__scopeMenu,children:i.jsx(Mn,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:p,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var l;u.isUsingKeyboardRef.current&&((l=f.current)==null||l.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:D(e.onFocusOutside,d=>{d.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:D(e.onEscapeKeyDown,d=>{u.onClose(),d.preventDefault()}),onKeyDown:D(e.onKeyDown,d=>{var v;const l=d.currentTarget.contains(d.target),m=ki[u.dir].includes(d.key);l&&m&&(s.onOpenChange(!1),(v=c.trigger)==null||v.focus(),d.preventDefault())})})})})})});Fo.displayName=ko;function Uo(e){return e?"open":"closed"}function pt(e){return e==="indeterminate"}function yn(e){return pt(e)?"indeterminate":e?"checked":"unchecked"}function nu(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ru(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ou(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let u=ru(e,Math.max(s,0));o.length===1&&(u=u.filter(p=>p!==n));const f=u.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function au(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,u=t.length-1;s<t.length;u=s++){const c=t[s].x,f=t[s].y,p=t[u].x,d=t[u].y;f>r!=d>r&&n<(p-c)*(r-f)/(d-f)+c&&(o=!o)}return o}function su(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return au(n,t)}function Ue(e){return t=>t.pointerType==="mouse"?e(t):void 0}var cu=xo,iu=Cn,uu=wo,lu=So,du=wn,fu=Eo,pu=yt,mu=Ro,hu=_o,vu=To,gu=No,Cu=$o,bu=Oo,xu=jo,Mu=Lo,wu=Fo,Rn="DropdownMenu",[Su,ym]=Ve(Rn,[go]),V=go(),[Eu,Go]=Su(Rn),Ko=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:u,modal:c=!0}=e,f=V(t),p=a.useRef(null),[d=!1,l]=$e({prop:o,defaultProp:s,onChange:u});return i.jsx(Eu,{scope:t,triggerId:ee(),triggerRef:p,contentId:ee(),open:d,onOpenChange:l,onOpenToggle:a.useCallback(()=>l(m=>!m),[l]),modal:c,children:i.jsx(cu,{...f,open:d,onOpenChange:l,dir:r,modal:c,children:n})})};Ko.displayName=Rn;var Bo="DropdownMenuTrigger",Wo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Go(Bo,n),u=V(n);return i.jsx(iu,{asChild:!0,...u,children:i.jsx(ie.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:hn(t,s.triggerRef),onPointerDown:D(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:D(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});Wo.displayName=Bo;var yu="DropdownMenuPortal",Vo=e=>{const{__scopeDropdownMenu:t,...n}=e,r=V(t);return i.jsx(uu,{...r,...n})};Vo.displayName=yu;var Ho="DropdownMenuContent",Yo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Go(Ho,n),s=V(n),u=a.useRef(!1);return i.jsx(lu,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:D(e.onCloseAutoFocus,c=>{var f;u.current||(f=o.triggerRef.current)==null||f.focus(),u.current=!1,c.preventDefault()}),onInteractOutside:D(e.onInteractOutside,c=>{const f=c.detail.originalEvent,p=f.button===0&&f.ctrlKey===!0,d=f.button===2||p;(!o.modal||d)&&(u.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)"}})});Yo.displayName=Ho;var Ru="DropdownMenuGroup",Xo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=V(n);return i.jsx(du,{...o,...r,ref:t})});Xo.displayName=Ru;var Pu="DropdownMenuLabel",zo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=V(n);return i.jsx(fu,{...o,...r,ref:t})});zo.displayName=Pu;var _u="DropdownMenuItem",Zo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=V(n);return i.jsx(pu,{...o,...r,ref:t})});Zo.displayName=_u;var Iu="DropdownMenuCheckboxItem",qo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=V(n);return i.jsx(mu,{...o,...r,ref:t})});qo.displayName=Iu;var Tu="DropdownMenuRadioGroup",Qo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=V(n);return i.jsx(hu,{...o,...r,ref:t})});Qo.displayName=Tu;var Au="DropdownMenuRadioItem",Jo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=V(n);return i.jsx(vu,{...o,...r,ref:t})});Jo.displayName=Au;var Nu="DropdownMenuItemIndicator",ea=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=V(n);return i.jsx(gu,{...o,...r,ref:t})});ea.displayName=Nu;var $u="DropdownMenuSeparator",ta=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=V(n);return i.jsx(Cu,{...o,...r,ref:t})});ta.displayName=$u;var Ou="DropdownMenuArrow",Du=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=V(n);return i.jsx(bu,{...o,...r,ref:t})});Du.displayName=Ou;var ju=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,u=V(t),[c=!1,f]=$e({prop:r,defaultProp:s,onChange:o});return i.jsx(xu,{...u,open:c,onOpenChange:f,children:n})},Lu="DropdownMenuSubTrigger",na=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=V(n);return i.jsx(Mu,{...o,...r,ref:t})});na.displayName=Lu;var ku="DropdownMenuSubContent",ra=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=V(n);return i.jsx(wu,{...o,...r,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)"}})});ra.displayName=ku;var oa=Ko,Fu=Wo,aa=Vo,Uu=Yo,Gu=Xo,Ku=zo,Bu=Zo,Wu=qo,Vu=Qo,Hu=Jo,Yu=ea,Xu=ta,zu=ju,Zu=na,qu=ra,Qu="DismissableLayer",qt="dismissableLayer.update",Ju="dismissableLayer.pointerDownOutside",el="dismissableLayer.focusOutside",ur,sa=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ca=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:u,onDismiss:c,...f}=e,p=a.useContext(sa),[d,l]=a.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=a.useState({}),g=U(t,E=>l(E)),h=Array.from(p.layers),[b]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),x=h.indexOf(b),M=d?h.indexOf(d):-1,w=p.layersWithOutsidePointerEventsDisabled.size>0,S=M>=x,R=rl(E=>{const _=E.target,P=[...p.branches].some(N=>N.contains(_));!S||P||(o==null||o(E),u==null||u(E),E.defaultPrevented||c==null||c())},m),I=ol(E=>{const _=E.target;[...p.branches].some(N=>N.contains(_))||(s==null||s(E),u==null||u(E),E.defaultPrevented||c==null||c())},m);return jr(E=>{M===p.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},m),a.useEffect(()=>{if(d)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(ur=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(d)),p.layers.add(d),lr(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=ur)}},[d,m,n,p]),a.useEffect(()=>()=>{d&&(p.layers.delete(d),p.layersWithOutsidePointerEventsDisabled.delete(d),lr())},[d,p]),a.useEffect(()=>{const E=()=>v({});return document.addEventListener(qt,E),()=>document.removeEventListener(qt,E)},[]),i.jsx(F.div,{...f,ref:g,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:y(e.onFocusCapture,I.onFocusCapture),onBlurCapture:y(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:y(e.onPointerDownCapture,R.onPointerDownCapture)})});ca.displayName=Qu;var tl="DismissableLayerBranch",nl=a.forwardRef((e,t)=>{const n=a.useContext(sa),r=a.useRef(null),o=U(t,r);return a.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),i.jsx(F.div,{...e,ref:o})});nl.displayName=tl;function rl(e,t=globalThis==null?void 0:globalThis.document){const n=k(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let f=function(){ia(Ju,n,p,{discrete:!0})};const p={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);r.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ol(e,t=globalThis==null?void 0:globalThis.document){const n=k(e),r=a.useRef(!1);return a.useEffect(()=>{const o=s=>{s.target&&!r.current&&ia(el,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lr(){const e=new CustomEvent(qt);document.dispatchEvent(e)}function ia(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?xt(o,s):o.dispatchEvent(s)}var Kt=0;function al(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??dr()),document.body.insertAdjacentElement("beforeend",e[1]??dr()),Kt++,()=>{Kt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Kt--}},[])}function dr(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Bt="focusScope.autoFocusOnMount",Wt="focusScope.autoFocusOnUnmount",fr={bubbles:!1,cancelable:!0},sl="FocusScope",ua=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...u}=e,[c,f]=a.useState(null),p=k(o),d=k(s),l=a.useRef(null),m=U(t,h=>f(h)),v=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let h=function(w){if(v.paused||!c)return;const S=w.target;c.contains(S)?l.current=S:he(l.current,{select:!0})},b=function(w){if(v.paused||!c)return;const S=w.relatedTarget;S!==null&&(c.contains(S)||he(l.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const R of w)R.removedNodes.length>0&&he(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const M=new MutationObserver(x);return c&&M.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),M.disconnect()}}},[r,c,v.paused]),a.useEffect(()=>{if(c){mr.add(v);const h=document.activeElement;if(!c.contains(h)){const x=new CustomEvent(Bt,fr);c.addEventListener(Bt,p),c.dispatchEvent(x),x.defaultPrevented||(cl(fl(la(c)),{select:!0}),document.activeElement===h&&he(c))}return()=>{c.removeEventListener(Bt,p),setTimeout(()=>{const x=new CustomEvent(Wt,fr);c.addEventListener(Wt,d),c.dispatchEvent(x),x.defaultPrevented||he(h??document.body,{select:!0}),c.removeEventListener(Wt,d),mr.remove(v)},0)}}},[c,p,d,v]);const g=a.useCallback(h=>{if(!n&&!r||v.paused)return;const b=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,x=document.activeElement;if(b&&x){const M=h.currentTarget,[w,S]=il(M);w&&S?!h.shiftKey&&x===S?(h.preventDefault(),n&&he(w,{select:!0})):h.shiftKey&&x===w&&(h.preventDefault(),n&&he(S,{select:!0})):x===M&&h.preventDefault()}},[n,r,v.paused]);return i.jsx(F.div,{tabIndex:-1,...u,ref:m,onKeyDown:g})});ua.displayName=sl;function cl(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(he(r,{select:t}),document.activeElement!==n)return}function il(e){const t=la(e),n=pr(t,e),r=pr(t.reverse(),e);return[n,r]}function la(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pr(e,t){for(const n of e)if(!ul(n,{upTo:t}))return n}function ul(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 ll(e){return e instanceof HTMLInputElement&&"select"in e}function he(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ll(e)&&t&&e.select()}}var mr=dl();function dl(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=hr(e,t),e.unshift(t)},remove(t){var n;e=hr(e,t),(n=e[0])==null||n.resume()}}}function hr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function fl(e){return e.filter(t=>t.tagName!=="A")}var pl="Portal",da=a.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[o,s]=a.useState(!1);me(()=>s(!0),[]);const u=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return u?Lr.createPortal(i.jsx(F.div,{...r,ref:t}),u):null});da.displayName=pl;var fa=a.forwardRef((e,t)=>{const{children:n,...r}=e,o=a.Children.toArray(n),s=o.find(hl);if(s){const u=s.props.children,c=o.map(f=>f===s?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:f);return i.jsx(Qt,{...r,ref:t,children:a.isValidElement(u)?a.cloneElement(u,void 0,c):null})}return i.jsx(Qt,{...r,ref:t,children:n})});fa.displayName="Slot";var Qt=a.forwardRef((e,t)=>{const{children:n,...r}=e;if(a.isValidElement(n)){const o=gl(n);return a.cloneElement(n,{...vl(r,n.props),ref:t?Mt(t,o):o})}return a.Children.count(n)>1?a.Children.only(null):null});Qt.displayName="SlotClone";var ml=({children:e})=>i.jsx(i.Fragment,{children:e});function hl(e){return a.isValidElement(e)&&e.type===ml}function vl(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{s(...c),o(...c)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function gl(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pa=kr(),Vt=function(){},Rt=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:Vt,onWheelCapture:Vt,onTouchMoveCapture:Vt}),o=r[0],s=r[1],u=e.forwardProps,c=e.children,f=e.className,p=e.removeScrollBar,d=e.enabled,l=e.shards,m=e.sideCar,v=e.noIsolation,g=e.inert,h=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,M=e.gapMode,w=Fr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,R=Ur([n,t]),I=J(J({},w),o);return a.createElement(a.Fragment,null,d&&a.createElement(S,{sideCar:pa,removeScrollBar:p,shards:l,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:M}),u?a.cloneElement(a.Children.only(c),J(J({},I),{ref:R})):a.createElement(x,J({},I,{className:f,ref:R}),c))});Rt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Rt.classNames={fullWidth:Gr,zeroRight:Kr};var Jt=!1;if(typeof window<"u")try{var at=Object.defineProperty({},"passive",{get:function(){return Jt=!0,!0}});window.addEventListener("test",at,at),window.removeEventListener("test",at,at)}catch{Jt=!1}var Pe=Jt?{passive:!1}:!1,Cl=function(e){return e.tagName==="TEXTAREA"},ma=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Cl(e)&&n[t]==="visible")},bl=function(e){return ma(e,"overflowY")},xl=function(e){return ma(e,"overflowX")},vr=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ha(e,r);if(o){var s=va(e,r),u=s[1],c=s[2];if(u>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ml=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},wl=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ha=function(e,t){return e==="v"?bl(t):xl(t)},va=function(e,t){return e==="v"?Ml(t):wl(t)},Sl=function(e,t){return e==="h"&&t==="rtl"?-1:1},El=function(e,t,n,r,o){var s=Sl(e,window.getComputedStyle(t).direction),u=s*r,c=n.target,f=t.contains(c),p=!1,d=u>0,l=0,m=0;do{var v=va(e,c),g=v[0],h=v[1],b=v[2],x=h-b-s*g;(g||x)&&ha(e,c)&&(l+=x,m+=g),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(d&&(o&&Math.abs(l)<1||!o&&u>l)||!d&&(o&&Math.abs(m)<1||!o&&-u>m))&&(p=!0),p},st=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gr=function(e){return[e.deltaX,e.deltaY]},Cr=function(e){return e&&"current"in e?e.current:e},yl=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Rl=function(e){return`
|
|
12
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
13
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
14
|
-
`)},Pl=0,_e=[];function _l(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(Pl++)[0],s=a.useState(Br)[0],u=a.useRef(e);a.useEffect(function(){u.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Wr([e.lockRef.current],(e.shards||[]).map(Cr),!0).filter(Boolean);return h.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=a.useCallback(function(h,b){if("touches"in h&&h.touches.length===2)return!u.current.allowPinchZoom;var x=st(h),M=n.current,w="deltaX"in h?h.deltaX:M[0]-x[0],S="deltaY"in h?h.deltaY:M[1]-x[1],R,I=h.target,E=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in h&&E==="h"&&I.type==="range")return!1;var _=vr(E,I);if(!_)return!0;if(_?R=E:(R=E==="v"?"h":"v",_=vr(E,I)),!_)return!1;if(!r.current&&"changedTouches"in h&&(w||S)&&(r.current=R),!R)return!0;var P=r.current||R;return El(P,b,h,P==="h"?w:S,!0)},[]),f=a.useCallback(function(h){var b=h;if(!(!_e.length||_e[_e.length-1]!==s)){var x="deltaY"in b?gr(b):st(b),M=t.current.filter(function(R){return R.name===b.type&&(R.target===b.target||b.target===R.shadowParent)&&yl(R.delta,x)})[0];if(M&&M.should){b.cancelable&&b.preventDefault();return}if(!M){var w=(u.current.shards||[]).map(Cr).filter(Boolean).filter(function(R){return R.contains(b.target)}),S=w.length>0?c(b,w[0]):!u.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),p=a.useCallback(function(h,b,x,M){var w={name:h,delta:b,target:x,should:M,shadowParent:Il(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=a.useCallback(function(h){n.current=st(h),r.current=void 0},[]),l=a.useCallback(function(h){p(h.type,gr(h),h.target,c(h,e.lockRef.current))},[]),m=a.useCallback(function(h){p(h.type,st(h),h.target,c(h,e.lockRef.current))},[]);a.useEffect(function(){return _e.push(s),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:m}),document.addEventListener("wheel",f,Pe),document.addEventListener("touchmove",f,Pe),document.addEventListener("touchstart",d,Pe),function(){_e=_e.filter(function(h){return h!==s}),document.removeEventListener("wheel",f,Pe),document.removeEventListener("touchmove",f,Pe),document.removeEventListener("touchstart",d,Pe)}},[]);var v=e.removeScrollBar,g=e.inert;return a.createElement(a.Fragment,null,g?a.createElement(s,{styles:Rl(o)}):null,v?a.createElement(Vr,{gapMode:e.gapMode}):null)}function Il(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Tl=Hr(pa,_l);var ga=a.forwardRef(function(e,t){return a.createElement(Rt,J({},e,{ref:t,sideCar:Tl}))});ga.classNames=Rt.classNames;const Al=ga;var en=["Enter"," "],Nl=["ArrowDown","PageUp","Home"],Ca=["ArrowUp","PageDown","End"],$l=[...Nl,...Ca],Ol={ltr:[...en,"ArrowRight"],rtl:[...en,"ArrowLeft"]},Dl={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ze="Menu",[Ge,jl,Ll]=dn(Ze),[Ee,ba]=fn(Ze,[Ll,wt,Oe]),qe=wt(),xa=Oe(),[Ma,be]=Ee(Ze),[kl,Qe]=Ee(Ze),wa=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:u=!0}=e,c=qe(t),[f,p]=a.useState(null),d=a.useRef(!1),l=k(s),m=Ne(o);return a.useEffect(()=>{const v=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),i.jsx(St,{...c,children:i.jsx(Ma,{scope:t,open:n,onOpenChange:l,content:f,onContentChange:p,children:i.jsx(kl,{scope:t,onClose:a.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:d,dir:m,modal:u,children:r})})})};wa.displayName=Ze;var Fl="MenuAnchor",Pn=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=qe(n);return i.jsx(Yr,{...o,...r,ref:t})});Pn.displayName=Fl;var _n="MenuPortal",[Ul,Sa]=Ee(_n,{forceMount:void 0}),Ea=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=be(_n,t);return i.jsx(Ul,{scope:t,forceMount:n,children:i.jsx(ge,{present:n||s.open,children:i.jsx(da,{asChild:!0,container:o,children:r})})})};Ea.displayName=_n;var ne="MenuContent",[Gl,In]=Ee(ne),ya=a.forwardRef((e,t)=>{const n=Sa(ne,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=be(ne,e.__scopeMenu),u=Qe(ne,e.__scopeMenu);return i.jsx(Ge.Provider,{scope:e.__scopeMenu,children:i.jsx(ge,{present:r||s.open,children:i.jsx(Ge.Slot,{scope:e.__scopeMenu,children:u.modal?i.jsx(Kl,{...o,ref:t}):i.jsx(Bl,{...o,ref:t})})})})}),Kl=a.forwardRef((e,t)=>{const n=be(ne,e.__scopeMenu),r=a.useRef(null),o=U(t,r);return a.useEffect(()=>{const s=r.current;if(s)return ln(s)},[]),i.jsx(Tn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:y(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Bl=a.forwardRef((e,t)=>{const n=be(ne,e.__scopeMenu);return i.jsx(Tn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Tn=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:c,onEntryFocus:f,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:m,onDismiss:v,disableOutsideScroll:g,...h}=e,b=be(ne,n),x=Qe(ne,n),M=qe(n),w=xa(n),S=jl(n),[R,I]=a.useState(null),E=a.useRef(null),_=U(t,E,b.onContentChange),P=a.useRef(0),N=a.useRef(""),K=a.useRef(0),W=a.useRef(null),X=a.useRef("right"),Z=a.useRef(0),ue=g?Al:a.Fragment,z=g?{as:fa,allowPinchZoom:!0}:void 0,le=C=>{var G,ae;const A=N.current+C,$=S().filter(O=>!O.disabled),j=document.activeElement,q=(G=$.find(O=>O.ref.current===j))==null?void 0:G.textValue,Q=$.map(O=>O.textValue),de=td(Q,A,q),B=(ae=$.find(O=>O.textValue===de))==null?void 0:ae.ref.current;(function O(se){N.current=se,window.clearTimeout(P.current),se!==""&&(P.current=window.setTimeout(()=>O(""),1e3))})(A),B&&setTimeout(()=>B.focus())};a.useEffect(()=>()=>window.clearTimeout(P.current),[]),al();const L=a.useCallback(C=>{var $,j;return X.current===(($=W.current)==null?void 0:$.side)&&rd(C,(j=W.current)==null?void 0:j.area)},[]);return i.jsx(Gl,{scope:n,searchRef:N,onItemEnter:a.useCallback(C=>{L(C)&&C.preventDefault()},[L]),onItemLeave:a.useCallback(C=>{var A;L(C)||((A=E.current)==null||A.focus(),I(null))},[L]),onTriggerLeave:a.useCallback(C=>{L(C)&&C.preventDefault()},[L]),pointerGraceTimerRef:K,onPointerGraceIntentChange:a.useCallback(C=>{W.current=C},[]),children:i.jsx(ue,{...z,children:i.jsx(ua,{asChild:!0,trapped:o,onMountAutoFocus:y(s,C=>{var A;C.preventDefault(),(A=E.current)==null||A.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:i.jsx(ca,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:m,onDismiss:v,children:i.jsx(pn,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:I,onEntryFocus:y(f,C=>{x.isUsingKeyboardRef.current||C.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(Xr,{role:"menu","aria-orientation":"vertical","data-state":Ka(b.open),"data-radix-menu-content":"",dir:x.dir,...M,...h,ref:_,style:{outline:"none",...h.style},onKeyDown:y(h.onKeyDown,C=>{const $=C.target.closest("[data-radix-menu-content]")===C.currentTarget,j=C.ctrlKey||C.altKey||C.metaKey,q=C.key.length===1;$&&(C.key==="Tab"&&C.preventDefault(),!j&&q&&le(C.key));const Q=E.current;if(C.target!==Q||!$l.includes(C.key))return;C.preventDefault();const B=S().filter(G=>!G.disabled).map(G=>G.ref.current);Ca.includes(C.key)&&B.reverse(),Jl(B)}),onBlur:y(e.onBlur,C=>{C.currentTarget.contains(C.target)||(window.clearTimeout(P.current),N.current="")}),onPointerMove:y(e.onPointerMove,Ke(C=>{const A=C.target,$=Z.current!==C.clientX;if(C.currentTarget.contains(A)&&$){const j=C.clientX>Z.current?"right":"left";X.current=j,Z.current=C.clientX}}))})})})})})})});ya.displayName=ne;var Wl="MenuGroup",An=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(F.div,{role:"group",...r,ref:t})});An.displayName=Wl;var Vl="MenuLabel",Ra=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(F.div,{...r,ref:t})});Ra.displayName=Vl;var mt="MenuItem",br="menu.itemSelect",Pt=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=a.useRef(null),u=Qe(mt,e.__scopeMenu),c=In(mt,e.__scopeMenu),f=U(t,s),p=a.useRef(!1),d=()=>{const l=s.current;if(!n&&l){const m=new CustomEvent(br,{bubbles:!0,cancelable:!0});l.addEventListener(br,v=>r==null?void 0:r(v),{once:!0}),xt(l,m),m.defaultPrevented?p.current=!1:u.onClose()}};return i.jsx(Pa,{...o,ref:f,disabled:n,onClick:y(e.onClick,d),onPointerDown:l=>{var m;(m=e.onPointerDown)==null||m.call(e,l),p.current=!0},onPointerUp:y(e.onPointerUp,l=>{var m;p.current||(m=l.currentTarget)==null||m.click()}),onKeyDown:y(e.onKeyDown,l=>{const m=c.searchRef.current!=="";n||m&&l.key===" "||en.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});Pt.displayName=mt;var Pa=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,u=In(mt,n),c=xa(n),f=a.useRef(null),p=U(t,f),[d,l]=a.useState(!1),[m,v]=a.useState("");return a.useEffect(()=>{const g=f.current;g&&v((g.textContent??"").trim())},[s.children]),i.jsx(Ge.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:i.jsx(mn,{asChild:!0,...c,focusable:!r,children:i.jsx(F.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:p,onPointerMove:y(e.onPointerMove,Ke(g=>{r?u.onItemLeave(g):(u.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:y(e.onPointerLeave,Ke(g=>u.onItemLeave(g))),onFocus:y(e.onFocus,()=>l(!0)),onBlur:y(e.onBlur,()=>l(!1))})})})}),Hl="MenuCheckboxItem",_a=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return i.jsx($a,{scope:e.__scopeMenu,checked:n,children:i.jsx(Pt,{role:"menuitemcheckbox","aria-checked":ht(n)?"mixed":n,...o,ref:t,"data-state":On(n),onSelect:y(o.onSelect,()=>r==null?void 0:r(ht(n)?!0:!n),{checkForDefaultPrevented:!1})})})});_a.displayName=Hl;var Ia="MenuRadioGroup",[Yl,Xl]=Ee(Ia,{value:void 0,onValueChange:()=>{}}),Ta=a.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=k(r);return i.jsx(Yl,{scope:e.__scopeMenu,value:n,onValueChange:s,children:i.jsx(An,{...o,ref:t})})});Ta.displayName=Ia;var Aa="MenuRadioItem",Na=a.forwardRef((e,t)=>{const{value:n,...r}=e,o=Xl(Aa,e.__scopeMenu),s=n===o.value;return i.jsx($a,{scope:e.__scopeMenu,checked:s,children:i.jsx(Pt,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":On(s),onSelect:y(r.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});Na.displayName=Aa;var Nn="MenuItemIndicator",[$a,zl]=Ee(Nn,{checked:!1}),Oa=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=zl(Nn,n);return i.jsx(ge,{present:r||ht(s.checked)||s.checked===!0,children:i.jsx(F.span,{...o,ref:t,"data-state":On(s.checked)})})});Oa.displayName=Nn;var Zl="MenuSeparator",Da=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(F.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Da.displayName=Zl;var ql="MenuArrow",ja=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=qe(n);return i.jsx(zr,{...o,...r,ref:t})});ja.displayName=ql;var $n="MenuSub",[Ql,La]=Ee($n),ka=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=be($n,t),u=qe(t),[c,f]=a.useState(null),[p,d]=a.useState(null),l=k(o);return a.useEffect(()=>(s.open===!1&&l(!1),()=>l(!1)),[s.open,l]),i.jsx(St,{...u,children:i.jsx(Ma,{scope:t,open:r,onOpenChange:l,content:p,onContentChange:d,children:i.jsx(Ql,{scope:t,contentId:ee(),triggerId:ee(),trigger:c,onTriggerChange:f,children:n})})})};ka.displayName=$n;var Le="MenuSubTrigger",Fa=a.forwardRef((e,t)=>{const n=be(Le,e.__scopeMenu),r=Qe(Le,e.__scopeMenu),o=La(Le,e.__scopeMenu),s=In(Le,e.__scopeMenu),u=a.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:f}=s,p={__scopeMenu:e.__scopeMenu},d=a.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return a.useEffect(()=>d,[d]),a.useEffect(()=>{const l=c.current;return()=>{window.clearTimeout(l),f(null)}},[c,f]),i.jsx(Pn,{asChild:!0,...p,children:i.jsx(Pa,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Ka(n.open),...e,ref:Mt(t,o.onTriggerChange),onClick:l=>{var m;(m=e.onClick)==null||m.call(e,l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:y(e.onPointerMove,Ke(l=>{s.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(s.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:y(e.onPointerLeave,Ke(l=>{var v,g;d();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const h=(g=n.content)==null?void 0:g.dataset.side,b=h==="right",x=b?-5:5,M=m[b?"left":"right"],w=m[b?"right":"left"];s.onPointerGraceIntentChange({area:[{x:l.clientX+x,y:l.clientY},{x:M,y:m.top},{x:w,y:m.top},{x:w,y:m.bottom},{x:M,y:m.bottom}],side:h}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(l),l.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:y(e.onKeyDown,l=>{var v;const m=s.searchRef.current!=="";e.disabled||m&&l.key===" "||Ol[r.dir].includes(l.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),l.preventDefault())})})})});Fa.displayName=Le;var Ua="MenuSubContent",Ga=a.forwardRef((e,t)=>{const n=Sa(ne,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=be(ne,e.__scopeMenu),u=Qe(ne,e.__scopeMenu),c=La(Ua,e.__scopeMenu),f=a.useRef(null),p=U(t,f);return i.jsx(Ge.Provider,{scope:e.__scopeMenu,children:i.jsx(ge,{present:r||s.open,children:i.jsx(Ge.Slot,{scope:e.__scopeMenu,children:i.jsx(Tn,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:p,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var l;u.isUsingKeyboardRef.current&&((l=f.current)==null||l.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:y(e.onFocusOutside,d=>{d.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:y(e.onEscapeKeyDown,d=>{u.onClose(),d.preventDefault()}),onKeyDown:y(e.onKeyDown,d=>{var v;const l=d.currentTarget.contains(d.target),m=Dl[u.dir].includes(d.key);l&&m&&(s.onOpenChange(!1),(v=c.trigger)==null||v.focus(),d.preventDefault())})})})})})});Ga.displayName=Ua;function Ka(e){return e?"open":"closed"}function ht(e){return e==="indeterminate"}function On(e){return ht(e)?"indeterminate":e?"checked":"unchecked"}function Jl(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ed(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function td(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let u=ed(e,Math.max(s,0));o.length===1&&(u=u.filter(p=>p!==n));const f=u.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function nd(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,u=t.length-1;s<t.length;u=s++){const c=t[s].x,f=t[s].y,p=t[u].x,d=t[u].y;f>r!=d>r&&n<(p-c)*(r-f)/(d-f)+c&&(o=!o)}return o}function rd(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return nd(n,t)}function Ke(e){return t=>t.pointerType==="mouse"?e(t):void 0}var od=wa,ad=Pn,sd=Ea,cd=ya,id=An,ud=Ra,ld=Pt,dd=_a,fd=Ta,pd=Na,md=Oa,hd=Da,vd=ja,gd=ka,Cd=Fa,bd=Ga,Dn="ContextMenu",[xd,Rm]=fn(Dn,[ba]),H=ba(),[Md,Ba]=xd(Dn),Wa=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:s=!0}=e,[u,c]=a.useState(!1),f=H(t),p=k(r),d=a.useCallback(l=>{c(l),p(l)},[p]);return i.jsx(Md,{scope:t,open:u,onOpenChange:d,modal:s,children:i.jsx(od,{...f,dir:o,open:u,onOpenChange:d,modal:s,children:n})})};Wa.displayName=Dn;var Va="ContextMenuTrigger",Ha=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,s=Ba(Va,n),u=H(n),c=a.useRef({x:0,y:0}),f=a.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...c.current})}),p=a.useRef(0),d=a.useCallback(()=>window.clearTimeout(p.current),[]),l=m=>{c.current={x:m.clientX,y:m.clientY},s.onOpenChange(!0)};return a.useEffect(()=>d,[d]),a.useEffect(()=>void(r&&d()),[r,d]),i.jsxs(i.Fragment,{children:[i.jsx(ad,{...u,virtualRef:f}),i.jsx(F.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:y(e.onContextMenu,m=>{d(),l(m),m.preventDefault()}),onPointerDown:r?e.onPointerDown:y(e.onPointerDown,ct(m=>{d(),p.current=window.setTimeout(()=>l(m),700)})),onPointerMove:r?e.onPointerMove:y(e.onPointerMove,ct(d)),onPointerCancel:r?e.onPointerCancel:y(e.onPointerCancel,ct(d)),onPointerUp:r?e.onPointerUp:y(e.onPointerUp,ct(d))})]})});Ha.displayName=Va;var wd="ContextMenuPortal",Ya=e=>{const{__scopeContextMenu:t,...n}=e,r=H(t);return i.jsx(sd,{...r,...n})};Ya.displayName=wd;var Xa="ContextMenuContent",za=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Ba(Xa,n),s=H(n),u=a.useRef(!1);return i.jsx(cd,{...s,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:c=>{var f;(f=e.onCloseAutoFocus)==null||f.call(e,c),!c.defaultPrevented&&u.current&&c.preventDefault(),u.current=!1},onInteractOutside:c=>{var f;(f=e.onInteractOutside)==null||f.call(e,c),!c.defaultPrevented&&!o.modal&&(u.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});za.displayName=Xa;var Sd="ContextMenuGroup",Za=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return i.jsx(id,{...o,...r,ref:t})});Za.displayName=Sd;var Ed="ContextMenuLabel",qa=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return i.jsx(ud,{...o,...r,ref:t})});qa.displayName=Ed;var yd="ContextMenuItem",Qa=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return i.jsx(ld,{...o,...r,ref:t})});Qa.displayName=yd;var Rd="ContextMenuCheckboxItem",Ja=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return i.jsx(dd,{...o,...r,ref:t})});Ja.displayName=Rd;var Pd="ContextMenuRadioGroup",es=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return i.jsx(fd,{...o,...r,ref:t})});es.displayName=Pd;var _d="ContextMenuRadioItem",ts=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return i.jsx(pd,{...o,...r,ref:t})});ts.displayName=_d;var Id="ContextMenuItemIndicator",ns=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return i.jsx(md,{...o,...r,ref:t})});ns.displayName=Id;var Td="ContextMenuSeparator",rs=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return i.jsx(hd,{...o,...r,ref:t})});rs.displayName=Td;var Ad="ContextMenuArrow",Nd=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return i.jsx(vd,{...o,...r,ref:t})});Nd.displayName=Ad;var $d="ContextMenuSub",os=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:s}=e,u=H(t),[c,f]=$e({prop:o,defaultProp:s,onChange:r});return i.jsx(gd,{...u,open:c,onOpenChange:f,children:n})};os.displayName=$d;var Od="ContextMenuSubTrigger",as=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return i.jsx(Cd,{...o,...r,ref:t})});as.displayName=Od;var Dd="ContextMenuSubContent",ss=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return i.jsx(bd,{...o,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});ss.displayName=Dd;function ct(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var cs=Wa,jd=Ha,is=Ya,Ld=za,kd=Za,Fd=qa,Ud=Qa,Gd=Ja,Kd=es,Bd=ts,Wd=ns,Vd=rs,Hd=os,Yd=as,Xd=ss;function us(e,t=[]){let n=[];function r(s,u){const c=a.createContext(u),f=n.length;n=[...n,u];const p=l=>{var x;const{scope:m,children:v,...g}=l,h=((x=m==null?void 0:m[e])==null?void 0:x[f])||c,b=a.useMemo(()=>g,Object.values(g));return i.jsx(h.Provider,{value:b,children:v})};p.displayName=s+"Provider";function d(l,m){var h;const v=((h=m==null?void 0:m[e])==null?void 0:h[f])||c,g=a.useContext(v);if(g)return g;if(u!==void 0)return u;throw new Error(`\`${l}\` must be used within \`${s}\``)}return[p,d]}const o=()=>{const s=n.map(u=>a.createContext(u));return function(c){const f=(c==null?void 0:c[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return o.scopeName=e,[r,zd(o,...t)]}function zd(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const u=r.reduce((c,{useScope:f,scopeName:p})=>{const l=f(s)[`__scope${p}`];return{...c,...l}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var Zd="DismissableLayer",tn="dismissableLayer.update",qd="dismissableLayer.pointerDownOutside",Qd="dismissableLayer.focusOutside",xr,ls=a.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ds=a.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:u,onDismiss:c,...f}=e,p=a.useContext(ls),[d,l]=a.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=a.useState({}),g=U(t,E=>l(E)),h=Array.from(p.layers),[b]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),x=h.indexOf(b),M=d?h.indexOf(d):-1,w=p.layersWithOutsidePointerEventsDisabled.size>0,S=M>=x,R=tf(E=>{const _=E.target,P=[...p.branches].some(N=>N.contains(_));!S||P||(o==null||o(E),u==null||u(E),E.defaultPrevented||c==null||c())},m),I=nf(E=>{const _=E.target;[...p.branches].some(N=>N.contains(_))||(s==null||s(E),u==null||u(E),E.defaultPrevented||c==null||c())},m);return jr(E=>{M===p.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},m),a.useEffect(()=>{if(d)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(xr=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(d)),p.layers.add(d),Mr(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=xr)}},[d,m,n,p]),a.useEffect(()=>()=>{d&&(p.layers.delete(d),p.layersWithOutsidePointerEventsDisabled.delete(d),Mr())},[d,p]),a.useEffect(()=>{const E=()=>v({});return document.addEventListener(tn,E),()=>document.removeEventListener(tn,E)},[]),i.jsx(F.div,{...f,ref:g,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:y(e.onFocusCapture,I.onFocusCapture),onBlurCapture:y(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:y(e.onPointerDownCapture,R.onPointerDownCapture)})});ds.displayName=Zd;var Jd="DismissableLayerBranch",ef=a.forwardRef((e,t)=>{const n=a.useContext(ls),r=a.useRef(null),o=U(t,r);return a.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),i.jsx(F.div,{...e,ref:o})});ef.displayName=Jd;function tf(e,t=globalThis==null?void 0:globalThis.document){const n=k(e),r=a.useRef(!1),o=a.useRef(()=>{});return a.useEffect(()=>{const s=c=>{if(c.target&&!r.current){let f=function(){fs(qd,n,p,{discrete:!0})};const p={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);r.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function nf(e,t=globalThis==null?void 0:globalThis.document){const n=k(e),r=a.useRef(!1);return a.useEffect(()=>{const o=s=>{s.target&&!r.current&&fs(Qd,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Mr(){const e=new CustomEvent(tn);document.dispatchEvent(e)}function fs(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?xt(o,s):o.dispatchEvent(s)}var Ht="focusScope.autoFocusOnMount",Yt="focusScope.autoFocusOnUnmount",wr={bubbles:!1,cancelable:!0},rf="FocusScope",ps=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...u}=e,[c,f]=a.useState(null),p=k(o),d=k(s),l=a.useRef(null),m=U(t,h=>f(h)),v=a.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;a.useEffect(()=>{if(r){let h=function(w){if(v.paused||!c)return;const S=w.target;c.contains(S)?l.current=S:ve(l.current,{select:!0})},b=function(w){if(v.paused||!c)return;const S=w.relatedTarget;S!==null&&(c.contains(S)||ve(l.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const R of w)R.removedNodes.length>0&&ve(c)};document.addEventListener("focusin",h),document.addEventListener("focusout",b);const M=new MutationObserver(x);return c&&M.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",b),M.disconnect()}}},[r,c,v.paused]),a.useEffect(()=>{if(c){Er.add(v);const h=document.activeElement;if(!c.contains(h)){const x=new CustomEvent(Ht,wr);c.addEventListener(Ht,p),c.dispatchEvent(x),x.defaultPrevented||(of(lf(ms(c)),{select:!0}),document.activeElement===h&&ve(c))}return()=>{c.removeEventListener(Ht,p),setTimeout(()=>{const x=new CustomEvent(Yt,wr);c.addEventListener(Yt,d),c.dispatchEvent(x),x.defaultPrevented||ve(h??document.body,{select:!0}),c.removeEventListener(Yt,d),Er.remove(v)},0)}}},[c,p,d,v]);const g=a.useCallback(h=>{if(!n&&!r||v.paused)return;const b=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,x=document.activeElement;if(b&&x){const M=h.currentTarget,[w,S]=af(M);w&&S?!h.shiftKey&&x===S?(h.preventDefault(),n&&ve(w,{select:!0})):h.shiftKey&&x===w&&(h.preventDefault(),n&&ve(S,{select:!0})):x===M&&h.preventDefault()}},[n,r,v.paused]);return i.jsx(F.div,{tabIndex:-1,...u,ref:m,onKeyDown:g})});ps.displayName=rf;function of(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ve(r,{select:t}),document.activeElement!==n)return}function af(e){const t=ms(e),n=Sr(t,e),r=Sr(t.reverse(),e);return[n,r]}function ms(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Sr(e,t){for(const n of e)if(!sf(n,{upTo:t}))return n}function sf(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 cf(e){return e instanceof HTMLInputElement&&"select"in e}function ve(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cf(e)&&t&&e.select()}}var Er=uf();function uf(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=yr(e,t),e.unshift(t)},remove(t){var n;e=yr(e,t),(n=e[0])==null||n.resume()}}}function yr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function lf(e){return e.filter(t=>t.tagName!=="A")}var df="Portal",hs=a.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[o,s]=a.useState(!1);me(()=>s(!0),[]);const u=n||o&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return u?Lr.createPortal(i.jsx(F.div,{...r,ref:t}),u):null});hs.displayName=df;function ff(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var Je=e=>{const{present:t,children:n}=e,r=pf(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),s=U(r.ref,mf(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:s}):null};Je.displayName="Presence";function pf(e){const[t,n]=a.useState(),r=a.useRef({}),o=a.useRef(e),s=a.useRef("none"),u=e?"mounted":"unmounted",[c,f]=ff(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return a.useEffect(()=>{const p=it(r.current);s.current=c==="mounted"?p:"none"},[c]),me(()=>{const p=r.current,d=o.current;if(d!==e){const m=s.current,v=it(p);e?f("MOUNT"):v==="none"||(p==null?void 0:p.display)==="none"?f("UNMOUNT"):f(d&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),me(()=>{if(t){let p;const d=t.ownerDocument.defaultView??window,l=v=>{const h=it(r.current).includes(v.animationName);if(v.target===t&&h&&(f("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",p=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=v=>{v.target===t&&(s.current=it(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{d.clearTimeout(p),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:a.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function it(e){return(e==null?void 0:e.animationName)||"none"}function mf(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vs=a.forwardRef((e,t)=>{const{children:n,...r}=e,o=a.Children.toArray(n),s=o.find(vf);if(s){const u=s.props.children,c=o.map(f=>f===s?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:f);return i.jsx(nn,{...r,ref:t,children:a.isValidElement(u)?a.cloneElement(u,void 0,c):null})}return i.jsx(nn,{...r,ref:t,children:n})});vs.displayName="Slot";var nn=a.forwardRef((e,t)=>{const{children:n,...r}=e;if(a.isValidElement(n)){const o=Cf(n);return a.cloneElement(n,{...gf(r,n.props),ref:t?Mt(t,o):o})}return a.Children.count(n)>1?a.Children.only(null):null});nn.displayName="SlotClone";var hf=({children:e})=>i.jsx(i.Fragment,{children:e});function vf(e){return a.isValidElement(e)&&e.type===hf}function gf(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...c)=>{s(...c),o(...c)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Cf(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var gs=kr(),Xt=function(){},_t=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:Xt,onWheelCapture:Xt,onTouchMoveCapture:Xt}),o=r[0],s=r[1],u=e.forwardProps,c=e.children,f=e.className,p=e.removeScrollBar,d=e.enabled,l=e.shards,m=e.sideCar,v=e.noIsolation,g=e.inert,h=e.allowPinchZoom,b=e.as,x=b===void 0?"div":b,M=e.gapMode,w=Fr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,R=Ur([n,t]),I=J(J({},w),o);return a.createElement(a.Fragment,null,d&&a.createElement(S,{sideCar:gs,removeScrollBar:p,shards:l,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:M}),u?a.cloneElement(a.Children.only(c),J(J({},I),{ref:R})):a.createElement(x,J({},I,{className:f,ref:R}),c))});_t.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};_t.classNames={fullWidth:Gr,zeroRight:Kr};var rn=!1;if(typeof window<"u")try{var ut=Object.defineProperty({},"passive",{get:function(){return rn=!0,!0}});window.addEventListener("test",ut,ut),window.removeEventListener("test",ut,ut)}catch{rn=!1}var Ie=rn?{passive:!1}:!1,bf=function(e){return e.tagName==="TEXTAREA"},Cs=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!bf(e)&&n[t]==="visible")},xf=function(e){return Cs(e,"overflowY")},Mf=function(e){return Cs(e,"overflowX")},Rr=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=bs(e,r);if(o){var s=xs(e,r),u=s[1],c=s[2];if(u>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wf=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Sf=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},bs=function(e,t){return e==="v"?xf(t):Mf(t)},xs=function(e,t){return e==="v"?wf(t):Sf(t)},Ef=function(e,t){return e==="h"&&t==="rtl"?-1:1},yf=function(e,t,n,r,o){var s=Ef(e,window.getComputedStyle(t).direction),u=s*r,c=n.target,f=t.contains(c),p=!1,d=u>0,l=0,m=0;do{var v=xs(e,c),g=v[0],h=v[1],b=v[2],x=h-b-s*g;(g||x)&&bs(e,c)&&(l+=x,m+=g),c instanceof ShadowRoot?c=c.host:c=c.parentNode}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(d&&(o&&Math.abs(l)<1||!o&&u>l)||!d&&(o&&Math.abs(m)<1||!o&&-u>m))&&(p=!0),p},lt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Pr=function(e){return[e.deltaX,e.deltaY]},_r=function(e){return e&&"current"in e?e.current:e},Rf=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pf=function(e){return`
|
|
15
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
16
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
17
|
-
`)},_f=0,Te=[];function If(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(_f++)[0],s=a.useState(Br)[0],u=a.useRef(e);a.useEffect(function(){u.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Wr([e.lockRef.current],(e.shards||[]).map(_r),!0).filter(Boolean);return h.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var c=a.useCallback(function(h,b){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!u.current.allowPinchZoom;var x=lt(h),M=n.current,w="deltaX"in h?h.deltaX:M[0]-x[0],S="deltaY"in h?h.deltaY:M[1]-x[1],R,I=h.target,E=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in h&&E==="h"&&I.type==="range")return!1;var _=Rr(E,I);if(!_)return!0;if(_?R=E:(R=E==="v"?"h":"v",_=Rr(E,I)),!_)return!1;if(!r.current&&"changedTouches"in h&&(w||S)&&(r.current=R),!R)return!0;var P=r.current||R;return yf(P,b,h,P==="h"?w:S,!0)},[]),f=a.useCallback(function(h){var b=h;if(!(!Te.length||Te[Te.length-1]!==s)){var x="deltaY"in b?Pr(b):lt(b),M=t.current.filter(function(R){return R.name===b.type&&(R.target===b.target||b.target===R.shadowParent)&&Rf(R.delta,x)})[0];if(M&&M.should){b.cancelable&&b.preventDefault();return}if(!M){var w=(u.current.shards||[]).map(_r).filter(Boolean).filter(function(R){return R.contains(b.target)}),S=w.length>0?c(b,w[0]):!u.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),p=a.useCallback(function(h,b,x,M){var w={name:h,delta:b,target:x,should:M,shadowParent:Tf(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=a.useCallback(function(h){n.current=lt(h),r.current=void 0},[]),l=a.useCallback(function(h){p(h.type,Pr(h),h.target,c(h,e.lockRef.current))},[]),m=a.useCallback(function(h){p(h.type,lt(h),h.target,c(h,e.lockRef.current))},[]);a.useEffect(function(){return Te.push(s),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:m}),document.addEventListener("wheel",f,Ie),document.addEventListener("touchmove",f,Ie),document.addEventListener("touchstart",d,Ie),function(){Te=Te.filter(function(h){return h!==s}),document.removeEventListener("wheel",f,Ie),document.removeEventListener("touchmove",f,Ie),document.removeEventListener("touchstart",d,Ie)}},[]);var v=e.removeScrollBar,g=e.inert;return a.createElement(a.Fragment,null,g?a.createElement(s,{styles:Pf(o)}):null,v?a.createElement(Vr,{gapMode:e.gapMode}):null)}function Tf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Af=Hr(gs,If);var Ms=a.forwardRef(function(e,t){return a.createElement(_t,J({},e,{ref:t,sideCar:Af}))});Ms.classNames=_t.classNames;const Nf=Ms;var on=["Enter"," "],$f=["ArrowDown","PageUp","Home"],ws=["ArrowUp","PageDown","End"],Of=[...$f,...ws],Df={ltr:[...on,"ArrowRight"],rtl:[...on,"ArrowLeft"]},jf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},et="Menu",[Be,Lf,kf]=dn(et),[ye,Ff]=us(et,[kf,wt,Oe]),tt=wt(),Ss=Oe(),[Es,xe]=ye(et),[Uf,nt]=ye(et),ys=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:u=!0}=e,c=tt(t),[f,p]=a.useState(null),d=a.useRef(!1),l=k(s),m=Ne(o);return a.useEffect(()=>{const v=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),i.jsx(St,{...c,children:i.jsx(Es,{scope:t,open:n,onOpenChange:l,content:f,onContentChange:p,children:i.jsx(Uf,{scope:t,onClose:a.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:d,dir:m,modal:u,children:r})})})};ys.displayName=et;var Gf="MenuAnchor",jn=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=tt(n);return i.jsx(Yr,{...o,...r,ref:t})});jn.displayName=Gf;var Ln="MenuPortal",[Kf,Rs]=ye(Ln,{forceMount:void 0}),Ps=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=xe(Ln,t);return i.jsx(Kf,{scope:t,forceMount:n,children:i.jsx(Je,{present:n||s.open,children:i.jsx(hs,{asChild:!0,container:o,children:r})})})};Ps.displayName=Ln;var re="MenuContent",[Bf,kn]=ye(re),_s=a.forwardRef((e,t)=>{const n=Rs(re,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=xe(re,e.__scopeMenu),u=nt(re,e.__scopeMenu);return i.jsx(Be.Provider,{scope:e.__scopeMenu,children:i.jsx(Je,{present:r||s.open,children:i.jsx(Be.Slot,{scope:e.__scopeMenu,children:u.modal?i.jsx(Wf,{...o,ref:t}):i.jsx(Vf,{...o,ref:t})})})})}),Wf=a.forwardRef((e,t)=>{const n=xe(re,e.__scopeMenu),r=a.useRef(null),o=U(t,r);return a.useEffect(()=>{const s=r.current;if(s)return ln(s)},[]),i.jsx(Fn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:y(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Vf=a.forwardRef((e,t)=>{const n=xe(re,e.__scopeMenu);return i.jsx(Fn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Fn=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:c,onEntryFocus:f,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:m,onDismiss:v,disableOutsideScroll:g,...h}=e,b=xe(re,n),x=nt(re,n),M=tt(n),w=Ss(n),S=Lf(n),[R,I]=a.useState(null),E=a.useRef(null),_=U(t,E,b.onContentChange),P=a.useRef(0),N=a.useRef(""),K=a.useRef(0),W=a.useRef(null),X=a.useRef("right"),Z=a.useRef(0),ue=g?Nf:a.Fragment,z=g?{as:vs,allowPinchZoom:!0}:void 0,le=C=>{var G,ae;const A=N.current+C,$=S().filter(O=>!O.disabled),j=document.activeElement,q=(G=$.find(O=>O.ref.current===j))==null?void 0:G.textValue,Q=$.map(O=>O.textValue),de=rp(Q,A,q),B=(ae=$.find(O=>O.textValue===de))==null?void 0:ae.ref.current;(function O(se){N.current=se,window.clearTimeout(P.current),se!==""&&(P.current=window.setTimeout(()=>O(""),1e3))})(A),B&&setTimeout(()=>B.focus())};a.useEffect(()=>()=>window.clearTimeout(P.current),[]),Dr();const L=a.useCallback(C=>{var $,j;return X.current===(($=W.current)==null?void 0:$.side)&&ap(C,(j=W.current)==null?void 0:j.area)},[]);return i.jsx(Bf,{scope:n,searchRef:N,onItemEnter:a.useCallback(C=>{L(C)&&C.preventDefault()},[L]),onItemLeave:a.useCallback(C=>{var A;L(C)||((A=E.current)==null||A.focus(),I(null))},[L]),onTriggerLeave:a.useCallback(C=>{L(C)&&C.preventDefault()},[L]),pointerGraceTimerRef:K,onPointerGraceIntentChange:a.useCallback(C=>{W.current=C},[]),children:i.jsx(ue,{...z,children:i.jsx(ps,{asChild:!0,trapped:o,onMountAutoFocus:y(s,C=>{var A;C.preventDefault(),(A=E.current)==null||A.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:i.jsx(ds,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:m,onDismiss:v,children:i.jsx(pn,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:I,onEntryFocus:y(f,C=>{x.isUsingKeyboardRef.current||C.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(Xr,{role:"menu","aria-orientation":"vertical","data-state":Vs(b.open),"data-radix-menu-content":"",dir:x.dir,...M,...h,ref:_,style:{outline:"none",...h.style},onKeyDown:y(h.onKeyDown,C=>{const $=C.target.closest("[data-radix-menu-content]")===C.currentTarget,j=C.ctrlKey||C.altKey||C.metaKey,q=C.key.length===1;$&&(C.key==="Tab"&&C.preventDefault(),!j&&q&&le(C.key));const Q=E.current;if(C.target!==Q||!Of.includes(C.key))return;C.preventDefault();const B=S().filter(G=>!G.disabled).map(G=>G.ref.current);ws.includes(C.key)&&B.reverse(),tp(B)}),onBlur:y(e.onBlur,C=>{C.currentTarget.contains(C.target)||(window.clearTimeout(P.current),N.current="")}),onPointerMove:y(e.onPointerMove,We(C=>{const A=C.target,$=Z.current!==C.clientX;if(C.currentTarget.contains(A)&&$){const j=C.clientX>Z.current?"right":"left";X.current=j,Z.current=C.clientX}}))})})})})})})});_s.displayName=re;var Hf="MenuGroup",Un=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(F.div,{role:"group",...r,ref:t})});Un.displayName=Hf;var Yf="MenuLabel",Is=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(F.div,{...r,ref:t})});Is.displayName=Yf;var vt="MenuItem",Ir="menu.itemSelect",It=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=a.useRef(null),u=nt(vt,e.__scopeMenu),c=kn(vt,e.__scopeMenu),f=U(t,s),p=a.useRef(!1),d=()=>{const l=s.current;if(!n&&l){const m=new CustomEvent(Ir,{bubbles:!0,cancelable:!0});l.addEventListener(Ir,v=>r==null?void 0:r(v),{once:!0}),xt(l,m),m.defaultPrevented?p.current=!1:u.onClose()}};return i.jsx(Ts,{...o,ref:f,disabled:n,onClick:y(e.onClick,d),onPointerDown:l=>{var m;(m=e.onPointerDown)==null||m.call(e,l),p.current=!0},onPointerUp:y(e.onPointerUp,l=>{var m;p.current||(m=l.currentTarget)==null||m.click()}),onKeyDown:y(e.onKeyDown,l=>{const m=c.searchRef.current!=="";n||m&&l.key===" "||on.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});It.displayName=vt;var Ts=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,u=kn(vt,n),c=Ss(n),f=a.useRef(null),p=U(t,f),[d,l]=a.useState(!1),[m,v]=a.useState("");return a.useEffect(()=>{const g=f.current;g&&v((g.textContent??"").trim())},[s.children]),i.jsx(Be.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:i.jsx(mn,{asChild:!0,...c,focusable:!r,children:i.jsx(F.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:p,onPointerMove:y(e.onPointerMove,We(g=>{r?u.onItemLeave(g):(u.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:y(e.onPointerLeave,We(g=>u.onItemLeave(g))),onFocus:y(e.onFocus,()=>l(!0)),onBlur:y(e.onBlur,()=>l(!1))})})})}),Xf="MenuCheckboxItem",As=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return i.jsx(js,{scope:e.__scopeMenu,checked:n,children:i.jsx(It,{role:"menuitemcheckbox","aria-checked":gt(n)?"mixed":n,...o,ref:t,"data-state":Bn(n),onSelect:y(o.onSelect,()=>r==null?void 0:r(gt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});As.displayName=Xf;var Ns="MenuRadioGroup",[zf,Zf]=ye(Ns,{value:void 0,onValueChange:()=>{}}),$s=a.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=k(r);return i.jsx(zf,{scope:e.__scopeMenu,value:n,onValueChange:s,children:i.jsx(Un,{...o,ref:t})})});$s.displayName=Ns;var Os="MenuRadioItem",Ds=a.forwardRef((e,t)=>{const{value:n,...r}=e,o=Zf(Os,e.__scopeMenu),s=n===o.value;return i.jsx(js,{scope:e.__scopeMenu,checked:s,children:i.jsx(It,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Bn(s),onSelect:y(r.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});Ds.displayName=Os;var Gn="MenuItemIndicator",[js,qf]=ye(Gn,{checked:!1}),Ls=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=qf(Gn,n);return i.jsx(Je,{present:r||gt(s.checked)||s.checked===!0,children:i.jsx(F.span,{...o,ref:t,"data-state":Bn(s.checked)})})});Ls.displayName=Gn;var Qf="MenuSeparator",ks=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(F.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});ks.displayName=Qf;var Jf="MenuArrow",Fs=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=tt(n);return i.jsx(zr,{...o,...r,ref:t})});Fs.displayName=Jf;var Kn="MenuSub",[ep,Us]=ye(Kn),Gs=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=xe(Kn,t),u=tt(t),[c,f]=a.useState(null),[p,d]=a.useState(null),l=k(o);return a.useEffect(()=>(s.open===!1&&l(!1),()=>l(!1)),[s.open,l]),i.jsx(St,{...u,children:i.jsx(Es,{scope:t,open:r,onOpenChange:l,content:p,onContentChange:d,children:i.jsx(ep,{scope:t,contentId:ee(),triggerId:ee(),trigger:c,onTriggerChange:f,children:n})})})};Gs.displayName=Kn;var ke="MenuSubTrigger",Ks=a.forwardRef((e,t)=>{const n=xe(ke,e.__scopeMenu),r=nt(ke,e.__scopeMenu),o=Us(ke,e.__scopeMenu),s=kn(ke,e.__scopeMenu),u=a.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:f}=s,p={__scopeMenu:e.__scopeMenu},d=a.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return a.useEffect(()=>d,[d]),a.useEffect(()=>{const l=c.current;return()=>{window.clearTimeout(l),f(null)}},[c,f]),i.jsx(jn,{asChild:!0,...p,children:i.jsx(Ts,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Vs(n.open),...e,ref:Mt(t,o.onTriggerChange),onClick:l=>{var m;(m=e.onClick)==null||m.call(e,l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:y(e.onPointerMove,We(l=>{s.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(s.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:y(e.onPointerLeave,We(l=>{var v,g;d();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const h=(g=n.content)==null?void 0:g.dataset.side,b=h==="right",x=b?-5:5,M=m[b?"left":"right"],w=m[b?"right":"left"];s.onPointerGraceIntentChange({area:[{x:l.clientX+x,y:l.clientY},{x:M,y:m.top},{x:w,y:m.top},{x:w,y:m.bottom},{x:M,y:m.bottom}],side:h}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(l),l.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:y(e.onKeyDown,l=>{var v;const m=s.searchRef.current!=="";e.disabled||m&&l.key===" "||Df[r.dir].includes(l.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),l.preventDefault())})})})});Ks.displayName=ke;var Bs="MenuSubContent",Ws=a.forwardRef((e,t)=>{const n=Rs(re,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=xe(re,e.__scopeMenu),u=nt(re,e.__scopeMenu),c=Us(Bs,e.__scopeMenu),f=a.useRef(null),p=U(t,f);return i.jsx(Be.Provider,{scope:e.__scopeMenu,children:i.jsx(Je,{present:r||s.open,children:i.jsx(Be.Slot,{scope:e.__scopeMenu,children:i.jsx(Fn,{id:c.contentId,"aria-labelledby":c.triggerId,...o,ref:p,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var l;u.isUsingKeyboardRef.current&&((l=f.current)==null||l.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:y(e.onFocusOutside,d=>{d.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:y(e.onEscapeKeyDown,d=>{u.onClose(),d.preventDefault()}),onKeyDown:y(e.onKeyDown,d=>{var v;const l=d.currentTarget.contains(d.target),m=jf[u.dir].includes(d.key);l&&m&&(s.onOpenChange(!1),(v=c.trigger)==null||v.focus(),d.preventDefault())})})})})})});Ws.displayName=Bs;function Vs(e){return e?"open":"closed"}function gt(e){return e==="indeterminate"}function Bn(e){return gt(e)?"indeterminate":e?"checked":"unchecked"}function tp(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function np(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function rp(e,t,n){const o=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let u=np(e,Math.max(s,0));o.length===1&&(u=u.filter(p=>p!==n));const f=u.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return f!==n?f:void 0}function op(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,u=t.length-1;s<t.length;u=s++){const c=t[s].x,f=t[s].y,p=t[u].x,d=t[u].y;f>r!=d>r&&n<(p-c)*(r-f)/(d-f)+c&&(o=!o)}return o}function ap(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return op(n,t)}function We(e){return t=>t.pointerType==="mouse"?e(t):void 0}var sp=ys,cp=jn,ip=Ps,up=_s,lp=Un,dp=Is,fp=It,pp=As,mp=$s,hp=Ds,vp=Ls,gp=ks,Cp=Fs,bp=Gs,xp=Ks,Mp=Ws,Tt="Menubar",[an,wp,Sp]=dn(Tt),[Hs,Pm]=us(Tt,[Sp,Oe]),Y=Ff(),Ys=Oe(),[Ep,Wn]=Hs(Tt),Xs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,value:r,onValueChange:o,defaultValue:s,loop:u=!0,dir:c,...f}=e,p=Ne(c),d=Ys(n),[l="",m]=$e({prop:r,onChange:o,defaultProp:s}),[v,g]=a.useState(null);return i.jsx(Ep,{scope:n,value:l,onMenuOpen:a.useCallback(h=>{m(h),g(h)},[m]),onMenuClose:a.useCallback(()=>m(""),[m]),onMenuToggle:a.useCallback(h=>{m(b=>b?"":h),g(h)},[m]),dir:p,loop:u,children:i.jsx(an.Provider,{scope:n,children:i.jsx(an.Slot,{scope:n,children:i.jsx(pn,{asChild:!0,...d,orientation:"horizontal",loop:u,dir:p,currentTabStopId:v,onCurrentTabStopIdChange:g,children:i.jsx(F.div,{role:"menubar",...f,ref:t})})})})})});Xs.displayName=Tt;var Vn="MenubarMenu",[yp,zs]=Hs(Vn),Zs=e=>{const{__scopeMenubar:t,value:n,...r}=e,o=ee(),s=n||o||"LEGACY_REACT_AUTO_VALUE",u=Wn(Vn,t),c=Y(t),f=a.useRef(null),p=a.useRef(!1),d=u.value===s;return a.useEffect(()=>{d||(p.current=!1)},[d]),i.jsx(yp,{scope:t,value:s,triggerId:ee(),triggerRef:f,contentId:ee(),wasKeyboardTriggerOpenRef:p,children:i.jsx(sp,{...c,open:d,onOpenChange:l=>{l||u.onMenuClose()},modal:!1,dir:u.dir,...r})})};Zs.displayName=Vn;var sn="MenubarTrigger",qs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,disabled:r=!1,...o}=e,s=Ys(n),u=Y(n),c=Wn(sn,n),f=zs(sn,n),p=a.useRef(null),d=U(t,p,f.triggerRef),[l,m]=a.useState(!1),v=c.value===f.value;return i.jsx(an.ItemSlot,{scope:n,value:f.value,disabled:r,children:i.jsx(mn,{asChild:!0,...s,focusable:!r,tabStopId:f.value,children:i.jsx(cp,{asChild:!0,...u,children:i.jsx(F.button,{type:"button",role:"menuitem",id:f.triggerId,"aria-haspopup":"menu","aria-expanded":v,"aria-controls":v?f.contentId:void 0,"data-highlighted":l?"":void 0,"data-state":v?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:d,onPointerDown:y(e.onPointerDown,g=>{!r&&g.button===0&&g.ctrlKey===!1&&(c.onMenuOpen(f.value),v||g.preventDefault())}),onPointerEnter:y(e.onPointerEnter,()=>{var h;!!c.value&&!v&&(c.onMenuOpen(f.value),(h=p.current)==null||h.focus())}),onKeyDown:y(e.onKeyDown,g=>{r||(["Enter"," "].includes(g.key)&&c.onMenuToggle(f.value),g.key==="ArrowDown"&&c.onMenuOpen(f.value),["Enter"," ","ArrowDown"].includes(g.key)&&(f.wasKeyboardTriggerOpenRef.current=!0,g.preventDefault()))}),onFocus:y(e.onFocus,()=>m(!0)),onBlur:y(e.onBlur,()=>m(!1))})})})})});qs.displayName=sn;var Rp="MenubarPortal",Qs=e=>{const{__scopeMenubar:t,...n}=e,r=Y(t);return i.jsx(ip,{...r,...n})};Qs.displayName=Rp;var cn="MenubarContent",Js=a.forwardRef((e,t)=>{const{__scopeMenubar:n,align:r="start",...o}=e,s=Y(n),u=Wn(cn,n),c=zs(cn,n),f=wp(n),p=a.useRef(!1);return i.jsx(up,{id:c.contentId,"aria-labelledby":c.triggerId,"data-radix-menubar-content":"",...s,...o,ref:t,align:r,onCloseAutoFocus:y(e.onCloseAutoFocus,d=>{var m;!!!u.value&&!p.current&&((m=c.triggerRef.current)==null||m.focus()),p.current=!1,d.preventDefault()}),onFocusOutside:y(e.onFocusOutside,d=>{const l=d.target;f().some(v=>{var g;return(g=v.ref.current)==null?void 0:g.contains(l)})&&d.preventDefault()}),onInteractOutside:y(e.onInteractOutside,()=>{p.current=!0}),onEntryFocus:d=>{c.wasKeyboardTriggerOpenRef.current||d.preventDefault()},onKeyDown:y(e.onKeyDown,d=>{if(["ArrowRight","ArrowLeft"].includes(d.key)){const l=d.target,m=l.hasAttribute("data-radix-menubar-subtrigger"),v=l.closest("[data-radix-menubar-content]")!==d.currentTarget,h=(u.dir==="rtl"?"ArrowRight":"ArrowLeft")===d.key;if(!h&&m||v&&h)return;let M=f().filter(R=>!R.disabled).map(R=>R.value);h&&M.reverse();const w=M.indexOf(c.value);M=u.loop?Up(M,w+1):M.slice(w+1);const[S]=M;S&&u.onMenuOpen(S)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});Js.displayName=cn;var Pp="MenubarGroup",ec=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return i.jsx(lp,{...o,...r,ref:t})});ec.displayName=Pp;var _p="MenubarLabel",tc=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return i.jsx(dp,{...o,...r,ref:t})});tc.displayName=_p;var Ip="MenubarItem",nc=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return i.jsx(fp,{...o,...r,ref:t})});nc.displayName=Ip;var Tp="MenubarCheckboxItem",rc=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return i.jsx(pp,{...o,...r,ref:t})});rc.displayName=Tp;var Ap="MenubarRadioGroup",oc=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return i.jsx(mp,{...o,...r,ref:t})});oc.displayName=Ap;var Np="MenubarRadioItem",ac=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return i.jsx(hp,{...o,...r,ref:t})});ac.displayName=Np;var $p="MenubarItemIndicator",sc=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return i.jsx(vp,{...o,...r,ref:t})});sc.displayName=$p;var Op="MenubarSeparator",cc=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return i.jsx(gp,{...o,...r,ref:t})});cc.displayName=Op;var Dp="MenubarArrow",jp=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return i.jsx(Cp,{...o,...r,ref:t})});jp.displayName=Dp;var Lp="MenubarSub",ic=e=>{const{__scopeMenubar:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,u=Y(t),[c=!1,f]=$e({prop:r,defaultProp:s,onChange:o});return i.jsx(bp,{...u,open:c,onOpenChange:f,children:n})};ic.displayName=Lp;var kp="MenubarSubTrigger",uc=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return i.jsx(xp,{"data-radix-menubar-subtrigger":"",...o,...r,ref:t})});uc.displayName=kp;var Fp="MenubarSubContent",lc=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return i.jsx(Mp,{...o,"data-radix-menubar-content":"",...r,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});lc.displayName=Fp;function Up(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var dc=Xs,Gp=Zs,fc=qs,pc=Qs,Kp=Js,Bp=ec,Wp=tc,Vp=nc,Hp=rc,Yp=oc,Xp=ac,zp=sc,Zp=cc,qp=ic,Qp=uc,Jp=lc;function em(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var Hn="ScrollArea",[mc,_m]=fn(Hn),[tm,oe]=mc(Hn),hc=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...u}=e,[c,f]=a.useState(null),[p,d]=a.useState(null),[l,m]=a.useState(null),[v,g]=a.useState(null),[h,b]=a.useState(null),[x,M]=a.useState(0),[w,S]=a.useState(0),[R,I]=a.useState(!1),[E,_]=a.useState(!1),P=U(t,K=>f(K)),N=Ne(o);return i.jsx(tm,{scope:n,type:r,dir:N,scrollHideDelay:s,scrollArea:c,viewport:p,onViewportChange:d,content:l,onContentChange:m,scrollbarX:v,onScrollbarXChange:g,scrollbarXEnabled:R,onScrollbarXEnabledChange:I,scrollbarY:h,onScrollbarYChange:b,scrollbarYEnabled:E,onScrollbarYEnabledChange:_,onCornerWidthChange:M,onCornerHeightChange:S,children:i.jsx(F.div,{dir:N,...u,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});hc.displayName=Hn;var vc="ScrollAreaViewport",gc=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,u=oe(vc,n),c=a.useRef(null),f=U(t,c,u.onViewportChange);return i.jsxs(i.Fragment,{children:[i.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),i.jsx(F.div,{"data-radix-scroll-area-viewport":"",...s,ref:f,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:i.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});gc.displayName=vc;var fe="ScrollAreaScrollbar",Cc=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oe(fe,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:u}=o,c=e.orientation==="horizontal";return a.useEffect(()=>(c?s(!0):u(!0),()=>{c?s(!1):u(!1)}),[c,s,u]),o.type==="hover"?i.jsx(nm,{...r,ref:t,forceMount:n}):o.type==="scroll"?i.jsx(rm,{...r,ref:t,forceMount:n}):o.type==="auto"?i.jsx(bc,{...r,ref:t,forceMount:n}):o.type==="always"?i.jsx(Yn,{...r,ref:t}):null});Cc.displayName=fe;var nm=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oe(fe,e.__scopeScrollArea),[s,u]=a.useState(!1);return a.useEffect(()=>{const c=o.scrollArea;let f=0;if(c){const p=()=>{window.clearTimeout(f),u(!0)},d=()=>{f=window.setTimeout(()=>u(!1),o.scrollHideDelay)};return c.addEventListener("pointerenter",p),c.addEventListener("pointerleave",d),()=>{window.clearTimeout(f),c.removeEventListener("pointerenter",p),c.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),i.jsx(ge,{present:n||s,children:i.jsx(bc,{"data-state":s?"visible":"hidden",...r,ref:t})})}),rm=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oe(fe,e.__scopeScrollArea),s=e.orientation==="horizontal",u=Nt(()=>f("SCROLL_END"),100),[c,f]=em("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return a.useEffect(()=>{if(c==="idle"){const p=window.setTimeout(()=>f("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(p)}},[c,o.scrollHideDelay,f]),a.useEffect(()=>{const p=o.viewport,d=s?"scrollLeft":"scrollTop";if(p){let l=p[d];const m=()=>{const v=p[d];l!==v&&(f("SCROLL"),u()),l=v};return p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[o.viewport,s,f,u]),i.jsx(ge,{present:n||c!=="hidden",children:i.jsx(Yn,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:y(e.onPointerEnter,()=>f("POINTER_ENTER")),onPointerLeave:y(e.onPointerLeave,()=>f("POINTER_LEAVE"))})})}),bc=a.forwardRef((e,t)=>{const n=oe(fe,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,u]=a.useState(!1),c=e.orientation==="horizontal",f=Nt(()=>{if(n.viewport){const p=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;u(c?p:d)}},10);return Ae(n.viewport,f),Ae(n.content,f),i.jsx(ge,{present:r||s,children:i.jsx(Yn,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Yn=a.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=oe(fe,e.__scopeScrollArea),s=a.useRef(null),u=a.useRef(0),[c,f]=a.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=Ec(c.viewport,c.content),d={...r,sizes:c,onSizesChange:f,hasThumb:p>0&&p<1,onThumbChange:m=>s.current=m,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:m=>u.current=m};function l(m,v){return um(m,u.current,c,v)}return n==="horizontal"?i.jsx(om,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const m=o.viewport.scrollLeft,v=Tr(m,c,o.dir);s.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollLeft=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollLeft=l(m,o.dir))}}):n==="vertical"?i.jsx(am,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const m=o.viewport.scrollTop,v=Tr(m,c);s.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:m=>{o.viewport&&(o.viewport.scrollTop=m)},onDragScroll:m=>{o.viewport&&(o.viewport.scrollTop=l(m))}}):null}),om=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=oe(fe,e.__scopeScrollArea),[u,c]=a.useState(),f=a.useRef(null),p=U(t,f,s.onScrollbarXChange);return a.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),i.jsx(Mc,{"data-orientation":"horizontal",...o,ref:p,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":At(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,l)=>{if(s.viewport){const m=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),Rc(m,l)&&d.preventDefault()}},onResize:()=>{f.current&&s.viewport&&u&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:f.current.clientWidth,paddingStart:bt(u.paddingLeft),paddingEnd:bt(u.paddingRight)}})}})}),am=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=oe(fe,e.__scopeScrollArea),[u,c]=a.useState(),f=a.useRef(null),p=U(t,f,s.onScrollbarYChange);return a.useEffect(()=>{f.current&&c(getComputedStyle(f.current))},[f]),i.jsx(Mc,{"data-orientation":"vertical",...o,ref:p,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":At(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,l)=>{if(s.viewport){const m=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),Rc(m,l)&&d.preventDefault()}},onResize:()=>{f.current&&s.viewport&&u&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:f.current.clientHeight,paddingStart:bt(u.paddingTop),paddingEnd:bt(u.paddingBottom)}})}})}),[sm,xc]=mc(fe),Mc=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:u,onThumbPointerDown:c,onThumbPositionChange:f,onDragScroll:p,onWheelScroll:d,onResize:l,...m}=e,v=oe(fe,n),[g,h]=a.useState(null),b=U(t,P=>h(P)),x=a.useRef(null),M=a.useRef(""),w=v.viewport,S=r.content-r.viewport,R=k(d),I=k(f),E=Nt(l,10);function _(P){if(x.current){const N=P.clientX-x.current.left,K=P.clientY-x.current.top;p({x:N,y:K})}}return a.useEffect(()=>{const P=N=>{const K=N.target;(g==null?void 0:g.contains(K))&&R(N,S)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[w,g,S,R]),a.useEffect(I,[r,I]),Ae(g,E),Ae(v.content,E),i.jsx(sm,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:k(s),onThumbPointerUp:k(u),onThumbPositionChange:I,onThumbPointerDown:k(c),children:i.jsx(F.div,{...m,ref:b,style:{position:"absolute",...m.style},onPointerDown:y(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),x.current=g.getBoundingClientRect(),M.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),_(P))}),onPointerMove:y(e.onPointerMove,_),onPointerUp:y(e.onPointerUp,P=>{const N=P.target;N.hasPointerCapture(P.pointerId)&&N.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=M.current,v.viewport&&(v.viewport.style.scrollBehavior=""),x.current=null})})})}),Ct="ScrollAreaThumb",wc=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=xc(Ct,e.__scopeScrollArea);return i.jsx(ge,{present:n||o.hasThumb,children:i.jsx(cm,{ref:t,...r})})}),cm=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=oe(Ct,n),u=xc(Ct,n),{onThumbPositionChange:c}=u,f=U(t,l=>u.onThumbChange(l)),p=a.useRef(),d=Nt(()=>{p.current&&(p.current(),p.current=void 0)},100);return a.useEffect(()=>{const l=s.viewport;if(l){const m=()=>{if(d(),!p.current){const v=lm(l,c);p.current=v,c()}};return c(),l.addEventListener("scroll",m),()=>l.removeEventListener("scroll",m)}},[s.viewport,d,c]),i.jsx(F.div,{"data-state":u.hasThumb?"visible":"hidden",...o,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:y(e.onPointerDownCapture,l=>{const v=l.target.getBoundingClientRect(),g=l.clientX-v.left,h=l.clientY-v.top;u.onThumbPointerDown({x:g,y:h})}),onPointerUp:y(e.onPointerUp,u.onThumbPointerUp)})});wc.displayName=Ct;var Xn="ScrollAreaCorner",Sc=a.forwardRef((e,t)=>{const n=oe(Xn,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?i.jsx(im,{...e,ref:t}):null});Sc.displayName=Xn;var im=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=oe(Xn,n),[s,u]=a.useState(0),[c,f]=a.useState(0),p=!!(s&&c);return Ae(o.scrollbarX,()=>{var l;const d=((l=o.scrollbarX)==null?void 0:l.offsetHeight)||0;o.onCornerHeightChange(d),f(d)}),Ae(o.scrollbarY,()=>{var l;const d=((l=o.scrollbarY)==null?void 0:l.offsetWidth)||0;o.onCornerWidthChange(d),u(d)}),p?i.jsx(F.div,{...r,ref:t,style:{width:s,height:c,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function bt(e){return e?parseInt(e,10):0}function Ec(e,t){const n=e/t;return isNaN(n)?0:n}function At(e){const t=Ec(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function um(e,t,n,r="ltr"){const o=At(n),s=o/2,u=t||s,c=o-u,f=n.scrollbar.paddingStart+u,p=n.scrollbar.size-n.scrollbar.paddingEnd-c,d=n.content-n.viewport,l=r==="ltr"?[0,d]:[d*-1,0];return yc([f,p],l)(e)}function Tr(e,t,n="ltr"){const r=At(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,u=t.content-t.viewport,c=s-r,f=n==="ltr"?[0,u]:[u*-1,0],p=Yc(e,f);return yc([0,u],[0,c])(p)}function yc(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Rc(e,t){return e>0&&e<t}var lm=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},u=n.left!==s.left,c=n.top!==s.top;(u||c)&&t(),n=s,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Nt(e,t){const n=k(e),r=a.useRef(0);return a.useEffect(()=>()=>window.clearTimeout(r.current),[]),a.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ae(e,t){const n=k(t);me(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var dm=hc,fm=gc,pm=Cc,mm=wc,hm=Sc;const vm=T(dm,{position:"relative",width:"100%",overflow:"hidden",maxHeight:"inherit",variants:{fullHeight:{true:{height:"100%"}}},defaultVariants:{fullHeight:!0}}),gm=T(fm,{width:"100%",height:"100%",maxHeight:"inherit",borderRadius:"inherit","& > div[style]":{display:"block !important"},variants:{asContainer:{true:{padding:"$1"}}}}),un=4,Ar=T(pm,{display:"flex",userSelect:"none",touchAction:"none",margin:"$0_5",background:"$scrollbarTrack",'&[data-orientation="vertical"]':{width:un},'&[data-orientation="horizontal"]':{flexDirection:"column",height:un},variants:{subtle:{true:{padding:"$0_5 0 $0_5 $0_5",margin:0,background:"transparent","&:hover":{background:"$scrollbarTrackHover"}}}},defaultVariants:{subtle:!0}}),Nr=T(mm,{flex:1,background:"$scrollbarThumb",borderRadius:un,position:"relative","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:8,minHeight:8}}),Cm=T(hm,{backgroundColor:"$scrollbarTrackHover"});function zn(e){const{fullHeight:t,subtle:n,css:r,asContainer:o,...s}=e;return i.jsxs(vm,{fullHeight:t,children:[i.jsx(gm,{css:r,asContainer:o,...s}),i.jsx(Ar,{orientation:"horizontal",subtle:n,children:i.jsx(Nr,{})}),i.jsx(Ar,{orientation:"vertical",subtle:n,children:i.jsx(Nr,{})}),i.jsx(Cm,{})]})}const Zn=T("span",{display:"flex",alignItems:"center","& > svg":{marginRight:"$1_5",width:"$4",height:"$4"}}),bm={context:{Root:cs,Group:kd,Sub:Hd,Portal:is,RadioGroup:T(Kd,$t),MenuLabel:T(Fd,Ot),MenuItem:T(Ud,Dt),Content:T(Ld,Re,nr),SubContent:T(Xd,Re,nr),SubMenuItem:T(Yd,jt),Separator:T(Vd,Lt),CheckboxItem:T(Gd,kt),RadioItem:T(Bd,Ft),ItemIndicator:T(Wd,Ut)},dropdown:{Root:oa,Group:Gu,RadioGroup:T(Vu,$t),Sub:zu,Portal:aa,MenuLabel:T(Ku,Ot),MenuItem:T(Bu,Dt),Content:T(Uu,Re,rr),SubContent:T(qu,Re,rr),SubMenuItem:T(Zu,jt),Separator:T(Xu,Lt),CheckboxItem:T(Wu,kt),RadioItem:T(Hu,Ft),ItemIndicator:T(Yu,Ut)},menubar:{Root:dc,Group:Bp,RadioGroup:T(Yp,$t),Sub:qp,Portal:pc,MenuLabel:T(Wp,Ot),MenuItem:T(Vp,Dt),Content:T(Kp,Re),SubContent:T(Jp,Re),SubMenuItem:T(Qp,jt),Separator:T(Zp,Lt),CheckboxItem:T(Hp,kt),RadioItem:T(Xp,Ft),ItemIndicator:T(zp,Ut)}};function Me(){const e=a.useContext(we),t=bm[e.type];if(!t)throw new Error(`Cannot resolve Primitive Component by type ${e.type}`);return t}const we=a.createContext({type:"dropdown",size:"sm"});we.displayName="MenuContext";const qn=function(t){return i.jsx(we.Provider,{value:{type:t.type,size:t.size},children:t.children})},Im=a.forwardRef(function(t,n){const{icon:r,name:o,shortcuts:s,label:u,disabled:c,onSelect:f,onClick:p,asChild:d,critical:l,children:m,...v}=t,{size:g}=a.useContext(we),{MenuItem:h}=Me();return i.jsx(h,{ref:n,disabled:c,onSelect:f,onClick:p,size:g,critical:l,asChild:d,...v,children:a.isValidElement(m)?m:i.jsxs(a.Fragment,{children:[i.jsxs(Zn,{children:[r,o]}),i.jsx(ai,{shortcuts:s})]})})}),Qn=a.forwardRef(function(t,n){const{Content:r}=Me(),{size:o}=a.useContext(we);return i.jsx(r,{size:o,ref:n,...t})});function Tm(e){const{name:t,icon:n,disabled:r,children:o}=e,{size:s}=a.useContext(we),{SubMenuItem:u,SubContent:c,Sub:f,Portal:p}=Me();return i.jsxs(f,{children:[i.jsxs(u,{size:s,disabled:r,children:[i.jsxs(Zn,{children:[n,t]}),i.jsx(Xc,{size:"12px"})]}),i.jsx(p,{children:i.jsx(c,{children:i.jsx(zn,{type:"always",subtle:!1,asContainer:!0,children:o})})})]})}function Am(e){const{Group:t,MenuLabel:n}=Me(),{label:r,divider:o,children:s,...u}=e,c=typeof o=="boolean"&&o?"bottom":o,f=c==="top"||c==="both",p=c==="bottom"||c==="both";return i.jsxs(pe.Fragment,{children:[f&&i.jsx($r,{}),i.jsxs(t,{...u,children:[r&&i.jsx(n,{children:r}),s]}),p&&i.jsx($r,{})]})}function Nm(e){const{name:t,icon:n,...r}=e,{size:o}=a.useContext(we),{CheckboxItem:s,ItemIndicator:u}=Me();return i.jsxs(s,{...r,size:o,children:[i.jsx(u,{children:i.jsx(zc,{})}),i.jsxs(Zn,{children:[n,t]})]})}const xm=T("div",{height:"$1",width:"$1",borderRadius:"$round",backgroundColor:"currentColor"});function Mm(e){const{value:t,onSelect:n,name:r}=e,{RadioItem:o,ItemIndicator:s}=Me();return i.jsxs(o,{value:t,onSelect:n,children:[i.jsx(s,{children:i.jsx(xm,{})}),r]})}function $m(e){const{items:t,label:n,...r}=e,{RadioGroup:o,MenuLabel:s}=Me(),{size:u}=a.useContext(we);return i.jsxs(o,{...r,size:u,children:[n&&i.jsx(s,{children:n}),t.map((c,f)=>i.jsx(Mm,{...c},f))]})}function $r(){const{Separator:e}=Me();return i.jsx(e,{})}function Om(e){const{children:t,portal:n=!0,size:r="sm",side:o,sideOffset:s=4,align:u="start",alignOffset:c,disabled:f=!1,...p}=e;let d=a.Fragment,l;n&&(d=aa,typeof n=="object"&&(l=n));const m=d===a.Fragment?{}:{container:l};return i.jsx(qn,{type:"dropdown",size:r,children:i.jsxs(oa,{modal:!1,...p,children:[i.jsx(Fu,{disabled:f,asChild:!0,children:e.trigger}),i.jsx(d,{...m,children:i.jsx(Qn,{side:o,sideOffset:s,align:u,alignOffset:c,children:i.jsx(zn,{type:"always",subtle:!1,asContainer:!0,children:t})})})]})})}function Dm(e){const{trigger:t,size:n="sm",children:r,onOpenChange:o,onPointerDownOutside:s,portal:u=!0,asChild:c,disabled:f=!1,hidden:p}=e;let d=a.Fragment,l;return u&&(d=is,typeof u=="object"&&(l=u)),i.jsx(qn,{type:"context",size:n,children:i.jsxs(cs,{onOpenChange:o,children:[i.jsx(jd,{disabled:f,asChild:c,children:t}),i.jsx(d,{container:l,children:i.jsx(Qn,{hidden:p,onPointerDownOutside:s,children:i.jsx(zn,{type:"always",subtle:!1,asContainer:!0,children:r})})})]})})}const wm=T(fc,{all:"unset",display:"flex",height:"$6",alignItems:"center",padding:"0 $2",fontSize:"$sm",outline:"none",cursor:"default",userSelect:"none",borderRadius:"$2","&:hover":{backgroundColor:"$grayA4",color:"$gray12"},"&:focus":{backgroundColor:"$grayA4",color:"$gray12"},"&[data-state=open]":{backgroundColor:"$grayA4",color:"$gray12"}}),Pc=pe.forwardRef((e,t)=>i.jsx(wm,{ref:t,...e}));Pc.displayName=fc.displayName;function jm(e){const{name:t}=e;return i.jsxs(Gp,{children:[i.jsx(Pc,{children:t}),i.jsx(pc,{children:i.jsx(Qn,{align:"start",alignOffset:-4,sideOffset:4,children:e.children})})]})}const Sm=T(dc,{display:"flex",height:"100%",alignItems:"center",padding:"0 $2",flexWrap:"nowrap"});function Lm(e){const{size:t="sm"}=e;return i.jsx(qn,{type:"menubar",size:t,children:i.jsx(Sm,{children:e.children})})}export{Dm as C,Om as D,sr as K,Im as M,Tm as S,Qc as a,Jc as b,ei as c,ai as d,Lm as e,jm as f,$r as g,Nm as h,$m as i,Am as j,zn as k};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var E=Object.defineProperty;var U=(n,e,t)=>e in n?E(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var _=(n,e,t)=>(U(n,typeof e!="symbol"?e+"":e,t),t);import{bN as v,bO as g,bw as T,a4 as i,bP as u,av as c,aN as b,y as f,bQ as p,j as x,n as C,e as V,q as N}from"./index-c3dec278.js";import"./index-cdbb2f4d.js";import"./postmen-2853c0e6.js";import{F as d}from"./index-05b76766.js";import{M as m}from"./MeshThumbnail-07ffa076.js";import{A as M}from"./AssetViewer-3847c058.js";import{e as A}from"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";class O{static createMesh(e,t){const s=new v(e);return O.setMeshData(s,t),s}static setMeshData(e,t){var s,r;return e.setPositions([...t.positions]),e.setNormals(t.normals),e.setUVs(t.uvs),t.uv1&&e.setUVs(t.uv1,1),t.uv2&&e.setUVs(t.uv2,2),t.uv3&&e.setUVs(t.uv3,3),t.uv4&&e.setUVs(t.uv4,4),t.uv5&&e.setUVs(t.uv5,5),t.uv6&&e.setUVs(t.uv6,6),t.uv7&&e.setUVs(t.uv7,7),t.bounds?(e.bounds.min.copyFrom(t.bounds.min),e.bounds.max.copyFrom(t.bounds.max)):O.calculateBounds(t.positions,e.bounds),(s=t.blendShapes)==null||s.forEach(o=>{const l=new g(o.name);o.frames.forEach(a=>{l.addFrame(a.weight,a.positions,a.normals,a.uvs)}),e.addBlendShape(l)}),(r=t.subMeshes)==null||r.forEach(o=>{e.addSubMesh(o)}),t.indices&&(t.positions.length<=65535?e.setIndices(new Uint16Array(t.indices)):e.setIndices(new Uint32Array(t.indices))),e.uploadData(!1),e}static calculateBounds(e,t){const{min:s,max:r}=t,o=e.length;s.set(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r.set(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);for(let l=0;l<o;l++){const a=e[l];s.x=Math.min(a.x,s.x),s.y=Math.min(a.y,s.y),s.z=Math.min(a.z,s.z),r.x=Math.max(a.x,r.x),r.y=Math.max(a.y,r.y),r.z=Math.max(a.z,r.z)}}}class R extends T{constructor(e,t){super(e),this.meshData=t}restoreContent(){O.setMeshData(this.resource,this.meshData)}}var y=(n=>(n.POSITION="Position",n.NORMAL="Normal",n.COLOR_0="Color",n.TANGENT="Tangent",n.WEIGHTS_0="BoneWeight",n.JOINTS_0="BoneIndex",n.TEXCOORD_0="UV",n.TEXCOORD_1="UV1",n.TEXCOORD_2="UV2",n.TEXCOORD_3="UV3",n.TEXCOORD_4="UV4",n.TEXCOORD_5="UV5",n.TEXCOORD_6="UV6",n.TEXCOORD_7="UV7",n))(y||{});const X=["POSITION","NORMAL","COLOR_0","TANGENT","WEIGHTS_0","JOINTS_0","TEXCOORD_0","TEXCOORD_1","TEXCOORD_2","TEXCOORD_3","TEXCOORD_4","TEXCOORD_5","TEXCOORD_6","TEXCOORD_7"],L={[i.Float]:"4 bytes",[i.Vector2]:"8 bytes",[i.Vector3]:"12 bytes",[i.Vector4]:"16 bytes",[i.Byte4]:"4 bytes",[i.UByte4]:"4 bytes",[i.NormalizedByte4]:"4 bytes",[i.NormalizedUByte4]:"4 bytes",[i.NormalizedShort2]:"4 bytes",[i.NormalizedShort4]:"8 bytes",[i.Short2]:"4 bytes",[i.UShort2]:"4 bytes",[i.NormalizedUShort2]:"4 bytes",[i.Short4]:"8 bytes",[i.UShort4]:"8 bytes",[i.NormalizedUShort4]:"8 bytes"};u.Triangles+"",u.TriangleStrip+"",u.TriangleFan+"",u.LineLoop+"",u.LineStrip+"",u.Lines+"",u.Points+"";function w(n){switch(n.topology){case u.Triangles:return`${n.count/3} triangles`;case u.TriangleFan:case u.TriangleStrip:return`${n.count-2} triangles`;case u.Lines:return`${n.count/2} lines`;case u.LineStrip:return`${n.count-1} lines`;case u.LineLoop:return`${n.count} lines`;case u.Points:return`${n.count} points`}}function I(n){if(n instanceof Uint8Array)return"Uint8";if(n instanceof Uint16Array)return"Uint16";if(n instanceof Uint32Array)return"Uint32"}const S=n=>{const e=n.asset.engineObject,t=e.vertexCount,s=e.getIndices(),r=e.subMeshes;return c.jsxs(c.Fragment,{children:[c.jsx(b,{title:`Vertices: ${t}`,defaultOpen:!0,children:X.map(o=>e.vertexElements.find(l=>l.semantic===o)).filter(o=>o!=null).map(o=>c.jsx(d,{label:y[o.attribute],value:`${i[o.format]} (${L[o.format]})`},o.attribute))}),s?c.jsx(b,{title:`Indices: ${s.length}`,defaultOpen:!0,children:c.jsx(d,{label:"Format",value:I(s)})}):null,c.jsx(b,{title:`SubMesh: ${r.length}`,defaultOpen:!0,children:r.map((o,l)=>c.jsx(d,{label:`# ${l}`,value:w(o)},l))})]})};class j extends M{setViewAsset(e,t){const s=t.createChild("mesh_entity"),r=s.addComponent(f);r.mesh=e.engineObject;const o=new p(e.engine);o.baseColor.set(.5,.5,.5,1),r.setMaterial(o),this._entity=s}}var B=Object.defineProperty,F=Object.getOwnPropertyDescriptor,z=(n,e,t,s)=>{for(var r=s>1?void 0:s?F(e,t):e,o=n.length-1,l;o>=0;o--)(l=n[o])&&(r=(s?l(e,t,r):l(r))||r);return s&&r&&B(e,t,r),r};let h=class extends x{constructor(e){super(e);_(this,"meshData",null)}beforeDelete(){return null}afterDelete(){return null}async initByMain(e){const{engine:t}=this,s=JSON.parse(await e.text());this.meshData=s;const r=new v(t);O.setMeshData(r,s),t.resourceManager.addContentRestorer(new R(r,s)),this.bindEngineObject(r),this._releaseMeshCache()}initByEngineObject(e){this.bindEngineObject(e),this._name=e.name,this.meshData={positions:[],subMeshes:[]}}_releaseMeshCache(){const e=this.engineObject;e._verticesUint8=null,e._indices=null,e._verticesFloat32=null,e._positions=null,e._tangents=null,e._normals=null,e._colors=null,e._uv=null,e._uv1=null,e._uv2=null,e._uv3=null,e._uv4=null,e._uv5=null,e._uv6=null,e._uv7=null}};h=z([C({type:"Mesh",label:V("asset.mesh.title"),icon:{},loaderType:"Mesh",extname:"mesh",customInspector:S,viewer:j,thumbnail:m,dragLayer:N.Mesh,async bundle({content:n}){const e=JSON.parse(await n.text()),t=A(e,{type:"Mesh",name:"mesh"});return{content:new Blob([t])}}})],h);export{h as MeshAsset};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
var ea=Object.defineProperty;var ta=(a,e,t)=>e in a?ea(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var S=(a,e,t)=>(ta(a,typeof e!="symbol"?e+"":e,t),t);import{bB as Ie,b8 as Ee,av as l,aw as ae,b7 as we,cb as ve,bT as lt,bU as je,cc as ie,ca as le,eW as me,aJ as Z,aM as F,aO as aa,aK as q,bm as ze,cm as ee,bk as ct,fa as Ce,fb as de,bA as ra,bX as sa,bI as L,fc as oa,bD as Vt,fd as na,fe as ia,ff as la,fg as ca,fh as pa,fi as $,aH as ua,fj as ma,aI as It,aL as Ct,fk as da,fl as ha,fm as he,dr as fa,c8 as Te,c9 as _e,c5 as ge,ce as Ot,b3 as Et,cf as wt,f7 as ya,E as ba,C as R,fn as W,fo as K,fp as be,bl as va,e as m,x as J,f as V,aE as ga,p as C,s as O}from"./index-c3dec278.js";import{u as At}from"./index-cdbb2f4d.js";import{c as xa}from"./Component-0f881fc1.js";import"./postmen-2853c0e6.js";import{c as Sa}from"./createOnModelChange-370b83da.js";import{R as Pa}from"./ReferencedMaterial-d11151b5.js";import"./TextureAsset-a7ff39b1.js";import"./GlTFAsset-5970e707.js";import"./MaterialAsset-5353c4cb.js";import{MeshAsset as Ma}from"./MeshAsset-c2bf60c5.js";import"./AnimatorControllerAsset-2716497a.js";import"./AnimationClipAsset-d7b37af0.js";import{I as za}from"./ShaderChunkAsset-e43dde8a.js";import"./AmbientLightAsset-be9e872c.js";import"./SpineSkeletonDataAsset-43b731f1.js";import"./FontAsset-d34b5378.js";import"./SceneAsset-08752701.js";import"./ShaderAsset-a9d667f5.js";import"./PrimitiveMesh-075dda8a.js";import"./XRReferenceImageAsset-96f516ba.js";import"./PrefabAsset-59743dbb.js";import"./PhysicsMaterialAsset-a2f73b5c.js";import"./RenderTargetAsset-b3cd1c49.js";import"./AudioAsset-c28f33ab.js";import"./index-da16047f.js";import"./MarkdownAsset-b2a3fad5.js";import{I as Ca}from"./IconPlus-def01e2b.js";import{B as rt}from"./index-dd0763bf.js";import{c as Oa}from"./createReactComponent-58d9f0dd.js";import"./MaterialInspector-8d466d59.js";import"./IconPointFilled-62d3c3b2.js";import"./ktx2-encoder-db93524f.js";import"./TaskQueue-05c94a4d.js";import"./ktx-parse.modern-6c9f771f.js";import"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import"./Tooltip-b5be390f.js";import"./AssetViewer-3847c058.js";import"./glTFIO-45ff9a17.js";import"./shader-data-utils-f0e4f5a3.js";import"./index-05b76766.js";import"./MeshThumbnail-07ffa076.js";import"./bundlers-9b0d37fc.js";import"./module-ec094ef6.js";import"./module-ada3dced.js";import"./ShaderUIScriptAsset-e1cd0b8b.js";import"./FormItemArray-b8cda1d2.js";import"./Accordion-2cd014f1.js";import"./module-de7ee724.js";import"./Menu-c8e6194b.js";/**
|
|
2
|
-
* @license @tabler/icons-react v3.24.0 - MIT
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/var kt=Ie("outline","ease-in","IconEaseIn",[["path",{d:"M3 20c8 0 18 -16 18 -16",key:"svg-0"}]]);/**
|
|
7
|
-
* @license @tabler/icons-react v3.24.0 - MIT
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var Dt=Ie("outline","equal","IconEqual",[["path",{d:"M5 10h14",key:"svg-0"}],["path",{d:"M5 14h14",key:"svg-1"}]]);/**
|
|
12
|
-
* @license @tabler/icons-react v3.24.0 - MIT
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the MIT license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/var Bt=Ie("outline","plus-minus","IconPlusMinus",[["path",{d:"M4 7h6",key:"svg-0"}],["path",{d:"M7 4v6",key:"svg-1"}],["path",{d:"M20 18h-6",key:"svg-2"}],["path",{d:"M5 19l14 -14",key:"svg-3"}]]);/**
|
|
17
|
-
* @license @tabler/icons-react v3.24.0 - MIT
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the MIT license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/var Ft=Ie("outline","vector-bezier-2","IconVectorBezier2",[["path",{d:"M3 3m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-0"}],["path",{d:"M17 17m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z",key:"svg-1"}],["path",{d:"M7 5l7 0",key:"svg-2"}],["path",{d:"M10 19l7 0",key:"svg-3"}],["path",{d:"M9 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-4"}],["path",{d:"M15 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-5"}],["path",{d:"M7 5.5a5 6.5 0 0 1 5 6.5a5 6.5 0 0 0 5 6.5",key:"svg-6"}]]);const jt=[{type:"constant",icon:l.jsx(Dt,{size:"14px"}),columns:"1fr 32px"},{type:"gradient",icon:l.jsx(kt,{size:"14px"}),columns:"1fr 32px"},{type:"two-constant",icon:l.jsx(Bt,{size:"14px"}),columns:"repeat(2, minmax(0, 12fr)) 32px"},{type:"two-gradient",icon:l.jsx(Ft,{size:"14px"}),columns:"repeat(2, minmax(0, 12fr)) 32px"}];function Ea(a){return a.map(e=>{const{type:t,value:r}=e;return t==="constant"?{type:t,label:e.label,value:ie(r)}:t==="two-constant"?{type:t,label:e.label,value:[ie(r[0]),ie(r[1])]}:t==="gradient"?{type:t,label:e.label,value:{color:r.color.map(s=>({value:ie(s.value),time:s.position})),alpha:r.alpha.map(s=>({value:s.value.a,time:s.position}))}}:t==="two-gradient"?{type:t,label:e.label,value:[{color:r[0].color.map(s=>({value:ie(s.value),time:s.position})),alpha:r[0].alpha.map(s=>({value:s.value.a,time:s.position}))},{color:r[1].color.map(s=>({value:ie(s.value),time:s.position})),alpha:r[1].alpha.map(s=>({value:s.value.a,time:s.position}))}]}:e})}function wa(a){return a.map(e=>{const{type:t,value:r}=e;return t==="constant"?{type:t,label:e.label,value:le(r)}:t==="two-constant"?{type:t,label:e.label,value:[le(r[0]),le(r[1])]}:t==="gradient"?{type:t,label:e.label,value:{color:r.color.map(s=>({value:le(s.value),position:s.time})),alpha:r.alpha.map(s=>({value:{r:255,g:255,b:255,a:s.value},position:s.time}))}}:t==="two-gradient"?{type:t,label:e.label,value:[{color:r[0].color.map(s=>({value:le(s.value),position:s.time})),alpha:r[0].alpha.map(s=>({value:{r:255,g:255,b:255,a:s.value},position:s.time}))},{color:r[1].color.map(s=>({value:le(s.value),position:s.time})),alpha:r[1].alpha.map(s=>({value:{r:255,g:255,b:255,a:s.value},position:s.time}))}]}:e})}function st({hdr:a,value:e,onValueChange:t,...r}){return a?l.jsx(ve,{...r,mode:"hdr",value:e,onValueChange:t}):l.jsx(ve,{...r,mode:"constant",value:e,onValueChange:t})}function Yt(a){var u;const{label:e,labelFirst:t,info:r,value:s,hdr:c=!1}=a,[o,n]=Ee({prop:wa(s),onChange:i=>{a.onValueChange&&a.onValueChange(Ea(i),d)}}),[d,b]=Ee({prop:a.type,defaultProp:"constant",onChange:i=>{a.onValueChange&&a.onValueChange(s,i)}});function v(i,g){var y;return g==="trigger"?(y=jt.find(M=>M.type===i))==null?void 0:y.icon:i}const p=i=>{n(g=>g.map(y=>y.type!==d?y:{...y,value:i}))},z=i=>g=>{n(y=>y.map(M=>{if(M.type!==d)return M;const{value:j}=M;if(M.type==="two-constant"){if(i===0)return{...M,value:[g,j[1]]};if(i===1)return{...M,value:[j[0],g]}}return M}))},h=i=>{n(g=>g.map(y=>y.type!==d?y:y.type==="gradient"?{...y,value:i}:y))},f=i=>g=>{n(y=>y.map(M=>{if(M.type!==d)return M;if(M.type==="two-gradient"){const{value:j}=M;if(i===0)return{...M,value:[g,j[1]]};if(i===1)return{...M,value:[j[0],g]}}return M}))};return l.jsxs(ae,{label:e,info:r,fieldCss:{gridTemplateColumns:(u=jt.find(i=>i.type===d))==null?void 0:u.columns},children:[o.map(i=>{const{type:g,value:y}=i;if(!g||d!==g)return null;switch(g){case"constant":return l.jsx(st,{fullsize:!0,hdr:c,value:y,onValueChange:p},"constant");case"gradient":return l.jsx(ve,{fullsize:!0,mode:"particle",value:y,onValueChange:h},"gradient");case"two-constant":return l.jsxs(we.Fragment,{children:[l.jsx(st,{fullsize:!0,hdr:c,value:y[0],onValueChange:z(0)}),l.jsx(st,{fullsize:!0,hdr:c,value:y[1],onValueChange:z(1)})]},"two-constant");case"two-gradient":return l.jsxs(we.Fragment,{children:[l.jsx(ve,{fullsize:!0,mode:"particle",value:y[0],onValueChange:f(0)}),l.jsx(ve,{fullsize:!0,mode:"particle",value:y[1],onValueChange:f(1)})]},"two-gradient");default:return null}}),l.jsx(lt,{defaultValue:"constant",position:"item-aligned",cornerArrow:!0,value:d,valueRenderer:v,onValueChange:i=>b(i),children:o.map(i=>l.jsx(je,{value:i.type,children:i.label||i.type},i.type))})]})}const Zt=[{type:"constant",icon:l.jsx(Dt,{size:"14px"}),columns:"minmax(0, 12fr) 32px"},{type:"curve",icon:l.jsx(kt,{size:"14px"}),columns:"minmax(0, 12fr) 32px"},{type:"two-constant",icon:l.jsx(Bt,{size:"14px"}),columns:"repeat(2, minmax(0, 12fr)) 32px"},{type:"two-curve",icon:l.jsx(Ft,{size:"14px"}),columns:"repeat(2, minmax(0, 12fr)) 32px"}];function ja(a,e){var t;return e==="trigger"?(t=Zt.find(r=>r.type===a))==null?void 0:t.icon:a}const ot=[{x:0,y:0},{x:.25,y:.25},{x:.75,y:.75},{x:1,y:1}];function Le(a){var _;const{label:e,info:t,value:r,onValueChange:s,algo:c="bezier",yRangeMode:o,yTickScale:n,yTickScaleMin:d,yTickScaleMax:b,onYTickScaleChange:v,onYTickScaleCommit:p,hideTypeSelector:z,...h}=a,[f,u]=Ee({prop:a.type,defaultProp:"constant",onChange:E=>{s&&s(r,E)}}),[i,g]=Ee({prop:r,onChange:E=>{s&&s(E,f)},defaultProp:[{value:0,type:"constant"},{value:ot,type:"curve"},{value:[0,0],type:"two-constant"},{value:[ot,ot],type:"two-curve"}]}),y=E=>{g(I=>I.map(T=>T.type!==f?T:{...T,value:E}))},M=E=>I=>{g(T=>T.map(A=>{if(A.type!==f)return A;const{value:X}=A;return E===0?{...A,value:[I,X[1]]}:E===1?{...A,value:[X[0],I]}:A}))},j=E=>{g(I=>I.map(T=>T.type!==f?T:{...T,value:E}))},w=E=>I=>{g(T=>T.map(A=>{if(A.type!==f)return A;const{value:X}=A;return E===0?{...A,value:[I,X[1]]}:E===1?{...A,value:[X[0],I]}:A}))},B={algo:c,yRangeMode:o,yTickScale:n,yTickScaleMin:d,yTickScaleMax:b,onYTickScaleChange:v,onYTickScaleCommit:p};return l.jsxs(ae,{label:e,info:t,fieldCss:{gridTemplateColumns:(_=Zt.find(E=>E.type===f))==null?void 0:_.columns,columnGap:"$1"},...h,children:[i.map(E=>{const{type:I,value:T,min:A,max:X,step:U}=E;if(!I||f!==I)return null;switch(I){case"constant":return l.jsx(me,{min:A,max:X,dragStep:U,step:U,value:T,onValueChange:y},"constant");case"curve":return l.jsx(rt,{...B,value:T,onChange:j},"curve");case"two-constant":return l.jsxs(we.Fragment,{children:[l.jsx(me,{size:"sm",startSlot:"min",value:T[0],min:A,max:X,dragStep:U,step:U,onValueChange:M(0)}),l.jsx(me,{size:"sm",startSlot:"max",value:T[1],min:A,max:X,dragStep:U,step:U,onValueChange:M(1)})]},"two-constant");case"two-curve":return l.jsxs(we.Fragment,{children:[l.jsx(rt,{...B,value:T[0],onChange:w(0)}),l.jsx(rt,{...B,value:T[1],onChange:w(1)})]},"two-curve");default:return null}}),!z&&l.jsx(lt,{value:f,position:"item-aligned",cornerArrow:!0,valueRenderer:ja,onValueChange:E=>u(E),children:i.map(E=>l.jsx(je,{value:E.type,children:E.label||E.type},E.type))})]})}/**
|
|
22
|
-
* @license @tabler/icons-react v3.24.0 - MIT
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var Ta=Oa("outline","equal","IconEqual",[["path",{d:"M5 10h14",key:"svg-0"}],["path",{d:"M5 14h14",key:"svg-1"}]]);const _a=Z(function(a){const[e,t]=F.useState(null),r=a.data,{assetStore:s,inspectorFacade:c}=At();return F.useEffect(()=>{s.getAssetByRef(r.material).then(o=>{t(o)})},[r.material]),l.jsxs(l.Fragment,{children:[l.jsx(aa.List,{model:r,configs:r.formSchema.items,onModelChange:Sa("component",r.id,c,r)}),e&&l.jsx(Pa,{materialAsset:e})]})});async function La(a,e){await a.assetStore.getAssetByRef(e)}var k=(a=>(a.BoxShape="BoxShape",a.CircleShape="CircleShape",a.ConeShape="ConeShape",a.HemisphereShape="HemisphereShape",a.SphereShape="SphereShape",a.MeshShape="MeshShape",a))(k||{});function Y(a,e){return{class:a.class,props:{...a.props,...e}}}const Ra=Z(({item:a,onModelChange:e})=>{const{t}=q();return l.jsx(l.Fragment,{children:l.jsx(ze,{label:t("effects.shape.size"),value:{x:a.props.size.x,y:a.props.size.y,z:a.props.size.z},onChange:(r,s)=>{const c=Y(a,{size:{...a.props.size,[s]:r[s]}});e==null||e("shape",c)}})})}),Va=Z(({item:a,onModelChange:e})=>{const{t}=q();return l.jsxs(l.Fragment,{children:[l.jsx(ee,{label:t("effects.shape.radius"),min:1e-4,step:.05,dragStep:.05,value:a.props.radius,onChange:r=>{const s=Y(a,{radius:r});e==null||e("shape",s)}}),l.jsx(ee,{label:t("effects.shape.arc"),min:0,max:360,value:a.props.arc,onChange:r=>{const s=Y(a,{arc:r});e==null||e("shape",s)}}),l.jsx(ct,{label:t("effects.shape.arc-mode.label"),options:[{label:t("effects.shape.loop"),value:Ce.Loop},{label:t("effects.shape.random"),value:Ce.Random}],value:a.props.arcMode,onChange:r=>{const s=Y(a,{arcMode:r});e==null||e("shape",s)}}),a.props.arcMode===Ce.Loop?l.jsx(ee,{label:t("effects.shape.arc-speed.label"),step:.1,dragStep:.1,value:a.props.arcSpeed,onChange:r=>{const s=Y(a,{arcSpeed:r});e==null||e("shape",s)}}):null]})}),Ia=Z(({item:a,onModelChange:e})=>{const{t}=q();return l.jsxs(l.Fragment,{children:[l.jsx(ct,{label:t("effects.shape.emit-type.label"),options:[{label:t("effects.shape.cone-base"),value:de.Base},{label:t("effects.shape.volume"),value:de.Volume}],value:a.props.emitType,onChange:r=>{const s=Y(a,{emitType:r});e==null||e("shape",s)}}),l.jsx(ee,{label:t("effects.shape.angle"),min:1e-4,max:90,step:.05,dragStep:.05,value:a.props.angle,onChange:r=>{const s=Y(a,{angle:r});e==null||e("shape",s)}}),l.jsx(ee,{label:t("effects.shape.radius"),min:1e-4,step:.05,dragStep:.05,value:a.props.radius,onChange:r=>{const s=Y(a,{radius:r});e==null||e("shape",s)}}),l.jsx(ee,{label:t("effects.shape.length"),min:1e-4,step:.1,dragStep:.1,value:a.props.length,disabled:a.props.emitType===de.Base,onChange:r=>{const s=Y(a,{length:r});e==null||e("shape",s)}})]})}),Aa=Z(({item:a,onModelChange:e})=>{const{t}=q();return l.jsx(l.Fragment,{children:l.jsx(ee,{label:t("effects.shape.radius"),min:1e-4,step:.05,dragStep:.05,value:a.props.radius,onChange:r=>{const s=Y(a,{radius:r});e==null||e("shape",s)}})})}),ka=Z(({item:a,onModelChange:e})=>{const{t}=q();return l.jsx(l.Fragment,{children:l.jsx(ee,{label:t("effects.shape.radius"),min:1e-4,step:.05,dragStep:.05,value:a.props.radius,onChange:r=>{const s=Y(a,{radius:r});e==null||e("shape",s)}})})}),Da=Z(({item:a,onModelChange:e})=>{const{t}=q(),{assetStore:r}=At(),s=Object.values(r.assets).filter(n=>n instanceof Ma),[c,o]=F.useState("");return F.useEffect(()=>{let n=!1;return(async()=>{if(!a.props.mesh){o("");return}try{const b=await r.getAssetByRef(a.props.mesh);n||o((b==null?void 0:b.name)??"")}catch{n||o("")}})(),()=>{n=!0}},[r,a.props.mesh]),l.jsx(ra,{label:t("effects.renderer.render-mode.options.mesh"),assets:s,dropLayer:0,value:c,onSelect:async n=>{o(n.name);const d=!!n.engineObject;d||sa.error("Mesh asset is not initialized");const b={class:a.class,props:{...a.props,mesh:n.getCurrentRef(),enabled:d}};e==null||e("shape",b)}})}),Ba=Z(({item:a,onModelChange:e})=>{const{t}=q();return l.jsx(ee,{label:t("effects.shape.random-direction-amount"),info:t("effects.shape.random-direction-amount-tip"),min:0,step:1,dragStep:.05,value:a.props.randomDirectionAmount||0,onChange:r=>{const s=Y(a,{randomDirectionAmount:r});e==null||e("shape",s)}})}),Fa=Z(({item:a,onModelChange:e})=>{const{t}=q(),r=a.props.position??{x:0,y:0,z:0},s=a.props.rotation??{x:0,y:0,z:0},c=a.props.scale??{x:1,y:1,z:1};return l.jsxs(l.Fragment,{children:[l.jsx(ze,{label:t("effects.shape.position"),value:{x:r.x,y:r.y,z:r.z},onChange:(o,n)=>{const d=Y(a,{position:{x:r.x,y:r.y,z:r.z,[n]:o[n]},rotation:{x:s.x,y:s.y,z:s.z},scale:{x:c.x,y:c.y,z:c.z}});e==null||e("shape",d)}}),l.jsx(ze,{label:t("effects.shape.rotation"),value:{x:s.x,y:s.y,z:s.z},onChange:(o,n)=>{const d=Y(a,{position:{x:r.x,y:r.y,z:r.z},rotation:{x:s.x,y:s.y,z:s.z,[n]:o[n]},scale:{x:c.x,y:c.y,z:c.z}});e==null||e("shape",d)}}),l.jsx(ze,{label:t("effects.shape.scale"),value:{x:c.x,y:c.y,z:c.z},onChange:(o,n)=>{const d=Y(a,{position:{x:r.x,y:r.y,z:r.z},rotation:{x:s.x,y:s.y,z:s.z},scale:{x:c.x,y:c.y,z:c.z,[n]:o[n]}});e==null||e("shape",d)}})]})}),it=new Map;function Ya(a,e){let t;switch(e.class){case k.BoxShape:{t=new pa;const r=t.size;r.copyFrom(e.props.size),t.size=r;break}case k.CircleShape:{t=new ca,t.radius=e.props.radius,t.arc=e.props.arc,t.arcMode=e.props.arcMode,t.arcSpeed=e.props.arcSpeed;break}case k.ConeShape:{t=new la,t.angle=e.props.angle,t.radius=e.props.radius,t.length=e.props.length,t.emitType=e.props.emitType;break}case k.HemisphereShape:{t=new ia,t.radius=e.props.radius;break}case k.SphereShape:{t=new na,t.radius=e.props.radius;break}case k.MeshShape:{t=new oa;const r=e.props.mesh;if(r!=null&&r.refId){const s=a.root.assetStore.assets[r.refId];t.mesh=s==null?void 0:s.engineObject}t.mesh||(t.mesh=Vt.createSphere(a.engineObject.engine));break}}if(t){if(e.props.randomDirectionAmount=e.props.randomDirectionAmount??0,t.randomDirectionAmount=e.props.randomDirectionAmount,t.enabled=e.props.enabled,e.props.position){const r=e.props.position;t.position.set(r.x,r.y,r.z)}if(e.props.rotation){const r=e.props.rotation;t.rotation.set(r.x,r.y,r.z)}if(e.props.scale){const r=e.props.scale;t.scale.set(r.x,r.y,r.z)}}return t}const Za=(a,e,t)=>{let r=it.get(`${a.id}-${t.class}`);r&&(r=JSON.parse(r),it.delete(`${a.id}-${t.class}`),Object.assign(t.props,r));const s=Ya(a,t);s&&a.applyEmissionShape(s)},Xa={BoxShape:Ra,CircleShape:Va,ConeShape:Ia,HemisphereShape:Aa,SphereShape:ka,MeshShape:Da},$a={BoxShape:{class:k.BoxShape,props:{size:{x:1,y:1,z:1},randomDirectionAmount:0,enabled:!0,position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}}},CircleShape:{class:k.CircleShape,props:{radius:1,arc:360,arcMode:Ce.Random,arcSpeed:1,randomDirectionAmount:0,enabled:!0,position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}}},ConeShape:{class:k.ConeShape,props:{angle:25,radius:1,length:5,emitType:de.Base,randomDirectionAmount:0,enabled:!0,position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}}},HemisphereShape:{class:k.HemisphereShape,props:{radius:1,randomDirectionAmount:0,enabled:!0,position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}}},SphereShape:{class:k.SphereShape,props:{radius:1,randomDirectionAmount:0,enabled:!0,position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}}},MeshShape:{class:k.MeshShape,props:{randomDirectionAmount:0,enabled:!0,mesh:void 0,position:{x:0,y:0,z:0},rotation:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}}}},qa=Z(({model:a,onModelChange:e})=>{const{t}=q(),r=a.shape;if(!r.class)return;const s=Xa[r.class];return l.jsxs(l.Fragment,{children:[l.jsx(ct,{label:t("effects.shape.type.label"),info:t("effects.shape.type.info"),value:r.class,options:[{label:t("effects.shape.options.box"),value:k.BoxShape},{label:t("effects.shape.options.circle"),value:k.CircleShape},{label:t("effects.shape.options.cone"),value:k.ConeShape},{label:t("effects.shape.options.hemisphere"),value:k.HemisphereShape},{label:t("effects.shape.options.sphere"),value:k.SphereShape},{label:t("effects.shape.options.mesh"),value:k.MeshShape}],onChange:c=>{const o=$a[c];if(a.shape&&a.shape.class!==c&&it.set(`${a.id}-${a.shape.class}`,JSON.stringify(a.shape.props)),o.class!==r.class){const n=L(o);e==null||e("shape",n)}}}),l.jsx(s,{item:r,component:a.engineObject,onModelChange:e}),l.jsx(Ba,{item:r,component:a.engineObject,onModelChange:e}),l.jsx(Fa,{item:r,component:a.engineObject,onModelChange:e})]})}),pt=["constant","two-constant","curve","two-curve"],te=[{x:0,y:0},{x:.25,y:.25},{x:.75,y:.75},{x:1,y:1}];function Re(a){return a.map(e=>({x:e.constructParams[0],y:e.constructParams[1]}))}const Tt={class:"ParticleCurve",constructParams:[{class:"CurveKey",constructParams:[0,0]},{class:"CurveKey",constructParams:[.25,.25]},{class:"CurveKey",constructParams:[.75,.75]},{class:"CurveKey",constructParams:[1,1]}]};function D(a,e=0,t=0,r=$.Constant){return{module:a,mode:r,constantMin:t,constantMax:e,curveMax:L(Tt),curveMin:L(Tt)}}function ce(a,e=0,t=0,r=$.Constant){return{enabled:!1,x:D(a,e,t,r),y:D(a,e,t,r),z:D(a,e,t,r)}}const Ka=a=>a===1/0?1/0:Math.max(1,Math.floor(a));function Na(a){if(!(a!=null&&a.constructParams))return;const e=a.constructParams[2];e===null?a.constructParams[2]=1/0:typeof e=="number"&&e!==1/0&&(a.constructParams[2]=Math.max(1,Math.floor(e)))}const Ve=1,ut=.01,Ga=ua("div",{height:"$6",display:"flex",alignItems:"center",paddingLeft:"$2",fontSize:"$sm",borderRadius:"$1",backgroundColor:"$softBg",color:"$gray9",userSelect:"none"}),Ha=l.jsx(Ta,{size:"14px"});function Wa(a,e){return e==="trigger"?Ha:a}const Ua={class:"Burst",constructParams:[0,{class:"ParticleCompositeCurve",constructParams:[15],props:{mode:$.Constant,constantMax:15,constantMin:0}},Ve,ut]},Ja=Z(({model:a,inspectorConfig:e,onModelChange:t})=>{const{t:r}=q(),{label:s,info:c}=e,o=a.bursts,[n,d]=F.useState(-1),b=u=>{const i=L(o);u(i),t==null||t("bursts",i)},v=(u,i)=>{b(g=>{const y=g[u];y&&i(y)})},p=u=>{b(i=>{i.splice(u,1)})},z=()=>{b(u=>{u.push(L(Ua))})},h=[{title:r("effects.burst.time.label")},{title:r("effects.burst.count.label")},{title:r("effects.burst.cycles.label")},{title:r("effects.burst.interval.label")}],f=(u,i)=>{const g=Math.max(1,u.constructParams[1].props.constantMax??0,u.constructParams[1].props.constantMin??0);return{data:u,cells:[l.jsx(ae,{children:l.jsx(me,{min:0,max:a.duration,step:.05,dragStep:.05,value:u.constructParams[0],onValueChange:y=>{v(i,M=>{M.constructParams[0]=y})}})},`time-${i}`),l.jsx(Le,{type:pt[u.constructParams[1].props.mode],direction:"column",algo:"bezier",yRangeMode:"positive",yTickScale:g,yTickScaleMin:0,yTickScaleMax:g,onYTickScaleChange:()=>{},onYTickScaleCommit:()=>{},value:[{value:u.constructParams[1].props.constantMax,type:"constant",min:0,step:1},{value:[u.constructParams[1].props.constantMin,u.constructParams[1].props.constantMax],type:"two-constant",min:0,step:1}],onValueChange:(y,M)=>{const j=y.find(w=>w.type===M);j&&v(i,w=>{switch(M){case"constant":{w.constructParams[1].props.mode=$.Constant,w.constructParams[1].props.constantMax=j.value;break}case"two-constant":{w.constructParams[1].props.mode=$.TwoConstants,w.constructParams[1].props.constantMin=j.value[0],w.constructParams[1].props.constantMax=j.value[1];break}}})}},`count-${i}`),l.jsxs(ae,{fieldCss:{gridTemplateColumns:"minmax(0, 1fr) 32px",columnGap:"$1"},children:[u.constructParams[2]===1/0?l.jsx(Ga,{children:"∞"}):l.jsx(me,{min:1,step:1,dragStep:1,value:u.constructParams[2]??Ve,onValueChange:y=>{v(i,M=>{M.constructParams[2]=Ka(y)})}}),l.jsxs(lt,{value:u.constructParams[2]===1/0?"infinity":"number",position:"item-aligned",cornerArrow:!0,valueRenderer:Wa,onValueChange:y=>{v(i,M=>{M.constructParams[2]=y==="infinity"?1/0:Ve})},children:[l.jsx(je,{value:"number",children:r("effects.burst.cycles.number")}),l.jsx(je,{value:"infinity",children:r("effects.burst.cycles.infinity")})]})]},`cycles-${i}`),l.jsx(ae,{children:l.jsx(me,{disabled:!u.constructParams[2]||u.constructParams[2]===1,min:.01,step:.01,dragStep:.01,value:u.constructParams[3]??ut,onValueChange:y=>{v(i,M=>{M.constructParams[3]=y})}})},`interval-${i}`)]}};return l.jsx(ma,{columns:h,items:o.map((u,i)=>f(u,i)),label:r(s),info:r(c),addable:!1,emptyText:r("effects.burst.empty","No bursts"),selectedIndex:n,onRowClick:d,sideSlot:l.jsxs(It,{direction:"column",gap:"xs",children:[l.jsx(Ct,{variant:"soft",onClick:z,css:{flex:1},children:l.jsx(Ca,{size:"14px"})}),l.jsx(Ct,{variant:"soft",css:{flex:1},onClick:()=>{const u=n>=0&&n<o.length?n:o.length-1;u>=0&&(p(u),d(Math.min(u,o.length-2)))},children:l.jsx(za,{size:"14px"})})]})})}),Qa=(a,e,t)=>{const r=a.engineObject.generator.emission,s=r.bursts;for(let c=s.length-1;c>=0;c--)r.removeBurst(s[c]);for(let c=0;c<t.length;c++){const o=t[c];if(!o||!Array.isArray(o.constructParams)||o.constructParams.length<2){console.warn(`Invalid burst item at index ${c}:`,o);continue}const n=o.constructParams[0],d=o.constructParams[1],b=o.constructParams[2]??Ve,v=o.constructParams[3]??ut;if(!d||!d.props){console.warn(`Invalid burst count data at index ${c}:`,d);continue}const p=d.props,z=new da(p.constantMax);z.mode=p.mode,z.constantMin=p.constantMin,z.constantMax=p.constantMax,z.constant=p.constantMax;const h=new ha(n,z);h.cycles=b,h.repeatInterval=v,r.addBurst(h)}};function _t(a="colorOverLifetime"){return{module:a,mode:he.Gradient,gradientMax:{class:"ParticleGradient",constructParams:[[{color:{r:1,g:1,b:1,a:1},time:0},{color:{r:1,g:1,b:1,a:1},time:.3},{color:{r:1,g:1,b:1,a:1},time:.6},{color:{r:1,g:1,b:1,a:1},time:1}],[{time:0,alpha:0},{time:.25,alpha:.25},{time:.5,alpha:.5},{time:1,alpha:1}]]},gradientMin:{class:"ParticleGradient",constructParams:[[{time:0,color:{r:1,g:1,b:1,a:1}},{time:.3,color:{r:1,g:1,b:1,a:1}},{time:.6,color:{r:1,g:1,b:1,a:1}},{time:1,color:{r:1,g:1,b:1,a:1}}],[{time:0,alpha:0},{time:.25,alpha:.25},{time:.5,alpha:.5},{time:1,alpha:1}]]}}}const Me=["x","y","z"],er={constant:$.Constant,"two-constant":$.TwoConstants,curve:$.Curve,"two-curve":$.TwoCurves},fe=Z(({model:a,inspectorConfig:e,onModelChange:t})=>{const{t:r}=q(),s=e.property,{mainAxis:c}=e,o=a[s],[n,d]=F.useState({x:{max:te,min:te},y:{max:te,min:te},z:{max:te,min:te}}),[b,v]=F.useState(e.yTickScale??1),p=pt[o.x.mode];function z(i){return(g,y)=>{const M=g.find(_=>_.type===y);if(!M)return;const j=L(o),w=j[i],B=er[y];for(const _ of Me)j[_].mode=B;switch(y){case"constant":w.constantMax=M.value;break;case"two-constant":w.constantMin=M.value[0],w.constantMax=M.value[1];break;case"curve":{if(M.value.length>4)return;d(_=>({..._,[i]:{..._[i],max:M.value}})),M.value.forEach((_,E)=>{w.curveMax.constructParams[E].constructParams[0]=_.x,w.curveMax.constructParams[E].constructParams[1]=_.y*b});break}case"two-curve":{if(M.value[0].length>4||M.value[1].length>4)return;d(_=>({..._,[i]:{min:M.value[0],max:M.value[1]}})),M.value[0].forEach((_,E)=>{w.curveMin.constructParams[E].constructParams[0]=_.x,w.curveMin.constructParams[E].constructParams[1]=_.y*b}),M.value[1].forEach((_,E)=>{w.curveMax.constructParams[E].constructParams[0]=_.x,w.curveMax.constructParams[E].constructParams[1]=_.y*b});break}}a[s]=j,t==null||t(s,j)}}function h(i){return[{value:o[i].constantMax,type:"constant",label:r("effects.curve.constant"),min:e.min,max:e.max,step:e.step},{value:[o[i].constantMin,o[i].constantMax],type:"two-constant",label:r("effects.curve.two-constant"),min:e.min,max:e.max,step:e.step},{value:n[i].max,type:"curve",label:r("effects.curve.curve")},{value:[n[i].min,n[i].max],type:"two-curve",label:r("effects.curve.two-curve")}]}const f=i=>{const g=i/b,y=L(o);for(const M of Me){const j=y[M];j.curveMax.constructParams.forEach(w=>{w.constructParams[1]*=g}),j.curveMin.constructParams.forEach(w=>{w.constructParams[1]*=g})}v(i),a[s]=y,t==null||t(s,y)},u={algo:"linear",yRangeMode:e.yRangeMode,yTickScale:b,yTickScaleMin:e.yTickScaleMin,yTickScaleMax:e.yTickScaleMax,onYTickScaleChange:f,onYTickScaleCommit:()=>{}};return F.useEffect(()=>{const i={};for(const g of Me)i[g]={max:Re(o[g].curveMax.constructParams).map(y=>({...y,y:y.y/b})),min:Re(o[g].curveMin.constructParams).map(y=>({...y,y:y.y/b}))};d(i)},[]),l.jsxs(l.Fragment,{children:[l.jsx(fa,{label:e.toggleLabel?r(e.toggleLabel):r("effects.curve.3d-prefix")+" "+r(e.label||s),info:r(e.info),value:o.enabled,onChange:i=>{const g=L(o);g.enabled=i,a[s]=g,t==null||t(s,g)}}),o.enabled?l.jsx(ae,{label:"",children:l.jsx(It,{direction:"column",gap:"xxs",children:Me.map((i,g)=>l.jsx(Le,{label:r(i).toLocaleUpperCase(),type:p,css:{gridTemplateColumns:"$4 repeat(3, minmax(0px, 1fr))"},...u,value:h(i),hideTypeSelector:g!==0,onValueChange:z(i)},i))})}):l.jsx(Le,{label:r(e.label||s),type:p,...u,value:h(c),onValueChange:z(c)})]})}),ye=a=>(e,t,r)=>{var o,n;const s=(n=(o=e.engineObject)==null?void 0:o.generator)==null?void 0:n[r.x.module];if(!s){console.warn(`Module container not found for: ${r.x.module}`);return}s[a]=r.enabled;const c={x:s[t+"X"],y:s[t+"Y"],z:s[t+"Z"]};for(const d in c){const b=r[d],v=c[d];if(!v){console.warn(`Axis module not found for: ${d} in ${t}`);continue}v.mode=b.mode,v.constantMax=b.constantMax,v.constantMin=b.constantMin,v.curveMax=new Te,b.curveMax.constructParams.forEach(p=>{const z=p.constructParams[0],h=p.constructParams[1];v.curveMax.addKey(new _e(z,h))}),v.curveMin=new Te,b.curveMin.constructParams.forEach(p=>{const z=p.constructParams[0],h=p.constructParams[1];v.curveMin.addKey(new _e(z,h))})}},N=Z(({model:a,inspectorConfig:e,onModelChange:t})=>{const{t:r}=q(),s=e.property,c=a[s],[o,n]=F.useState(te),[d,b]=F.useState(te),[v,p]=F.useState(e.yTickScale??1);F.useEffect(()=>{const h=Re(c.curveMax.constructParams),f=Re(c.curveMin.constructParams);n(h),b(f)},[]);const z=(h,f)=>{const u=h.find(g=>g.type===f);if(!u)return;const i=L(c);switch(f){case"constant":i.mode=$.Constant,i.constantMax=u.value;break;case"two-constant":i.mode=$.TwoConstants,i.constantMin=u.value[0],i.constantMax=u.value[1];break;case"curve":{if(u.value.length>4)return;n(u.value),i.mode=$.Curve,u.value.forEach((g,y)=>{i.curveMax.constructParams[y].constructParams[0]=g.x,i.curveMax.constructParams[y].constructParams[1]=g.y});break}case"two-curve":{if(u.value[0].length>4||u.value[1].length>4)return;i.mode=$.TwoCurves,b(u.value[0]),n(u.value[1]),u.value[0].forEach((g,y)=>{i.curveMin.constructParams[y].constructParams[0]=g.x,i.curveMin.constructParams[y].constructParams[1]=g.y}),u.value[1].forEach((g,y)=>{i.curveMax.constructParams[y].constructParams[0]=g.x,i.curveMax.constructParams[y].constructParams[1]=g.y});break}}a[s]=i,t==null||t(s,i)};return l.jsx(l.Fragment,{children:l.jsx(Le,{label:r(e.label||e.property),info:r(e.info),type:pt[c.mode],algo:"linear",yRangeMode:e.yRangeMode,yTickScale:v,yTickScaleMin:e.yTickScaleMin,yTickScaleMax:e.yTickScaleMax,onYTickScaleChange:p,onYTickScaleCommit:()=>{},value:[{value:c.constantMax,type:"constant",label:r("effects.curve.constant"),min:e.min,max:e.max,step:e.step},{value:[c.constantMin,c.constantMax],type:"two-constant",label:r("effects.curve.two-constant"),min:e.min,max:e.max,step:e.step},{value:o,type:"curve",label:r("effects.curve.curve")},{value:[d,o],type:"two-curve",label:r("effects.curve.two-curve")}],onValueChange:z})})}),G=(a,e,t)=>{var c,o;const r=(o=(c=a.engineObject)==null?void 0:c.generator)==null?void 0:o[t.module];if(!r){console.warn(`Module container not found for: ${t.module}`);return}const s=r[e];if(!s){console.warn(`Module not found for property: ${e} in ${t.module}`);return}s.mode=t.mode,s.constantMax=t.constantMax,s.constantMin=t.constantMin,s.curveMax=new Te,t.curveMax.constructParams.forEach(n=>{const d=n.constructParams[0],b=n.constructParams[1];s.curveMax.addKey(new _e(d,b))}),s.curveMin=new Te,t.curveMin.constructParams.forEach(n=>{const d=n.constructParams[0],b=n.constructParams[1];s.curveMin.addKey(new _e(d,b))})},tr=["constant","two-constant"],ar=Z(({model:a,inspectorConfig:e,onModelChange:t})=>{var b,v;const{t:r}=q(),s=e.property,c=a[s],o={...ge(c.constantMax),intensity:((b=c.constantMax)==null?void 0:b.intensity)??1},n={...ge(c.constantMin),intensity:((v=c.constantMin)==null?void 0:v.intensity)??1},d=(p,z)=>{const h=p.find(u=>u.type===z);if(!h)return;const f=L(c);switch(z){case"constant":{f.mode=he.Constant,f.constantMax=h.value;break}case"two-constant":{const u=h.value[0],i=h.value[1];f.mode=he.TwoConstants,f.constantMin=u,f.constantMax=i;break}}a[s]=f,t==null||t(s,f)};return l.jsx(Yt,{label:r(e.label||e.property),type:tr[c.mode],info:r(e.info),hdr:!0,value:[{value:o,type:"constant",label:r("effects.curve.constant")},{value:[n,o],type:"two-constant",label:r("effects.curve.two-constant")}],onValueChange:d})}),rr=(a,e,t)=>{const r=a.engineObject.generator.main.startColor;r.mode=t.mode;const{constantMax:s,constantMin:c}=t,o=s.intensity??1,n=c.intensity??1;r.constantMax.set(s.r*o,s.g*o,s.b*o,s.a),r.constantMin.set(c.r*n,c.g*n,c.b*n,c.a)},sr=["gradient","two-gradient"],or=Z(({model:a,inspectorConfig:e,onModelChange:t})=>{const{t:r}=q(),s=e.property,c=a[s],o=(n,d)=>{var p,z;if(!n.find(h=>h.type===d))return;const v=L(c);switch(d){case"gradient":{const h=n.find(f=>f.type===d);if(!((p=h==null?void 0:h.value)!=null&&p.color)||!((z=h==null?void 0:h.value)!=null&&z.alpha)){console.warn(`Invalid gradient value structure for ${s}`);return}if(h.value.color.length>4||h.value.alpha.length>4)return;v.mode=he.Gradient,v.gradientMax.constructParams=[h.value.color.map(f=>({color:f.value,time:f.time})),h.value.alpha.map(f=>({alpha:f.value,time:f.time}))];break}case"two-gradient":{const h=n.find(f=>f.type===d);if(h.value[0].color.length>4||h.value[0].alpha.length>4||h.value[1].color.length>4||h.value[1].alpha.length>4)return;v.mode=he.TwoGradients,v.gradientMin.constructParams=[h.value[0].color.map(f=>({color:f.value,time:f.time})),h.value[0].alpha.map(f=>({alpha:f.value,time:f.time}))],v.gradientMax.constructParams=[h.value[1].color.map(f=>({color:f.value,time:f.time})),h.value[1].alpha.map(f=>({alpha:f.value,time:f.time}))];break}}a[s]=v,t==null||t(s,v)};return l.jsx(l.Fragment,{children:l.jsx(Yt,{label:r(e.property),type:sr[c.mode-2],info:r(e.info),value:[{value:{color:c.gradientMax.constructParams[0].map(n=>({value:ge(n.color),time:n.time})),alpha:c.gradientMax.constructParams[1].map(n=>({value:n.alpha,time:n.time}))},type:"gradient",label:r("effects.curve.gradient")},{value:[{color:c.gradientMin.constructParams[0].map(n=>({value:ge(n.color),time:n.time})),alpha:c.gradientMin.constructParams[1].map(n=>({value:n.alpha,time:n.time}))},{color:c.gradientMax.constructParams[0].map(n=>({value:ge(n.color),time:n.time})),alpha:c.gradientMax.constructParams[1].map(n=>({value:n.alpha,time:n.time}))}],type:"two-gradient",label:r("effects.curve.two-gradient")}],onValueChange:o})})}),pe=[],ue=[],nr=(a,e,t)=>{var d,b,v;const r=(b=(d=a.engineObject)==null?void 0:d.generator)==null?void 0:b[t.module];if(!r){console.warn(`Module container not found for: ${t.module}`);return}const s=r[e];if(!s){console.warn(`Module not found for property: ${e} in ${t.module}`);return}if(s.mode=t.mode,pe.length=0,ue.length=0,!((v=t.gradientMax)!=null&&v.constructParams)||!Array.isArray(t.gradientMax.constructParams)){console.warn(`Invalid gradientMax.constructParams for ${e}`);return}const c=t.gradientMax.constructParams,o=c[0]||[],n=c[1]||[];Array.isArray(o)&&o.forEach(p=>{if(p&&p.color&&typeof p.time=="number"){const z=p.color;pe.push(new Ot(p.time,new Et(z.r??0,z.g??0,z.b??0,z.a??1)))}}),Array.isArray(n)&&n.forEach(p=>{p&&typeof p.time=="number"&&typeof p.alpha=="number"&&ue.push(new wt(p.time,p.alpha))}),s.gradientMax.setKeys(pe,ue),pe.length=0,ue.length=0,t.gradientMin.constructParams[0].forEach(p=>{pe.push(new Ot(p.time,new Et(p.color.r,p.color.g,p.color.b,p.color.a)))}),t.gradientMin.constructParams[1].forEach(p=>{ue.push(new wt(p.time,p.alpha))}),s.gradientMin.setKeys(pe,ue)};function Oe(a){return a-Math.floor(a*(1/289))*289}function H(a){return Oe((34*a+1)*a)}function nt(a,e,t){const r=.16666666666666666,s=1/3,c=(a+e+t)*s,o=Math.floor(a+c),n=Math.floor(e+c),d=Math.floor(t+c),b=(o+n+d)*r,v=a-o+b,p=e-n+b,z=t-d+b;let h,f,u,i,g,y;v>=p?p>=z?(h=1,f=0,u=0,i=1,g=1,y=0):v>=z?(h=1,f=0,u=0,i=1,g=0,y=1):(h=0,f=0,u=1,i=1,g=0,y=1):p<z?(h=0,f=0,u=1,i=0,g=1,y=1):v<z?(h=0,f=1,u=0,i=0,g=1,y=1):(h=0,f=1,u=0,i=1,g=1,y=0);const M=v-h+r,j=p-f+r,w=z-u+r,B=v-i+s,_=p-g+s,E=z-y+s,I=v-.5,T=p-.5,A=z-.5,X=Oe(o),U=Oe(n),xe=Oe(d),Xt=H(H(H(xe)+U)+X),$t=H(H(H(xe+u)+U+f)+X+h),qt=H(H(H(xe+y)+U+g)+X+i),Kt=H(H(H(xe+1)+U+1)+X+1),Ae=.142857142857,mt=Ae*2-0,dt=Ae*.5-1,ke=Ae*1-0;function Se(bt){const vt=bt-49*Math.floor(bt*ke*ke),gt=Math.floor(vt*ke),Ut=Math.floor(vt-7*gt),xt=gt*mt+dt,St=Ut*mt+dt,Pe=1-Math.abs(xt)-Math.abs(St),Pt=xt,Mt=St,Jt=Math.floor(Pt)*2+1,Qt=Math.floor(Mt)*2+1,zt=-(Pe<0?1:0),et=Pt+Jt*zt,tt=Mt+Qt*zt,at=1.79284291400159-.85373472095314*(et*et+tt*tt+Pe*Pe);return[et*at,tt*at,Pe*at]}const re=Se(Xt),se=Se($t),oe=Se(qt),ne=Se(Kt),De=Math.max(.6-(v*v+p*p+z*z),0),Be=Math.max(.6-(M*M+j*j+w*w),0),Fe=Math.max(.6-(B*B+_*_+E*E),0),Ye=Math.max(.6-(I*I+T*T+A*A),0),Ze=De*De,Xe=Be*Be,$e=Fe*Fe,qe=Ye*Ye,Ke=Ze*Ze,Ne=Xe*Xe,Ge=$e*$e,He=qe*qe,Nt=re[0]*v+re[1]*p+re[2]*z,Gt=se[0]*M+se[1]*j+se[2]*w,Ht=oe[0]*B+oe[1]*_+oe[2]*E,Wt=ne[0]*I+ne[1]*T+ne[2]*A,We=Ze*De*Nt,Ue=Xe*Be*Gt,Je=$e*Fe*Ht,Qe=qe*Ye*Wt;let ht=-8*(We*v+Ue*M+Je*B+Qe*I),ft=-8*(We*p+Ue*j+Je*_+Qe*T),yt=-8*(We*z+Ue*w+Je*E+Qe*A);return ht+=Ke*re[0]+Ne*se[0]+Ge*oe[0]+He*ne[0],ft+=Ke*re[1]+Ne*se[1]+Ge*oe[1]+He*ne[1],yt+=Ke*re[2]+Ne*se[2]+Ge*oe[2]+He*ne[2],[ht*42,ft*42,yt*42]}function Lt(a,e,t){nt(t,e,a);const s=nt(a+100,t,e);return nt(e,a+100,t)[1]-s[2]}function ir(a,e,t,r,s,c,o){let n=Lt(a*r,e*r,t*r),d=1,b=r,v=1;for(let p=1;p<s;p++)v*=o,b*=c,d+=v,n+=v*Lt(a*b,e*b,t*b);return n/d}const Q=80,Rt=5,lr=({model:a})=>{const e=F.useRef(null),t=F.useRef(0);return F.useEffect(()=>{const r=e.current;if(!r)return;const s=r.getContext("2d");if(!s)return;const c=ya(()=>{var f,u;const o=((u=(f=a.noiseStrength)==null?void 0:f.x)==null?void 0:u.constantMax)??1,n=a.noiseFrequency??.5,d=a.noiseScrollSpeed??0,b=a.noiseOctaveCount??1,v=a.noiseOctaveIntensityMultiplier??.5,p=a.noiseOctaveFrequencyMultiplier??2;cancelAnimationFrame(t.current);const z=performance.now(),h=i=>{const g=(i-z)/1e3*d,y=s.createImageData(Q,Q),M=y.data;for(let j=0;j<Q;j++){const w=(1-j/Q)*Rt;for(let B=0;B<Q;B++){const _=B/Q*Rt,E=ir(_,w,g,n,b,p,v),I=Math.max(0,Math.min(255,Math.round((E*o*(.5/7)+.5)*255))),T=(j*Q+B)*4;M[T]=I,M[T+1]=I,M[T+2]=I,M[T+3]=255}}s.putImageData(y,0,0),d>0&&(t.current=requestAnimationFrame(h))};t.current=requestAnimationFrame(h)});return()=>{cancelAnimationFrame(t.current),c()}},[a]),l.jsx(ae,{label:" ",labelCss:{visibility:"hidden"},children:l.jsxs("div",{style:{position:"relative",width:80,height:80},children:[l.jsx("canvas",{ref:e,width:Q,height:Q,style:{width:80,height:80,borderRadius:4,border:"1px solid var(--color-border-default, rgba(255,255,255,0.12))",display:"block"}}),l.jsx("span",{style:{position:"absolute",bottom:2,left:0,right:0,textAlign:"center",fontSize:9,color:"rgba(255,255,255,0.6)",textShadow:"0 1px 2px rgba(0,0,0,0.8)",pointerEvents:"none"},children:"Preview"})]})})};var cr=Object.defineProperty,pr=Object.getOwnPropertyDescriptor,P=(a,e,t,r)=>{for(var s=r>1?void 0:r?pr(e,t):e,c=a.length-1,o;c>=0;c--)(o=a[c])&&(s=(r?o(e,t,s):o(s))||s);return r&&s&&cr(e,t,s),s};let x=class extends ba{constructor(e,t){super(e,t);S(this,"_emissionModuleEnabled",!0);S(this,"_emissionShapeModuleEnabled",!0);S(this,"_rotationOverLifetimeModuleEnabled",!1);S(this,"_sizeOverLifetimeModuleEnabled",!1);S(this,"_textureSheetAnimationModuleEnabled",!1);S(this,"_velocityOverLifetimeModuleEnabled",!1);S(this,"_forceOverLifetimeModuleEnabled",!1);S(this,"_limitVelocityOverLifetimeModuleEnabled",!1);S(this,"_colorOverLifetimeModuleEnabled",!1);S(this,"_noiseModuleEnabled",!1);S(this,"material",{refId:"0000202"});S(this,"priority",0);S(this,"velocityScale",0);S(this,"lengthScale",2);S(this,"pivot",{x:0,y:0,z:0});S(this,"renderMode",W.Billboard);S(this,"mesh",null);S(this,"duration",5);S(this,"isLoop",!0);S(this,"startDelay",D("main"));S(this,"startLifetime",D("main",5));S(this,"startSpeed",D("main",5));S(this,"startSize",ce("main",1));S(this,"startRotation",ce("main"));S(this,"flipRotation",0);S(this,"startColor",{module:"main",mode:he.Constant,constantMax:{r:1,g:1,b:1,a:1,intensity:1},constantMin:{r:1,g:1,b:1,a:1,intensity:1}});S(this,"gravityModifier",D("main"));S(this,"simulationSpace",K.Local);S(this,"simulationSpeed",1);S(this,"scalingMode",be.Local);S(this,"playOnEnabled",!0);S(this,"maxParticles",1e3);S(this,"rateOverTime",D("emission",10));S(this,"shape",{class:k.ConeShape,props:{angle:25,radius:1,length:5,emitType:de.Base,enabled:!0}});S(this,"bursts",[]);S(this,"size",ce("sizeOverLifetime",1));S(this,"rotation",ce("rotationOverLifetime",45));S(this,"textureSheetAnimationType",0);S(this,"cycleCount",1);S(this,"tiling",{x:1,y:1});S(this,"frameOverTime",D("textureSheetAnimation",1,0,$.Curve));S(this,"spaceMode",K.Local);S(this,"forceSpaceMode",K.Local);S(this,"velocityX",D("velocityOverLifetime"));S(this,"velocityY",D("velocityOverLifetime"));S(this,"velocityZ",D("velocityOverLifetime"));S(this,"speed",ce("limitVelocityOverLifetime",1));S(this,"limitVelocitySpaceMode",K.Local);S(this,"dampen",0);S(this,"drag",D("limitVelocityOverLifetime"));S(this,"multiplyDragByParticleSize",!1);S(this,"multiplyDragByParticleVelocity",!1);S(this,"forceX",D("forceOverLifetime"));S(this,"forceY",D("forceOverLifetime"));S(this,"forceZ",D("forceOverLifetime"));S(this,"color",_t());S(this,"noisePreview",null);S(this,"noiseStrength",ce("noise",1));S(this,"noiseFrequency",.5);S(this,"noiseScrollSpeed",0);S(this,"noiseOctaveCount",1);S(this,"noiseOctaveIntensityMultiplier",.5);S(this,"noiseOctaveFrequencyMultiplier",2);const r=this.formSchema,s=(o,n,d,b,v,p)=>{const z=m(o);r.addGroup(z,n,{controlOpenKey:d,defaultOpen:p,sectionTitle:{title:z,onToggle:h=>{v==null||v(h),this.root.inspectorFacade.componentChange(this.id,d,h),this.applyBoundPathChange(b,R.Toggle,h)}}})};s("effects.renderer.sections.emission",["rateOverTime","bursts"],"_emissionModuleEnabled","generator.emission.enabled"),s("effects.renderer.sections.shape",["shape"],"_emissionShapeModuleEnabled","generator.emission.shape.enabled",o=>{this.shape.props.enabled=o}),s("effects.renderer.sections.size-over-lifetime",["size"],"_sizeOverLifetimeModuleEnabled","generator.sizeOverLifetime.enabled"),s("effects.renderer.sections.rotation-over-lifetime",["rotation"],"_rotationOverLifetimeModuleEnabled","generator.rotationOverLifetime.enabled"),s("effects.renderer.sections.force-over-lifetime",["forceSpaceMode","forceX","forceY","forceZ"],"_forceOverLifetimeModuleEnabled","generator.forceOverLifetime.enabled"),s("effects.renderer.sections.velocity-over-lifetime",["spaceMode","velocityX","velocityY","velocityZ"],"_velocityOverLifetimeModuleEnabled","generator.velocityOverLifetime.enabled"),s("effects.renderer.sections.limit-velocity-over-lifetime",["speed","limitVelocitySpaceMode","dampen","drag","multiplyDragByParticleSize","multiplyDragByParticleVelocity"],"_limitVelocityOverLifetimeModuleEnabled","generator.limitVelocityOverLifetime.enabled"),s("effects.renderer.sections.texture-sheet-animation",["textureSheetAnimationType","cycleCount","tiling","frameOverTime"],"_textureSheetAnimationModuleEnabled","generator.textureSheetAnimation.enabled"),s("effects.renderer.sections.color-over-lifetime",["color"],"_colorOverLifetimeModuleEnabled","generator.colorOverLifetime.enabled"),s("effects.renderer.sections.noise",["noisePreview","noiseStrength","noiseFrequency","noiseScrollSpeed","noiseOctaveCount","noiseOctaveIntensityMultiplier","noiseOctaveFrequencyMultiplier"],"_noiseModuleEnabled","generator.noise.enabled");const c=m("effects.renderer.sections.rendering");r.addGroup(c,["renderMode","mesh","material","velocityScale","lengthScale","pivot","priority"],{sectionTitle:{title:c}})}applyEmissionShape(e){this.applyBoundPathChange("generator.emission.shape",R.Input,e)}onInitComplete(){this._applyEditorRuntimeState()}_applyRendererMeshFromRef(){this.applyBoundPathChange("mesh",R.AssetPicker,this.mesh??null)}_applyEditorRuntimeState(){const{_engineObject:{generator:e}}=this;if(this.applyBoundPathChange("enabled",R.Toggle,this._enabled),this.applyBoundPathChange("renderMode",R.Select,this.renderMode),e.emission.enabled=this._emissionModuleEnabled,e.emission.shape.enabled=this._emissionShapeModuleEnabled,this.shape.class===k.MeshShape){const t=e.emission.shape,r=this.shape.props.mesh;r?(t.enabled=!1,La(this.root,r).then(()=>{this.applyBoundPathChange("generator.emission.shape.mesh",R.AssetPicker,r),t.enabled=this._emissionShapeModuleEnabled})):this.applyBoundPathChange("generator.emission.shape.mesh",R.Input,Vt.createSphere(this.engineObject.engine))}e.rotationOverLifetime.enabled=this._rotationOverLifetimeModuleEnabled,e.sizeOverLifetime.enabled=this._sizeOverLifetimeModuleEnabled,e.textureSheetAnimation.enabled=this._textureSheetAnimationModuleEnabled,e.velocityOverLifetime.enabled=this._velocityOverLifetimeModuleEnabled,e.limitVelocityOverLifetime.enabled=this._limitVelocityOverLifetimeModuleEnabled,e.forceOverLifetime.enabled=this._forceOverLifetimeModuleEnabled,e.main.simulationSpeed=0,e.colorOverLifetime.enabled=this._colorOverLifetimeModuleEnabled,e.noise.enabled=this._noiseModuleEnabled,this.renderMode===W.Mesh&&this._applyRendererMeshFromRef()}async bindEngineObject(e){e.enabled=!1,await super.bindEngineObject(e)}rebindEngineObject(e){super.rebindEngineObject(e),e.enabled=!1,this._applyEditorRuntimeState()}deserialize(e){var r,s,c;const t=e.props;if(this._enabled=(t==null?void 0:t.enabled)??!0,t!=null&&t.generator){this.priority=t.priority??this.priority,this.velocityScale=t.velocityScale??this.velocityScale,this.lengthScale=t.lengthScale??this.lengthScale,this.pivot=t.pivot??this.pivot,this.renderMode=t.renderMode??this.renderMode,this.mesh=t.mesh??null;const{main:o,emission:n,sizeOverLifetime:d,rotationOverLifetime:b,velocityOverLifetime:v,limitVelocityOverLifetime:p,colorOverLifetime:z,textureSheetAnimation:h,forceOverLifetime:f,noise:u}=t.generator;this.duration=(o==null?void 0:o.duration)??this.duration,this.isLoop=(o==null?void 0:o.isLoop)??this.isLoop,this.startDelay=(o==null?void 0:o.startDelay)??this.startDelay,this.startLifetime=(o==null?void 0:o.startLifetime)??this.startLifetime,this.startSpeed=(o==null?void 0:o.startSpeed)??this.startSpeed,this.startSize.enabled=(o==null?void 0:o.startSize3D)??this.startSize.enabled,this.startSize.x=(o==null?void 0:o.startSizeX)??this.startSize.x,this.startSize.y=(o==null?void 0:o.startSizeY)??this.startSize.y,this.startSize.z=(o==null?void 0:o.startSizeZ)??this.startSize.z,this.startRotation.enabled=(o==null?void 0:o.startRotation3D)??this.startRotation.enabled,this.startRotation.x=(o==null?void 0:o.startRotationX)??this.startRotation.x,this.startRotation.y=(o==null?void 0:o.startRotationY)??this.startRotation.y,this.startRotation.z=(o==null?void 0:o.startRotationZ)??this.startRotation.z,this.flipRotation=(o==null?void 0:o.flipRotation)??this.flipRotation,this.startColor=(o==null?void 0:o.startColor)??this.startColor,this.gravityModifier=(o==null?void 0:o.gravityModifier)??this.gravityModifier,this.simulationSpace=(o==null?void 0:o.simulationSpace)??this.simulationSpace,this.simulationSpeed=(o==null?void 0:o.simulationSpeed)??this.simulationSpeed,this.scalingMode=(o==null?void 0:o.scalingMode)??this.scalingMode,this.playOnEnabled=(o==null?void 0:o.playOnEnabled)??this.playOnEnabled,this.maxParticles=(o==null?void 0:o.maxParticles)??this.maxParticles,this._emissionModuleEnabled=(n==null?void 0:n.enabled)??this._emissionModuleEnabled,this.rateOverTime=(n==null?void 0:n.rateOverTime)??this.rateOverTime,(n==null?void 0:n.shape)===null||((r=n==null?void 0:n.shape)==null?void 0:r.class)==="Null"?(this.shape={class:k.ConeShape,props:{angle:25,radius:1,length:5,emitType:de.Base,enabled:!1}},this._emissionShapeModuleEnabled=!1):(this.shape=(n==null?void 0:n.shape)??this.shape,this._emissionShapeModuleEnabled=((c=(s=n==null?void 0:n.shape)==null?void 0:s.props)==null?void 0:c.enabled)??this._emissionShapeModuleEnabled),this.bursts=Array.isArray(n==null?void 0:n.bursts)?n.bursts.map(y=>(Na(y),y)):[],this._sizeOverLifetimeModuleEnabled=(d==null?void 0:d.enabled)??this._sizeOverLifetimeModuleEnabled,this.size.enabled=(d==null?void 0:d.separateAxes)??this.size.enabled,this.size.x=d!=null&&d.sizeX?{...d.sizeX,module:"sizeOverLifetime"}:{...L(this.size.x),module:"sizeOverLifetime"},this.size.y=d!=null&&d.sizeY?{...d.sizeY,module:"sizeOverLifetime"}:{...L(this.size.y),module:"sizeOverLifetime"},this.size.z=d!=null&&d.sizeZ?{...d.sizeZ,module:"sizeOverLifetime"}:{...L(this.size.z),module:"sizeOverLifetime"},this._rotationOverLifetimeModuleEnabled=(b==null?void 0:b.enabled)??this._rotationOverLifetimeModuleEnabled,this.rotation.enabled=(b==null?void 0:b.separateAxes)??this.rotation.enabled,this.rotation.x=b!=null&&b.rotationX?{...b.rotationX,module:"rotationOverLifetime"}:{...L(this.rotation.x),module:"rotationOverLifetime"},this.rotation.y=b!=null&&b.rotationY?{...b.rotationY,module:"rotationOverLifetime"}:{...L(this.rotation.y),module:"rotationOverLifetime"},this.rotation.z=b!=null&&b.rotationZ?{...b.rotationZ,module:"rotationOverLifetime"}:{...L(this.rotation.z),module:"rotationOverLifetime"},this._velocityOverLifetimeModuleEnabled=(v==null?void 0:v.enabled)??this._velocityOverLifetimeModuleEnabled,this.velocityX=(v==null?void 0:v.velocityX)??L(this.velocityX),this.velocityY=(v==null?void 0:v.velocityY)??L(this.velocityY),this.velocityZ=(v==null?void 0:v.velocityZ)??L(this.velocityZ),this.spaceMode=(v==null?void 0:v.space)??this.spaceMode,this._limitVelocityOverLifetimeModuleEnabled=(p==null?void 0:p.enabled)??this._limitVelocityOverLifetimeModuleEnabled,this.speed.enabled=(p==null?void 0:p.separateAxes)??this.speed.enabled;const i=(p==null?void 0:p.speedX)??(p==null?void 0:p.speed);this.speed.x=i?{...i,module:"limitVelocityOverLifetime"}:{...L(this.speed.x),module:"limitVelocityOverLifetime"},this.speed.y=p!=null&&p.speedY?{...p.speedY,module:"limitVelocityOverLifetime"}:{...L(this.speed.y),module:"limitVelocityOverLifetime"},this.speed.z=p!=null&&p.speedZ?{...p.speedZ,module:"limitVelocityOverLifetime"}:{...L(this.speed.z),module:"limitVelocityOverLifetime"},this.dampen=(p==null?void 0:p.dampen)??this.dampen,this.drag=p!=null&&p.drag?{...p.drag,module:"limitVelocityOverLifetime"}:D("limitVelocityOverLifetime"),this.multiplyDragByParticleSize=(p==null?void 0:p.multiplyDragByParticleSize)??this.multiplyDragByParticleSize,this.multiplyDragByParticleVelocity=(p==null?void 0:p.multiplyDragByParticleVelocity)??this.multiplyDragByParticleVelocity,this.limitVelocitySpaceMode=(p==null?void 0:p.space)??this.limitVelocitySpaceMode,this._forceOverLifetimeModuleEnabled=(f==null?void 0:f.enabled)??this._forceOverLifetimeModuleEnabled,this.forceX=(f==null?void 0:f.forceX)??D("forceOverLifetime"),this.forceY=(f==null?void 0:f.forceY)??D("forceOverLifetime"),this.forceZ=(f==null?void 0:f.forceZ)??D("forceOverLifetime"),this.forceSpaceMode=(f==null?void 0:f.space)??this.forceSpaceMode,z?(this._colorOverLifetimeModuleEnabled=z.enabled??this._colorOverLifetimeModuleEnabled,this.color=z.color??this.color):(this._colorOverLifetimeModuleEnabled=!0,this.color=_t()),this._textureSheetAnimationModuleEnabled=(h==null?void 0:h.enabled)??this._textureSheetAnimationModuleEnabled,this.textureSheetAnimationType=(h==null?void 0:h.type)??this.textureSheetAnimationType,this.cycleCount=(h==null?void 0:h.cycleCount)??this.cycleCount,this.tiling=(h==null?void 0:h.tiling)??this.tiling,this.frameOverTime=(h==null?void 0:h.frameOverTime)??this.frameOverTime,this._noiseModuleEnabled=(u==null?void 0:u.enabled)??this._noiseModuleEnabled,this.noiseStrength.enabled=(u==null?void 0:u.separateAxes)??this.noiseStrength.enabled;const g=u==null?void 0:u.strengthX;this.noiseStrength.x=g?{...g,module:"noise"}:{...L(this.noiseStrength.x),module:"noise"},this.noiseStrength.y=u!=null&&u.strengthY?{...u.strengthY,module:"noise"}:{...L(this.noiseStrength.y),module:"noise"},this.noiseStrength.z=u!=null&&u.strengthZ?{...u.strengthZ,module:"noise"}:{...L(this.noiseStrength.z),module:"noise"},this.noiseFrequency=(u==null?void 0:u.frequency)??this.noiseFrequency,this.noiseScrollSpeed=(u==null?void 0:u.scrollSpeed)??this.noiseScrollSpeed,this.noiseOctaveCount=(u==null?void 0:u.octaveCount)??this.noiseOctaveCount,this.noiseOctaveIntensityMultiplier=(u==null?void 0:u.octaveIntensityMultiplier)??this.noiseOctaveIntensityMultiplier,this.noiseOctaveFrequencyMultiplier=(u==null?void 0:u.octaveFrequencyMultiplier)??this.noiseOctaveFrequencyMultiplier}super.deserialize(e)}toJSON(){const e=this.bursts.map(r=>{var c;if(((c=r==null?void 0:r.constructParams)==null?void 0:c[2])!==1/0)return r;const s=L(r);return s.constructParams[2]=null,s});return{type:this.type,props:va({enabled:this.enabled,priority:this.priority,velocityScale:this.velocityScale,lengthScale:this.lengthScale,pivot:this.pivot,renderMode:this.renderMode,mesh:this.mesh,material:this.material,generator:{main:{duration:this.duration,isLoop:this.isLoop,startDelay:this.startDelay,startLifetime:this.startLifetime,startSpeed:this.startSpeed,startSize3D:this.startSize.enabled,startSizeX:this.startSize.x,startSizeY:this.startSize.y,startSizeZ:this.startSize.z,startRotation3D:this.startRotation.enabled,startRotationX:this.startRotation.x,startRotationY:this.startRotation.y,startRotationZ:this.startRotation.z,flipRotation:this.flipRotation,startColor:this.startColor,gravityModifier:this.gravityModifier,simulationSpace:this.simulationSpace,simulationSpeed:this.simulationSpeed,scalingMode:this.scalingMode,playOnEnabled:this.playOnEnabled,maxParticles:this.maxParticles},emission:{enabled:this._emissionModuleEnabled,rateOverTime:this.rateOverTime,shape:this.shape,bursts:e},sizeOverLifetime:{enabled:this._sizeOverLifetimeModuleEnabled,separateAxes:this.size.enabled,sizeX:this.size.x,sizeY:this.size.y,sizeZ:this.size.z},rotationOverLifetime:{enabled:this._rotationOverLifetimeModuleEnabled,separateAxes:this.rotation.enabled,rotationX:this.rotation.x,rotationY:this.rotation.y,rotationZ:this.rotation.z},velocityOverLifetime:{enabled:this._velocityOverLifetimeModuleEnabled,space:this.spaceMode,velocityX:this.velocityX,velocityY:this.velocityY,velocityZ:this.velocityZ},limitVelocityOverLifetime:{enabled:this._limitVelocityOverLifetimeModuleEnabled,separateAxes:this.speed.enabled,speedX:this.speed.x,speedY:this.speed.y,speedZ:this.speed.z,dampen:this.dampen,drag:this.drag,multiplyDragByParticleSize:this.multiplyDragByParticleSize,multiplyDragByParticleVelocity:this.multiplyDragByParticleVelocity,space:this.limitVelocitySpaceMode},forceOverLifetime:{enabled:this._forceOverLifetimeModuleEnabled,space:this.forceSpaceMode,forceX:this.forceX,forceY:this.forceY,forceZ:this.forceZ},colorOverLifetime:{enabled:this._colorOverLifetimeModuleEnabled,color:this.color},textureSheetAnimation:{enabled:this._textureSheetAnimationModuleEnabled,type:this.textureSheetAnimationType,cycleCount:this.cycleCount,tiling:this.tiling,frameOverTime:this.frameOverTime},noise:{enabled:this._noiseModuleEnabled,separateAxes:this.noiseStrength.enabled,strengthX:this.noiseStrength.x,strengthY:this.noiseStrength.y,strengthZ:this.noiseStrength.z,frequency:this.noiseFrequency,scrollSpeed:this.noiseScrollSpeed,octaveCount:this.noiseOctaveCount,octaveIntensityMultiplier:this.noiseOctaveIntensityMultiplier,octaveFrequencyMultiplier:this.noiseOctaveFrequencyMultiplier}}})}}};P([J],x.prototype,"_emissionModuleEnabled",2);P([J],x.prototype,"_emissionShapeModuleEnabled",2);P([J],x.prototype,"_rotationOverLifetimeModuleEnabled",2);P([J],x.prototype,"_sizeOverLifetimeModuleEnabled",2);P([J],x.prototype,"_textureSheetAnimationModuleEnabled",2);P([J],x.prototype,"_velocityOverLifetimeModuleEnabled",2);P([J],x.prototype,"_forceOverLifetimeModuleEnabled",2);P([J],x.prototype,"_limitVelocityOverLifetimeModuleEnabled",2);P([J],x.prototype,"_colorOverLifetimeModuleEnabled",2);P([J],x.prototype,"_noiseModuleEnabled",2);P([V({engineKey:"setMaterial",setPath:"setMaterial()",getPath:"getMaterial()",valueType:ga.ReferResource,getEngineValue:a=>a.getMaterial()}),C({type:R.AssetPicker,assetType:"Material",customFilter:a=>{var e;return((e=a.engineObject.shader)==null?void 0:e.name)==="Effect/Particle"},priority:-100,label:m("effects.renderer.material.label"),info:m("effects.renderer.material.info")}),O()],x.prototype,"material",2);P([C({bindPath:"priority",min:0,step:1,dragStep:1,priority:-100,label:m("effects.renderer.priority.label"),info:m("effects.renderer.priority.info")}),O()],x.prototype,"priority",2);P([C({bindPath:"velocityScale",priority:-100,label:m("effects.renderer.velocity-scale.label"),info:m("effects.renderer.velocity-scale.info"),when:a=>a.renderMode===W.StretchBillboard}),O()],x.prototype,"velocityScale",2);P([C({bindPath:"lengthScale",priority:-100,label:m("effects.renderer.length-scale.label"),info:m("effects.renderer.length-scale.info"),when:a=>a.renderMode===W.StretchBillboard}),O()],x.prototype,"lengthScale",2);P([C({type:R.Vector3,bindPath:"pivot",label:m("effects.renderer.pivot.label"),priority:-100}),O()],x.prototype,"pivot",2);P([V({getPath:"renderMode",setPath:"renderMode"}),C({type:R.Select,value:W.Billboard,label:m("effects.renderer.render-mode.label"),options:[{label:m("effects.renderer.render-mode.options.billboard"),value:W.Billboard},{label:m("effects.renderer.render-mode.options.stretch-billboard"),value:W.StretchBillboard},{label:m("effects.renderer.render-mode.options.horizontal-billboard"),value:W.HorizontalBillboard},{label:m("effects.renderer.render-mode.options.mesh"),value:W.Mesh},{label:m("effects.renderer.render-mode.options.none"),value:W.None}],onChange(a){a.renderMode===W.Mesh&&a._applyRendererMeshFromRef()},priority:-100}),O()],x.prototype,"renderMode",2);P([C({type:R.AssetPicker,assetType:"Mesh",label:m("effects.renderer.mesh.label"),info:m("effects.renderer.mesh.info"),when:a=>a.renderMode===W.Mesh,onChange:async(a,e,t)=>{a.mesh=t?t.getCurrentRef():null;try{await a.applyBoundPathChange("mesh",R.AssetPicker,a.mesh)}catch(r){console.warn(r)}},priority:-100}),O()],x.prototype,"mesh",2);P([V({getPath:"generator.main.duration",setPath:"generator.main.duration"}),C({bindPath:"generator.main.duration",min:.05,step:.05,dragStep:.05,label:m("effects.renderer.duration.label"),info:m("effects.renderer.duration.info")}),O()],x.prototype,"duration",2);P([V({getPath:"generator.main.isLoop",setPath:"generator.main.isLoop"}),C({bindPath:"generator.main.isLoop",label:m("effects.renderer.loop.label"),info:m("effects.renderer.loop.info")}),O()],x.prototype,"isLoop",2);P([C({customComponent:N,min:0,yRangeMode:"positive",onChange:G,info:m("effects.renderer.start.delay.info"),label:m("effects.renderer.start.delay.label")}),O()],x.prototype,"startDelay",2);P([C({customComponent:N,onChange:G,min:1e-4,yRangeMode:"positive",label:m("effects.renderer.start.lifetime.label"),info:m("effects.renderer.start.lifetime.info")}),O()],x.prototype,"startLifetime",2);P([C({customComponent:N,onChange:G,label:m("effects.renderer.start.speed.label")}),O()],x.prototype,"startSpeed",2);P([C({module:"main",toggleProps:"startSize3D",axisX:"startSizeX",axisY:"startSizeY",axisZ:"startSizeZ",mainAxis:"x",customComponent:fe,onChange:ye("startSize3D"),label:m("effects.renderer.start.size.label"),info:m("effects.renderer.start.size.info"),min:0,yRangeMode:"positive"}),O()],x.prototype,"startSize",2);P([C({module:"main",toggleProps:"startRotation3D",axisX:"startRotationX",axisY:"startRotationY",axisZ:"startRotationZ",mainAxis:"z",customComponent:fe,onChange:ye("startRotation3D"),label:m("effects.renderer.start.rotation.label"),info:m("effects.renderer.start.rotation.info"),step:1}),O()],x.prototype,"startRotation",2);P([V({getPath:"generator.main.flipRotation",setPath:"generator.main.flipRotation"}),C({bindPath:"generator.main.flipRotation",min:0,max:1,step:.05,dragStep:.05,label:m("effects.renderer.flip-rotation.label")}),O()],x.prototype,"flipRotation",2);P([C({customComponent:ar,onChange:rr,label:m("effects.renderer.start.color.label")}),O()],x.prototype,"startColor",2);P([C({customComponent:N,info:m("effects.renderer.gravity-modifier.info"),onChange:G,label:m("effects.renderer.gravity-modifier.label")}),O()],x.prototype,"gravityModifier",2);P([V({getPath:"generator.main.simulationSpace",setPath:"generator.main.simulationSpace"}),C({type:R.Select,bindPath:"generator.main.simulationSpace",value:K.Local,label:m("effects.renderer.simulation.space.label"),info:m("effects.renderer.simulation.space.info"),options:[{label:m("effects.renderer.simulation.space.options.local"),value:K.Local},{label:m("effects.renderer.simulation.space.options.world"),value:K.World}]}),O()],x.prototype,"simulationSpace",2);P([V({getPath:"generator.main.simulationSpeed",setPath:"generator.main.simulationSpeed"}),C({bindPath:"generator.main.simulationSpeed",step:.05,dragStep:.05,label:m("effects.renderer.simulation.speed.label"),info:m("effects.renderer.simulation.speed.info")}),O()],x.prototype,"simulationSpeed",2);P([V({getPath:"generator.main.scalingMode",setPath:"generator.main.scalingMode"}),C({type:R.Select,bindPath:"generator.main.scalingMode",label:m("effects.renderer.scaling-mode.label"),info:m("effects.renderer.scaling-mode.info"),value:be.Local,options:[{label:m("effects.renderer.scaling-mode.options.world"),value:be.World},{label:m("effects.renderer.scaling-mode.options.local"),value:be.Local},{label:m("effects.renderer.scaling-mode.options.shape"),value:be.Shape}]}),O()],x.prototype,"scalingMode",2);P([V({getPath:"generator.main.playOnEnabled",setPath:"generator.main.playOnEnabled"}),C({type:R.Toggle,bindPath:"generator.main.playOnEnabled",label:m("effects.renderer.play-on-enabled.label"),info:m("effects.renderer.play-on-enabled.info")}),O()],x.prototype,"playOnEnabled",2);P([V({getPath:"generator.main.maxParticles",setPath:"generator.main.maxParticles"}),C({type:R.Number,bindPath:"generator.main.maxParticles",min:1,dragStep:1,label:m("effects.renderer.max-particles.label"),info:m("effects.renderer.max-particles.info")}),O()],x.prototype,"maxParticles",2);P([C({customComponent:N,onChange:G,min:0,yRangeMode:"positive",label:m("effects.renderer.rate-over-time.label"),info:m("effects.renderer.rate-over-time.info")}),O()],x.prototype,"rateOverTime",2);P([C({customComponent:qa,onChange:Za}),O()],x.prototype,"shape",2);P([O(),C({label:m("effects.renderer.bursts.label"),info:m("effects.renderer.bursts.info"),customComponent:Ja,onChange:Qa})],x.prototype,"bursts",2);P([C({module:"sizeOverLifetime",toggleProps:"separateAxes",toggleLabel:"effects.curve.separate-axes",axisX:"sizeX",axisY:"sizeY",axisZ:"sizeZ",mainAxis:"x",customComponent:fe,onChange:ye("separateAxes"),min:0,yRangeMode:"positive",label:m("effects.renderer.over-lifetime.size.label")}),O()],x.prototype,"size",2);P([C({module:"rotationOverLifetime",toggleProps:"separateAxes",toggleLabel:"effects.curve.separate-axes",axisX:"rotationX",axisY:"rotationY",axisZ:"rotationZ",mainAxis:"z",customComponent:fe,onChange:ye("separateAxes"),step:1,yTickScale:45,label:m("effects.renderer.over-lifetime.rotation.label")}),O()],x.prototype,"rotation",2);P([V({getPath:"generator.textureSheetAnimation.type",setPath:"generator.textureSheetAnimation.type"}),C({type:R.Select,value:0,label:m("effects.renderer.texture-sheet.type.label"),info:m("effects.renderer.texture-sheet.type.info"),options:[{label:m("effects.renderer.texture-sheet.type.options.whole-sheet"),value:0},{label:m("effects.renderer.texture-sheet.type.options.single-row"),value:1}]}),O()],x.prototype,"textureSheetAnimationType",2);P([V({getPath:"generator.textureSheetAnimation.cycleCount",setPath:"generator.textureSheetAnimation.cycleCount"}),C({bindPath:"generator.textureSheetAnimation.cycleCount",min:1e-4,step:1,dragStep:1,label:m("effects.renderer.texture-sheet.cycle-count.label"),info:m("effects.renderer.texture-sheet.cycle-count.info")}),O()],x.prototype,"cycleCount",2);P([C({type:R.Vector2,min:1,label:m("effects.renderer.texture-sheet.tiling.label"),info:m("effects.renderer.texture-sheet.tiling.info"),onChange(a,e,t){a.applyBoundPathChange("generator.textureSheetAnimation.tiling",R.Vector2,t)}}),O()],x.prototype,"tiling",2);P([C({customComponent:N,onChange:G,min:0,max:1,yRangeMode:"positive",label:m("effects.renderer.over-lifetime.frame.label")}),O()],x.prototype,"frameOverTime",2);P([V({getPath:"generator.velocityOverLifetime.space",setPath:"generator.velocityOverLifetime.space"}),C({type:R.Select,bindPath:"generator.velocityOverLifetime.space",value:0,label:m("effects.renderer.space-mode.label"),info:m("effects.renderer.space-mode.info"),options:[{label:m("effects.renderer.space-mode.options.local"),value:K.Local},{label:m("effects.renderer.space-mode.options.world"),value:K.World}]}),O()],x.prototype,"spaceMode",2);P([V({getPath:"generator.forceOverLifetime.space",setPath:"generator.forceOverLifetime.space"}),C({type:R.Select,bindPath:"generator.forceOverLifetime.space",value:0,label:m("effects.renderer.space-mode.label"),info:m("effects.renderer.space-mode.info-force"),options:[{label:"Local",value:K.Local},{label:"World",value:K.World}]}),O()],x.prototype,"forceSpaceMode",2);P([C({customComponent:N,onChange:G,label:m("effects.renderer.velocity.x.label"),info:m("effects.renderer.velocity.x.info")}),O()],x.prototype,"velocityX",2);P([C({customComponent:N,onChange:G,label:m("effects.renderer.velocity.y.label")}),O()],x.prototype,"velocityY",2);P([C({customComponent:N,onChange:G,label:m("effects.renderer.velocity.z.label")}),O()],x.prototype,"velocityZ",2);P([C({module:"limitVelocityOverLifetime",toggleProps:"separateAxes",toggleLabel:"effects.curve.separate-axes",axisX:"speedX",axisY:"speedY",axisZ:"speedZ",mainAxis:"x",customComponent:fe,onChange:ye("separateAxes"),min:0,yRangeMode:"positive",label:m("effects.renderer.limit-velocity.limit.label")}),O()],x.prototype,"speed",2);P([V({getPath:"generator.limitVelocityOverLifetime.space",setPath:"generator.limitVelocityOverLifetime.space"}),C({type:R.Select,bindPath:"generator.limitVelocityOverLifetime.space",value:0,when:a=>a.speed.enabled,label:m("effects.renderer.space-mode.label"),info:m("effects.renderer.limit-velocity.space.info"),options:[{label:m("effects.renderer.space-mode.options.local"),value:K.Local},{label:m("effects.renderer.space-mode.options.world"),value:K.World}]}),O()],x.prototype,"limitVelocitySpaceMode",2);P([V({getPath:"generator.limitVelocityOverLifetime.dampen",setPath:"generator.limitVelocityOverLifetime.dampen"}),C({bindPath:"generator.limitVelocityOverLifetime.dampen",min:0,max:1,step:.01,dragStep:.01,label:m("effects.renderer.limit-velocity.dampen.label"),info:m("effects.renderer.limit-velocity.dampen.info")}),O()],x.prototype,"dampen",2);P([C({customComponent:N,onChange:G,min:0,yRangeMode:"positive",label:m("effects.renderer.limit-velocity.drag.label"),info:m("effects.renderer.limit-velocity.drag.info")}),O()],x.prototype,"drag",2);P([V({getPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleSize",setPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleSize"}),C({type:R.Toggle,bindPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleSize",label:m("effects.renderer.limit-velocity.multiply-drag-by-size.label"),info:m("effects.renderer.limit-velocity.multiply-drag-by-size.info")}),O()],x.prototype,"multiplyDragByParticleSize",2);P([V({getPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleVelocity",setPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleVelocity"}),C({type:R.Toggle,bindPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleVelocity",label:m("effects.renderer.limit-velocity.multiply-drag-by-velocity.label"),info:m("effects.renderer.limit-velocity.multiply-drag-by-velocity.info")}),O()],x.prototype,"multiplyDragByParticleVelocity",2);P([C({customComponent:N,onChange:G}),O()],x.prototype,"forceX",2);P([C({customComponent:N,onChange:G}),O()],x.prototype,"forceY",2);P([C({customComponent:N,onChange:G}),O()],x.prototype,"forceZ",2);P([C({customComponent:or,onChange:nr,label:m("effects.renderer.color-over-lifetime.label")}),O()],x.prototype,"color",2);P([C({customComponent:lr,label:m("effects.renderer.noise.preview.label")})],x.prototype,"noisePreview",2);P([C({module:"noise",toggleProps:"separateAxes",toggleLabel:"effects.curve.separate-axes",axisX:"strengthX",axisY:"strengthY",axisZ:"strengthZ",mainAxis:"x",customComponent:fe,onChange:(a,e,t)=>{ye("separateAxes")(a,"strength",t)},label:m("effects.renderer.noise.strength.label")}),O()],x.prototype,"noiseStrength",2);P([V({getPath:"generator.noise.frequency",setPath:"generator.noise.frequency"}),C({bindPath:"generator.noise.frequency",min:1e-6,step:.1,dragStep:.1,label:m("effects.renderer.noise.frequency.label")}),O()],x.prototype,"noiseFrequency",2);P([V({getPath:"generator.noise.scrollSpeed",setPath:"generator.noise.scrollSpeed"}),C({bindPath:"generator.noise.scrollSpeed",min:0,step:.01,dragStep:.01,label:m("effects.renderer.noise.scroll-speed.label")}),O()],x.prototype,"noiseScrollSpeed",2);P([V({getPath:"generator.noise.octaveCount",setPath:"generator.noise.octaveCount"}),C({bindPath:"generator.noise.octaveCount",min:1,max:3,step:1,dragStep:1,label:m("effects.renderer.noise.octave-count.label")}),O()],x.prototype,"noiseOctaveCount",2);P([V({getPath:"generator.noise.octaveIntensityMultiplier",setPath:"generator.noise.octaveIntensityMultiplier"}),C({bindPath:"generator.noise.octaveIntensityMultiplier",min:0,max:1,step:.01,dragStep:.01,when:a=>a.noiseOctaveCount>1,label:m("effects.renderer.noise.octave-intensity-multiplier.label")}),O()],x.prototype,"noiseOctaveIntensityMultiplier",2);P([V({getPath:"generator.noise.octaveFrequencyMultiplier",setPath:"generator.noise.octaveFrequencyMultiplier"}),C({bindPath:"generator.noise.octaveFrequencyMultiplier",min:1,max:4,step:.1,dragStep:.1,when:a=>a.noiseOctaveCount>1,label:m("effects.renderer.noise.octave-frequency-multiplier.label")}),O()],x.prototype,"noiseOctaveFrequencyMultiplier",2);x=P([xa({type:"ParticleRenderer",customInspector:_a,componentsMenu:{group:"effects",label:m("component.particle-renderer.title")}})],x);export{x as ParticleRendererComponent};
|