@galacean/cli 2.0.0-alpha.12 → 2.0.0-alpha.14
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 +134 -135
- package/dist/viewport-client/_static/Accordion-3d330bc6.js +1 -0
- package/dist/viewport-client/_static/{AmbientLightAsset-f70b95f1.js → AmbientLightAsset-bdbc4e1d.js} +2 -2
- package/dist/viewport-client/_static/AnimationClipAsset-9167378a.js +1 -0
- package/dist/viewport-client/_static/AnimatorControllerAsset-21dc6332.js +1 -0
- package/dist/viewport-client/_static/AnimatorStore-18d3c551.js +1 -0
- package/dist/viewport-client/_static/{AssetViewer-bc198e16.js → AssetViewer-64cd01fa.js} +1 -1
- package/dist/viewport-client/_static/AudioAsset-0c828c80.js +1 -0
- package/dist/viewport-client/_static/AudioComponent-fbff3825.js +1 -0
- package/dist/viewport-client/_static/{Callout-cb4a55ff.js → Callout-ba7e2adf.js} +1 -1
- package/dist/viewport-client/_static/CameraComponent-74975570.js +1 -0
- package/dist/viewport-client/_static/{Component-f923abb1.js → Component-ed7aa0ab.js} +1 -1
- package/dist/viewport-client/_static/DirectLight-b884e7db.js +1 -0
- package/dist/viewport-client/_static/FontAsset-d1ced18d.js +5 -0
- package/dist/viewport-client/_static/FormItemArray-6d69acd4.js +6 -0
- package/dist/viewport-client/_static/{GlTFAsset-9c68f862.js → GlTFAsset-2723b84a.js} +9 -9
- package/dist/viewport-client/_static/IconEdit-ab77303f.js +6 -0
- package/dist/viewport-client/_static/{IconPointFilled-a304fd34.js → IconPointFilled-811fc660.js} +1 -1
- package/dist/viewport-client/_static/LightBaseComponent-12dc27d1.js +1 -0
- package/dist/viewport-client/_static/LottieAnimationComponent-c48c5eb5.js +1 -0
- package/dist/viewport-client/_static/LottieAsset-3692580d.js +6 -0
- package/dist/viewport-client/_static/MarkdownAsset-bcb90be4.js +1 -0
- package/dist/viewport-client/_static/MaterialAsset-6ef9b4ed.js +1 -0
- package/dist/viewport-client/_static/MaterialInspector-e8242674.js +1 -0
- package/dist/viewport-client/_static/Menu-0b8da92f.js +17 -0
- package/dist/viewport-client/_static/MeshAsset-ca9305e5.js +1 -0
- package/dist/viewport-client/_static/MeshRendererBaseComponent-9efd3943.js +1 -0
- package/dist/viewport-client/_static/MeshRendererComponent-c9a03641.js +1 -0
- package/dist/viewport-client/_static/{MeshThumbnail-49273f71.js → MeshThumbnail-ab28b3b8.js} +1 -1
- package/dist/viewport-client/_static/ParticleRendererComponent-96947c1d.js +26 -0
- package/dist/viewport-client/_static/PhysicsMaterialAsset-4a1e5ea3.js +1 -0
- package/dist/viewport-client/_static/PhysicsStore-33cac578.js +1 -0
- package/dist/viewport-client/_static/PointLight-fd514526.js +1 -0
- package/dist/viewport-client/_static/PostProcessComponent-d0ea27a4.js +6 -0
- package/dist/viewport-client/_static/PrefabAsset-9179b95c.js +1 -0
- package/dist/viewport-client/_static/PrimitiveMesh-0572a073.js +1 -0
- package/dist/viewport-client/_static/ProxyConfigs-3a5fd860.js +1 -0
- package/dist/viewport-client/_static/{ReferencedMaterial-a87818f3.js → ReferencedMaterial-5773c9d2.js} +1 -1
- package/dist/viewport-client/_static/RenderTargetAsset-ab6e06d2.js +1 -0
- package/dist/viewport-client/_static/SceneAsset-385fa837.js +1 -0
- package/dist/viewport-client/_static/{ShaderAsset-cb3ff628.js → ShaderAsset-f4514b03.js} +6 -6
- package/dist/viewport-client/_static/ShaderChunkAsset-34116f2c.js +5 -0
- package/dist/viewport-client/_static/{ShaderUIScriptAsset-d13fa4e2.js → ShaderUIScriptAsset-fc503291.js} +5 -5
- package/dist/viewport-client/_static/SkinnedMeshRendererComponent-494ad439.js +1 -0
- package/dist/viewport-client/_static/SpineAnimationComponent-3918d7b5.js +1 -0
- package/dist/viewport-client/_static/SpineSkeletonDataAsset-27244892.js +1 -0
- package/dist/viewport-client/_static/SpotLight-f9972dc0.js +1 -0
- package/dist/viewport-client/_static/SpriteAsset-558ffca8.js +6 -0
- package/dist/viewport-client/_static/SpriteAtlasAsset-cdc34386.js +1 -0
- package/dist/viewport-client/_static/SpriteBaseComponent-3edafa31.js +1 -0
- package/dist/viewport-client/_static/SpriteMaskComponent-de2e5231.js +1 -0
- package/dist/viewport-client/_static/SpriteRendererComponent-e999e735.js +1 -0
- package/dist/viewport-client/_static/{TextBaseComponent-69233798.js → TextBaseComponent-ce1402c3.js} +2 -2
- package/dist/viewport-client/_static/TextRendererComponent-f7c0deae.js +1 -0
- package/dist/viewport-client/_static/TextureAsset-39fb07fe.js +36 -0
- package/dist/viewport-client/_static/Tooltip-82063435.js +1 -0
- package/dist/viewport-client/_static/TrailRendererComponent-37f5c981.js +1 -0
- package/dist/viewport-client/_static/TransformBaseComponent-713d57e9.js +1 -0
- package/dist/viewport-client/_static/TransformComponent-40a57948.js +1 -0
- package/dist/viewport-client/_static/XRReferenceImageAsset-2f6ff226.js +1 -0
- package/dist/viewport-client/_static/audio-7120ec91.js +1 -0
- package/dist/viewport-client/_static/glTFIO-79bbca27.js +1 -0
- package/dist/viewport-client/_static/index-483b5738.js +1 -0
- package/dist/viewport-client/_static/{index-98982ce2.js → index-74130ff3.js} +1 -1
- package/dist/viewport-client/_static/index-78269e76.js +1 -0
- package/dist/viewport-client/_static/index-7834b582.js +1 -0
- package/dist/viewport-client/_static/{index-237c84cd.js → index-7917f782.js} +3 -3
- package/dist/viewport-client/_static/index-7acd49d2.js +1 -0
- package/dist/viewport-client/_static/index-9d3917da.js +1 -0
- package/dist/viewport-client/_static/index-a9b2675e.js +1 -0
- package/dist/viewport-client/_static/index-aec7e708.js +11487 -0
- package/dist/viewport-client/_static/index-b5582401.js +1 -0
- package/dist/viewport-client/_static/{index-e46ec5b1.js → index-bfe6f30e.js} +7 -7
- package/dist/viewport-client/_static/index-c63c9606.js +2 -0
- package/dist/viewport-client/_static/index-cd1fee9d.js +1 -0
- package/dist/viewport-client/_static/index-e73ceaed.js +1 -0
- package/dist/viewport-client/_static/index-e8a45e82.js +1 -0
- package/dist/viewport-client/_static/index-f2cb64af.js +1 -0
- package/dist/viewport-client/_static/index-fbe040bf.js +31 -0
- package/dist/viewport-client/_static/ktx2-encoder-53b21bdc.js +1 -0
- package/dist/viewport-client/_static/{module-5c85b07e.js → module-220b3921.js} +1 -1
- package/dist/viewport-client/_static/{module-6406b050.js → module-8816772d.js} +1 -1
- package/dist/viewport-client/_static/{module-107b7430.js → module-ffeaf99f.js} +1 -1
- package/dist/viewport-client/_static/postmen-2f47f6bb.js +1 -0
- package/dist/viewport-client/index.html +2 -2
- package/package.json +1 -1
- package/dist/viewport-client/_static/Accordion-4897319b.js +0 -6
- package/dist/viewport-client/_static/AnimationClipAsset-01f3deb6.js +0 -1
- package/dist/viewport-client/_static/AnimatorControllerAsset-b7424e9c.js +0 -1
- package/dist/viewport-client/_static/AnimatorStore-fd98c00e.js +0 -1
- package/dist/viewport-client/_static/AssetPreviewer-24e31d97.js +0 -6
- package/dist/viewport-client/_static/AudioAsset-eae03324.js +0 -1
- package/dist/viewport-client/_static/AudioComponent-44070c2c.js +0 -1
- package/dist/viewport-client/_static/CameraComponent-907ac745.js +0 -1
- package/dist/viewport-client/_static/CanvasRenderer-9dd98cb3.js +0 -1
- package/dist/viewport-client/_static/DirectLight-58f5fe9e.js +0 -1
- package/dist/viewport-client/_static/FontAsset-abfb9a8a.js +0 -5
- package/dist/viewport-client/_static/FormItemArray-66be8701.js +0 -1
- package/dist/viewport-client/_static/IconPlayerPlayFilled-b058c98f.js +0 -6
- package/dist/viewport-client/_static/InstanceEditorAsset-a70e73fe.js +0 -1
- package/dist/viewport-client/_static/LightBaseComponent-fbc3ae49.js +0 -1
- package/dist/viewport-client/_static/LottieAnimationComponent-1c3e02a5.js +0 -1
- package/dist/viewport-client/_static/LottieAsset-377c1419.js +0 -1
- package/dist/viewport-client/_static/MarkdownAsset-7ea387a9.js +0 -1
- package/dist/viewport-client/_static/MaterialAsset-74a15124.js +0 -1
- package/dist/viewport-client/_static/MaterialInspector-aec1248b.js +0 -1
- package/dist/viewport-client/_static/Menu-cd3be298.js +0 -17
- package/dist/viewport-client/_static/MeshAsset-73e2cc8e.js +0 -1
- package/dist/viewport-client/_static/MeshRendererBaseComponent-3a0e09ed.js +0 -1
- package/dist/viewport-client/_static/MeshRendererComponent-5385d30f.js +0 -1
- package/dist/viewport-client/_static/ParticleRendererComponent-5a7b57d9.js +0 -21
- package/dist/viewport-client/_static/PhysicsMaterialAsset-a5ac9f82.js +0 -1
- package/dist/viewport-client/_static/PhysicsStore-0729e76d.js +0 -1
- package/dist/viewport-client/_static/PointLight-0e1d1546.js +0 -1
- package/dist/viewport-client/_static/PostProcessComponent-8276d33c.js +0 -1
- package/dist/viewport-client/_static/PrefabAsset-1a7edfbd.js +0 -1
- package/dist/viewport-client/_static/PrimitiveMesh-3ce6fa2f.js +0 -1
- package/dist/viewport-client/_static/ProxyConfigs-4de3304c.js +0 -1
- package/dist/viewport-client/_static/RenderTargetAsset-33c0d9e7.js +0 -1
- package/dist/viewport-client/_static/SceneAsset-8917c210.js +0 -1
- package/dist/viewport-client/_static/ShaderChunkAsset-83f923f4.js +0 -5
- package/dist/viewport-client/_static/SkinnedMeshRendererComponent-2a8323bf.js +0 -1
- package/dist/viewport-client/_static/SpineAnimationComponent-e733d50f.js +0 -1
- package/dist/viewport-client/_static/SpineSkeletonDataAsset-b64a3ee3.js +0 -1
- package/dist/viewport-client/_static/SpotLight-ca6c0c3b.js +0 -1
- package/dist/viewport-client/_static/SpriteAsset-9a31ec24.js +0 -1
- package/dist/viewport-client/_static/SpriteAtlasAsset-a862db46.js +0 -1
- package/dist/viewport-client/_static/SpriteBaseComponent-f6f1731f.js +0 -1
- package/dist/viewport-client/_static/SpriteMaskComponent-778be04f.js +0 -1
- package/dist/viewport-client/_static/SpriteRendererComponent-2b4d153b.js +0 -1
- package/dist/viewport-client/_static/TextRendererComponent-130b4e99.js +0 -1
- package/dist/viewport-client/_static/TextureAsset-28fedf2a.js +0 -36
- package/dist/viewport-client/_static/ThumbnailMixin-35997457.js +0 -1
- package/dist/viewport-client/_static/ThumbnailRegistry-495c18c9.js +0 -1
- package/dist/viewport-client/_static/Tooltip-33f770ba.js +0 -1
- package/dist/viewport-client/_static/TrailRendererComponent-148550b5.js +0 -1
- package/dist/viewport-client/_static/TransformBaseComponent-02318c5a.js +0 -1
- package/dist/viewport-client/_static/TransformComponent-96106065.js +0 -1
- package/dist/viewport-client/_static/ViewerManager-202b570a.js +0 -1
- package/dist/viewport-client/_static/XRReferenceImageAsset-6a6adb3b.js +0 -1
- package/dist/viewport-client/_static/audio-244358e2.js +0 -1
- package/dist/viewport-client/_static/glTFIO-45ff9a17.js +0 -1
- package/dist/viewport-client/_static/index-0a8702e2.js +0 -11217
- package/dist/viewport-client/_static/index-37c74ae9.js +0 -26
- package/dist/viewport-client/_static/index-4cca0201.js +0 -1
- package/dist/viewport-client/_static/index-59732f86.js +0 -1
- package/dist/viewport-client/_static/index-6c8198f6.js +0 -2
- package/dist/viewport-client/_static/index-6f827618.js +0 -1
- package/dist/viewport-client/_static/index-803ca489.js +0 -1
- package/dist/viewport-client/_static/index-85a6cf6a.js +0 -1
- package/dist/viewport-client/_static/index-b3d51f87.js +0 -1
- package/dist/viewport-client/_static/index-be6bc38a.js +0 -177
- package/dist/viewport-client/_static/index-c403cbcd.js +0 -1
- package/dist/viewport-client/_static/index-e73966ae.js +0 -1
- package/dist/viewport-client/_static/index-e95b4498.js +0 -1
- package/dist/viewport-client/_static/index-f5a67a46.js +0 -1
- package/dist/viewport-client/_static/ktx-parse.modern-6c9f771f.js +0 -1
- package/dist/viewport-client/_static/ktx2-encoder-1e63c1eb.js +0 -1
- package/dist/viewport-client/_static/postmen-45d4c238.js +0 -1
- package/dist/viewport-client/_static/utilities-e09052e3.js +0 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var L=Object.defineProperty;var A=(d,e,t)=>e in d?L(d,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):d[e]=t;var S=(d,e,t)=>(A(d,typeof e!="symbol"?e+"":e,t),t);import{aO as x,aX as N,aQ as j,aU as $,aS as s,aP as M,C as n,bL as V,aD as F,bM as B,aW as f,aR as P,bN as W,e as O}from"./index-aec7e708.js";import{u as T}from"./index-e8a45e82.js";import{I as z}from"./IconPointFilled-811fc660.js";const U=x(z,{marginRight:"-$1",variants:{checked:{true:{color:"$green10"}}}}),Q=x(N,{width:"100%",border:"none",position:"relative",whiteSpace:"pre-wrap",boxShadow:"$2","& > svg":{marginRight:"$1"}});function b(d){return j(function(t){const{inspectorConfig:r,macroConfig:c,...p}=t,{model:i}=p;let{models:g}=p;const{checked:u,onSwitch:h}=c,{type:m,...a}=r,[o,l]=$.useState(u);$.useEffect(()=>{l(u)},[u]),g=g||[i];const R=()=>{const I=!o;if(h)for(const k of g)h(I,k);l(I)},v=r.label;return s.jsxs(M,{direction:"column",fullWidth:!0,children:[m!==n.Null&&o&&V.createElement(d,{...p,inspectorConfig:{...a,type:m}}),s.jsx(F,{label:o?"":v,children:s.jsx(Q,{size:"sm",variant:"subtle",startSlot:s.jsx(U,{size:"12px",checked:o}),onClick:R,children:o?"Enabled ":"Disabled"})})]})})}const X=x(M),q=x(B,{backgroundColor:"$gray1",height:"2px !important"});function D(d){const{inspectorConfig:e,models:t,onModelChange:r,model:c,macroConfig:p}=d,{type:i,property:g,info:u}=e,{t:h}=P(),m=!c&&t&&t.length>1;if(m&&!t.find(y=>e.when?e.when(y):!0)||e.when&&!e.when(c))return null;const a=p?w.getRegisteredMacroComponent(i):w.getRegisteredComponent(i);if(!a)return console.warn(`缺少${i}类型的组件`),null;let o=e.disabled;!m&&c.getEditable&&(o=c.getEditable(e.property)===!1);const l=typeof e.label=="string"?h(e.label):e.label;let R=e.options;R&&(R=R.map(y=>({label:typeof y.label=="string"?h(y.label):y.label,value:y.value})));const v={...e,label:l,info:u,options:R,disabled:o},{triggerAfterInit:I,customComponent:k,...E}=v;return s.jsx(a,{inspectorConfig:E,macroConfig:p,models:t,model:c,onModelChange:r},g)}const C=class C{static registerComponent(e,t){this.components[e]=t}static getRegisteredComponent(e){return C.components[e]}static getRegisteredMacroComponent(e){return C.macroComponents[e]}};S(C,"components",f.getRegisteredComponents()),S(C,"macroComponents",{[n.Color]:b(f.getRegisteredComponent(n.Color)),[n.Vector4]:b(f.getRegisteredComponent(n.Vector4)),[n.Vector3]:b(f.getRegisteredComponent(n.Vector3)),[n.Vector2]:b(f.getRegisteredComponent(n.Vector2)),[n.Number]:b(f.getRegisteredComponent(n.Number)),[n.AssetPicker]:b(f.getRegisteredComponent(n.AssetPicker)),[n.Boolean]:b(f.getRegisteredComponent(n.Boolean)),[n.Null]:b(f.getRegisteredComponent(n.Null))}),S(C,"Item",j(D)),S(C,"List",j(function(t){const{configs:r,models:c,css:p,onModelChange:i,model:g,children:u,fullWidth:h=!1,withSeparator:m}=t;return r!=null&&r.length&&r.sort((a,o)=>{const l=a.priority??0;return(o.priority??0)-l}),r?s.jsxs(X,{css:p,className:"shader-inspector-form",fullWidth:h,children:[r.map(a=>s.jsxs($.Fragment,{children:[s.jsx(C.Item,{inspectorConfig:a,macroConfig:a.macroConfig,model:g,models:c,onModelChange:i},a.property),m&&s.jsx(q,{})]},a.property)),u]}):null}));let w=C;const G=x("div",{backgroundColor:"$appBg",width:"100%"}),H=x("div",{backgroundColor:"$panelBg",borderRadius:"0 0 $2 $2",overflow:"hidden",paddingBottom:"$1"}),J=x("div",{width:"100%",backgroundColor:"$gray3",paddingBottom:"$0_5"}),K=x(B,{backgroundColor:"$appBg",height:"2px !important"}),Y=d=>{var a;const{asset:e}=d,t=e.formConfig,{assetStore:r,inspectorFacade:c}=T(),{i18n:p}=P(),i=r.assets[e.shaderRef.refId],g=i==null?void 0:i.name,u=Object.values(r.assets).filter(o=>o.meta.type==="Shader"&&o.meta.utility!=="error"),h=()=>{r.selectAsset(e.shaderRef.refId)},m=(o,l)=>{c.assetChange(e.id,o,l)};if(t.root)for(const o of t.root){const l=o.comments;l&&(o.info=l[p.language]??l.default??void 0)}return s.jsxs(G,{children:[s.jsx(J,{children:s.jsx(W,{label:O("asset.shader.title"),assets:u,disabled:!!(i!=null&&i.isSubAsset)||e.isSubAsset||!e.getEditable(),value:g,dropLayer:0,onSelect:async o=>{await e.bindShaderAsset(o,e._getMainData()),await c.assetChanges(e.id,{shaderRef:e.shaderRef,shader:e.shader})},onLocate:h})}),((a=t.root)==null?void 0:a.length)>0&&s.jsx(H,{children:s.jsx(w.List,{model:e,onModelChange:m,configs:t.root,withSeparator:!1})}),s.jsx(K,{}),s.jsx(w.List,{model:e,onModelChange:m,configs:Object.values(t.groups)})]})},oe=j(Y);export{oe as M};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{aH as _r,aC as c,aO as P,b3 as a,g7 as dt,g8 as bc,b8 as pe,g9 as Mc,ga as wc,gb as Sc,gc as Rc,gd as yc,ge as Ec,gf as Pc,gg as _c,gh as Ic,gi as Ac,gj as F,ds as me,bb as Ne,b9 as $e,be as ee,gk as sn,gl as Ir,gm as Tc,dy as cn,gn as Nc,go as $c,ba as U,bd as G,dt as Ar,du as bt,gp as Tr,gq as Nr,gr as $r,gs as J,gt as Or,gu as jr,gv as Dr,gw as kr,gx as Lr,gy as Fr,b5 as un,b6 as ln,dv as Mt,gz as Oe,dw as Gr,dx as ge,bc as R,gA as dn,dz as Ur,gB as fn,dA as Kr,gC as Br,dB as wt,gD as Oc,gE as Nt,gF as $t,gG as Ot,gH as Ee,gI as er,gJ as jt,gK as Dt,gL as kt,gM as Lt,gN as Ft,gO as tr,bj as jc,gP as Dc}from"./index-aec7e708.js";/**
|
|
2
|
+
* @license @tabler/icons-react v3.17.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 kc=_r("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.17.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 Lc=_r("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 Fc=e=>c.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:[c.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"}),c.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"})]}),Gc=e=>c.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:[c.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)"}),c.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"})]}),Uc=e=>c.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:[c.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)"}),c.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"})]}),nr={backspace:"⌫",delete:"Del",cmd:"⌘",alt:"⌥",option:"⌥",enter:"↩",ctrl:"⌃",shift:"⇧",tab:"⇥",capslock:"⇪"},Kc=["OF","TF","MLD","MRD","MDD"],Bc={OF:c.jsx(kc,{width:"16px",height:"18px",stroke:"var(--colors-gray8)",strokeWidth:1.2,fill:"var(--colors-grayA2)",style:{marginLeft:"2px"}}),TF:c.jsx(Lc,{width:"16px",height:"18px",stroke:"var(--colors-gray8)",strokeWidth:1.2,fill:"var(--colors-grayA2)",style:{marginLeft:"2px"}}),MLD:c.jsx(Gc,{width:"18px",height:"18px",stroke:"var(--colors-gray8)",fill:"var(--colors-gray8)",strokeWidth:1.2}),MRD:c.jsx(Uc,{width:"18px",height:"18px",stroke:"var(--colors-gray8)",fill:"var(--colors-gray8)",strokeWidth:1.2}),MDD:c.jsx(Fc,{width:"18px",height:"18px",stroke:"var(--colors-gray8)",fill:"var(--colors-gray8)",strokeWidth:1.2})},Vc=P("span",{display:"inline-block",marginLeft:"-1",height:"18px",width:"18px",variants:{half:{true:{marginLeft:"-0_5"}}}}),Wc=P("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}}),rr=P("div",{display:"inline-flex",alignItems:"center","& > kbd:last-child":{marginRight:0}}),or=Wc;function Hc(e){const{shortcuts:t,uppercase:n=!0,size:r="sm"}=e;if(!t)return null;if(Array.isArray(t))return c.jsx(rr,{children:t.map((s,u)=>Kc.indexOf(s)!==-1?c.jsx(Vc,{children:Bc[s]},u):c.jsx(or,{uppercase:n,size:r,children:nr[s]??s},u))});const o=t.split(/[,+]/).map(s=>nr[s]??s);return c.jsx(rr,{children:o.map((s,u)=>c.jsx(or,{uppercase:n,size:r,children:s},u))})}function j(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 ar(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function pn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ar(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():ar(e[o],null)}}}}function ce(...e){return a.useCallback(pn(...e),e)}function We(e,t=[]){let n=[];function r(s,u){const i=a.createContext(u),d=n.length;n=[...n,u];const p=l=>{var b;const{scope:m,children:v,...g}=l,h=((b=m==null?void 0:m[e])==null?void 0:b[d])||i,x=a.useMemo(()=>g,Object.values(g));return c.jsx(h.Provider,{value:x,children:v})};p.displayName=s+"Provider";function f(l,m){var h;const v=((h=m==null?void 0:m[e])==null?void 0:h[d])||i,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,f]}const o=()=>{const s=n.map(u=>a.createContext(u));return function(i){const d=(i==null?void 0:i[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return o.scopeName=e,[r,Yc(o,...t)]}function Yc(...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((i,{useScope:d,scopeName:p})=>{const l=d(s)[`__scope${p}`];return{...i,...l}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var Xc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ie=Xc.reduce((e,t)=>{const n=a.forwardRef((r,o)=>{const{asChild:s,...u}=r,i=s?dt:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(i,{...u,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function zc(e,t){e&&bc.flushSync(()=>e.dispatchEvent(t))}function Vr(e){const t=e+"CollectionProvider",[n,r]=We(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=v=>{const{scope:g,children:h}=v,x=pe.useRef(null),b=pe.useRef(new Map).current;return c.jsx(o,{scope:g,itemMap:b,collectionRef:x,children:h})};u.displayName=t;const i=e+"CollectionSlot",d=pe.forwardRef((v,g)=>{const{scope:h,children:x}=v,b=s(i,h),M=ce(g,b.collectionRef);return c.jsx(dt,{ref:M,children:x})});d.displayName=i;const p=e+"CollectionItemSlot",f="data-radix-collection-item",l=pe.forwardRef((v,g)=>{const{scope:h,children:x,...b}=v,M=pe.useRef(null),w=ce(g,M),S=s(p,h);return pe.useEffect(()=>(S.itemMap.set(M,{ref:M,...b}),()=>void S.itemMap.delete(M))),c.jsx(dt,{[f]:"",ref:w,children:x})});l.displayName=p;function m(v){const g=s(e+"CollectionConsumer",v);return pe.useCallback(()=>{const x=g.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((S,y)=>b.indexOf(S.ref.current)-b.indexOf(y.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:u,Slot:d,ItemSlot:l},m,r]}var Zc="Arrow",Wr=a.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsx(ie.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});Wr.displayName=Zc;var qc=Wr,mn="Popper",[Hr,Yr]=We(mn),[Qc,Xr]=Hr(mn),zr=e=>{const{__scopePopper:t,children:n}=e,[r,o]=a.useState(null);return c.jsx(Qc,{scope:t,anchor:r,onAnchorChange:o,children:n})};zr.displayName=mn;var Zr="PopperAnchor",qr=a.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Xr(Zr,n),u=a.useRef(null),i=ce(t,u);return a.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||u.current)}),r?null:c.jsx(ie.div,{...o,ref:i})});qr.displayName=Zr;var hn="PopperContent",[Jc,ei]=Hr(hn),Qr=a.forwardRef((e,t)=>{var L,ae,$,se,qn,Qn;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:u=0,arrowPadding:i=0,avoidCollisions:d=!0,collisionBoundary:p=[],collisionPadding:f=0,sticky:l="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:g,...h}=e,x=Xr(hn,n),[b,M]=a.useState(null),w=ce(t,je=>M(je)),[S,y]=a.useState(null),I=Mc(S),N=(I==null?void 0:I.width)??0,A=(I==null?void 0:I.height)??0,E=r+(s!=="center"?"-"+s:""),O=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},K=Array.isArray(p)?p:[p],V=K.length>0,X={padding:O,boundary:K.filter(ni),altBoundary:V},{refs:Z,floatingStyles:ue,placement:z,isPositioned:le,middlewareData:k}=wc({strategy:"fixed",placement:E,whileElementsMounted:(...je)=>Sc(...je,{animationFrame:v==="always"}),elements:{reference:x.anchor},middleware:[Rc({mainAxis:o+A,alignmentAxis:u}),d&&yc({mainAxis:!0,crossAxis:!1,limiter:l==="partial"?Ec():void 0,...X}),d&&Pc({...X}),_c({...X,apply:({elements:je,rects:Jn,availableWidth:vc,availableHeight:gc})=>{const{width:Cc,height:xc}=Jn.reference,rt=je.floating.style;rt.setProperty("--radix-popper-available-width",`${vc}px`),rt.setProperty("--radix-popper-available-height",`${gc}px`),rt.setProperty("--radix-popper-anchor-width",`${Cc}px`),rt.setProperty("--radix-popper-anchor-height",`${xc}px`)}}),S&&Ic({element:S,padding:i}),ri({arrowWidth:N,arrowHeight:A}),m&&Ac({strategy:"referenceHidden",...X})]}),[C,_]=to(z),T=F(g);me(()=>{le&&(T==null||T())},[le,T]);const D=(L=k.arrow)==null?void 0:L.x,q=(ae=k.arrow)==null?void 0:ae.y,Q=(($=k.arrow)==null?void 0:$.centerOffset)!==0,[de,B]=a.useState();return me(()=>{b&&B(window.getComputedStyle(b).zIndex)},[b]),c.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=k.transformOrigin)==null?void 0:se.x,(qn=k.transformOrigin)==null?void 0:qn.y].join(" "),...((Qn=k.hide)==null?void 0:Qn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Jc,{scope:n,placedSide:C,onArrowChange:y,arrowX:D,arrowY:q,shouldHideArrow:Q,children:c.jsx(ie.div,{"data-side":C,"data-align":_,...h,ref:w,style:{...h.style,animation:le?void 0:"none"}})})})});Qr.displayName=hn;var Jr="PopperArrow",ti={top:"bottom",right:"left",bottom:"top",left:"right"},eo=a.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=ei(Jr,r),u=ti[s.placedSide];return c.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:c.jsx(qc,{...o,ref:n,style:{...o.style,display:"block"}})})});eo.displayName=Jr;function ni(e){return e!==null}var ri=e=>({name:"transformOrigin",options:e,fn(t){var x,b,M;const{placement:n,rects:r,middlewareData:o}=t,u=((x=o.arrow)==null?void 0:x.centerOffset)!==0,i=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[p,f]=to(n),l={start:"0%",center:"50%",end:"100%"}[f],m=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,v=(((M=o.arrow)==null?void 0:M.y)??0)+d/2;let g="",h="";return p==="bottom"?(g=u?l:`${m}px`,h=`${-d}px`):p==="top"?(g=u?l:`${m}px`,h=`${r.floating.height+d}px`):p==="right"?(g=`${-d}px`,h=u?l:`${v}px`):p==="left"&&(g=`${r.floating.width+d}px`,h=u?l:`${v}px`),{data:{x:g,y:h}}}});function to(e){const[t,n="center"]=e.split("-");return[t,n]}var no=zr,oi=qr,ai=Qr,si=eo;function ci(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var He=e=>{const{present:t,children:n}=e,r=ii(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),s=ce(r.ref,ui(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:s}):null};He.displayName="Presence";function ii(e){const[t,n]=a.useState(),r=a.useRef({}),o=a.useRef(e),s=a.useRef("none"),u=e?"mounted":"unmounted",[i,d]=ci(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=i==="mounted"?p:"none"},[i]),me(()=>{const p=r.current,f=o.current;if(f!==e){const m=s.current,v=ot(p);e?d("MOUNT"):v==="none"||(p==null?void 0:p.display)==="none"?d("UNMOUNT"):d(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),me(()=>{if(t){let p;const f=t.ownerDocument.defaultView??window,l=v=>{const h=ot(r.current).includes(v.animationName);if(v.target===t&&h&&(d("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",p=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=v=>{v.target===t&&(s.current=ot(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{f.clearTimeout(p),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:a.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function ot(e){return(e==null?void 0:e.animationName)||"none"}function ui(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",li={bubbles:!1,cancelable:!0},St="RovingFocusGroup",[Xt,ro,di]=Vr(St),[fi,oo]=We(St,[di]),[pi,mi]=fi(St),ao=a.forwardRef((e,t)=>c.jsx(Xt.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Xt.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(hi,{...e,ref:t})})}));ao.displayName=St;var hi=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:u,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:d,onEntryFocus:p,preventScrollOnEntryFocus:f=!1,...l}=e,m=a.useRef(null),v=ce(t,m),g=Ne(s),[h=null,x]=$e({prop:u,defaultProp:i,onChange:d}),[b,M]=a.useState(!1),w=F(p),S=ro(n),y=a.useRef(!1),[I,N]=a.useState(0);return a.useEffect(()=>{const A=m.current;if(A)return A.addEventListener(Gt,w),()=>A.removeEventListener(Gt,w)},[w]),c.jsx(pi,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:h,onItemFocus:a.useCallback(A=>x(A),[x]),onItemShiftTab:a.useCallback(()=>M(!0),[]),onFocusableItemAdd:a.useCallback(()=>N(A=>A+1),[]),onFocusableItemRemove:a.useCallback(()=>N(A=>A-1),[]),children:c.jsx(ie.div,{tabIndex:b||I===0?-1:0,"data-orientation":r,...l,ref:v,style:{outline:"none",...e.style},onMouseDown:j(e.onMouseDown,()=>{y.current=!0}),onFocus:j(e.onFocus,A=>{const E=!y.current;if(A.target===A.currentTarget&&E&&!b){const O=new CustomEvent(Gt,li);if(A.currentTarget.dispatchEvent(O),!O.defaultPrevented){const K=S().filter(z=>z.focusable),V=K.find(z=>z.active),X=K.find(z=>z.id===h),ue=[V,X,...K].filter(Boolean).map(z=>z.ref.current);io(ue,f)}}y.current=!1}),onBlur:j(e.onBlur,()=>M(!1))})})}),so="RovingFocusGroupItem",co=a.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,...u}=e,i=ee(),d=s||i,p=mi(so,n),f=p.currentTabStopId===d,l=ro(n),{onFocusableItemAdd:m,onFocusableItemRemove:v}=p;return a.useEffect(()=>{if(r)return m(),()=>v()},[r,m,v]),c.jsx(Xt.ItemSlot,{scope:n,id:d,focusable:r,active:o,children:c.jsx(ie.span,{tabIndex:f?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:j(e.onMouseDown,g=>{r?p.onItemFocus(d):g.preventDefault()}),onFocus:j(e.onFocus,()=>p.onItemFocus(d)),onKeyDown:j(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){p.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const h=Ci(g,p.orientation,p.dir);if(h!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=l().filter(M=>M.focusable).map(M=>M.ref.current);if(h==="last")b.reverse();else if(h==="prev"||h==="next"){h==="prev"&&b.reverse();const M=b.indexOf(g.currentTarget);b=p.loop?xi(b,M+1):b.slice(M+1)}setTimeout(()=>io(b))}})})})});co.displayName=so;var vi={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gi(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Ci(e,t,n){const r=gi(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return vi[r]}function io(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function xi(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bi=ao,Mi=co,zt=["Enter"," "],wi=["ArrowDown","PageUp","Home"],uo=["ArrowUp","PageDown","End"],Si=[...wi,...uo],Ri={ltr:[...zt,"ArrowRight"],rtl:[...zt,"ArrowLeft"]},yi={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ye="Menu",[Fe,Ei,Pi]=Vr(Ye),[Se,lo]=We(Ye,[Pi,Yr,oo]),Xe=Yr(),fo=oo(),[po,Ce]=Se(Ye),[_i,ze]=Se(Ye),mo=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:u=!0}=e,i=Xe(t),[d,p]=a.useState(null),f=a.useRef(!1),l=F(s),m=Ne(o);return a.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.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})}},[]),c.jsx(no,{...i,children:c.jsx(po,{scope:t,open:n,onOpenChange:l,content:d,onContentChange:p,children:c.jsx(_i,{scope:t,onClose:a.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:f,dir:m,modal:u,children:r})})})};mo.displayName=Ye;var Ii="MenuAnchor",vn=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xe(n);return c.jsx(oi,{...o,...r,ref:t})});vn.displayName=Ii;var gn="MenuPortal",[Ai,ho]=Se(gn,{forceMount:void 0}),vo=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Ce(gn,t);return c.jsx(Ai,{scope:t,forceMount:n,children:c.jsx(He,{present:n||s.open,children:c.jsx($c,{asChild:!0,container:o,children:r})})})};vo.displayName=gn;var te="MenuContent",[Ti,Cn]=Se(te),go=a.forwardRef((e,t)=>{const n=ho(te,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ce(te,e.__scopeMenu),u=ze(te,e.__scopeMenu);return c.jsx(Fe.Provider,{scope:e.__scopeMenu,children:c.jsx(He,{present:r||s.open,children:c.jsx(Fe.Slot,{scope:e.__scopeMenu,children:u.modal?c.jsx(Ni,{...o,ref:t}):c.jsx($i,{...o,ref:t})})})})}),Ni=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 sn(s)},[]),c.jsx(xn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:j(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),$i=a.forwardRef((e,t)=>{const n=Ce(te,e.__scopeMenu);return c.jsx(xn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),xn=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:i,onEntryFocus:d,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:m,onDismiss:v,disableOutsideScroll:g,...h}=e,x=Ce(te,n),b=ze(te,n),M=Xe(n),w=fo(n),S=Ei(n),[y,I]=a.useState(null),N=a.useRef(null),A=ce(t,N,x.onContentChange),E=a.useRef(0),O=a.useRef(""),K=a.useRef(0),V=a.useRef(null),X=a.useRef("right"),Z=a.useRef(0),ue=g?Nc:a.Fragment,z=g?{as:dt,allowPinchZoom:!0}:void 0,le=C=>{var L,ae;const _=O.current+C,T=S().filter($=>!$.disabled),D=document.activeElement,q=(L=T.find($=>$.ref.current===D))==null?void 0:L.textValue,Q=T.map($=>$.textValue),de=Wi(Q,_,q),B=(ae=T.find($=>$.textValue===de))==null?void 0:ae.ref.current;(function $(se){O.current=se,window.clearTimeout(E.current),se!==""&&(E.current=window.setTimeout(()=>$(""),1e3))})(_),B&&setTimeout(()=>B.focus())};a.useEffect(()=>()=>window.clearTimeout(E.current),[]),Ir();const k=a.useCallback(C=>{var T,D;return X.current===((T=V.current)==null?void 0:T.side)&&Yi(C,(D=V.current)==null?void 0:D.area)},[]);return c.jsx(Ti,{scope:n,searchRef:O,onItemEnter:a.useCallback(C=>{k(C)&&C.preventDefault()},[k]),onItemLeave:a.useCallback(C=>{var _;k(C)||((_=N.current)==null||_.focus(),I(null))},[k]),onTriggerLeave:a.useCallback(C=>{k(C)&&C.preventDefault()},[k]),pointerGraceTimerRef:K,onPointerGraceIntentChange:a.useCallback(C=>{V.current=C},[]),children:c.jsx(ue,{...z,children:c.jsx(Tc,{asChild:!0,trapped:o,onMountAutoFocus:j(s,C=>{var _;C.preventDefault(),(_=N.current)==null||_.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:c.jsx(cn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:m,onDismiss:v,children:c.jsx(bi,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:y,onCurrentTabStopIdChange:I,onEntryFocus:j(d,C=>{b.isUsingKeyboardRef.current||C.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(ai,{role:"menu","aria-orientation":"vertical","data-state":Oo(x.open),"data-radix-menu-content":"",dir:b.dir,...M,...h,ref:A,style:{outline:"none",...h.style},onKeyDown:j(h.onKeyDown,C=>{const T=C.target.closest("[data-radix-menu-content]")===C.currentTarget,D=C.ctrlKey||C.altKey||C.metaKey,q=C.key.length===1;T&&(C.key==="Tab"&&C.preventDefault(),!D&&q&&le(C.key));const Q=N.current;if(C.target!==Q||!Si.includes(C.key))return;C.preventDefault();const B=S().filter(L=>!L.disabled).map(L=>L.ref.current);uo.includes(C.key)&&B.reverse(),Bi(B)}),onBlur:j(e.onBlur,C=>{C.currentTarget.contains(C.target)||(window.clearTimeout(E.current),O.current="")}),onPointerMove:j(e.onPointerMove,Ge(C=>{const _=C.target,T=Z.current!==C.clientX;if(C.currentTarget.contains(_)&&T){const D=C.clientX>Z.current?"right":"left";X.current=D,Z.current=C.clientX}}))})})})})})})});go.displayName=te;var Oi="MenuGroup",bn=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ie.div,{role:"group",...r,ref:t})});bn.displayName=Oi;var ji="MenuLabel",Co=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ie.div,{...r,ref:t})});Co.displayName=ji;var ft="MenuItem",sr="menu.itemSelect",Rt=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=a.useRef(null),u=ze(ft,e.__scopeMenu),i=Cn(ft,e.__scopeMenu),d=ce(t,s),p=a.useRef(!1),f=()=>{const l=s.current;if(!n&&l){const m=new CustomEvent(sr,{bubbles:!0,cancelable:!0});l.addEventListener(sr,v=>r==null?void 0:r(v),{once:!0}),zc(l,m),m.defaultPrevented?p.current=!1:u.onClose()}};return c.jsx(xo,{...o,ref:d,disabled:n,onClick:j(e.onClick,f),onPointerDown:l=>{var m;(m=e.onPointerDown)==null||m.call(e,l),p.current=!0},onPointerUp:j(e.onPointerUp,l=>{var m;p.current||(m=l.currentTarget)==null||m.click()}),onKeyDown:j(e.onKeyDown,l=>{const m=i.searchRef.current!=="";n||m&&l.key===" "||zt.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});Rt.displayName=ft;var xo=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,u=Cn(ft,n),i=fo(n),d=a.useRef(null),p=ce(t,d),[f,l]=a.useState(!1),[m,v]=a.useState("");return a.useEffect(()=>{const g=d.current;g&&v((g.textContent??"").trim())},[s.children]),c.jsx(Fe.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:c.jsx(Mi,{asChild:!0,...i,focusable:!r,children:c.jsx(ie.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:p,onPointerMove:j(e.onPointerMove,Ge(g=>{r?u.onItemLeave(g):(u.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:j(e.onPointerLeave,Ge(g=>u.onItemLeave(g))),onFocus:j(e.onFocus,()=>l(!0)),onBlur:j(e.onBlur,()=>l(!1))})})})}),Di="MenuCheckboxItem",bo=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return c.jsx(yo,{scope:e.__scopeMenu,checked:n,children:c.jsx(Rt,{role:"menuitemcheckbox","aria-checked":pt(n)?"mixed":n,...o,ref:t,"data-state":Sn(n),onSelect:j(o.onSelect,()=>r==null?void 0:r(pt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});bo.displayName=Di;var Mo="MenuRadioGroup",[ki,Li]=Se(Mo,{value:void 0,onValueChange:()=>{}}),wo=a.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=F(r);return c.jsx(ki,{scope:e.__scopeMenu,value:n,onValueChange:s,children:c.jsx(bn,{...o,ref:t})})});wo.displayName=Mo;var So="MenuRadioItem",Ro=a.forwardRef((e,t)=>{const{value:n,...r}=e,o=Li(So,e.__scopeMenu),s=n===o.value;return c.jsx(yo,{scope:e.__scopeMenu,checked:s,children:c.jsx(Rt,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Sn(s),onSelect:j(r.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});Ro.displayName=So;var Mn="MenuItemIndicator",[yo,Fi]=Se(Mn,{checked:!1}),Eo=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Fi(Mn,n);return c.jsx(He,{present:r||pt(s.checked)||s.checked===!0,children:c.jsx(ie.span,{...o,ref:t,"data-state":Sn(s.checked)})})});Eo.displayName=Mn;var Gi="MenuSeparator",Po=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(ie.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Po.displayName=Gi;var Ui="MenuArrow",_o=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Xe(n);return c.jsx(si,{...o,...r,ref:t})});_o.displayName=Ui;var wn="MenuSub",[Ki,Io]=Se(wn),Ao=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=Ce(wn,t),u=Xe(t),[i,d]=a.useState(null),[p,f]=a.useState(null),l=F(o);return a.useEffect(()=>(s.open===!1&&l(!1),()=>l(!1)),[s.open,l]),c.jsx(no,{...u,children:c.jsx(po,{scope:t,open:r,onOpenChange:l,content:p,onContentChange:f,children:c.jsx(Ki,{scope:t,contentId:ee(),triggerId:ee(),trigger:i,onTriggerChange:d,children:n})})})};Ao.displayName=wn;var De="MenuSubTrigger",To=a.forwardRef((e,t)=>{const n=Ce(De,e.__scopeMenu),r=ze(De,e.__scopeMenu),o=Io(De,e.__scopeMenu),s=Cn(De,e.__scopeMenu),u=a.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:d}=s,p={__scopeMenu:e.__scopeMenu},f=a.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return a.useEffect(()=>f,[f]),a.useEffect(()=>{const l=i.current;return()=>{window.clearTimeout(l),d(null)}},[i,d]),c.jsx(vn,{asChild:!0,...p,children:c.jsx(xo,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Oo(n.open),...e,ref:pn(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:j(e.onPointerMove,Ge(l=>{s.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(s.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:j(e.onPointerLeave,Ge(l=>{var v,g;f();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const h=(g=n.content)==null?void 0:g.dataset.side,x=h==="right",b=x?-5:5,M=m[x?"left":"right"],w=m[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:l.clientX+b,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(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(l),l.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:j(e.onKeyDown,l=>{var v;const m=s.searchRef.current!=="";e.disabled||m&&l.key===" "||Ri[r.dir].includes(l.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),l.preventDefault())})})})});To.displayName=De;var No="MenuSubContent",$o=a.forwardRef((e,t)=>{const n=ho(te,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Ce(te,e.__scopeMenu),u=ze(te,e.__scopeMenu),i=Io(No,e.__scopeMenu),d=a.useRef(null),p=ce(t,d);return c.jsx(Fe.Provider,{scope:e.__scopeMenu,children:c.jsx(He,{present:r||s.open,children:c.jsx(Fe.Slot,{scope:e.__scopeMenu,children:c.jsx(xn,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:p,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var l;u.isUsingKeyboardRef.current&&((l=d.current)==null||l.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:j(e.onFocusOutside,f=>{f.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:j(e.onEscapeKeyDown,f=>{u.onClose(),f.preventDefault()}),onKeyDown:j(e.onKeyDown,f=>{var v;const l=f.currentTarget.contains(f.target),m=yi[u.dir].includes(f.key);l&&m&&(s.onOpenChange(!1),(v=i.trigger)==null||v.focus(),f.preventDefault())})})})})})});$o.displayName=No;function Oo(e){return e?"open":"closed"}function pt(e){return e==="indeterminate"}function Sn(e){return pt(e)?"indeterminate":e?"checked":"unchecked"}function Bi(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Vi(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Wi(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=Vi(e,Math.max(s,0));o.length===1&&(u=u.filter(p=>p!==n));const d=u.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function Hi(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 i=t[s].x,d=t[s].y,p=t[u].x,f=t[u].y;d>r!=f>r&&n<(p-i)*(r-d)/(f-d)+i&&(o=!o)}return o}function Yi(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Hi(n,t)}function Ge(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Xi=mo,zi=vn,Zi=vo,qi=go,Qi=bn,Ji=Co,eu=Rt,tu=bo,nu=wo,ru=Ro,ou=Eo,au=Po,su=_o,cu=Ao,iu=To,uu=$o,Rn="DropdownMenu",[lu,Qp]=We(Rn,[lo]),W=lo(),[du,jo]=lu(Rn),Do=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:u,modal:i=!0}=e,d=W(t),p=a.useRef(null),[f=!1,l]=$e({prop:o,defaultProp:s,onChange:u});return c.jsx(du,{scope:t,triggerId:ee(),triggerRef:p,contentId:ee(),open:f,onOpenChange:l,onOpenToggle:a.useCallback(()=>l(m=>!m),[l]),modal:i,children:c.jsx(Xi,{...d,open:f,onOpenChange:l,dir:r,modal:i,children:n})})};Do.displayName=Rn;var ko="DropdownMenuTrigger",Lo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=jo(ko,n),u=W(n);return c.jsx(zi,{asChild:!0,...u,children:c.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:pn(t,s.triggerRef),onPointerDown:j(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:j(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Lo.displayName=ko;var fu="DropdownMenuPortal",Fo=e=>{const{__scopeDropdownMenu:t,...n}=e,r=W(t);return c.jsx(Zi,{...r,...n})};Fo.displayName=fu;var Go="DropdownMenuContent",Uo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=jo(Go,n),s=W(n),u=a.useRef(!1);return c.jsx(qi,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:j(e.onCloseAutoFocus,i=>{var d;u.current||(d=o.triggerRef.current)==null||d.focus(),u.current=!1,i.preventDefault()}),onInteractOutside:j(e.onInteractOutside,i=>{const d=i.detail.originalEvent,p=d.button===0&&d.ctrlKey===!0,f=d.button===2||p;(!o.modal||f)&&(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)"}})});Uo.displayName=Go;var pu="DropdownMenuGroup",Ko=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(Qi,{...o,...r,ref:t})});Ko.displayName=pu;var mu="DropdownMenuLabel",Bo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(Ji,{...o,...r,ref:t})});Bo.displayName=mu;var hu="DropdownMenuItem",Vo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(eu,{...o,...r,ref:t})});Vo.displayName=hu;var vu="DropdownMenuCheckboxItem",Wo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(tu,{...o,...r,ref:t})});Wo.displayName=vu;var gu="DropdownMenuRadioGroup",Ho=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(nu,{...o,...r,ref:t})});Ho.displayName=gu;var Cu="DropdownMenuRadioItem",Yo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(ru,{...o,...r,ref:t})});Yo.displayName=Cu;var xu="DropdownMenuItemIndicator",Xo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(ou,{...o,...r,ref:t})});Xo.displayName=xu;var bu="DropdownMenuSeparator",zo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(au,{...o,...r,ref:t})});zo.displayName=bu;var Mu="DropdownMenuArrow",wu=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(su,{...o,...r,ref:t})});wu.displayName=Mu;var Su=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,u=W(t),[i=!1,d]=$e({prop:r,defaultProp:s,onChange:o});return c.jsx(cu,{...u,open:i,onOpenChange:d,children:n})},Ru="DropdownMenuSubTrigger",Zo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(iu,{...o,...r,ref:t})});Zo.displayName=Ru;var yu="DropdownMenuSubContent",qo=a.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=W(n);return c.jsx(uu,{...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)"}})});qo.displayName=yu;var Qo=Do,Eu=Lo,Jo=Fo,Pu=Uo,_u=Ko,Iu=Bo,Au=Vo,Tu=Wo,Nu=Ho,$u=Yo,Ou=Xo,ju=zo,Du=Su,ku=Zo,Lu=qo,Ut=0;function Fu(){a.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??cr()),document.body.insertAdjacentElement("beforeend",e[1]??cr()),Ut++,()=>{Ut===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ut--}},[])}function cr(){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 Kt="focusScope.autoFocusOnMount",Bt="focusScope.autoFocusOnUnmount",ir={bubbles:!1,cancelable:!0},Gu="FocusScope",ea=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...u}=e,[i,d]=a.useState(null),p=F(o),f=F(s),l=a.useRef(null),m=U(t,h=>d(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||!i)return;const S=w.target;i.contains(S)?l.current=S:he(l.current,{select:!0})},x=function(w){if(v.paused||!i)return;const S=w.relatedTarget;S!==null&&(i.contains(S)||he(l.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const y of w)y.removedNodes.length>0&&he(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const M=new MutationObserver(b);return i&&M.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),M.disconnect()}}},[r,i,v.paused]),a.useEffect(()=>{if(i){lr.add(v);const h=document.activeElement;if(!i.contains(h)){const b=new CustomEvent(Kt,ir);i.addEventListener(Kt,p),i.dispatchEvent(b),b.defaultPrevented||(Uu(Hu(ta(i)),{select:!0}),document.activeElement===h&&he(i))}return()=>{i.removeEventListener(Kt,p),setTimeout(()=>{const b=new CustomEvent(Bt,ir);i.addEventListener(Bt,f),i.dispatchEvent(b),b.defaultPrevented||he(h??document.body,{select:!0}),i.removeEventListener(Bt,f),lr.remove(v)},0)}}},[i,p,f,v]);const g=a.useCallback(h=>{if(!n&&!r||v.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(x&&b){const M=h.currentTarget,[w,S]=Ku(M);w&&S?!h.shiftKey&&b===S?(h.preventDefault(),n&&he(w,{select:!0})):h.shiftKey&&b===w&&(h.preventDefault(),n&&he(S,{select:!0})):b===M&&h.preventDefault()}},[n,r,v.paused]);return c.jsx(G.div,{tabIndex:-1,...u,ref:m,onKeyDown:g})});ea.displayName=Gu;function Uu(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(he(r,{select:t}),document.activeElement!==n)return}function Ku(e){const t=ta(e),n=ur(t,e),r=ur(t.reverse(),e);return[n,r]}function ta(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 ur(e,t){for(const n of e)if(!Bu(n,{upTo:t}))return n}function Bu(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 Vu(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&&Vu(e)&&t&&e.select()}}var lr=Wu();function Wu(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=dr(e,t),e.unshift(t)},remove(t){var n;e=dr(e,t),(n=e[0])==null||n.resume()}}}function dr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Hu(e){return e.filter(t=>t.tagName!=="A")}var Yu="Portal",na=a.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=a.useState(!1);me(()=>s(!0),[]);const u=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return u?Ar.createPortal(c.jsx(G.div,{...r,ref:t}),u):null});na.displayName=Yu;var ra=a.forwardRef((e,t)=>{const{children:n,...r}=e,o=a.Children.toArray(n),s=o.find(zu);if(s){const u=s.props.children,i=o.map(d=>d===s?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:d);return c.jsx(Zt,{...r,ref:t,children:a.isValidElement(u)?a.cloneElement(u,void 0,i):null})}return c.jsx(Zt,{...r,ref:t,children:n})});ra.displayName="Slot";var Zt=a.forwardRef((e,t)=>{const{children:n,...r}=e;if(a.isValidElement(n)){const o=qu(n);return a.cloneElement(n,{...Zu(r,n.props),ref:t?bt(t,o):o})}return a.Children.count(n)>1?a.Children.only(null):null});Zt.displayName="SlotClone";var Xu=({children:e})=>c.jsx(c.Fragment,{children:e});function zu(e){return a.isValidElement(e)&&e.type===Xu}function Zu(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]=(...i)=>{s(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function qu(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 oa=Tr(),Vt=function(){},yt=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,i=e.children,d=e.className,p=e.removeScrollBar,f=e.enabled,l=e.shards,m=e.sideCar,v=e.noIsolation,g=e.inert,h=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,M=e.gapMode,w=Nr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,y=$r([n,t]),I=J(J({},w),o);return a.createElement(a.Fragment,null,f&&a.createElement(S,{sideCar:oa,removeScrollBar:p,shards:l,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:M}),u?a.cloneElement(a.Children.only(i),J(J({},I),{ref:y})):a.createElement(b,J({},I,{className:d,ref:y}),i))});yt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yt.classNames={fullWidth:Or,zeroRight:jr};var qt=!1;if(typeof window<"u")try{var at=Object.defineProperty({},"passive",{get:function(){return qt=!0,!0}});window.addEventListener("test",at,at),window.removeEventListener("test",at,at)}catch{qt=!1}var Pe=qt?{passive:!1}:!1,Qu=function(e){return e.tagName==="TEXTAREA"},aa=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Qu(e)&&n[t]==="visible")},Ju=function(e){return aa(e,"overflowY")},el=function(e){return aa(e,"overflowX")},fr=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=sa(e,r);if(o){var s=ca(e,r),u=s[1],i=s[2];if(u>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},tl=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},nl=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},sa=function(e,t){return e==="v"?Ju(t):el(t)},ca=function(e,t){return e==="v"?tl(t):nl(t)},rl=function(e,t){return e==="h"&&t==="rtl"?-1:1},ol=function(e,t,n,r,o){var s=rl(e,window.getComputedStyle(t).direction),u=s*r,i=n.target,d=t.contains(i),p=!1,f=u>0,l=0,m=0;do{var v=ca(e,i),g=v[0],h=v[1],x=v[2],b=h-x-s*g;(g||b)&&sa(e,i)&&(l+=b,m+=g),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!d&&i!==document.body||d&&(t.contains(i)||t===i));return(f&&(o&&Math.abs(l)<1||!o&&u>l)||!f&&(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]},pr=function(e){return[e.deltaX,e.deltaY]},mr=function(e){return e&&"current"in e?e.current:e},al=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sl=function(e){return`
|
|
12
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
13
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
14
|
+
`)},cl=0,_e=[];function il(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(cl++)[0],s=a.useState(Dr)[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=kr([e.lockRef.current],(e.shards||[]).map(mr),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=a.useCallback(function(h,x){if("touches"in h&&h.touches.length===2)return!u.current.allowPinchZoom;var b=st(h),M=n.current,w="deltaX"in h?h.deltaX:M[0]-b[0],S="deltaY"in h?h.deltaY:M[1]-b[1],y,I=h.target,N=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in h&&N==="h"&&I.type==="range")return!1;var A=fr(N,I);if(!A)return!0;if(A?y=N:(y=N==="v"?"h":"v",A=fr(N,I)),!A)return!1;if(!r.current&&"changedTouches"in h&&(w||S)&&(r.current=y),!y)return!0;var E=r.current||y;return ol(E,x,h,E==="h"?w:S,!0)},[]),d=a.useCallback(function(h){var x=h;if(!(!_e.length||_e[_e.length-1]!==s)){var b="deltaY"in x?pr(x):st(x),M=t.current.filter(function(y){return y.name===x.type&&(y.target===x.target||x.target===y.shadowParent)&&al(y.delta,b)})[0];if(M&&M.should){x.cancelable&&x.preventDefault();return}if(!M){var w=(u.current.shards||[]).map(mr).filter(Boolean).filter(function(y){return y.contains(x.target)}),S=w.length>0?i(x,w[0]):!u.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),p=a.useCallback(function(h,x,b,M){var w={name:h,delta:x,target:b,should:M,shadowParent:ul(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),f=a.useCallback(function(h){n.current=st(h),r.current=void 0},[]),l=a.useCallback(function(h){p(h.type,pr(h),h.target,i(h,e.lockRef.current))},[]),m=a.useCallback(function(h){p(h.type,st(h),h.target,i(h,e.lockRef.current))},[]);a.useEffect(function(){return _e.push(s),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:m}),document.addEventListener("wheel",d,Pe),document.addEventListener("touchmove",d,Pe),document.addEventListener("touchstart",f,Pe),function(){_e=_e.filter(function(h){return h!==s}),document.removeEventListener("wheel",d,Pe),document.removeEventListener("touchmove",d,Pe),document.removeEventListener("touchstart",f,Pe)}},[]);var v=e.removeScrollBar,g=e.inert;return a.createElement(a.Fragment,null,g?a.createElement(s,{styles:sl(o)}):null,v?a.createElement(Lr,{gapMode:e.gapMode}):null)}function ul(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ll=Fr(oa,il);var ia=a.forwardRef(function(e,t){return a.createElement(yt,J({},e,{ref:t,sideCar:ll}))});ia.classNames=yt.classNames;const dl=ia;var Qt=["Enter"," "],fl=["ArrowDown","PageUp","Home"],ua=["ArrowUp","PageDown","End"],pl=[...fl,...ua],ml={ltr:[...Qt,"ArrowRight"],rtl:[...Qt,"ArrowLeft"]},hl={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ze="Menu",[Ue,vl,gl]=un(Ze),[Re,la]=ln(Ze,[gl,Mt,Oe]),qe=Mt(),da=Oe(),[fa,xe]=Re(Ze),[Cl,Qe]=Re(Ze),pa=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:u=!0}=e,i=qe(t),[d,p]=a.useState(null),f=a.useRef(!1),l=F(s),m=Ne(o);return a.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.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})}},[]),c.jsx(wt,{...i,children:c.jsx(fa,{scope:t,open:n,onOpenChange:l,content:d,onContentChange:p,children:c.jsx(Cl,{scope:t,onClose:a.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:f,dir:m,modal:u,children:r})})})};pa.displayName=Ze;var xl="MenuAnchor",yn=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=qe(n);return c.jsx(Gr,{...o,...r,ref:t})});yn.displayName=xl;var En="MenuPortal",[bl,ma]=Re(En,{forceMount:void 0}),ha=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=xe(En,t);return c.jsx(bl,{scope:t,forceMount:n,children:c.jsx(ge,{present:n||s.open,children:c.jsx(na,{asChild:!0,container:o,children:r})})})};ha.displayName=En;var ne="MenuContent",[Ml,Pn]=Re(ne),va=a.forwardRef((e,t)=>{const n=ma(ne,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=xe(ne,e.__scopeMenu),u=Qe(ne,e.__scopeMenu);return c.jsx(Ue.Provider,{scope:e.__scopeMenu,children:c.jsx(ge,{present:r||s.open,children:c.jsx(Ue.Slot,{scope:e.__scopeMenu,children:u.modal?c.jsx(wl,{...o,ref:t}):c.jsx(Sl,{...o,ref:t})})})})}),wl=a.forwardRef((e,t)=>{const n=xe(ne,e.__scopeMenu),r=a.useRef(null),o=U(t,r);return a.useEffect(()=>{const s=r.current;if(s)return sn(s)},[]),c.jsx(_n,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Sl=a.forwardRef((e,t)=>{const n=xe(ne,e.__scopeMenu);return c.jsx(_n,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),_n=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:i,onEntryFocus:d,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:m,onDismiss:v,disableOutsideScroll:g,...h}=e,x=xe(ne,n),b=Qe(ne,n),M=qe(n),w=da(n),S=vl(n),[y,I]=a.useState(null),N=a.useRef(null),A=U(t,N,x.onContentChange),E=a.useRef(0),O=a.useRef(""),K=a.useRef(0),V=a.useRef(null),X=a.useRef("right"),Z=a.useRef(0),ue=g?dl:a.Fragment,z=g?{as:ra,allowPinchZoom:!0}:void 0,le=C=>{var L,ae;const _=O.current+C,T=S().filter($=>!$.disabled),D=document.activeElement,q=(L=T.find($=>$.ref.current===D))==null?void 0:L.textValue,Q=T.map($=>$.textValue),de=jl(Q,_,q),B=(ae=T.find($=>$.textValue===de))==null?void 0:ae.ref.current;(function $(se){O.current=se,window.clearTimeout(E.current),se!==""&&(E.current=window.setTimeout(()=>$(""),1e3))})(_),B&&setTimeout(()=>B.focus())};a.useEffect(()=>()=>window.clearTimeout(E.current),[]),Fu();const k=a.useCallback(C=>{var T,D;return X.current===((T=V.current)==null?void 0:T.side)&&kl(C,(D=V.current)==null?void 0:D.area)},[]);return c.jsx(Ml,{scope:n,searchRef:O,onItemEnter:a.useCallback(C=>{k(C)&&C.preventDefault()},[k]),onItemLeave:a.useCallback(C=>{var _;k(C)||((_=N.current)==null||_.focus(),I(null))},[k]),onTriggerLeave:a.useCallback(C=>{k(C)&&C.preventDefault()},[k]),pointerGraceTimerRef:K,onPointerGraceIntentChange:a.useCallback(C=>{V.current=C},[]),children:c.jsx(ue,{...z,children:c.jsx(ea,{asChild:!0,trapped:o,onMountAutoFocus:R(s,C=>{var _;C.preventDefault(),(_=N.current)==null||_.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:c.jsx(cn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:m,onDismiss:v,children:c.jsx(dn,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:y,onCurrentTabStopIdChange:I,onEntryFocus:R(d,C=>{b.isUsingKeyboardRef.current||C.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Ur,{role:"menu","aria-orientation":"vertical","data-state":$a(x.open),"data-radix-menu-content":"",dir:b.dir,...M,...h,ref:A,style:{outline:"none",...h.style},onKeyDown:R(h.onKeyDown,C=>{const T=C.target.closest("[data-radix-menu-content]")===C.currentTarget,D=C.ctrlKey||C.altKey||C.metaKey,q=C.key.length===1;T&&(C.key==="Tab"&&C.preventDefault(),!D&&q&&le(C.key));const Q=N.current;if(C.target!==Q||!pl.includes(C.key))return;C.preventDefault();const B=S().filter(L=>!L.disabled).map(L=>L.ref.current);ua.includes(C.key)&&B.reverse(),$l(B)}),onBlur:R(e.onBlur,C=>{C.currentTarget.contains(C.target)||(window.clearTimeout(E.current),O.current="")}),onPointerMove:R(e.onPointerMove,Ke(C=>{const _=C.target,T=Z.current!==C.clientX;if(C.currentTarget.contains(_)&&T){const D=C.clientX>Z.current?"right":"left";X.current=D,Z.current=C.clientX}}))})})})})})})});va.displayName=ne;var Rl="MenuGroup",In=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(G.div,{role:"group",...r,ref:t})});In.displayName=Rl;var yl="MenuLabel",ga=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(G.div,{...r,ref:t})});ga.displayName=yl;var mt="MenuItem",hr="menu.itemSelect",Et=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=a.useRef(null),u=Qe(mt,e.__scopeMenu),i=Pn(mt,e.__scopeMenu),d=U(t,s),p=a.useRef(!1),f=()=>{const l=s.current;if(!n&&l){const m=new CustomEvent(hr,{bubbles:!0,cancelable:!0});l.addEventListener(hr,v=>r==null?void 0:r(v),{once:!0}),Br(l,m),m.defaultPrevented?p.current=!1:u.onClose()}};return c.jsx(Ca,{...o,ref:d,disabled:n,onClick:R(e.onClick,f),onPointerDown:l=>{var m;(m=e.onPointerDown)==null||m.call(e,l),p.current=!0},onPointerUp:R(e.onPointerUp,l=>{var m;p.current||(m=l.currentTarget)==null||m.click()}),onKeyDown:R(e.onKeyDown,l=>{const m=i.searchRef.current!=="";n||m&&l.key===" "||Qt.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});Et.displayName=mt;var Ca=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,u=Pn(mt,n),i=da(n),d=a.useRef(null),p=U(t,d),[f,l]=a.useState(!1),[m,v]=a.useState("");return a.useEffect(()=>{const g=d.current;g&&v((g.textContent??"").trim())},[s.children]),c.jsx(Ue.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:c.jsx(fn,{asChild:!0,...i,focusable:!r,children:c.jsx(G.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:p,onPointerMove:R(e.onPointerMove,Ke(g=>{r?u.onItemLeave(g):(u.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,Ke(g=>u.onItemLeave(g))),onFocus:R(e.onFocus,()=>l(!0)),onBlur:R(e.onBlur,()=>l(!1))})})})}),El="MenuCheckboxItem",xa=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return c.jsx(Ra,{scope:e.__scopeMenu,checked:n,children:c.jsx(Et,{role:"menuitemcheckbox","aria-checked":ht(n)?"mixed":n,...o,ref:t,"data-state":Nn(n),onSelect:R(o.onSelect,()=>r==null?void 0:r(ht(n)?!0:!n),{checkForDefaultPrevented:!1})})})});xa.displayName=El;var ba="MenuRadioGroup",[Pl,_l]=Re(ba,{value:void 0,onValueChange:()=>{}}),Ma=a.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=F(r);return c.jsx(Pl,{scope:e.__scopeMenu,value:n,onValueChange:s,children:c.jsx(In,{...o,ref:t})})});Ma.displayName=ba;var wa="MenuRadioItem",Sa=a.forwardRef((e,t)=>{const{value:n,...r}=e,o=_l(wa,e.__scopeMenu),s=n===o.value;return c.jsx(Ra,{scope:e.__scopeMenu,checked:s,children:c.jsx(Et,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Nn(s),onSelect:R(r.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});Sa.displayName=wa;var An="MenuItemIndicator",[Ra,Il]=Re(An,{checked:!1}),ya=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Il(An,n);return c.jsx(ge,{present:r||ht(s.checked)||s.checked===!0,children:c.jsx(G.span,{...o,ref:t,"data-state":Nn(s.checked)})})});ya.displayName=An;var Al="MenuSeparator",Ea=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(G.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ea.displayName=Al;var Tl="MenuArrow",Pa=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=qe(n);return c.jsx(Kr,{...o,...r,ref:t})});Pa.displayName=Tl;var Tn="MenuSub",[Nl,_a]=Re(Tn),Ia=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=xe(Tn,t),u=qe(t),[i,d]=a.useState(null),[p,f]=a.useState(null),l=F(o);return a.useEffect(()=>(s.open===!1&&l(!1),()=>l(!1)),[s.open,l]),c.jsx(wt,{...u,children:c.jsx(fa,{scope:t,open:r,onOpenChange:l,content:p,onContentChange:f,children:c.jsx(Nl,{scope:t,contentId:ee(),triggerId:ee(),trigger:i,onTriggerChange:d,children:n})})})};Ia.displayName=Tn;var ke="MenuSubTrigger",Aa=a.forwardRef((e,t)=>{const n=xe(ke,e.__scopeMenu),r=Qe(ke,e.__scopeMenu),o=_a(ke,e.__scopeMenu),s=Pn(ke,e.__scopeMenu),u=a.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:d}=s,p={__scopeMenu:e.__scopeMenu},f=a.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return a.useEffect(()=>f,[f]),a.useEffect(()=>{const l=i.current;return()=>{window.clearTimeout(l),d(null)}},[i,d]),c.jsx(yn,{asChild:!0,...p,children:c.jsx(Ca,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":$a(n.open),...e,ref:bt(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:R(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),f()},100))})),onPointerLeave:R(e.onPointerLeave,Ke(l=>{var v,g;f();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const h=(g=n.content)==null?void 0:g.dataset.side,x=h==="right",b=x?-5:5,M=m[x?"left":"right"],w=m[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:l.clientX+b,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(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(l),l.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:R(e.onKeyDown,l=>{var v;const m=s.searchRef.current!=="";e.disabled||m&&l.key===" "||ml[r.dir].includes(l.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),l.preventDefault())})})})});Aa.displayName=ke;var Ta="MenuSubContent",Na=a.forwardRef((e,t)=>{const n=ma(ne,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=xe(ne,e.__scopeMenu),u=Qe(ne,e.__scopeMenu),i=_a(Ta,e.__scopeMenu),d=a.useRef(null),p=U(t,d);return c.jsx(Ue.Provider,{scope:e.__scopeMenu,children:c.jsx(ge,{present:r||s.open,children:c.jsx(Ue.Slot,{scope:e.__scopeMenu,children:c.jsx(_n,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:p,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var l;u.isUsingKeyboardRef.current&&((l=d.current)==null||l.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:R(e.onFocusOutside,f=>{f.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:R(e.onEscapeKeyDown,f=>{u.onClose(),f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{var v;const l=f.currentTarget.contains(f.target),m=hl[u.dir].includes(f.key);l&&m&&(s.onOpenChange(!1),(v=i.trigger)==null||v.focus(),f.preventDefault())})})})})})});Na.displayName=Ta;function $a(e){return e?"open":"closed"}function ht(e){return e==="indeterminate"}function Nn(e){return ht(e)?"indeterminate":e?"checked":"unchecked"}function $l(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Ol(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function jl(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=Ol(e,Math.max(s,0));o.length===1&&(u=u.filter(p=>p!==n));const d=u.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function Dl(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 i=t[s].x,d=t[s].y,p=t[u].x,f=t[u].y;d>r!=f>r&&n<(p-i)*(r-d)/(f-d)+i&&(o=!o)}return o}function kl(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Dl(n,t)}function Ke(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Ll=pa,Fl=yn,Gl=ha,Ul=va,Kl=In,Bl=ga,Vl=Et,Wl=xa,Hl=Ma,Yl=Sa,Xl=ya,zl=Ea,Zl=Pa,ql=Ia,Ql=Aa,Jl=Na,$n="ContextMenu",[ed,Jp]=ln($n,[la]),H=la(),[td,Oa]=ed($n),ja=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:o,modal:s=!0}=e,[u,i]=a.useState(!1),d=H(t),p=F(r),f=a.useCallback(l=>{i(l),p(l)},[p]);return c.jsx(td,{scope:t,open:u,onOpenChange:f,modal:s,children:c.jsx(Ll,{...d,dir:o,open:u,onOpenChange:f,modal:s,children:n})})};ja.displayName=$n;var Da="ContextMenuTrigger",ka=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,disabled:r=!1,...o}=e,s=Oa(Da,n),u=H(n),i=a.useRef({x:0,y:0}),d=a.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...i.current})}),p=a.useRef(0),f=a.useCallback(()=>window.clearTimeout(p.current),[]),l=m=>{i.current={x:m.clientX,y:m.clientY},s.onOpenChange(!0)};return a.useEffect(()=>f,[f]),a.useEffect(()=>void(r&&f()),[r,f]),c.jsxs(c.Fragment,{children:[c.jsx(Fl,{...u,virtualRef:d}),c.jsx(G.span,{"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,...o,ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:r?e.onContextMenu:R(e.onContextMenu,m=>{f(),l(m),m.preventDefault()}),onPointerDown:r?e.onPointerDown:R(e.onPointerDown,ct(m=>{f(),p.current=window.setTimeout(()=>l(m),700)})),onPointerMove:r?e.onPointerMove:R(e.onPointerMove,ct(f)),onPointerCancel:r?e.onPointerCancel:R(e.onPointerCancel,ct(f)),onPointerUp:r?e.onPointerUp:R(e.onPointerUp,ct(f))})]})});ka.displayName=Da;var nd="ContextMenuPortal",La=e=>{const{__scopeContextMenu:t,...n}=e,r=H(t);return c.jsx(Gl,{...r,...n})};La.displayName=nd;var Fa="ContextMenuContent",Ga=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=Oa(Fa,n),s=H(n),u=a.useRef(!1);return c.jsx(Ul,{...s,...r,ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:i=>{var d;(d=e.onCloseAutoFocus)==null||d.call(e,i),!i.defaultPrevented&&u.current&&i.preventDefault(),u.current=!1},onInteractOutside:i=>{var d;(d=e.onInteractOutside)==null||d.call(e,i),!i.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)"}})});Ga.displayName=Fa;var rd="ContextMenuGroup",Ua=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Kl,{...o,...r,ref:t})});Ua.displayName=rd;var od="ContextMenuLabel",Ka=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Bl,{...o,...r,ref:t})});Ka.displayName=od;var ad="ContextMenuItem",Ba=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Vl,{...o,...r,ref:t})});Ba.displayName=ad;var sd="ContextMenuCheckboxItem",Va=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Wl,{...o,...r,ref:t})});Va.displayName=sd;var cd="ContextMenuRadioGroup",Wa=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Hl,{...o,...r,ref:t})});Wa.displayName=cd;var id="ContextMenuRadioItem",Ha=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Yl,{...o,...r,ref:t})});Ha.displayName=id;var ud="ContextMenuItemIndicator",Ya=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Xl,{...o,...r,ref:t})});Ya.displayName=ud;var ld="ContextMenuSeparator",Xa=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(zl,{...o,...r,ref:t})});Xa.displayName=ld;var dd="ContextMenuArrow",fd=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Zl,{...o,...r,ref:t})});fd.displayName=dd;var pd="ContextMenuSub",za=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,open:o,defaultOpen:s}=e,u=H(t),[i,d]=$e({prop:o,defaultProp:s,onChange:r});return c.jsx(ql,{...u,open:i,onOpenChange:d,children:n})};za.displayName=pd;var md="ContextMenuSubTrigger",Za=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Ql,{...o,...r,ref:t})});Za.displayName=md;var hd="ContextMenuSubContent",qa=a.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,o=H(n);return c.jsx(Jl,{...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)"}})});qa.displayName=hd;function ct(e){return t=>t.pointerType!=="mouse"?e(t):void 0}var Qa=ja,vd=ka,Ja=La,gd=Ga,Cd=Ua,xd=Ka,bd=Ba,Md=Va,wd=Wa,Sd=Ha,Rd=Ya,yd=Xa,Ed=za,Pd=Za,_d=qa;function es(e,t=[]){let n=[];function r(s,u){const i=a.createContext(u),d=n.length;n=[...n,u];const p=l=>{var b;const{scope:m,children:v,...g}=l,h=((b=m==null?void 0:m[e])==null?void 0:b[d])||i,x=a.useMemo(()=>g,Object.values(g));return c.jsx(h.Provider,{value:x,children:v})};p.displayName=s+"Provider";function f(l,m){var h;const v=((h=m==null?void 0:m[e])==null?void 0:h[d])||i,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,f]}const o=()=>{const s=n.map(u=>a.createContext(u));return function(i){const d=(i==null?void 0:i[e])||s;return a.useMemo(()=>({[`__scope${e}`]:{...i,[e]:d}}),[i,d])}};return o.scopeName=e,[r,Id(o,...t)]}function Id(...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((i,{useScope:d,scopeName:p})=>{const l=d(s)[`__scope${p}`];return{...i,...l}},{});return a.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}var Wt="focusScope.autoFocusOnMount",Ht="focusScope.autoFocusOnUnmount",vr={bubbles:!1,cancelable:!0},Ad="FocusScope",ts=a.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...u}=e,[i,d]=a.useState(null),p=F(o),f=F(s),l=a.useRef(null),m=U(t,h=>d(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||!i)return;const S=w.target;i.contains(S)?l.current=S:ve(l.current,{select:!0})},x=function(w){if(v.paused||!i)return;const S=w.relatedTarget;S!==null&&(i.contains(S)||ve(l.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const y of w)y.removedNodes.length>0&&ve(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const M=new MutationObserver(b);return i&&M.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),M.disconnect()}}},[r,i,v.paused]),a.useEffect(()=>{if(i){Cr.add(v);const h=document.activeElement;if(!i.contains(h)){const b=new CustomEvent(Wt,vr);i.addEventListener(Wt,p),i.dispatchEvent(b),b.defaultPrevented||(Td(Dd(ns(i)),{select:!0}),document.activeElement===h&&ve(i))}return()=>{i.removeEventListener(Wt,p),setTimeout(()=>{const b=new CustomEvent(Ht,vr);i.addEventListener(Ht,f),i.dispatchEvent(b),b.defaultPrevented||ve(h??document.body,{select:!0}),i.removeEventListener(Ht,f),Cr.remove(v)},0)}}},[i,p,f,v]);const g=a.useCallback(h=>{if(!n&&!r||v.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(x&&b){const M=h.currentTarget,[w,S]=Nd(M);w&&S?!h.shiftKey&&b===S?(h.preventDefault(),n&&ve(w,{select:!0})):h.shiftKey&&b===w&&(h.preventDefault(),n&&ve(S,{select:!0})):b===M&&h.preventDefault()}},[n,r,v.paused]);return c.jsx(G.div,{tabIndex:-1,...u,ref:m,onKeyDown:g})});ts.displayName=Ad;function Td(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ve(r,{select:t}),document.activeElement!==n)return}function Nd(e){const t=ns(e),n=gr(t,e),r=gr(t.reverse(),e);return[n,r]}function ns(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 gr(e,t){for(const n of e)if(!$d(n,{upTo:t}))return n}function $d(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 Od(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&&Od(e)&&t&&e.select()}}var Cr=jd();function jd(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=xr(e,t),e.unshift(t)},remove(t){var n;e=xr(e,t),(n=e[0])==null||n.resume()}}}function xr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Dd(e){return e.filter(t=>t.tagName!=="A")}var kd="Portal",rs=a.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,s]=a.useState(!1);me(()=>s(!0),[]);const u=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return u?Ar.createPortal(c.jsx(G.div,{...r,ref:t}),u):null});rs.displayName=kd;function Ld(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var Je=e=>{const{present:t,children:n}=e,r=Fd(t),o=typeof n=="function"?n({present:r.isPresent}):a.Children.only(n),s=U(r.ref,Gd(o));return typeof n=="function"||r.isPresent?a.cloneElement(o,{ref:s}):null};Je.displayName="Presence";function Fd(e){const[t,n]=a.useState(),r=a.useRef({}),o=a.useRef(e),s=a.useRef("none"),u=e?"mounted":"unmounted",[i,d]=Ld(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=i==="mounted"?p:"none"},[i]),me(()=>{const p=r.current,f=o.current;if(f!==e){const m=s.current,v=it(p);e?d("MOUNT"):v==="none"||(p==null?void 0:p.display)==="none"?d("UNMOUNT"):d(f&&m!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),me(()=>{if(t){let p;const f=t.ownerDocument.defaultView??window,l=v=>{const h=it(r.current).includes(v.animationName);if(v.target===t&&h&&(d("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",p=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=v=>{v.target===t&&(s.current=it(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{f.clearTimeout(p),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:a.useCallback(p=>{p&&(r.current=getComputedStyle(p)),n(p)},[])}}function it(e){return(e==null?void 0:e.animationName)||"none"}function Gd(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 os=a.forwardRef((e,t)=>{const{children:n,...r}=e,o=a.Children.toArray(n),s=o.find(Kd);if(s){const u=s.props.children,i=o.map(d=>d===s?a.Children.count(u)>1?a.Children.only(null):a.isValidElement(u)?u.props.children:null:d);return c.jsx(Jt,{...r,ref:t,children:a.isValidElement(u)?a.cloneElement(u,void 0,i):null})}return c.jsx(Jt,{...r,ref:t,children:n})});os.displayName="Slot";var Jt=a.forwardRef((e,t)=>{const{children:n,...r}=e;if(a.isValidElement(n)){const o=Vd(n);return a.cloneElement(n,{...Bd(r,n.props),ref:t?bt(t,o):o})}return a.Children.count(n)>1?a.Children.only(null):null});Jt.displayName="SlotClone";var Ud=({children:e})=>c.jsx(c.Fragment,{children:e});function Kd(e){return a.isValidElement(e)&&e.type===Ud}function Bd(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]=(...i)=>{s(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Vd(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 as=Tr(),Yt=function(){},Pt=a.forwardRef(function(e,t){var n=a.useRef(null),r=a.useState({onScrollCapture:Yt,onWheelCapture:Yt,onTouchMoveCapture:Yt}),o=r[0],s=r[1],u=e.forwardProps,i=e.children,d=e.className,p=e.removeScrollBar,f=e.enabled,l=e.shards,m=e.sideCar,v=e.noIsolation,g=e.inert,h=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,M=e.gapMode,w=Nr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,y=$r([n,t]),I=J(J({},w),o);return a.createElement(a.Fragment,null,f&&a.createElement(S,{sideCar:as,removeScrollBar:p,shards:l,noIsolation:v,inert:g,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:M}),u?a.cloneElement(a.Children.only(i),J(J({},I),{ref:y})):a.createElement(b,J({},I,{className:d,ref:y}),i))});Pt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Pt.classNames={fullWidth:Or,zeroRight:jr};var en=!1;if(typeof window<"u")try{var ut=Object.defineProperty({},"passive",{get:function(){return en=!0,!0}});window.addEventListener("test",ut,ut),window.removeEventListener("test",ut,ut)}catch{en=!1}var Ie=en?{passive:!1}:!1,Wd=function(e){return e.tagName==="TEXTAREA"},ss=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Wd(e)&&n[t]==="visible")},Hd=function(e){return ss(e,"overflowY")},Yd=function(e){return ss(e,"overflowX")},br=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=cs(e,r);if(o){var s=is(e,r),u=s[1],i=s[2];if(u>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Xd=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},zd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cs=function(e,t){return e==="v"?Hd(t):Yd(t)},is=function(e,t){return e==="v"?Xd(t):zd(t)},Zd=function(e,t){return e==="h"&&t==="rtl"?-1:1},qd=function(e,t,n,r,o){var s=Zd(e,window.getComputedStyle(t).direction),u=s*r,i=n.target,d=t.contains(i),p=!1,f=u>0,l=0,m=0;do{var v=is(e,i),g=v[0],h=v[1],x=v[2],b=h-x-s*g;(g||b)&&cs(e,i)&&(l+=b,m+=g),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!d&&i!==document.body||d&&(t.contains(i)||t===i));return(f&&(o&&Math.abs(l)<1||!o&&u>l)||!f&&(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]},Mr=function(e){return[e.deltaX,e.deltaY]},wr=function(e){return e&&"current"in e?e.current:e},Qd=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Jd=function(e){return`
|
|
15
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
16
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
17
|
+
`)},ef=0,Ae=[];function tf(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),o=a.useState(ef++)[0],s=a.useState(Dr)[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=kr([e.lockRef.current],(e.shards||[]).map(wr),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=a.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!u.current.allowPinchZoom;var b=lt(h),M=n.current,w="deltaX"in h?h.deltaX:M[0]-b[0],S="deltaY"in h?h.deltaY:M[1]-b[1],y,I=h.target,N=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in h&&N==="h"&&I.type==="range")return!1;var A=br(N,I);if(!A)return!0;if(A?y=N:(y=N==="v"?"h":"v",A=br(N,I)),!A)return!1;if(!r.current&&"changedTouches"in h&&(w||S)&&(r.current=y),!y)return!0;var E=r.current||y;return qd(E,x,h,E==="h"?w:S,!0)},[]),d=a.useCallback(function(h){var x=h;if(!(!Ae.length||Ae[Ae.length-1]!==s)){var b="deltaY"in x?Mr(x):lt(x),M=t.current.filter(function(y){return y.name===x.type&&(y.target===x.target||x.target===y.shadowParent)&&Qd(y.delta,b)})[0];if(M&&M.should){x.cancelable&&x.preventDefault();return}if(!M){var w=(u.current.shards||[]).map(wr).filter(Boolean).filter(function(y){return y.contains(x.target)}),S=w.length>0?i(x,w[0]):!u.current.noIsolation;S&&x.cancelable&&x.preventDefault()}}},[]),p=a.useCallback(function(h,x,b,M){var w={name:h,delta:x,target:b,should:M,shadowParent:nf(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),f=a.useCallback(function(h){n.current=lt(h),r.current=void 0},[]),l=a.useCallback(function(h){p(h.type,Mr(h),h.target,i(h,e.lockRef.current))},[]),m=a.useCallback(function(h){p(h.type,lt(h),h.target,i(h,e.lockRef.current))},[]);a.useEffect(function(){return Ae.push(s),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:m}),document.addEventListener("wheel",d,Ie),document.addEventListener("touchmove",d,Ie),document.addEventListener("touchstart",f,Ie),function(){Ae=Ae.filter(function(h){return h!==s}),document.removeEventListener("wheel",d,Ie),document.removeEventListener("touchmove",d,Ie),document.removeEventListener("touchstart",f,Ie)}},[]);var v=e.removeScrollBar,g=e.inert;return a.createElement(a.Fragment,null,g?a.createElement(s,{styles:Jd(o)}):null,v?a.createElement(Lr,{gapMode:e.gapMode}):null)}function nf(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const rf=Fr(as,tf);var us=a.forwardRef(function(e,t){return a.createElement(Pt,J({},e,{ref:t,sideCar:rf}))});us.classNames=Pt.classNames;const of=us;var tn=["Enter"," "],af=["ArrowDown","PageUp","Home"],ls=["ArrowUp","PageDown","End"],sf=[...af,...ls],cf={ltr:[...tn,"ArrowRight"],rtl:[...tn,"ArrowLeft"]},uf={ltr:["ArrowLeft"],rtl:["ArrowRight"]},et="Menu",[Be,lf,df]=un(et),[ye,ff]=es(et,[df,Mt,Oe]),tt=Mt(),ds=Oe(),[fs,be]=ye(et),[pf,nt]=ye(et),ps=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:u=!0}=e,i=tt(t),[d,p]=a.useState(null),f=a.useRef(!1),l=F(s),m=Ne(o);return a.useEffect(()=>{const v=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.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})}},[]),c.jsx(wt,{...i,children:c.jsx(fs,{scope:t,open:n,onOpenChange:l,content:d,onContentChange:p,children:c.jsx(pf,{scope:t,onClose:a.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:f,dir:m,modal:u,children:r})})})};ps.displayName=et;var mf="MenuAnchor",On=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=tt(n);return c.jsx(Gr,{...o,...r,ref:t})});On.displayName=mf;var jn="MenuPortal",[hf,ms]=ye(jn,{forceMount:void 0}),hs=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=be(jn,t);return c.jsx(hf,{scope:t,forceMount:n,children:c.jsx(Je,{present:n||s.open,children:c.jsx(rs,{asChild:!0,container:o,children:r})})})};hs.displayName=jn;var re="MenuContent",[vf,Dn]=ye(re),vs=a.forwardRef((e,t)=>{const n=ms(re,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=be(re,e.__scopeMenu),u=nt(re,e.__scopeMenu);return c.jsx(Be.Provider,{scope:e.__scopeMenu,children:c.jsx(Je,{present:r||s.open,children:c.jsx(Be.Slot,{scope:e.__scopeMenu,children:u.modal?c.jsx(gf,{...o,ref:t}):c.jsx(Cf,{...o,ref:t})})})})}),gf=a.forwardRef((e,t)=>{const n=be(re,e.__scopeMenu),r=a.useRef(null),o=U(t,r);return a.useEffect(()=>{const s=r.current;if(s)return sn(s)},[]),c.jsx(kn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Cf=a.forwardRef((e,t)=>{const n=be(re,e.__scopeMenu);return c.jsx(kn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),kn=a.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:i,onEntryFocus:d,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:m,onDismiss:v,disableOutsideScroll:g,...h}=e,x=be(re,n),b=nt(re,n),M=tt(n),w=ds(n),S=lf(n),[y,I]=a.useState(null),N=a.useRef(null),A=U(t,N,x.onContentChange),E=a.useRef(0),O=a.useRef(""),K=a.useRef(0),V=a.useRef(null),X=a.useRef("right"),Z=a.useRef(0),ue=g?of:a.Fragment,z=g?{as:os,allowPinchZoom:!0}:void 0,le=C=>{var L,ae;const _=O.current+C,T=S().filter($=>!$.disabled),D=document.activeElement,q=(L=T.find($=>$.ref.current===D))==null?void 0:L.textValue,Q=T.map($=>$.textValue),de=Af(Q,_,q),B=(ae=T.find($=>$.textValue===de))==null?void 0:ae.ref.current;(function $(se){O.current=se,window.clearTimeout(E.current),se!==""&&(E.current=window.setTimeout(()=>$(""),1e3))})(_),B&&setTimeout(()=>B.focus())};a.useEffect(()=>()=>window.clearTimeout(E.current),[]),Ir();const k=a.useCallback(C=>{var T,D;return X.current===((T=V.current)==null?void 0:T.side)&&Nf(C,(D=V.current)==null?void 0:D.area)},[]);return c.jsx(vf,{scope:n,searchRef:O,onItemEnter:a.useCallback(C=>{k(C)&&C.preventDefault()},[k]),onItemLeave:a.useCallback(C=>{var _;k(C)||((_=N.current)==null||_.focus(),I(null))},[k]),onTriggerLeave:a.useCallback(C=>{k(C)&&C.preventDefault()},[k]),pointerGraceTimerRef:K,onPointerGraceIntentChange:a.useCallback(C=>{V.current=C},[]),children:c.jsx(ue,{...z,children:c.jsx(ts,{asChild:!0,trapped:o,onMountAutoFocus:R(s,C=>{var _;C.preventDefault(),(_=N.current)==null||_.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:c.jsx(cn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:p,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:m,onDismiss:v,children:c.jsx(dn,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:y,onCurrentTabStopIdChange:I,onEntryFocus:R(d,C=>{b.isUsingKeyboardRef.current||C.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(Ur,{role:"menu","aria-orientation":"vertical","data-state":$s(x.open),"data-radix-menu-content":"",dir:b.dir,...M,...h,ref:A,style:{outline:"none",...h.style},onKeyDown:R(h.onKeyDown,C=>{const T=C.target.closest("[data-radix-menu-content]")===C.currentTarget,D=C.ctrlKey||C.altKey||C.metaKey,q=C.key.length===1;T&&(C.key==="Tab"&&C.preventDefault(),!D&&q&&le(C.key));const Q=N.current;if(C.target!==Q||!sf.includes(C.key))return;C.preventDefault();const B=S().filter(L=>!L.disabled).map(L=>L.ref.current);ls.includes(C.key)&&B.reverse(),_f(B)}),onBlur:R(e.onBlur,C=>{C.currentTarget.contains(C.target)||(window.clearTimeout(E.current),O.current="")}),onPointerMove:R(e.onPointerMove,Ve(C=>{const _=C.target,T=Z.current!==C.clientX;if(C.currentTarget.contains(_)&&T){const D=C.clientX>Z.current?"right":"left";X.current=D,Z.current=C.clientX}}))})})})})})})});vs.displayName=re;var xf="MenuGroup",Ln=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(G.div,{role:"group",...r,ref:t})});Ln.displayName=xf;var bf="MenuLabel",gs=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(G.div,{...r,ref:t})});gs.displayName=bf;var vt="MenuItem",Sr="menu.itemSelect",_t=a.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=a.useRef(null),u=nt(vt,e.__scopeMenu),i=Dn(vt,e.__scopeMenu),d=U(t,s),p=a.useRef(!1),f=()=>{const l=s.current;if(!n&&l){const m=new CustomEvent(Sr,{bubbles:!0,cancelable:!0});l.addEventListener(Sr,v=>r==null?void 0:r(v),{once:!0}),Br(l,m),m.defaultPrevented?p.current=!1:u.onClose()}};return c.jsx(Cs,{...o,ref:d,disabled:n,onClick:R(e.onClick,f),onPointerDown:l=>{var m;(m=e.onPointerDown)==null||m.call(e,l),p.current=!0},onPointerUp:R(e.onPointerUp,l=>{var m;p.current||(m=l.currentTarget)==null||m.click()}),onKeyDown:R(e.onKeyDown,l=>{const m=i.searchRef.current!=="";n||m&&l.key===" "||tn.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});_t.displayName=vt;var Cs=a.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,u=Dn(vt,n),i=ds(n),d=a.useRef(null),p=U(t,d),[f,l]=a.useState(!1),[m,v]=a.useState("");return a.useEffect(()=>{const g=d.current;g&&v((g.textContent??"").trim())},[s.children]),c.jsx(Be.ItemSlot,{scope:n,disabled:r,textValue:o??m,children:c.jsx(fn,{asChild:!0,...i,focusable:!r,children:c.jsx(G.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:p,onPointerMove:R(e.onPointerMove,Ve(g=>{r?u.onItemLeave(g):(u.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,Ve(g=>u.onItemLeave(g))),onFocus:R(e.onFocus,()=>l(!0)),onBlur:R(e.onBlur,()=>l(!1))})})})}),Mf="MenuCheckboxItem",xs=a.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return c.jsx(Rs,{scope:e.__scopeMenu,checked:n,children:c.jsx(_t,{role:"menuitemcheckbox","aria-checked":gt(n)?"mixed":n,...o,ref:t,"data-state":Un(n),onSelect:R(o.onSelect,()=>r==null?void 0:r(gt(n)?!0:!n),{checkForDefaultPrevented:!1})})})});xs.displayName=Mf;var bs="MenuRadioGroup",[wf,Sf]=ye(bs,{value:void 0,onValueChange:()=>{}}),Ms=a.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=F(r);return c.jsx(wf,{scope:e.__scopeMenu,value:n,onValueChange:s,children:c.jsx(Ln,{...o,ref:t})})});Ms.displayName=bs;var ws="MenuRadioItem",Ss=a.forwardRef((e,t)=>{const{value:n,...r}=e,o=Sf(ws,e.__scopeMenu),s=n===o.value;return c.jsx(Rs,{scope:e.__scopeMenu,checked:s,children:c.jsx(_t,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Un(s),onSelect:R(r.onSelect,()=>{var u;return(u=o.onValueChange)==null?void 0:u.call(o,n)},{checkForDefaultPrevented:!1})})})});Ss.displayName=ws;var Fn="MenuItemIndicator",[Rs,Rf]=ye(Fn,{checked:!1}),ys=a.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=Rf(Fn,n);return c.jsx(Je,{present:r||gt(s.checked)||s.checked===!0,children:c.jsx(G.span,{...o,ref:t,"data-state":Un(s.checked)})})});ys.displayName=Fn;var yf="MenuSeparator",Es=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return c.jsx(G.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Es.displayName=yf;var Ef="MenuArrow",Ps=a.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=tt(n);return c.jsx(Kr,{...o,...r,ref:t})});Ps.displayName=Ef;var Gn="MenuSub",[Pf,_s]=ye(Gn),Is=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=be(Gn,t),u=tt(t),[i,d]=a.useState(null),[p,f]=a.useState(null),l=F(o);return a.useEffect(()=>(s.open===!1&&l(!1),()=>l(!1)),[s.open,l]),c.jsx(wt,{...u,children:c.jsx(fs,{scope:t,open:r,onOpenChange:l,content:p,onContentChange:f,children:c.jsx(Pf,{scope:t,contentId:ee(),triggerId:ee(),trigger:i,onTriggerChange:d,children:n})})})};Is.displayName=Gn;var Le="MenuSubTrigger",As=a.forwardRef((e,t)=>{const n=be(Le,e.__scopeMenu),r=nt(Le,e.__scopeMenu),o=_s(Le,e.__scopeMenu),s=Dn(Le,e.__scopeMenu),u=a.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:d}=s,p={__scopeMenu:e.__scopeMenu},f=a.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return a.useEffect(()=>f,[f]),a.useEffect(()=>{const l=i.current;return()=>{window.clearTimeout(l),d(null)}},[i,d]),c.jsx(On,{asChild:!0,...p,children:c.jsx(Cs,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":$s(n.open),...e,ref:bt(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:R(e.onPointerMove,Ve(l=>{s.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!u.current&&(s.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:R(e.onPointerLeave,Ve(l=>{var v,g;f();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const h=(g=n.content)==null?void 0:g.dataset.side,x=h==="right",b=x?-5:5,M=m[x?"left":"right"],w=m[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:l.clientX+b,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(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(l),l.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:R(e.onKeyDown,l=>{var v;const m=s.searchRef.current!=="";e.disabled||m&&l.key===" "||cf[r.dir].includes(l.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),l.preventDefault())})})})});As.displayName=Le;var Ts="MenuSubContent",Ns=a.forwardRef((e,t)=>{const n=ms(re,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=be(re,e.__scopeMenu),u=nt(re,e.__scopeMenu),i=_s(Ts,e.__scopeMenu),d=a.useRef(null),p=U(t,d);return c.jsx(Be.Provider,{scope:e.__scopeMenu,children:c.jsx(Je,{present:r||s.open,children:c.jsx(Be.Slot,{scope:e.__scopeMenu,children:c.jsx(kn,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:p,align:"start",side:u.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var l;u.isUsingKeyboardRef.current&&((l=d.current)==null||l.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:R(e.onFocusOutside,f=>{f.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:R(e.onEscapeKeyDown,f=>{u.onClose(),f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{var v;const l=f.currentTarget.contains(f.target),m=uf[u.dir].includes(f.key);l&&m&&(s.onOpenChange(!1),(v=i.trigger)==null||v.focus(),f.preventDefault())})})})})})});Ns.displayName=Ts;function $s(e){return e?"open":"closed"}function gt(e){return e==="indeterminate"}function Un(e){return gt(e)?"indeterminate":e?"checked":"unchecked"}function _f(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function If(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Af(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=If(e,Math.max(s,0));o.length===1&&(u=u.filter(p=>p!==n));const d=u.find(p=>p.toLowerCase().startsWith(o.toLowerCase()));return d!==n?d:void 0}function Tf(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 i=t[s].x,d=t[s].y,p=t[u].x,f=t[u].y;d>r!=f>r&&n<(p-i)*(r-d)/(f-d)+i&&(o=!o)}return o}function Nf(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Tf(n,t)}function Ve(e){return t=>t.pointerType==="mouse"?e(t):void 0}var $f=ps,Of=On,jf=hs,Df=vs,kf=Ln,Lf=gs,Ff=_t,Gf=xs,Uf=Ms,Kf=Ss,Bf=ys,Vf=Es,Wf=Ps,Hf=Is,Yf=As,Xf=Ns,It="Menubar",[nn,zf,Zf]=un(It),[Os,em]=es(It,[Zf,Oe]),Y=ff(),js=Oe(),[qf,Kn]=Os(It),Ds=a.forwardRef((e,t)=>{const{__scopeMenubar:n,value:r,onValueChange:o,defaultValue:s,loop:u=!0,dir:i,...d}=e,p=Ne(i),f=js(n),[l="",m]=$e({prop:r,onChange:o,defaultProp:s}),[v,g]=a.useState(null);return c.jsx(qf,{scope:n,value:l,onMenuOpen:a.useCallback(h=>{m(h),g(h)},[m]),onMenuClose:a.useCallback(()=>m(""),[m]),onMenuToggle:a.useCallback(h=>{m(x=>x?"":h),g(h)},[m]),dir:p,loop:u,children:c.jsx(nn.Provider,{scope:n,children:c.jsx(nn.Slot,{scope:n,children:c.jsx(dn,{asChild:!0,...f,orientation:"horizontal",loop:u,dir:p,currentTabStopId:v,onCurrentTabStopIdChange:g,children:c.jsx(G.div,{role:"menubar",...d,ref:t})})})})})});Ds.displayName=It;var Bn="MenubarMenu",[Qf,ks]=Os(Bn),Ls=e=>{const{__scopeMenubar:t,value:n,...r}=e,o=ee(),s=n||o||"LEGACY_REACT_AUTO_VALUE",u=Kn(Bn,t),i=Y(t),d=a.useRef(null),p=a.useRef(!1),f=u.value===s;return a.useEffect(()=>{f||(p.current=!1)},[f]),c.jsx(Qf,{scope:t,value:s,triggerId:ee(),triggerRef:d,contentId:ee(),wasKeyboardTriggerOpenRef:p,children:c.jsx($f,{...i,open:f,onOpenChange:l=>{l||u.onMenuClose()},modal:!1,dir:u.dir,...r})})};Ls.displayName=Bn;var rn="MenubarTrigger",Fs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,disabled:r=!1,...o}=e,s=js(n),u=Y(n),i=Kn(rn,n),d=ks(rn,n),p=a.useRef(null),f=U(t,p,d.triggerRef),[l,m]=a.useState(!1),v=i.value===d.value;return c.jsx(nn.ItemSlot,{scope:n,value:d.value,disabled:r,children:c.jsx(fn,{asChild:!0,...s,focusable:!r,tabStopId:d.value,children:c.jsx(Of,{asChild:!0,...u,children:c.jsx(G.button,{type:"button",role:"menuitem",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":v,"aria-controls":v?d.contentId:void 0,"data-highlighted":l?"":void 0,"data-state":v?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:f,onPointerDown:R(e.onPointerDown,g=>{!r&&g.button===0&&g.ctrlKey===!1&&(i.onMenuOpen(d.value),v||g.preventDefault())}),onPointerEnter:R(e.onPointerEnter,()=>{var h;!!i.value&&!v&&(i.onMenuOpen(d.value),(h=p.current)==null||h.focus())}),onKeyDown:R(e.onKeyDown,g=>{r||(["Enter"," "].includes(g.key)&&i.onMenuToggle(d.value),g.key==="ArrowDown"&&i.onMenuOpen(d.value),["Enter"," ","ArrowDown"].includes(g.key)&&(d.wasKeyboardTriggerOpenRef.current=!0,g.preventDefault()))}),onFocus:R(e.onFocus,()=>m(!0)),onBlur:R(e.onBlur,()=>m(!1))})})})})});Fs.displayName=rn;var Jf="MenubarPortal",Gs=e=>{const{__scopeMenubar:t,...n}=e,r=Y(t);return c.jsx(jf,{...r,...n})};Gs.displayName=Jf;var on="MenubarContent",Us=a.forwardRef((e,t)=>{const{__scopeMenubar:n,align:r="start",...o}=e,s=Y(n),u=Kn(on,n),i=ks(on,n),d=zf(n),p=a.useRef(!1);return c.jsx(Df,{id:i.contentId,"aria-labelledby":i.triggerId,"data-radix-menubar-content":"",...s,...o,ref:t,align:r,onCloseAutoFocus:R(e.onCloseAutoFocus,f=>{var m;!!!u.value&&!p.current&&((m=i.triggerRef.current)==null||m.focus()),p.current=!1,f.preventDefault()}),onFocusOutside:R(e.onFocusOutside,f=>{const l=f.target;d().some(v=>{var g;return(g=v.ref.current)==null?void 0:g.contains(l)})&&f.preventDefault()}),onInteractOutside:R(e.onInteractOutside,()=>{p.current=!0}),onEntryFocus:f=>{i.wasKeyboardTriggerOpenRef.current||f.preventDefault()},onKeyDown:R(e.onKeyDown,f=>{if(["ArrowRight","ArrowLeft"].includes(f.key)){const l=f.target,m=l.hasAttribute("data-radix-menubar-subtrigger"),v=l.closest("[data-radix-menubar-content]")!==f.currentTarget,h=(u.dir==="rtl"?"ArrowRight":"ArrowLeft")===f.key;if(!h&&m||v&&h)return;let M=d().filter(y=>!y.disabled).map(y=>y.value);h&&M.reverse();const w=M.indexOf(i.value);M=u.loop?pp(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)"}})});Us.displayName=on;var ep="MenubarGroup",Ks=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(kf,{...o,...r,ref:t})});Ks.displayName=ep;var tp="MenubarLabel",Bs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Lf,{...o,...r,ref:t})});Bs.displayName=tp;var np="MenubarItem",Vs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Ff,{...o,...r,ref:t})});Vs.displayName=np;var rp="MenubarCheckboxItem",Ws=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Gf,{...o,...r,ref:t})});Ws.displayName=rp;var op="MenubarRadioGroup",Hs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Uf,{...o,...r,ref:t})});Hs.displayName=op;var ap="MenubarRadioItem",Ys=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Kf,{...o,...r,ref:t})});Ys.displayName=ap;var sp="MenubarItemIndicator",Xs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Bf,{...o,...r,ref:t})});Xs.displayName=sp;var cp="MenubarSeparator",zs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Vf,{...o,...r,ref:t})});zs.displayName=cp;var ip="MenubarArrow",up=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Wf,{...o,...r,ref:t})});up.displayName=ip;var lp="MenubarSub",Zs=e=>{const{__scopeMenubar:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,u=Y(t),[i=!1,d]=$e({prop:r,defaultProp:s,onChange:o});return c.jsx(Hf,{...u,open:i,onOpenChange:d,children:n})};Zs.displayName=lp;var dp="MenubarSubTrigger",qs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Yf,{"data-radix-menubar-subtrigger":"",...o,...r,ref:t})});qs.displayName=dp;var fp="MenubarSubContent",Qs=a.forwardRef((e,t)=>{const{__scopeMenubar:n,...r}=e,o=Y(n);return c.jsx(Xf,{...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)"}})});Qs.displayName=fp;function pp(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Js=Ds,mp=Ls,ec=Fs,tc=Gs,hp=Us,vp=Ks,gp=Bs,Cp=Vs,xp=Ws,bp=Hs,Mp=Ys,wp=Xs,Sp=zs,Rp=Zs,yp=qs,Ep=Qs;function Pp(e,t){return a.useReducer((n,r)=>t[n][r]??n,e)}var Vn="ScrollArea",[nc,tm]=ln(Vn),[_p,oe]=nc(Vn),rc=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...u}=e,[i,d]=a.useState(null),[p,f]=a.useState(null),[l,m]=a.useState(null),[v,g]=a.useState(null),[h,x]=a.useState(null),[b,M]=a.useState(0),[w,S]=a.useState(0),[y,I]=a.useState(!1),[N,A]=a.useState(!1),E=U(t,K=>d(K)),O=Ne(o);return c.jsx(_p,{scope:n,type:r,dir:O,scrollHideDelay:s,scrollArea:i,viewport:p,onViewportChange:f,content:l,onContentChange:m,scrollbarX:v,onScrollbarXChange:g,scrollbarXEnabled:y,onScrollbarXEnabledChange:I,scrollbarY:h,onScrollbarYChange:x,scrollbarYEnabled:N,onScrollbarYEnabledChange:A,onCornerWidthChange:M,onCornerHeightChange:S,children:c.jsx(G.div,{dir:O,...u,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});rc.displayName=Vn;var oc="ScrollAreaViewport",ac=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,u=oe(oc,n),i=a.useRef(null),d=U(t,i,u.onViewportChange);return c.jsxs(c.Fragment,{children:[c.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}),c.jsx(G.div,{"data-radix-scroll-area-viewport":"",...s,ref:d,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:c.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});ac.displayName=oc;var fe="ScrollAreaScrollbar",sc=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oe(fe,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:u}=o,i=e.orientation==="horizontal";return a.useEffect(()=>(i?s(!0):u(!0),()=>{i?s(!1):u(!1)}),[i,s,u]),o.type==="hover"?c.jsx(Ip,{...r,ref:t,forceMount:n}):o.type==="scroll"?c.jsx(Ap,{...r,ref:t,forceMount:n}):o.type==="auto"?c.jsx(cc,{...r,ref:t,forceMount:n}):o.type==="always"?c.jsx(Wn,{...r,ref:t}):null});sc.displayName=fe;var Ip=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oe(fe,e.__scopeScrollArea),[s,u]=a.useState(!1);return a.useEffect(()=>{const i=o.scrollArea;let d=0;if(i){const p=()=>{window.clearTimeout(d),u(!0)},f=()=>{d=window.setTimeout(()=>u(!1),o.scrollHideDelay)};return i.addEventListener("pointerenter",p),i.addEventListener("pointerleave",f),()=>{window.clearTimeout(d),i.removeEventListener("pointerenter",p),i.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),c.jsx(ge,{present:n||s,children:c.jsx(cc,{"data-state":s?"visible":"hidden",...r,ref:t})})}),Ap=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=oe(fe,e.__scopeScrollArea),s=e.orientation==="horizontal",u=Tt(()=>d("SCROLL_END"),100),[i,d]=Pp("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(i==="idle"){const p=window.setTimeout(()=>d("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(p)}},[i,o.scrollHideDelay,d]),a.useEffect(()=>{const p=o.viewport,f=s?"scrollLeft":"scrollTop";if(p){let l=p[f];const m=()=>{const v=p[f];l!==v&&(d("SCROLL"),u()),l=v};return p.addEventListener("scroll",m),()=>p.removeEventListener("scroll",m)}},[o.viewport,s,d,u]),c.jsx(ge,{present:n||i!=="hidden",children:c.jsx(Wn,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:R(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:R(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),cc=a.forwardRef((e,t)=>{const n=oe(fe,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,u]=a.useState(!1),i=e.orientation==="horizontal",d=Tt(()=>{if(n.viewport){const p=n.viewport.offsetWidth<n.viewport.scrollWidth,f=n.viewport.offsetHeight<n.viewport.scrollHeight;u(i?p:f)}},10);return Te(n.viewport,d),Te(n.content,d),c.jsx(ge,{present:r||s,children:c.jsx(Wn,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Wn=a.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=oe(fe,e.__scopeScrollArea),s=a.useRef(null),u=a.useRef(0),[i,d]=a.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=fc(i.viewport,i.content),f={...r,sizes:i,onSizesChange:d,hasThumb:p>0&&p<1,onThumbChange:m=>s.current=m,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:m=>u.current=m};function l(m,v){return Dp(m,u.current,i,v)}return n==="horizontal"?c.jsx(Tp,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const m=o.viewport.scrollLeft,v=Rr(m,i,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"?c.jsx(Np,{...f,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const m=o.viewport.scrollTop,v=Rr(m,i);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}),Tp=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=oe(fe,e.__scopeScrollArea),[u,i]=a.useState(),d=a.useRef(null),p=U(t,d,s.onScrollbarXChange);return a.useEffect(()=>{d.current&&i(getComputedStyle(d.current))},[d]),c.jsx(uc,{"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:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,l)=>{if(s.viewport){const m=s.viewport.scrollLeft+f.deltaX;e.onWheelScroll(m),mc(m,l)&&f.preventDefault()}},onResize:()=>{d.current&&s.viewport&&u&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:xt(u.paddingLeft),paddingEnd:xt(u.paddingRight)}})}})}),Np=a.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=oe(fe,e.__scopeScrollArea),[u,i]=a.useState(),d=a.useRef(null),p=U(t,d,s.onScrollbarYChange);return a.useEffect(()=>{d.current&&i(getComputedStyle(d.current))},[d]),c.jsx(uc,{"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:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,l)=>{if(s.viewport){const m=s.viewport.scrollTop+f.deltaY;e.onWheelScroll(m),mc(m,l)&&f.preventDefault()}},onResize:()=>{d.current&&s.viewport&&u&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:xt(u.paddingTop),paddingEnd:xt(u.paddingBottom)}})}})}),[$p,ic]=nc(fe),uc=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:u,onThumbPointerDown:i,onThumbPositionChange:d,onDragScroll:p,onWheelScroll:f,onResize:l,...m}=e,v=oe(fe,n),[g,h]=a.useState(null),x=U(t,E=>h(E)),b=a.useRef(null),M=a.useRef(""),w=v.viewport,S=r.content-r.viewport,y=F(f),I=F(d),N=Tt(l,10);function A(E){if(b.current){const O=E.clientX-b.current.left,K=E.clientY-b.current.top;p({x:O,y:K})}}return a.useEffect(()=>{const E=O=>{const K=O.target;(g==null?void 0:g.contains(K))&&y(O,S)};return document.addEventListener("wheel",E,{passive:!1}),()=>document.removeEventListener("wheel",E,{passive:!1})},[w,g,S,y]),a.useEffect(I,[r,I]),Te(g,N),Te(v.content,N),c.jsx($p,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:F(s),onThumbPointerUp:F(u),onThumbPositionChange:I,onThumbPointerDown:F(i),children:c.jsx(G.div,{...m,ref:x,style:{position:"absolute",...m.style},onPointerDown:R(e.onPointerDown,E=>{E.button===0&&(E.target.setPointerCapture(E.pointerId),b.current=g.getBoundingClientRect(),M.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),A(E))}),onPointerMove:R(e.onPointerMove,A),onPointerUp:R(e.onPointerUp,E=>{const O=E.target;O.hasPointerCapture(E.pointerId)&&O.releasePointerCapture(E.pointerId),document.body.style.webkitUserSelect=M.current,v.viewport&&(v.viewport.style.scrollBehavior=""),b.current=null})})})}),Ct="ScrollAreaThumb",lc=a.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ic(Ct,e.__scopeScrollArea);return c.jsx(ge,{present:n||o.hasThumb,children:c.jsx(Op,{ref:t,...r})})}),Op=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=oe(Ct,n),u=ic(Ct,n),{onThumbPositionChange:i}=u,d=U(t,l=>u.onThumbChange(l)),p=a.useRef(),f=Tt(()=>{p.current&&(p.current(),p.current=void 0)},100);return a.useEffect(()=>{const l=s.viewport;if(l){const m=()=>{if(f(),!p.current){const v=kp(l,i);p.current=v,i()}};return i(),l.addEventListener("scroll",m),()=>l.removeEventListener("scroll",m)}},[s.viewport,f,i]),c.jsx(G.div,{"data-state":u.hasThumb?"visible":"hidden",...o,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:R(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:R(e.onPointerUp,u.onThumbPointerUp)})});lc.displayName=Ct;var Hn="ScrollAreaCorner",dc=a.forwardRef((e,t)=>{const n=oe(Hn,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?c.jsx(jp,{...e,ref:t}):null});dc.displayName=Hn;var jp=a.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=oe(Hn,n),[s,u]=a.useState(0),[i,d]=a.useState(0),p=!!(s&&i);return Te(o.scrollbarX,()=>{var l;const f=((l=o.scrollbarX)==null?void 0:l.offsetHeight)||0;o.onCornerHeightChange(f),d(f)}),Te(o.scrollbarY,()=>{var l;const f=((l=o.scrollbarY)==null?void 0:l.offsetWidth)||0;o.onCornerWidthChange(f),u(f)}),p?c.jsx(G.div,{...r,ref:t,style:{width:s,height:i,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function xt(e){return e?parseInt(e,10):0}function fc(e,t){const n=e/t;return isNaN(n)?0:n}function At(e){const t=fc(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Dp(e,t,n,r="ltr"){const o=At(n),s=o/2,u=t||s,i=o-u,d=n.scrollbar.paddingStart+u,p=n.scrollbar.size-n.scrollbar.paddingEnd-i,f=n.content-n.viewport,l=r==="ltr"?[0,f]:[f*-1,0];return pc([d,p],l)(e)}function Rr(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,i=s-r,d=n==="ltr"?[0,u]:[u*-1,0],p=Oc(e,d);return pc([0,u],[0,i])(p)}function pc(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 mc(e,t){return e>0&&e<t}var kp=(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,i=n.top!==s.top;(u||i)&&t(),n=s,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Tt(e,t){const n=F(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 Te(e,t){const n=F(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 Lp=rc,Fp=ac,Gp=sc,Up=lc,Kp=dc;const Bp=P(Lp,{position:"relative",width:"100%",overflow:"hidden",maxHeight:"inherit",variants:{fullHeight:{true:{height:"100%"}}},defaultVariants:{fullHeight:!0}}),Vp=P(Fp,{width:"100%",height:"100%",maxHeight:"inherit",borderRadius:"inherit","& > div[style]":{display:"block !important"},variants:{asContainer:{true:{padding:"$1"}}}}),an=4,yr=P(Gp,{display:"flex",userSelect:"none",touchAction:"none",margin:"$0_5",background:"$scrollbarTrack",'&[data-orientation="vertical"]':{width:an},'&[data-orientation="horizontal"]':{flexDirection:"column",height:an},variants:{subtle:{true:{padding:"$0_5 0 $0_5 $0_5",margin:0,background:"transparent","&:hover":{background:"$scrollbarTrackHover"}}}},defaultVariants:{subtle:!0}}),Er=P(Up,{flex:1,background:"$scrollbarThumb",borderRadius:an,position:"relative","&::before":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",height:"100%",minWidth:8,minHeight:8}}),Wp=P(Kp,{backgroundColor:"$scrollbarTrackHover"});function Yn(e){const{fullHeight:t,subtle:n,css:r,asContainer:o,...s}=e;return c.jsxs(Bp,{fullHeight:t,children:[c.jsx(Vp,{css:r,asContainer:o,...s}),c.jsx(yr,{orientation:"horizontal",subtle:n,children:c.jsx(Er,{})}),c.jsx(yr,{orientation:"vertical",subtle:n,children:c.jsx(Er,{})}),c.jsx(Wp,{})]})}const Xn=P("span",{display:"flex",alignItems:"center","& > svg":{marginRight:"$1_5",width:"$4",height:"$4"}}),Hp={context:{Root:Qa,Group:Cd,Sub:Ed,Portal:Ja,RadioGroup:P(wd,Nt),MenuLabel:P(xd,$t),MenuItem:P(bd,Ot),Content:P(gd,Ee,er),SubContent:P(_d,Ee,er),SubMenuItem:P(Pd,jt),Separator:P(yd,Dt),CheckboxItem:P(Md,kt),RadioItem:P(Sd,Lt),ItemIndicator:P(Rd,Ft)},dropdown:{Root:Qo,Group:_u,RadioGroup:P(Nu,Nt),Sub:Du,Portal:Jo,MenuLabel:P(Iu,$t),MenuItem:P(Au,Ot),Content:P(Pu,Ee,tr),SubContent:P(Lu,Ee,tr),SubMenuItem:P(ku,jt),Separator:P(ju,Dt),CheckboxItem:P(Tu,kt),RadioItem:P($u,Lt),ItemIndicator:P(Ou,Ft)},menubar:{Root:Js,Group:vp,RadioGroup:P(bp,Nt),Sub:Rp,Portal:tc,MenuLabel:P(gp,$t),MenuItem:P(Cp,Ot),Content:P(hp,Ee),SubContent:P(Ep,Ee),SubMenuItem:P(yp,jt),Separator:P(Sp,Dt),CheckboxItem:P(xp,kt),RadioItem:P(Mp,Lt),ItemIndicator:P(wp,Ft)}};function Me(){const e=a.useContext(we),t=Hp[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 zn=function(t){return c.jsx(we.Provider,{value:{type:t.type,size:t.size},children:t.children})},nm=a.forwardRef(function(t,n){const{icon:r,name:o,shortcuts:s,label:u,disabled:i,onSelect:d,onClick:p,asChild:f,critical:l,children:m,...v}=t,{size:g}=a.useContext(we),{MenuItem:h}=Me();return c.jsx(h,{ref:n,disabled:i,onSelect:d,onClick:p,size:g,critical:l,asChild:f,...v,children:a.isValidElement(m)?m:c.jsxs(a.Fragment,{children:[c.jsxs(Xn,{children:[r,o]}),c.jsx(Hc,{shortcuts:s})]})})}),Zn=a.forwardRef(function(t,n){const{Content:r}=Me(),{size:o}=a.useContext(we);return c.jsx(r,{size:o,ref:n,...t})});function rm(e){const{name:t,icon:n,disabled:r,children:o}=e,{size:s}=a.useContext(we),{SubMenuItem:u,SubContent:i,Sub:d,Portal:p}=Me();return c.jsxs(d,{children:[c.jsxs(u,{size:s,disabled:r,children:[c.jsxs(Xn,{children:[n,t]}),c.jsx(jc,{size:"12px"})]}),c.jsx(p,{children:c.jsx(i,{children:c.jsx(Yn,{type:"always",subtle:!1,asContainer:!0,children:o})})})]})}function om(e){const{Group:t,MenuLabel:n}=Me(),{label:r,divider:o,children:s,...u}=e,i=typeof o=="boolean"&&o?"bottom":o,d=i==="top"||i==="both",p=i==="bottom"||i==="both";return c.jsxs(pe.Fragment,{children:[d&&c.jsx(Pr,{}),c.jsxs(t,{...u,children:[r&&c.jsx(n,{children:r}),s]}),p&&c.jsx(Pr,{})]})}function am(e){const{name:t,icon:n,...r}=e,{size:o}=a.useContext(we),{CheckboxItem:s,ItemIndicator:u}=Me();return c.jsxs(s,{...r,size:o,children:[c.jsx(u,{children:c.jsx(Dc,{})}),c.jsxs(Xn,{children:[n,t]})]})}const Yp=P("div",{height:"$1",width:"$1",borderRadius:"$round",backgroundColor:"currentColor"});function Xp(e){const{value:t,onSelect:n,name:r}=e,{RadioItem:o,ItemIndicator:s}=Me();return c.jsxs(o,{value:t,onSelect:n,children:[c.jsx(s,{children:c.jsx(Yp,{})}),r]})}function sm(e){const{items:t,label:n,...r}=e,{RadioGroup:o,MenuLabel:s}=Me(),{size:u}=a.useContext(we);return c.jsxs(o,{...r,size:u,children:[n&&c.jsx(s,{children:n}),t.map((i,d)=>c.jsx(Xp,{...i},d))]})}function Pr(){const{Separator:e}=Me();return c.jsx(e,{})}function cm(e){const{children:t,portal:n=!0,size:r="sm",side:o,sideOffset:s=4,align:u="start",alignOffset:i,disabled:d=!1,...p}=e;let f=a.Fragment,l;n&&(f=Jo,typeof n=="object"&&(l=n));const m=f===a.Fragment?{}:{container:l};return c.jsx(zn,{type:"dropdown",size:r,children:c.jsxs(Qo,{modal:!1,...p,children:[c.jsx(Eu,{disabled:d,asChild:!0,children:e.trigger}),c.jsx(f,{...m,children:c.jsx(Zn,{side:o,sideOffset:s,align:u,alignOffset:i,children:c.jsx(Yn,{type:"always",subtle:!1,asContainer:!0,children:t})})})]})})}function im(e){const{trigger:t,size:n="sm",children:r,onOpenChange:o,onPointerDownOutside:s,portal:u=!0,asChild:i,disabled:d=!1,hidden:p}=e;let f=a.Fragment,l;return u&&(f=Ja,typeof u=="object"&&(l=u)),c.jsx(zn,{type:"context",size:n,children:c.jsxs(Qa,{onOpenChange:o,children:[c.jsx(vd,{disabled:d,asChild:i,children:t}),c.jsx(f,{container:l,children:c.jsx(Zn,{hidden:p,onPointerDownOutside:s,children:c.jsx(Yn,{type:"always",subtle:!1,asContainer:!0,children:r})})})]})})}const zp=P(ec,{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"}}),hc=pe.forwardRef((e,t)=>c.jsx(zp,{ref:t,...e}));hc.displayName=ec.displayName;function um(e){const{name:t}=e;return c.jsxs(mp,{children:[c.jsx(hc,{children:t}),c.jsx(tc,{children:c.jsx(Zn,{align:"start",alignOffset:-4,sideOffset:4,children:e.children})})]})}const Zp=P(Js,{display:"flex",height:"100%",alignItems:"center",padding:"0 $2",flexWrap:"nowrap"});function lm(e){const{size:t="sm"}=e;return c.jsx(zn,{type:"menubar",size:t,children:c.jsx(Zp,{children:e.children})})}export{im as C,cm as D,or as K,nm as M,rm as S,Fc as a,Gc as b,Uc as c,Hc as d,lm as e,um as f,Pr as g,am as h,sm as i,om as j,Yn as k};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var E=Object.defineProperty;var T=(n,e,t)=>e in n?E(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var _=(n,e,t)=>(T(n,typeof e!="symbol"?e+"":e,t),t);import{bS as v,bT as g,bH as y,ae as i,bU as u,aS as c,aV as b,O as f,bV as p,j as x,n as C,e as V,q as m}from"./index-aec7e708.js";import"./index-e8a45e82.js";import"./postmen-2f47f6bb.js";import{F as d}from"./index-74130ff3.js";import{M}from"./MeshThumbnail-ab28b3b8.js";import{A}from"./AssetViewer-64cd01fa.js";import{e as N}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 y{constructor(e,t){super(e),this.meshData=t}restoreContent(){O.setMeshData(this.resource,this.meshData)}}var U=(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))(U||{});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 S(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 w(n){if(n instanceof Uint8Array)return"Uint8";if(n instanceof Uint16Array)return"Uint16";if(n instanceof Uint32Array)return"Uint32"}const I=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:U[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:w(s)})}):null,c.jsx(b,{title:`SubMesh: ${r.length}`,defaultOpen:!0,children:r.map((o,l)=>c.jsx(d,{label:`# ${l}`,value:S(o)},l))})]})};class j extends A{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:I,viewer:j,thumbnail:M,dragLayer:m.Mesh,async bundle({content:n}){const e=JSON.parse(await n.text()),t=N(e,{type:"Mesh",name:"mesh"});return{content:new Blob([t])}}})],h);export{h as MeshAsset};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var c=Object.defineProperty;var f=(e,r,t)=>r in e?c(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var s=(e,r,t)=>(f(e,typeof r!="symbol"?r+"":r,t),t);import{p as n,C as m,s as p,f as u,z as v,E as b,v as y,x as P,aL as w}from"./index-aec7e708.js";import"./index-e8a45e82.js";var M=Object.defineProperty,O=Object.getOwnPropertyDescriptor,i=(e,r,t,l)=>{for(var a=l>1?void 0:l?O(r,t):r,h=e.length-1,d;h>=0;h--)(d=e[h])&&(a=(l?d(r,t,a):d(a))||a);return l&&a&&M(r,t,a),a};class o extends b{constructor(){super(...arguments);s(this,"mesh",null);s(this,"material",{refId:"0000200"});s(this,"receiveShadows",!0);s(this,"castShadows",!0);s(this,"priority",0);s(this,"materialOpen",!1)}setMaterialOpen(t){this.materialOpen=t}}i([n({type:m.AssetPicker,assetType:["Mesh"],label:"mesh-renderer.mesh.title",info:"mesh-renderer.mesh.info",bindPath:"mesh"}),p()],o.prototype,"mesh",2);i([n({type:m.AssetPicker,assetType:"Material",label:"mesh-renderer.material.title",info:"mesh-renderer.material.info",customFilter:e=>{var r;return((r=e.engineObject.shader)==null?void 0:r.name)!=="particle-shader"}}),u({engineKey:"setMaterial",setPath:"setMaterial()",getPath:"getMaterial()",valueType:v.ReferResource,getEngineValue:e=>e.getMaterial()}),p({type:"methods",key:"setMaterial",onSerialize:e=>e?[[e]]:void 0,onDeserialize(e){return e?e[0][0]:void 0}})],o.prototype,"material",2);i([n({label:"mesh-renderer.receive-shadows.title",info:"mesh-renderer.receive-shadows.info",bindPath:"receiveShadows"}),y(),p()],o.prototype,"receiveShadows",2);i([n({label:"mesh-renderer.cast-shadows.title",info:"mesh-renderer.cast-shadows.info",bindPath:"castShadows"}),y(),p()],o.prototype,"castShadows",2);i([n({label:"mesh-renderer.priority.title",info:"mesh-renderer.priority.info",bindPath:"priority"}),p()],o.prototype,"priority",2);i([P],o.prototype,"materialOpen",2);i([w],o.prototype,"setMaterialOpen",1);export{o as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as l}from"./index-e8a45e82.js";import{aQ as f,aU as c,aS as m,aW as h,p as d}from"./index-aec7e708.js";import{c as u}from"./Component-ed7aa0ab.js";import{c as M}from"./createOnModelChange-b57a0da8.js";import{R}from"./ReferencedMaterial-5773c9d2.js";import{M as v}from"./MeshRendererBaseComponent-9efd3943.js";import"./MaterialInspector-e8242674.js";import"./IconPointFilled-811fc660.js";const x=f(function(s){const[r,o]=c.useState(null),e=s.data,{assetStore:t,inspectorFacade:n}=l();return c.useEffect(()=>{t.getAssetByRef(e.material).then(a=>{o(a)})},[e.material]),m.jsxs(m.Fragment,{children:[m.jsx(h.List,{model:e,configs:e.formSchema.items,onModelChange:M("component",e.id,n,e)}),r&&m.jsx(R,{materialAsset:r})]})});var C=Object.defineProperty,j=Object.getOwnPropertyDescriptor,i=(s,r,o,e)=>{for(var t=e>1?void 0:e?j(r,o):r,n=s.length-1,a;n>=0;n--)(a=s[n])&&(t=(e?a(r,o,t):a(t))||t);return e&&t&&C(r,o,t),t};let p=class extends v{constructor(s,r){super(s,r)}};i([d({assetType:["PrimitiveMesh","Mesh"]})],p.prototype,"mesh",2);p=i([u({type:"MeshRenderer",customInspector:x,componentsMenu:{label:"component.renderer.mesh.title"}})],p);export{p as MeshRendererComponent};
|
package/dist/viewport-client/_static/{MeshThumbnail-49273f71.js → MeshThumbnail-ab28b3b8.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
var r=Object.defineProperty;var c=(i,e,t)=>e in i?r(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var n=(i,e,t)=>(c(i,typeof e!="symbol"?e+"":e,t),t);import{O as h,Q as o,
|
|
1
|
+
var r=Object.defineProperty;var c=(i,e,t)=>e in i?r(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var n=(i,e,t)=>(c(i,typeof e!="symbol"?e+"":e,t),t);import{O as h,Q as o,H as d}from"./index-aec7e708.js";class a{static update(e,t){this.entity?this.entity.isActive=!0:this.initScene(e),this.meshRenderer.mesh=t.engineObject}static clear(){this.entity.isActive=!1}static initScene(e){const t=this.entity=e.createChild("mesh");t.transform.setRotation(16,-47.4,-16.7),this.meshRenderer=t.addComponent(h);const s=new o(e.engine);s.baseColor.set(.7,.7,.7,1),s.metallic=0,s.renderFace=d.Double,this.meshRenderer.setMaterial(s)}}n(a,"entity"),n(a,"meshRenderer");export{a as M};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var Ut=Object.defineProperty;var Jt=(a,e,t)=>e in a?Ut(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var x=(a,e,t)=>(Jt(a,typeof e!="symbol"?e+"":e,t),t);import{aH as Re,b9 as we,aC as T,aD as ge,b8 as Ee,ci as be,c9 as Tt,ca as jt,cj as ie,ch as le,eH as Ce,aG as Qt,aQ as Z,aU as $,aS as C,aW as ea,aO as ta,aP as Lt,aF as aa,dD as ra,aR as G,bm as oa,cC as te,bl as st,eT as ze,eU as me,bN as na,by as sa,cy as R,eV as ia,bX as _t,eW as la,eX as ca,eY as pa,eZ as ua,e_ as ma,e$ as q,f0 as da,f1 as ha,f2 as fa,f3 as de,dQ as ya,cf as Te,cg as je,bP as ve,cl as St,B as Mt,cm as Pt,eO as ba,E as va,C as A,f4 as W,f5 as Y,f6 as ye,e as n,x as Q,f as V,z as ga,p as z,s as O}from"./index-aec7e708.js";import{u as Rt}from"./index-e8a45e82.js";import{c as xa}from"./Component-ed7aa0ab.js";import"./postmen-2f47f6bb.js";import{c as Sa}from"./createOnModelChange-b57a0da8.js";import{R as Ma}from"./ReferencedMaterial-5773c9d2.js";import"./TextureAsset-39fb07fe.js";import"./GlTFAsset-2723b84a.js";import"./MaterialAsset-6ef9b4ed.js";import{MeshAsset as Pa}from"./MeshAsset-ca9305e5.js";import"./AnimatorControllerAsset-21dc6332.js";import"./AnimationClipAsset-9167378a.js";import"./SpriteAsset-558ffca8.js";import"./SpriteAtlasAsset-cdc34386.js";import"./AmbientLightAsset-bdbc4e1d.js";import"./LottieAsset-3692580d.js";import"./ShaderChunkAsset-34116f2c.js";import"./SpineSkeletonDataAsset-27244892.js";import"./FontAsset-d1ced18d.js";import"./SceneAsset-385fa837.js";import"./ShaderAsset-f4514b03.js";import"./PrimitiveMesh-0572a073.js";import"./XRReferenceImageAsset-2f6ff226.js";import"./PrefabAsset-9179b95c.js";import"./PhysicsMaterialAsset-4a1e5ea3.js";import"./RenderTargetAsset-ab6e06d2.js";import"./AudioAsset-0c828c80.js";import"./index-78269e76.js";import"./MarkdownAsset-bcb90be4.js";import{B as tt}from"./index-fbe040bf.js";import"./MaterialInspector-e8242674.js";import"./IconPointFilled-811fc660.js";import"./enum-58295f88.js";import"./encode-ac4bb64e.js";import"./meshopt_simplifier.module-cd99529d.js";import"./Tooltip-82063435.js";import"./AssetViewer-64cd01fa.js";import"./ktx2-encoder-53b21bdc.js";import"./TaskQueue-05c94a4d.js";import"./glTFIO-79bbca27.js";import"./ProxyConfigs-3a5fd860.js";import"./index-74130ff3.js";import"./MeshThumbnail-ab28b3b8.js";import"./bundlers-9b0d37fc.js";import"./assetEditorActions-c4e5962f.js";import"./module-8816772d.js";import"./module-ffeaf99f.js";import"./FormItemArray-6d69acd4.js";import"./Accordion-3d330bc6.js";import"./IconEdit-ab77303f.js";import"./ShaderUIScriptAsset-fc503291.js";import"./module-220b3921.js";import"./Menu-0b8da92f.js";/**
|
|
2
|
+
* @license @tabler/icons-react v3.17.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 At=Re("outline","ease-in","IconEaseIn",[["path",{d:"M3 20c8 0 18 -16 18 -16",key:"svg-0"}]]);/**
|
|
7
|
+
* @license @tabler/icons-react v3.17.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 Vt=Re("outline","equal","IconEqual",[["path",{d:"M5 10h14",key:"svg-0"}],["path",{d:"M5 14h14",key:"svg-1"}]]);/**
|
|
12
|
+
* @license @tabler/icons-react v3.17.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 kt=Re("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.17.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 Bt=Re("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 Ct=[{type:"constant",icon:T.jsx(Vt,{size:"14px"}),columns:"1fr 32px"},{type:"gradient",icon:T.jsx(At,{size:"14px"}),columns:"1fr 32px"},{type:"two-constant",icon:T.jsx(kt,{size:"14px"}),columns:"repeat(2, minmax(0, 12fr)) 32px"},{type:"two-gradient",icon:T.jsx(Bt,{size:"14px"}),columns:"repeat(2, minmax(0, 12fr)) 32px"}];function Ca(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(o=>({value:ie(o.value),time:o.position})),alpha:r.alpha.map(o=>({value:o.value.a,time:o.position}))}}:t==="two-gradient"?{type:t,label:e.label,value:[{color:r[0].color.map(o=>({value:ie(o.value),time:o.position})),alpha:r[0].alpha.map(o=>({value:o.value.a,time:o.position}))},{color:r[1].color.map(o=>({value:ie(o.value),time:o.position})),alpha:r[1].alpha.map(o=>({value:o.value.a,time:o.position}))}]}:e})}function za(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(o=>({value:le(o.value),position:o.time})),alpha:r.alpha.map(o=>({value:{r:255,g:255,b:255,a:o.value},position:o.time}))}}:t==="two-gradient"?{type:t,label:e.label,value:[{color:r[0].color.map(o=>({value:le(o.value),position:o.time})),alpha:r[0].alpha.map(o=>({value:{r:255,g:255,b:255,a:o.value},position:o.time}))},{color:r[1].color.map(o=>({value:le(o.value),position:o.time})),alpha:r[1].alpha.map(o=>({value:{r:255,g:255,b:255,a:o.value},position:o.time}))}]}:e})}function at({hdr:a,value:e,onValueChange:t,...r}){return a?T.jsx(be,{...r,mode:"hdr",value:e,onValueChange:t}):T.jsx(be,{...r,mode:"constant",value:e,onValueChange:t})}function Dt(a){var d;const{label:e,labelFirst:t,info:r,value:o,hdr:i=!1}=a,[f,p]=we({prop:za(o),onChange:s=>{a.onValueChange&&a.onValueChange(Ca(s),M)}}),[M,v]=we({prop:a.type,defaultProp:"constant",onChange:s=>{a.onValueChange&&a.onValueChange(o,s)}});function m(s,b){var h;return b==="trigger"?(h=Ct.find(u=>u.type===s))==null?void 0:h.icon:s}const y=s=>{p(b=>b.map(h=>h.type!==M?h:{...h,value:s}))},P=s=>b=>{p(h=>h.map(u=>{if(u.type!==M)return u;const{value:j}=u;if(u.type==="two-constant"){if(s===0)return{...u,value:[b,j[1]]};if(s===1)return{...u,value:[j[0],b]}}return u}))},l=s=>{p(b=>b.map(h=>h.type!==M?h:h.type==="gradient"?{...h,value:s}:h))},c=s=>b=>{p(h=>h.map(u=>{if(u.type!==M)return u;if(u.type==="two-gradient"){const{value:j}=u;if(s===0)return{...u,value:[b,j[1]]};if(s===1)return{...u,value:[j[0],b]}}return u}))};return T.jsxs(ge,{label:e,info:r,fieldCss:{gridTemplateColumns:(d=Ct.find(s=>s.type===M))==null?void 0:d.columns},children:[f.map(s=>{const{type:b,value:h}=s;if(!b||M!==b)return null;switch(b){case"constant":return T.jsx(at,{fullsize:!0,hdr:i,value:h,onValueChange:y},"constant");case"gradient":return T.jsx(be,{fullsize:!0,mode:"particle",value:h,onValueChange:l},"gradient");case"two-constant":return T.jsxs(Ee.Fragment,{children:[T.jsx(at,{fullsize:!0,hdr:i,value:h[0],onValueChange:P(0)}),T.jsx(at,{fullsize:!0,hdr:i,value:h[1],onValueChange:P(1)})]},"two-constant");case"two-gradient":return T.jsxs(Ee.Fragment,{children:[T.jsx(be,{fullsize:!0,mode:"particle",value:h[0],onValueChange:c(0)}),T.jsx(be,{fullsize:!0,mode:"particle",value:h[1],onValueChange:c(1)})]},"two-gradient");default:return null}}),T.jsx(Tt,{defaultValue:"constant",position:"item-aligned",cornerArrow:!0,value:M,valueRenderer:m,onValueChange:s=>v(s),children:f.map(s=>T.jsx(jt,{value:s.type,children:s.label||s.type},s.type))})]})}const It=[{type:"constant",icon:T.jsx(Vt,{size:"14px"}),columns:"minmax(0, 12fr) 32px"},{type:"curve",icon:T.jsx(At,{size:"14px"}),columns:"minmax(0, 12fr) 32px"},{type:"two-constant",icon:T.jsx(kt,{size:"14px"}),columns:"repeat(2, minmax(0, 12fr)) 32px"},{type:"two-curve",icon:T.jsx(Bt,{size:"14px"}),columns:"repeat(2, minmax(0, 12fr)) 32px"}];function Oa(a,e){var t;return e==="trigger"?(t=It.find(r=>r.type===a))==null?void 0:t.icon:a}const rt=[{x:0,y:0},{x:.25,y:.25},{x:.75,y:.75},{x:1,y:1}];function Le(a){var E;const{label:e,info:t,value:r,onValueChange:o,algo:i="bezier",yRangeMode:f,yTickScale:p,yTickScaleMin:M,yTickScaleMax:v,onYTickScaleChange:m,onYTickScaleCommit:y,hideTypeSelector:P,...l}=a,[c,d]=we({prop:a.type,defaultProp:"constant",onChange:w=>{o&&o(r,w)}}),[s,b]=we({prop:r,onChange:w=>{o&&o(w,c)},defaultProp:[{value:0,type:"constant"},{value:rt,type:"curve"},{value:[0,0],type:"two-constant"},{value:[rt,rt],type:"two-curve"}]}),h=w=>{b(k=>k.map(L=>L.type!==c?L:{...L,value:w}))},u=w=>k=>{b(L=>L.map(B=>{if(B.type!==c)return B;const{value:X}=B;return w===0?{...B,value:[k,X[1]]}:w===1?{...B,value:[X[0],k]}:B}))},j=w=>{b(k=>k.map(L=>L.type!==c?L:{...L,value:w}))},_=w=>k=>{b(L=>L.map(B=>{if(B.type!==c)return B;const{value:X}=B;return w===0?{...B,value:[k,X[1]]}:w===1?{...B,value:[X[0],k]}:B}))},F={algo:i,yRangeMode:f,yTickScale:p,yTickScaleMin:M,yTickScaleMax:v,onYTickScaleChange:m,onYTickScaleCommit:y};return T.jsxs(ge,{label:e,info:t,fieldCss:{gridTemplateColumns:(E=It.find(w=>w.type===c))==null?void 0:E.columns,columnGap:"$1"},...l,children:[s.map(w=>{const{type:k,value:L,min:B,max:X,step:J}=w;if(!k||c!==k)return null;switch(k){case"constant":return T.jsx(Ce,{min:B,max:X,dragStep:J,step:J,value:L,onValueChange:h},"constant");case"curve":return T.jsx(tt,{...F,value:L,onChange:j},"curve");case"two-constant":return T.jsxs(Ee.Fragment,{children:[T.jsx(Ce,{size:"sm",startSlot:"min",value:L[0],min:B,max:X,dragStep:J,step:J,onValueChange:u(0)}),T.jsx(Ce,{size:"sm",startSlot:"max",value:L[1],min:B,max:X,dragStep:J,step:J,onValueChange:u(1)})]},"two-constant");case"two-curve":return T.jsxs(Ee.Fragment,{children:[T.jsx(tt,{...F,value:L[0],onChange:_(0)}),T.jsx(tt,{...F,value:L[1],onChange:_(1)})]},"two-curve");default:return null}}),!P&&T.jsx(Tt,{value:c,position:"item-aligned",cornerArrow:!0,valueRenderer:Oa,onValueChange:w=>d(w),children:s.map(w=>T.jsx(jt,{value:w.type,children:w.label||w.type},w.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 wa=Qt("filled","triangle-inverted-filled","IconTriangleInvertedFilled",[["path",{d:"M20.118 3h-16.225a2.914 2.914 0 0 0 -2.503 4.371l8.116 13.549a2.917 2.917 0 0 0 4.987 .005l8.11 -13.539a2.914 2.914 0 0 0 -2.486 -4.386z",key:"svg-0"}]]);const Ea=Z(function(a){const[e,t]=$.useState(null),r=a.data,{assetStore:o,inspectorFacade:i}=Rt();return $.useEffect(()=>{o.getAssetByRef(r.material).then(f=>{t(f)})},[r.material]),C.jsxs(C.Fragment,{children:[C.jsx(ea.List,{model:r,configs:r.formSchema.items,onModelChange:Sa("component",r.id,i,r)}),e&&C.jsx(Ma,{materialAsset:e})]})});ta(wa,{height:"6px",width:"6px",transform:"rotate(-90deg)",variants:{open:{true:{transform:"rotate(0)"}}}});const Ta=function(e){const{title:t,controlOpenKey:r,onCheckedChange:o,model:i}=e;return C.jsxs(Lt,{align:"v",gap:"xs",css:{borderTop:"1px solid $gray4",paddingTop:"$1_5"},justifyContent:"between",children:[C.jsx(aa,{size:"sm",muted:!0,children:t}),C.jsx(ra,{checked:i[r],onCheckedChange:o})]})},ja=Z(Ta);async function La(a,e){await a.assetStore.getAssetByRef(e)}function _a(a,e,t,r){a.inspectorFacade.componentChange(e,t,r)}var D=(a=>(a.BoxShape="BoxShape",a.CircleShape="CircleShape",a.ConeShape="ConeShape",a.HemisphereShape="HemisphereShape",a.SphereShape="SphereShape",a.MeshShape="MeshShape",a))(D||{});function U(a,e){return{class:a.class,props:{...a.props,...e}}}const Ra=Z(({item:a,onModelChange:e})=>{const{t}=G();return C.jsx(C.Fragment,{children:C.jsx(oa,{label:t("effects.shape.size"),value:{x:a.props.size.x,y:a.props.size.y,z:a.props.size.z},onChange:(r,o)=>{const i=U(a,{size:{...a.props.size,[o]:r[o]}});e==null||e("shape",i)}})})}),Aa=Z(({item:a,onModelChange:e})=>{const{t}=G();return C.jsxs(C.Fragment,{children:[C.jsx(te,{label:t("effects.shape.radius"),min:1e-4,step:.05,dragStep:.05,value:a.props.radius,onChange:r=>{const o=U(a,{radius:r});e==null||e("shape",o)}}),C.jsx(te,{label:t("effects.shape.arc"),min:0,max:360,value:a.props.arc,onChange:r=>{const o=U(a,{arc:r});e==null||e("shape",o)}}),C.jsx(st,{label:t("effects.shape.arc-mode.label"),options:[{label:t("effects.shape.loop"),value:ze.Loop},{label:t("effects.shape.random"),value:ze.Random}],value:a.props.arcMode,onChange:r=>{const o=U(a,{arcMode:r});e==null||e("shape",o)}}),a.props.arcMode===ze.Loop?C.jsx(te,{label:t("effects.shape.arc-speed.label"),step:.1,dragStep:.1,value:a.props.arcSpeed,onChange:r=>{const o=U(a,{arcSpeed:r});e==null||e("shape",o)}}):null]})}),Va=Z(({item:a,onModelChange:e})=>{const{t}=G();return C.jsxs(C.Fragment,{children:[C.jsx(st,{label:t("effects.shape.emit-type.label"),options:[{label:t("effects.shape.cone-base"),value:me.Base},{label:t("effects.shape.volume"),value:me.Volume}],value:a.props.emitType,onChange:r=>{const o=U(a,{emitType:r});e==null||e("shape",o)}}),C.jsx(te,{label:t("effects.shape.angle"),min:1e-4,max:90,step:.05,dragStep:.05,value:a.props.angle,onChange:r=>{const o=U(a,{angle:r});e==null||e("shape",o)}}),C.jsx(te,{label:t("effects.shape.radius"),min:1e-4,step:.05,dragStep:.05,value:a.props.radius,onChange:r=>{const o=U(a,{radius:r});e==null||e("shape",o)}}),C.jsx(te,{label:t("effects.shape.length"),min:1e-4,step:.1,dragStep:.1,value:a.props.length,disabled:a.props.emitType===me.Base,onChange:r=>{const o=U(a,{length:r});e==null||e("shape",o)}})]})}),ka=Z(({item:a,onModelChange:e})=>{const{t}=G();return C.jsx(C.Fragment,{children:C.jsx(te,{label:t("effects.shape.radius"),min:1e-4,step:.05,dragStep:.05,value:a.props.radius,onChange:r=>{const o=U(a,{radius:r});e==null||e("shape",o)}})})}),Ba=Z(({item:a,onModelChange:e})=>{const{t}=G();return C.jsx(C.Fragment,{children:C.jsx(te,{label:t("effects.shape.radius"),min:1e-4,step:.05,dragStep:.05,value:a.props.radius,onChange:r=>{const o=U(a,{radius:r});e==null||e("shape",o)}})})}),Da=Z(({item:a,onModelChange:e})=>{const{t}=G(),{assetStore:r}=Rt(),o=Object.values(r.assets).filter(p=>p instanceof Pa),[i,f]=$.useState("");return $.useEffect(()=>{let p=!1;return(async()=>{if(!a.props.mesh){f("");return}try{const v=await r.getAssetByRef(a.props.mesh);p||f((v==null?void 0:v.name)??"")}catch{p||f("")}})(),()=>{p=!0}},[r,a.props.mesh]),C.jsx(na,{label:t("effects.renderer.render-mode.options.mesh"),assets:o,dropLayer:0,value:i,onSelect:async p=>{f(p.name);const M=!!p.engineObject;M||sa.error("Mesh asset is not initialized");const v={class:a.class,props:{...a.props,mesh:p.getCurrentRef(),enabled:M}};e==null||e("shape",v)}})}),Ia=Z(({item:a,onModelChange:e})=>{const{t}=G();return C.jsx(te,{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 o=U(a,{randomDirectionAmount:r});e==null||e("shape",o)}})}),nt=new Map;function Fa(a,e){let t;switch(e.class){case D.BoxShape:{t=new ma;const r=t.size;r.copyFrom(e.props.size),t.size=r;break}case D.CircleShape:{t=new ua,t.radius=e.props.radius,t.arc=e.props.arc,t.arcMode=e.props.arcMode,t.arcSpeed=e.props.arcSpeed;break}case D.ConeShape:{t=new pa,t.angle=e.props.angle,t.radius=e.props.radius,t.length=e.props.length,t.emitType=e.props.emitType;break}case D.HemisphereShape:{t=new ca,t.radius=e.props.radius;break}case D.SphereShape:{t=new la,t.radius=e.props.radius;break}case D.MeshShape:{t=new ia;const r=e.props.mesh;if(r!=null&&r.refId){const o=a.root.assetStore.assets[r.refId];t.mesh=o==null?void 0:o.engineObject}t.mesh||(t.mesh=_t.createSphere(a.engineObject.engine));break}}return t&&(e.props.randomDirectionAmount=e.props.randomDirectionAmount??0,t.randomDirectionAmount=e.props.randomDirectionAmount,t.enabled=e.props.enabled),t}const Ya=(a,e,t)=>{let r=nt.get(`${a.id}-${t.class}`);r&&(r=JSON.parse(r),nt.delete(`${a.id}-${t.class}`),Object.assign(t.props,r));const o=Fa(a,t);o&&a.applyEmissionShape(o)},Za={BoxShape:Ra,CircleShape:Aa,ConeShape:Va,HemisphereShape:ka,SphereShape:Ba,MeshShape:Da},Xa={BoxShape:{class:D.BoxShape,props:{size:{x:1,y:1,z:1},randomDirectionAmount:0,enabled:!0}},CircleShape:{class:D.CircleShape,props:{radius:1,arc:360,arcMode:ze.Random,arcSpeed:1,randomDirectionAmount:0,enabled:!0}},ConeShape:{class:D.ConeShape,props:{angle:25,radius:1,length:5,emitType:me.Base,randomDirectionAmount:0,enabled:!0}},HemisphereShape:{class:D.HemisphereShape,props:{radius:1,randomDirectionAmount:0,enabled:!0}},SphereShape:{class:D.SphereShape,props:{radius:1,randomDirectionAmount:0,enabled:!0}},MeshShape:{class:D.MeshShape,props:{randomDirectionAmount:0,enabled:!0,mesh:void 0}}},$a=Z(({model:a,onModelChange:e})=>{const{t}=G(),r=a.shape;if(!r.class)return;const o=Za[r.class];return C.jsxs(C.Fragment,{children:[C.jsx(st,{label:t("effects.shape.type.label"),info:t("effects.shape.type.info"),value:r.class,options:[{label:t("effects.shape.options.box"),value:D.BoxShape},{label:t("effects.shape.options.circle"),value:D.CircleShape},{label:t("effects.shape.options.cone"),value:D.ConeShape},{label:t("effects.shape.options.hemisphere"),value:D.HemisphereShape},{label:t("effects.shape.options.sphere"),value:D.SphereShape},{label:t("effects.shape.options.mesh"),value:D.MeshShape}],onChange:i=>{const f=Xa[i];if(a.shape&&a.shape.class!==i&&nt.set(`${a.id}-${a.shape.class}`,JSON.stringify(a.shape.props)),f.class!==r.class){const p=R(f);e==null||e("shape",p)}}}),C.jsx(o,{item:r,component:a.engineObject,onModelChange:e}),C.jsx(Ia,{item:r,component:a.engineObject,onModelChange:e})]})}),it=["constant","two-constant","curve","two-curve"],ae=[{x:0,y:0},{x:.25,y:.25},{x:.75,y:.75},{x:1,y:1}];function _e(a){return a.map(e=>({x:e.constructParams[0],y:e.constructParams[1]}))}const zt={class:"ParticleCurve",constructParams:[{class:"CurveKey",constructParams:[0,0]},{class:"CurveKey",constructParams:[.25,.25]},{class:"CurveKey",constructParams:[.75,.75]},{class:"CurveKey",constructParams:[1,1]}]};function I(a,e=0,t=0,r=q.Constant){return{module:a,mode:r,constantMin:t,constantMax:e,curveMax:R(zt),curveMin:R(zt)}}function ce(a,e=0,t=0,r=q.Constant){return{enabled:!1,x:I(a,e,t,r),y:I(a,e,t,r),z:I(a,e,t,r)}}const qa={class:"Burst",constructParams:[0,{class:"ParticleCompositeCurve",constructParams:[15],props:{mode:q.Constant,constantMax:15,constantMin:0}}]},Ga=Z(({model:a,inspectorConfig:e,onModelChange:t})=>{const{t:r}=G(),{label:o,info:i}=e,f=a.bursts,p=l=>{const c=R(f);l(c),t==null||t("bursts",c)},M=(l,c)=>{p(d=>{const s=d[l];s&&c(s)})},v=l=>{const c=f.indexOf(l);c!==-1&&p(d=>{d.splice(c,1)})},m=()=>{p(l=>{l.push(R(qa))})},y=[{title:r("effects.burst.time.label")},{title:r("effects.burst.count.label")}],P=(l,c)=>{const d=Math.max(1,l.constructParams[1].props.constantMax??0,l.constructParams[1].props.constantMin??0);return{data:l,cells:[C.jsx(ge,{children:C.jsx(Ce,{min:0,max:a.duration,step:.05,dragStep:.05,value:l.constructParams[0],onValueChange:s=>{M(c,b=>{b.constructParams[0]=s})}})},`time-${c}`),C.jsx(Le,{type:it[l.constructParams[1].props.mode],direction:"column",algo:"bezier",yRangeMode:"positive",yTickScale:d,yTickScaleMin:0,yTickScaleMax:d,onYTickScaleChange:()=>{},onYTickScaleCommit:()=>{},value:[{value:l.constructParams[1].props.constantMax,type:"constant",min:0,step:1},{value:[l.constructParams[1].props.constantMin,l.constructParams[1].props.constantMax],type:"two-constant",min:0,step:1}],onValueChange:(s,b)=>{const h=s.find(u=>u.type===b);h&&M(c,u=>{switch(b){case"constant":{u.constructParams[1].props.mode=q.Constant,u.constructParams[1].props.constantMax=h.value;break}case"two-constant":{u.constructParams[1].props.mode=q.TwoConstants,u.constructParams[1].props.constantMin=h.value[0],u.constructParams[1].props.constantMax=h.value[1];break}}})}},`count-${c}`)]}};return C.jsx(da,{columns:y,items:f.map((l,c)=>P(l,c)),label:r(o),info:r(i),addable:!0,onAdd:m,onDelete:v,addText:r("effects.burst.add"),emptyText:r("effects.burst.empty","No bursts")})}),Ka=(a,e,t)=>{const r=a.engineObject.generator.emission,o=r.bursts;for(let i=o.length-1;i>=0;i--)r.removeBurst(o[i]);for(let i=0;i<t.length;i++){const f=t[i];if(!f||!f.constructParams||!Array.isArray(f.constructParams)||f.constructParams.length<2){console.warn(`Invalid burst item at index ${i}:`,f);continue}const p=f.constructParams[0],M=f.constructParams[1];if(!M||!M.props){console.warn(`Invalid burst count data at index ${i}:`,M);continue}const v=M.props,m=new ha(v.constantMax);m.mode=v.mode,m.constantMin=v.constantMin,m.constantMax=v.constantMax,m.constant=v.constantMax,r.addBurst(new fa(p,m))}};function Ot(a="colorOverLifetime"){return{module:a,mode:de.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 Pe=["x","y","z"],Na={constant:q.Constant,"two-constant":q.TwoConstants,curve:q.Curve,"two-curve":q.TwoCurves},he=Z(({model:a,inspectorConfig:e,onModelChange:t})=>{const{t:r}=G(),o=e.property,{mainAxis:i}=e,f=a[o],[p,M]=$.useState({x:{max:ae,min:ae},y:{max:ae,min:ae},z:{max:ae,min:ae}}),[v,m]=$.useState(e.yTickScale??1),y=it[f.x.mode];function P(s){return(b,h)=>{const u=b.find(E=>E.type===h);if(!u)return;const j=R(f),_=j[s],F=Na[h];for(const E of Pe)j[E].mode=F;switch(h){case"constant":_.constantMax=u.value;break;case"two-constant":_.constantMin=u.value[0],_.constantMax=u.value[1];break;case"curve":{if(u.value.length>4)return;M(E=>({...E,[s]:{...E[s],max:u.value}})),u.value.forEach((E,w)=>{_.curveMax.constructParams[w].constructParams[0]=E.x,_.curveMax.constructParams[w].constructParams[1]=E.y*v});break}case"two-curve":{if(u.value[0].length>4||u.value[1].length>4)return;M(E=>({...E,[s]:{min:u.value[0],max:u.value[1]}})),u.value[0].forEach((E,w)=>{_.curveMin.constructParams[w].constructParams[0]=E.x,_.curveMin.constructParams[w].constructParams[1]=E.y*v}),u.value[1].forEach((E,w)=>{_.curveMax.constructParams[w].constructParams[0]=E.x,_.curveMax.constructParams[w].constructParams[1]=E.y*v});break}}a[o]=j,t==null||t(o,j)}}function l(s){return[{value:f[s].constantMax,type:"constant",label:r("effects.curve.constant"),min:e.min,max:e.max,step:e.step},{value:[f[s].constantMin,f[s].constantMax],type:"two-constant",label:r("effects.curve.two-constant"),min:e.min,max:e.max,step:e.step},{value:p[s].max,type:"curve",label:r("effects.curve.curve")},{value:[p[s].min,p[s].max],type:"two-curve",label:r("effects.curve.two-curve")}]}const c=s=>{const b=s/v,h=R(f);for(const u of Pe){const j=h[u];j.curveMax.constructParams.forEach(_=>{_.constructParams[1]*=b}),j.curveMin.constructParams.forEach(_=>{_.constructParams[1]*=b})}m(s),a[o]=h,t==null||t(o,h)},d={algo:"linear",yRangeMode:e.yRangeMode,yTickScale:v,yTickScaleMin:e.yTickScaleMin,yTickScaleMax:e.yTickScaleMax,onYTickScaleChange:c,onYTickScaleCommit:()=>{}};return $.useEffect(()=>{const s={};for(const b of Pe)s[b]={max:_e(f[b].curveMax.constructParams).map(h=>({...h,y:h.y/v})),min:_e(f[b].curveMin.constructParams).map(h=>({...h,y:h.y/v}))};M(s)},[]),C.jsxs(C.Fragment,{children:[C.jsx(ya,{label:e.toggleLabel?r(e.toggleLabel):r("effects.curve.3d-prefix")+" "+r(e.label||o),info:r(e.info),value:f.enabled,onChange:s=>{const b=R(f);b.enabled=s,a[o]=b,t==null||t(o,b)}}),f.enabled?C.jsx(ge,{label:"",children:C.jsx(Lt,{direction:"column",gap:"xxs",children:Pe.map((s,b)=>C.jsx(Le,{label:r(s).toLocaleUpperCase(),type:y,css:{gridTemplateColumns:"$4 repeat(3, minmax(0px, 1fr))"},...d,value:l(s),hideTypeSelector:b!==0,onValueChange:P(s)},s))})}):C.jsx(Le,{label:r(e.label||o),type:y,...d,value:l(i),onValueChange:P(i)})]})}),fe=a=>(e,t,r)=>{var f,p;const o=(p=(f=e.engineObject)==null?void 0:f.generator)==null?void 0:p[r.x.module];if(!o){console.warn(`Module container not found for: ${r.x.module}`);return}o[a]=r.enabled;const i={x:o[t+"X"],y:o[t+"Y"],z:o[t+"Z"]};for(const M in i){const v=r[M],m=i[M];if(!m){console.warn(`Axis module not found for: ${M} in ${t}`);continue}m.mode=v.mode,m.constantMax=v.constantMax,m.constantMin=v.constantMin,m.curveMax=new Te,v.curveMax.constructParams.forEach(y=>{const P=y.constructParams[0],l=y.constructParams[1];m.curveMax.addKey(new je(P,l))}),m.curveMin=new Te,v.curveMin.constructParams.forEach(y=>{const P=y.constructParams[0],l=y.constructParams[1];m.curveMin.addKey(new je(P,l))})}},K=Z(({model:a,inspectorConfig:e,onModelChange:t})=>{const{t:r}=G(),o=e.property,i=a[o],[f,p]=$.useState(ae),[M,v]=$.useState(ae),[m,y]=$.useState(e.yTickScale??1);$.useEffect(()=>{const l=_e(i.curveMax.constructParams),c=_e(i.curveMin.constructParams);p(l),v(c)},[]);const P=(l,c)=>{const d=l.find(b=>b.type===c);if(!d)return;const s=R(i);switch(c){case"constant":s.mode=q.Constant,s.constantMax=d.value;break;case"two-constant":s.mode=q.TwoConstants,s.constantMin=d.value[0],s.constantMax=d.value[1];break;case"curve":{if(d.value.length>4)return;p(d.value),s.mode=q.Curve,d.value.forEach((b,h)=>{s.curveMax.constructParams[h].constructParams[0]=b.x,s.curveMax.constructParams[h].constructParams[1]=b.y});break}case"two-curve":{if(d.value[0].length>4||d.value[1].length>4)return;s.mode=q.TwoCurves,v(d.value[0]),p(d.value[1]),d.value[0].forEach((b,h)=>{s.curveMin.constructParams[h].constructParams[0]=b.x,s.curveMin.constructParams[h].constructParams[1]=b.y}),d.value[1].forEach((b,h)=>{s.curveMax.constructParams[h].constructParams[0]=b.x,s.curveMax.constructParams[h].constructParams[1]=b.y});break}}a[o]=s,t==null||t(o,s)};return C.jsx(C.Fragment,{children:C.jsx(Le,{label:r(e.label||e.property),info:r(e.info),type:it[i.mode],algo:"linear",yRangeMode:e.yRangeMode,yTickScale:m,yTickScaleMin:e.yTickScaleMin,yTickScaleMax:e.yTickScaleMax,onYTickScaleChange:y,onYTickScaleCommit:()=>{},value:[{value:i.constantMax,type:"constant",label:r("effects.curve.constant"),min:e.min,max:e.max,step:e.step},{value:[i.constantMin,i.constantMax],type:"two-constant",label:r("effects.curve.two-constant"),min:e.min,max:e.max,step:e.step},{value:f,type:"curve",label:r("effects.curve.curve")},{value:[M,f],type:"two-curve",label:r("effects.curve.two-curve")}],onValueChange:P})})}),N=(a,e,t)=>{var i,f;const r=(f=(i=a.engineObject)==null?void 0:i.generator)==null?void 0:f[t.module];if(!r){console.warn(`Module container not found for: ${t.module}`);return}const o=r[e];if(!o){console.warn(`Module not found for property: ${e} in ${t.module}`);return}o.mode=t.mode,o.constantMax=t.constantMax,o.constantMin=t.constantMin,o.curveMax=new Te,t.curveMax.constructParams.forEach(p=>{const M=p.constructParams[0],v=p.constructParams[1];o.curveMax.addKey(new je(M,v))}),o.curveMin=new Te,t.curveMin.constructParams.forEach(p=>{const M=p.constructParams[0],v=p.constructParams[1];o.curveMin.addKey(new je(M,v))})},Ha=["constant","two-constant"],Wa=Z(({model:a,inspectorConfig:e,onModelChange:t})=>{var v,m;const{t:r}=G(),o=e.property,i=a[o],f={...ve(i.constantMax),intensity:((v=i.constantMax)==null?void 0:v.intensity)??1},p={...ve(i.constantMin),intensity:((m=i.constantMin)==null?void 0:m.intensity)??1},M=(y,P)=>{const l=y.find(d=>d.type===P);if(!l)return;const c=R(i);switch(P){case"constant":{c.mode=de.Constant,c.constantMax=l.value;break}case"two-constant":{const d=l.value[0],s=l.value[1];c.mode=de.TwoConstants,c.constantMin=d,c.constantMax=s;break}}a[o]=c,t==null||t(o,c)};return C.jsx(Dt,{label:r(e.label||e.property),type:Ha[i.mode],info:r(e.info),hdr:!0,value:[{value:f,type:"constant",label:r("effects.curve.constant")},{value:[p,f],type:"two-constant",label:r("effects.curve.two-constant")}],onValueChange:M})}),Ua=(a,e,t)=>{const r=a.engineObject.generator.main.startColor;r.mode=t.mode;const{constantMax:o,constantMin:i}=t,f=o.intensity??1,p=i.intensity??1;r.constantMax.set(o.r*f,o.g*f,o.b*f,o.a),r.constantMin.set(i.r*p,i.g*p,i.b*p,i.a)},Ja=["gradient","two-gradient"],Qa=Z(({model:a,inspectorConfig:e,onModelChange:t})=>{const{t:r}=G(),o=e.property,i=a[o],f=(p,M)=>{var y,P;if(!p.find(l=>l.type===M))return;const m=R(i);switch(M){case"gradient":{const l=p.find(c=>c.type===M);if(!((y=l==null?void 0:l.value)!=null&&y.color)||!((P=l==null?void 0:l.value)!=null&&P.alpha)){console.warn(`Invalid gradient value structure for ${o}`);return}if(l.value.color.length>4||l.value.alpha.length>4)return;m.mode=de.Gradient,m.gradientMax.constructParams=[l.value.color.map(c=>({color:c.value,time:c.time})),l.value.alpha.map(c=>({alpha:c.value,time:c.time}))];break}case"two-gradient":{const l=p.find(c=>c.type===M);if(l.value[0].color.length>4||l.value[0].alpha.length>4||l.value[1].color.length>4||l.value[1].alpha.length>4)return;m.mode=de.TwoGradients,m.gradientMin.constructParams=[l.value[0].color.map(c=>({color:c.value,time:c.time})),l.value[0].alpha.map(c=>({alpha:c.value,time:c.time}))],m.gradientMax.constructParams=[l.value[1].color.map(c=>({color:c.value,time:c.time})),l.value[1].alpha.map(c=>({alpha:c.value,time:c.time}))];break}}a[o]=m,t==null||t(o,m)};return C.jsx(C.Fragment,{children:C.jsx(Dt,{label:r(e.property),type:Ja[i.mode-2],info:r(e.info),value:[{value:{color:i.gradientMax.constructParams[0].map(p=>({value:ve(p.color),time:p.time})),alpha:i.gradientMax.constructParams[1].map(p=>({value:p.alpha,time:p.time}))},type:"gradient",label:r("effects.curve.gradient")},{value:[{color:i.gradientMin.constructParams[0].map(p=>({value:ve(p.color),time:p.time})),alpha:i.gradientMin.constructParams[1].map(p=>({value:p.alpha,time:p.time}))},{color:i.gradientMax.constructParams[0].map(p=>({value:ve(p.color),time:p.time})),alpha:i.gradientMax.constructParams[1].map(p=>({value:p.alpha,time:p.time}))}],type:"two-gradient",label:r("effects.curve.two-gradient")}],onValueChange:f})})}),pe=[],ue=[],er=(a,e,t)=>{var M,v,m;const r=(v=(M=a.engineObject)==null?void 0:M.generator)==null?void 0:v[t.module];if(!r){console.warn(`Module container not found for: ${t.module}`);return}const o=r[e];if(!o){console.warn(`Module not found for property: ${e} in ${t.module}`);return}if(o.mode=t.mode,pe.length=0,ue.length=0,!((m=t.gradientMax)!=null&&m.constructParams)||!Array.isArray(t.gradientMax.constructParams)){console.warn(`Invalid gradientMax.constructParams for ${e}`);return}const i=t.gradientMax.constructParams,f=i[0]||[],p=i[1]||[];Array.isArray(f)&&f.forEach(y=>{if(y&&y.color&&typeof y.time=="number"){const P=y.color;pe.push(new St(y.time,new Mt(P.r??0,P.g??0,P.b??0,P.a??1)))}}),Array.isArray(p)&&p.forEach(y=>{y&&typeof y.time=="number"&&typeof y.alpha=="number"&&ue.push(new Pt(y.time,y.alpha))}),o.gradientMax.setKeys(pe,ue),pe.length=0,ue.length=0,t.gradientMin.constructParams[0].forEach(y=>{pe.push(new St(y.time,new Mt(y.color.r,y.color.g,y.color.b,y.color.a)))}),t.gradientMin.constructParams[1].forEach(y=>{ue.push(new Pt(y.time,y.alpha))}),o.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 ot(a,e,t){const r=.16666666666666666,o=1/3,i=(a+e+t)*o,f=Math.floor(a+i),p=Math.floor(e+i),M=Math.floor(t+i),v=(f+p+M)*r,m=a-f+v,y=e-p+v,P=t-M+v;let l,c,d,s,b,h;m>=y?y>=P?(l=1,c=0,d=0,s=1,b=1,h=0):m>=P?(l=1,c=0,d=0,s=1,b=0,h=1):(l=0,c=0,d=1,s=1,b=0,h=1):y<P?(l=0,c=0,d=1,s=0,b=1,h=1):m<P?(l=0,c=1,d=0,s=0,b=1,h=1):(l=0,c=1,d=0,s=1,b=1,h=0);const u=m-l+r,j=y-c+r,_=P-d+r,F=m-s+o,E=y-b+o,w=P-h+o,k=m-.5,L=y-.5,B=P-.5,X=Oe(f),J=Oe(p),xe=Oe(M),Ft=H(H(H(xe)+J)+X),Yt=H(H(H(xe+d)+J+c)+X+l),Zt=H(H(H(xe+h)+J+b)+X+s),Xt=H(H(H(xe+1)+J+1)+X+1),Ae=.142857142857,lt=Ae*2-0,ct=Ae*.5-1,Ve=Ae*1-0;function Se(dt){const ht=dt-49*Math.floor(dt*Ve*Ve),ft=Math.floor(ht*Ve),Nt=Math.floor(ht-7*ft),yt=ft*lt+ct,bt=Nt*lt+ct,Me=1-Math.abs(yt)-Math.abs(bt),vt=yt,gt=bt,Ht=Math.floor(vt)*2+1,Wt=Math.floor(gt)*2+1,xt=-(Me<0?1:0),Je=vt+Ht*xt,Qe=gt+Wt*xt,et=1.79284291400159-.85373472095314*(Je*Je+Qe*Qe+Me*Me);return[Je*et,Qe*et,Me*et]}const re=Se(Ft),oe=Se(Yt),ne=Se(Zt),se=Se(Xt),ke=Math.max(.6-(m*m+y*y+P*P),0),Be=Math.max(.6-(u*u+j*j+_*_),0),De=Math.max(.6-(F*F+E*E+w*w),0),Ie=Math.max(.6-(k*k+L*L+B*B),0),Fe=ke*ke,Ye=Be*Be,Ze=De*De,Xe=Ie*Ie,$e=Fe*Fe,qe=Ye*Ye,Ge=Ze*Ze,Ke=Xe*Xe,$t=re[0]*m+re[1]*y+re[2]*P,qt=oe[0]*u+oe[1]*j+oe[2]*_,Gt=ne[0]*F+ne[1]*E+ne[2]*w,Kt=se[0]*k+se[1]*L+se[2]*B,Ne=Fe*ke*$t,He=Ye*Be*qt,We=Ze*De*Gt,Ue=Xe*Ie*Kt;let pt=-8*(Ne*m+He*u+We*F+Ue*k),ut=-8*(Ne*y+He*j+We*E+Ue*L),mt=-8*(Ne*P+He*_+We*w+Ue*B);return pt+=$e*re[0]+qe*oe[0]+Ge*ne[0]+Ke*se[0],ut+=$e*re[1]+qe*oe[1]+Ge*ne[1]+Ke*se[1],mt+=$e*re[2]+qe*oe[2]+Ge*ne[2]+Ke*se[2],[pt*42,ut*42,mt*42]}function wt(a,e,t){ot(t,e,a);const o=ot(a+100,t,e);return ot(e,a+100,t)[1]-o[2]}function tr(a,e,t,r,o,i,f){let p=wt(a*r,e*r,t*r),M=1,v=r,m=1;for(let y=1;y<o;y++)m*=f,v*=i,M+=m,p+=m*wt(a*v,e*v,t*v);return p/M}const ee=80,Et=5,ar=({model:a})=>{const e=$.useRef(null),t=$.useRef(0);return $.useEffect(()=>{const r=e.current;if(!r)return;const o=r.getContext("2d");if(!o)return;const i=ba(()=>{var c,d;const f=((d=(c=a.noiseStrength)==null?void 0:c.x)==null?void 0:d.constantMax)??1,p=a.noiseFrequency??.5,M=a.noiseScrollSpeed??0,v=a.noiseOctaveCount??1,m=a.noiseOctaveIntensityMultiplier??.5,y=a.noiseOctaveFrequencyMultiplier??2;cancelAnimationFrame(t.current);const P=performance.now(),l=s=>{const b=(s-P)/1e3*M,h=o.createImageData(ee,ee),u=h.data;for(let j=0;j<ee;j++){const _=(1-j/ee)*Et;for(let F=0;F<ee;F++){const E=F/ee*Et,w=tr(E,_,b,p,v,y,m),k=Math.max(0,Math.min(255,Math.round((w*f*(.5/7)+.5)*255))),L=(j*ee+F)*4;u[L]=k,u[L+1]=k,u[L+2]=k,u[L+3]=255}}o.putImageData(h,0,0),M>0&&(t.current=requestAnimationFrame(l))};t.current=requestAnimationFrame(l)});return()=>{cancelAnimationFrame(t.current),i()}},[a]),C.jsx(ge,{label:" ",labelCss:{visibility:"hidden"},children:C.jsxs("div",{style:{position:"relative",width:80,height:80},children:[C.jsx("canvas",{ref:e,width:ee,height:ee,style:{width:80,height:80,borderRadius:4,border:"1px solid var(--color-border-default, rgba(255,255,255,0.12))",display:"block"}}),C.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 rr=Object.defineProperty,or=Object.getOwnPropertyDescriptor,S=(a,e,t,r)=>{for(var o=r>1?void 0:r?or(e,t):e,i=a.length-1,f;i>=0;i--)(f=a[i])&&(o=(r?f(e,t,o):f(o))||o);return r&&o&&rr(e,t,o),o};let g=class extends va{constructor(e,t){super(e,t);x(this,"_emissionModuleEnabled",!0);x(this,"_emissionShapeModuleEnabled",!0);x(this,"_rotationOverLifetimeModuleEnabled",!1);x(this,"_sizeOverLifetimeModuleEnabled",!1);x(this,"_textureSheetAnimationModuleEnabled",!1);x(this,"_velocityOverLifetimeModuleEnabled",!1);x(this,"_forceOverLifetimeModuleEnabled",!1);x(this,"_limitVelocityOverLifetimeModuleEnabled",!1);x(this,"_colorOverLifetimeModuleEnabled",!1);x(this,"_noiseModuleEnabled",!1);x(this,"material",{refId:"0000202"});x(this,"priority",0);x(this,"velocityScale",0);x(this,"lengthScale",2);x(this,"pivot",{x:0,y:0,z:0});x(this,"renderMode",W.Billboard);x(this,"mesh",null);x(this,"duration",5);x(this,"isLoop",!0);x(this,"startDelay",I("main"));x(this,"startLifetime",I("main",5));x(this,"startSpeed",I("main",5));x(this,"startSize",ce("main",1));x(this,"startRotation",ce("main"));x(this,"flipRotation",0);x(this,"startColor",{module:"main",mode:de.Constant,constantMax:{r:1,g:1,b:1,a:1,intensity:1},constantMin:{r:1,g:1,b:1,a:1,intensity:1}});x(this,"gravityModifier",I("main"));x(this,"simulationSpace",Y.Local);x(this,"simulationSpeed",1);x(this,"scalingMode",ye.Local);x(this,"playOnEnabled",!0);x(this,"maxParticles",1e3);x(this,"rateOverTime",I("emission",10));x(this,"shape",{class:D.ConeShape,props:{angle:25,radius:1,length:5,emitType:me.Base,enabled:!0}});x(this,"bursts",[]);x(this,"size",ce("sizeOverLifetime",1));x(this,"rotation",ce("rotationOverLifetime",45));x(this,"textureSheetAnimationType",0);x(this,"cycleCount",1);x(this,"tiling",{x:1,y:1});x(this,"frameOverTime",I("textureSheetAnimation",1,0,q.Curve));x(this,"spaceMode",Y.Local);x(this,"forceSpaceMode",Y.Local);x(this,"velocityX",I("velocityOverLifetime"));x(this,"velocityY",I("velocityOverLifetime"));x(this,"velocityZ",I("velocityOverLifetime"));x(this,"speed",ce("limitVelocityOverLifetime",1));x(this,"limitVelocitySpaceMode",Y.Local);x(this,"dampen",0);x(this,"drag",I("limitVelocityOverLifetime"));x(this,"multiplyDragByParticleSize",!1);x(this,"multiplyDragByParticleVelocity",!1);x(this,"forceX",I("forceOverLifetime"));x(this,"forceY",I("forceOverLifetime"));x(this,"forceZ",I("forceOverLifetime"));x(this,"color",Ot());x(this,"noisePreview",null);x(this,"noiseStrength",ce("noise",1));x(this,"noiseFrequency",.5);x(this,"noiseScrollSpeed",0);x(this,"noiseOctaveCount",1);x(this,"noiseOctaveIntensityMultiplier",.5);x(this,"noiseOctaveFrequencyMultiplier",2);const r=this.formSchema;r.addGroup(n("effects.renderer.sections.main"),["duration","isLoop","startDelay","startLifetime","startSpeed","startSize","startRotation","flipRotation","startColor","gravityModifier","simulationSpace","simulationSpeed","scalingMode","playOnEnabled","maxParticles"]);const o=(i,f,p,M,v)=>{r.addGroup(n(i),f,{collapsible:!1,controlOpenKey:p,customTitle:C.jsx(ja,{model:this,title:n(i),controlOpenKey:p,onCheckedChange:m=>{v==null||v(m),_a(this.root,this.id,p,m),this.applyBoundPathChange(M,A.Toggle,m)}})})};o("effects.renderer.sections.emission",["rateOverTime","bursts"],"_emissionModuleEnabled","generator.emission.enabled"),o("effects.renderer.sections.shape",["shape"],"_emissionShapeModuleEnabled","generator.emission.shape.enabled",i=>{this.shape.props.enabled=i}),o("effects.renderer.sections.size-over-lifetime",["size"],"_sizeOverLifetimeModuleEnabled","generator.sizeOverLifetime.enabled"),o("effects.renderer.sections.rotation-over-lifetime",["rotation"],"_rotationOverLifetimeModuleEnabled","generator.rotationOverLifetime.enabled"),o("effects.renderer.sections.force-over-lifetime",["forceSpaceMode","forceX","forceY","forceZ"],"_forceOverLifetimeModuleEnabled","generator.forceOverLifetime.enabled"),o("effects.renderer.sections.velocity-over-lifetime",["spaceMode","velocityX","velocityY","velocityZ"],"_velocityOverLifetimeModuleEnabled","generator.velocityOverLifetime.enabled"),o("effects.renderer.sections.limit-velocity-over-lifetime",["speed","limitVelocitySpaceMode","dampen","drag","multiplyDragByParticleSize","multiplyDragByParticleVelocity"],"_limitVelocityOverLifetimeModuleEnabled","generator.limitVelocityOverLifetime.enabled"),o("effects.renderer.sections.texture-sheet-animation",["textureSheetAnimationType","cycleCount","tiling","frameOverTime"],"_textureSheetAnimationModuleEnabled","generator.textureSheetAnimation.enabled"),o("effects.renderer.sections.color-over-lifetime",["color"],"_colorOverLifetimeModuleEnabled","generator.colorOverLifetime.enabled"),o("effects.renderer.sections.noise",["noisePreview","noiseStrength","noiseFrequency","noiseScrollSpeed","noiseOctaveCount","noiseOctaveIntensityMultiplier","noiseOctaveFrequencyMultiplier"],"_noiseModuleEnabled","generator.noise.enabled"),r.addGroup(n("effects.renderer.sections.rendering"),["renderMode","mesh","material","velocityScale","lengthScale","pivot","priority"])}applyEmissionShape(e){this.applyBoundPathChange("generator.emission.shape",A.Input,e)}onInitComplete(){const{_engineObject:{generator:e}}=this;if(this.applyBoundPathChange("enabled",A.Toggle,this._enabled),this.applyBoundPathChange("renderMode",A.Select,this.renderMode),e.emission.enabled=this._emissionModuleEnabled,e.emission.shape.enabled=this._emissionShapeModuleEnabled,this.shape.class===D.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",A.AssetPicker,r),t.enabled=this._emissionShapeModuleEnabled})):this.applyBoundPathChange("generator.emission.shape.mesh",A.Input,_t.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()}_applyRendererMeshFromRef(){this.applyBoundPathChange("mesh",A.AssetPicker,this.mesh??null)}async bindEngineObject(e){e.enabled=!1,await super.bindEngineObject(e)}deserialize(e){var r,o,i,f,p,M;if(this._enabled=((r=e.props)==null?void 0:r.enabled)??!0,(o=e.props)!=null&&o.generator){const{props:v}=e;this.priority=v.priority??this.priority,this.velocityScale=v.velocityScale??this.velocityScale,this.lengthScale=v.lengthScale??this.lengthScale,this.pivot=v.pivot??this.pivot,this.renderMode=v.renderMode??this.renderMode,this.mesh=v.mesh??null;const{main:m,emission:y,sizeOverLifetime:P,rotationOverLifetime:l,velocityOverLifetime:c,limitVelocityOverLifetime:d,colorOverLifetime:s,textureSheetAnimation:b,forceOverLifetime:h,noise:u}=e.props.generator;this.duration=m.duration,this.isLoop=m.isLoop,this.startDelay=m.startDelay,this.startLifetime=m.startLifetime,this.startSpeed=m.startSpeed,this.startSize.enabled=m.startSize3D,this.startSize.x=m.startSizeX,this.startSize.y=m.startSizeY,this.startSize.z=m.startSizeZ,this.startRotation.enabled=m.startRotation3D,this.startRotation.x=m.startRotationX,this.startRotation.y=m.startRotationY,this.startRotation.z=m.startRotationZ,this.flipRotation=m.flipRotation,this.startColor=m.startColor,this.gravityModifier=m.gravityModifier,this.simulationSpace=m.simulationSpace,this.simulationSpeed=m.simulationSpeed,this.scalingMode=m.scalingMode,this.playOnEnabled=m.playOnEnabled,this.maxParticles=m.maxParticles,this._emissionModuleEnabled=y.enabled,this.rateOverTime=y.rateOverTime,this.shape=y.shape,(((i=y.shape)==null?void 0:i.class)==="Null"||y.shape===null)&&(this.shape={class:D.ConeShape,props:{angle:25,radius:1,length:5,emitType:me.Base,enabled:!1}}),this._emissionShapeModuleEnabled=((p=(f=y==null?void 0:y.shape)==null?void 0:f.props)==null?void 0:p.enabled)??!0;const j=[];if((M=y==null?void 0:y.methods)!=null&&M.addBurst&&Array.isArray(y.methods.addBurst))for(let E=0;E<y.methods.addBurst.length;E++)y.methods.addBurst[E]&&y.methods.addBurst[E][0]&&j.push(y.methods.addBurst[E][0]);this.bursts=j,this._sizeOverLifetimeModuleEnabled=(P==null?void 0:P.enabled)??!1,this.size.enabled=(P==null?void 0:P.separateAxes)??!1,this.size.x=P!=null&&P.sizeX?{...P.sizeX,module:"sizeOverLifetime"}:{...R(this.size.x),module:"sizeOverLifetime"},this.size.y=P!=null&&P.sizeY?{...P.sizeY,module:"sizeOverLifetime"}:{...R(this.size.y),module:"sizeOverLifetime"},this.size.z=P!=null&&P.sizeZ?{...P.sizeZ,module:"sizeOverLifetime"}:{...R(this.size.z),module:"sizeOverLifetime"},this._rotationOverLifetimeModuleEnabled=(l==null?void 0:l.enabled)??!1,this.rotation.enabled=(l==null?void 0:l.separateAxes)??!1,this.rotation.x=l!=null&&l.rotationX?{...l.rotationX,module:"rotationOverLifetime"}:{...R(this.rotation.x),module:"rotationOverLifetime"},this.rotation.y=l!=null&&l.rotationY?{...l.rotationY,module:"rotationOverLifetime"}:{...R(this.rotation.y),module:"rotationOverLifetime"},this.rotation.z=l!=null&&l.rotationZ?{...l.rotationZ,module:"rotationOverLifetime"}:{...R(this.rotation.z),module:"rotationOverLifetime"},this._velocityOverLifetimeModuleEnabled=(c==null?void 0:c.enabled)??!1,this.velocityX=(c==null?void 0:c.velocityX)??R(this.velocityX),this.velocityY=(c==null?void 0:c.velocityY)??R(this.velocityY),this.velocityZ=(c==null?void 0:c.velocityZ)??R(this.velocityZ),this.spaceMode=(c==null?void 0:c.space)??Y.Local,this._limitVelocityOverLifetimeModuleEnabled=(d==null?void 0:d.enabled)??!1,this.speed.enabled=(d==null?void 0:d.separateAxes)??!1;const _=(d==null?void 0:d.speedX)??(d==null?void 0:d.speed);this.speed.x=_?{..._,module:"limitVelocityOverLifetime"}:{...R(this.speed.x),module:"limitVelocityOverLifetime"},this.speed.y=d!=null&&d.speedY?{...d.speedY,module:"limitVelocityOverLifetime"}:{...R(this.speed.y),module:"limitVelocityOverLifetime"},this.speed.z=d!=null&&d.speedZ?{...d.speedZ,module:"limitVelocityOverLifetime"}:{...R(this.speed.z),module:"limitVelocityOverLifetime"},this.dampen=(d==null?void 0:d.dampen)??0,this.drag=d!=null&&d.drag?{...d.drag,module:"limitVelocityOverLifetime"}:I("limitVelocityOverLifetime"),this.multiplyDragByParticleSize=(d==null?void 0:d.multiplyDragByParticleSize)??!1,this.multiplyDragByParticleVelocity=(d==null?void 0:d.multiplyDragByParticleVelocity)??!1,this.limitVelocitySpaceMode=(d==null?void 0:d.space)??Y.Local,this._forceOverLifetimeModuleEnabled=(h==null?void 0:h.enabled)??!1,this.forceX=(h==null?void 0:h.forceX)??I("forceOverLifetime"),this.forceY=(h==null?void 0:h.forceY)??I("forceOverLifetime"),this.forceZ=(h==null?void 0:h.forceZ)??I("forceOverLifetime"),this.forceSpaceMode=(h==null?void 0:h.space)??Y.Local,s?(this._colorOverLifetimeModuleEnabled=s.enabled,this.color=s.color):(this._colorOverLifetimeModuleEnabled=!0,this.color=Ot()),this._textureSheetAnimationModuleEnabled=b.enabled,this.textureSheetAnimationType=b.type,this.cycleCount=b.cycleCount,this.tiling=b.tiling,this.frameOverTime=b.frameOverTime,this._noiseModuleEnabled=(u==null?void 0:u.enabled)??!1,this.noiseStrength.enabled=(u==null?void 0:u.separateAxes)??!1;const F=u==null?void 0:u.strengthX;this.noiseStrength.x=F?{...F,module:"noise"}:{...R(this.noiseStrength.x),module:"noise"},this.noiseStrength.y=u!=null&&u.strengthY?{...u.strengthY,module:"noise"}:{...R(this.noiseStrength.y),module:"noise"},this.noiseStrength.z=u!=null&&u.strengthZ?{...u.strengthZ,module:"noise"}:{...R(this.noiseStrength.z),module:"noise"},this.noiseFrequency=(u==null?void 0:u.frequency)??.5,this.noiseScrollSpeed=(u==null?void 0:u.scrollSpeed)??0,this.noiseOctaveCount=(u==null?void 0:u.octaveCount)??1,this.noiseOctaveIntensityMultiplier=(u==null?void 0:u.octaveIntensityMultiplier)??.5,this.noiseOctaveFrequencyMultiplier=(u==null?void 0:u.octaveFrequencyMultiplier)??2}e.methods&&(this.material=e.methods.setMaterial[0][0]);const t=e.methods?e:{...e,methods:{setMaterial:[[this.material]]}};super.deserialize(t)}toJSON(){const e=[];return this.bursts.forEach(r=>{e.push([r])}),{id:this.id,class:this.type,props:{enabled:this.enabled,priority:this.priority,velocityScale:this.velocityScale,lengthScale:this.lengthScale,pivot:this.pivot,renderMode:this.renderMode,mesh:this.mesh,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,methods:{addBurst: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}}},methods:{setMaterial:[[this.material]]}}}};S([Q],g.prototype,"_emissionModuleEnabled",2);S([Q],g.prototype,"_emissionShapeModuleEnabled",2);S([Q],g.prototype,"_rotationOverLifetimeModuleEnabled",2);S([Q],g.prototype,"_sizeOverLifetimeModuleEnabled",2);S([Q],g.prototype,"_textureSheetAnimationModuleEnabled",2);S([Q],g.prototype,"_velocityOverLifetimeModuleEnabled",2);S([Q],g.prototype,"_forceOverLifetimeModuleEnabled",2);S([Q],g.prototype,"_limitVelocityOverLifetimeModuleEnabled",2);S([Q],g.prototype,"_colorOverLifetimeModuleEnabled",2);S([Q],g.prototype,"_noiseModuleEnabled",2);S([V({engineKey:"setMaterial",setPath:"setMaterial()",getPath:"getMaterial()",valueType:ga.ReferResource,getEngineValue:a=>a.getMaterial()}),z({type:A.AssetPicker,assetType:"Material",customFilter:a=>{var e;return((e=a.engineObject.shader)==null?void 0:e.name)==="particle-shader"},priority:-100,label:n("effects.renderer.material.label"),info:n("effects.renderer.material.info")}),O()],g.prototype,"material",2);S([z({bindPath:"priority",min:0,step:1,dragStep:1,priority:-100,label:n("effects.renderer.priority.label"),info:n("effects.renderer.priority.info")}),O()],g.prototype,"priority",2);S([z({bindPath:"velocityScale",priority:-100,label:n("effects.renderer.velocity-scale.label"),info:n("effects.renderer.velocity-scale.info"),when:a=>a.renderMode===W.StretchBillboard}),O()],g.prototype,"velocityScale",2);S([z({bindPath:"lengthScale",priority:-100,label:n("effects.renderer.length-scale.label"),info:n("effects.renderer.length-scale.info"),when:a=>a.renderMode===W.StretchBillboard}),O()],g.prototype,"lengthScale",2);S([z({type:A.Vector3,bindPath:"pivot",label:n("effects.renderer.pivot.label"),priority:-100}),O()],g.prototype,"pivot",2);S([V({getPath:"renderMode",setPath:"renderMode"}),z({type:A.Select,value:W.Billboard,label:n("effects.renderer.render-mode.label"),options:[{label:n("effects.renderer.render-mode.options.billboard"),value:W.Billboard},{label:n("effects.renderer.render-mode.options.stretch-billboard"),value:W.StretchBillboard},{label:n("effects.renderer.render-mode.options.horizontal-billboard"),value:W.HorizontalBillboard},{label:n("effects.renderer.render-mode.options.mesh"),value:W.Mesh},{label:n("effects.renderer.render-mode.options.none"),value:W.None}],onChange(a){a.renderMode===W.Mesh&&a._applyRendererMeshFromRef()},priority:-100}),O()],g.prototype,"renderMode",2);S([z({type:A.AssetPicker,assetType:"Mesh",label:n("effects.renderer.mesh.label"),info:n("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",A.AssetPicker,a.mesh)}catch(r){console.warn(r)}},priority:-100}),O()],g.prototype,"mesh",2);S([V({getPath:"generator.main.duration",setPath:"generator.main.duration"}),z({bindPath:"generator.main.duration",min:.05,step:.05,dragStep:.05,label:n("effects.renderer.duration.label"),info:n("effects.renderer.duration.info")}),O()],g.prototype,"duration",2);S([V({getPath:"generator.main.isLoop",setPath:"generator.main.isLoop"}),z({bindPath:"generator.main.isLoop",label:n("effects.renderer.loop.label"),info:n("effects.renderer.loop.info")}),O()],g.prototype,"isLoop",2);S([z({customComponent:K,min:0,yRangeMode:"positive",onChange:N,info:n("effects.renderer.start.delay.info"),label:n("effects.renderer.start.delay.label")}),O()],g.prototype,"startDelay",2);S([z({customComponent:K,onChange:N,min:1e-4,yRangeMode:"positive",label:n("effects.renderer.start.lifetime.label"),info:n("effects.renderer.start.lifetime.info")}),O()],g.prototype,"startLifetime",2);S([z({customComponent:K,onChange:N,label:n("effects.renderer.start.speed.label")}),O()],g.prototype,"startSpeed",2);S([z({module:"main",toggleProps:"startSize3D",axisX:"startSizeX",axisY:"startSizeY",axisZ:"startSizeZ",mainAxis:"x",customComponent:he,onChange:fe("startSize3D"),label:n("effects.renderer.start.size.label"),info:n("effects.renderer.start.size.info"),min:0,yRangeMode:"positive"}),O()],g.prototype,"startSize",2);S([z({module:"main",toggleProps:"startRotation3D",axisX:"startRotationX",axisY:"startRotationY",axisZ:"startRotationZ",mainAxis:"z",customComponent:he,onChange:fe("startRotation3D"),label:n("effects.renderer.start.rotation.label"),info:n("effects.renderer.start.rotation.info"),step:1}),O()],g.prototype,"startRotation",2);S([V({getPath:"generator.main.flipRotation",setPath:"generator.main.flipRotation"}),z({bindPath:"generator.main.flipRotation",min:0,max:1,step:.05,dragStep:.05,label:n("effects.renderer.flip-rotation.label")}),O()],g.prototype,"flipRotation",2);S([z({customComponent:Wa,onChange:Ua,label:n("effects.renderer.start.color.label")}),O()],g.prototype,"startColor",2);S([z({customComponent:K,info:n("effects.renderer.gravity-modifier.info"),onChange:N,label:n("effects.renderer.gravity-modifier.label")}),O()],g.prototype,"gravityModifier",2);S([V({getPath:"generator.main.simulationSpace",setPath:"generator.main.simulationSpace"}),z({type:A.Select,bindPath:"generator.main.simulationSpace",value:Y.Local,label:n("effects.renderer.simulation.space.label"),info:n("effects.renderer.simulation.space.info"),options:[{label:n("effects.renderer.simulation.space.options.local"),value:Y.Local},{label:n("effects.renderer.simulation.space.options.world"),value:Y.World}]}),O()],g.prototype,"simulationSpace",2);S([V({getPath:"generator.main.simulationSpeed",setPath:"generator.main.simulationSpeed"}),z({bindPath:"generator.main.simulationSpeed",step:.05,dragStep:.05,label:n("effects.renderer.simulation.speed.label"),info:n("effects.renderer.simulation.speed.info")}),O()],g.prototype,"simulationSpeed",2);S([V({getPath:"generator.main.scalingMode",setPath:"generator.main.scalingMode"}),z({type:A.Select,bindPath:"generator.main.scalingMode",label:n("effects.renderer.scaling-mode.label"),info:n("effects.renderer.scaling-mode.info"),value:ye.Local,options:[{label:n("effects.renderer.scaling-mode.options.hierarchy"),value:ye.Hierarchy},{label:n("effects.renderer.scaling-mode.options.local"),value:ye.Local},{label:n("effects.renderer.scaling-mode.options.world"),value:ye.World}]}),O()],g.prototype,"scalingMode",2);S([V({getPath:"generator.main.playOnEnabled",setPath:"generator.main.playOnEnabled"}),z({type:A.Toggle,bindPath:"generator.main.playOnEnabled",label:n("effects.renderer.play-on-enabled.label"),info:n("effects.renderer.play-on-enabled.info")}),O()],g.prototype,"playOnEnabled",2);S([V({getPath:"generator.main.maxParticles",setPath:"generator.main.maxParticles"}),z({type:A.Number,bindPath:"generator.main.maxParticles",min:1,dragStep:1,label:n("effects.renderer.max-particles.label"),info:n("effects.renderer.max-particles.info")}),O()],g.prototype,"maxParticles",2);S([z({customComponent:K,onChange:N,min:0,yRangeMode:"positive",label:n("effects.renderer.rate-over-time.label"),info:n("effects.renderer.rate-over-time.info")}),O()],g.prototype,"rateOverTime",2);S([z({customComponent:$a,onChange:Ya}),O()],g.prototype,"shape",2);S([O({type:"methods",key:"addBurst"}),z({label:n("effects.renderer.bursts.label"),info:n("effects.renderer.bursts.info"),customComponent:Ga,onChange:Ka})],g.prototype,"bursts",2);S([z({module:"sizeOverLifetime",toggleProps:"separateAxes",toggleLabel:"effects.curve.separate-axes",axisX:"sizeX",axisY:"sizeY",axisZ:"sizeZ",mainAxis:"x",customComponent:he,onChange:fe("separateAxes"),min:0,yRangeMode:"positive",label:n("effects.renderer.over-lifetime.size.label")}),O()],g.prototype,"size",2);S([z({module:"rotationOverLifetime",toggleProps:"separateAxes",toggleLabel:"effects.curve.separate-axes",axisX:"rotationX",axisY:"rotationY",axisZ:"rotationZ",mainAxis:"z",customComponent:he,onChange:fe("separateAxes"),step:1,yTickScale:45,label:n("effects.renderer.over-lifetime.rotation.label")}),O()],g.prototype,"rotation",2);S([V({getPath:"generator.textureSheetAnimation.type",setPath:"generator.textureSheetAnimation.type"}),z({type:A.Select,value:0,label:n("effects.renderer.texture-sheet.type.label"),info:n("effects.renderer.texture-sheet.type.info"),options:[{label:n("effects.renderer.texture-sheet.type.options.whole-sheet"),value:0},{label:n("effects.renderer.texture-sheet.type.options.single-row"),value:1}]}),O()],g.prototype,"textureSheetAnimationType",2);S([V({getPath:"generator.textureSheetAnimation.cycleCount",setPath:"generator.textureSheetAnimation.cycleCount"}),z({bindPath:"generator.textureSheetAnimation.cycleCount",min:1e-4,step:1,dragStep:1,label:n("effects.renderer.texture-sheet.cycle-count.label"),info:n("effects.renderer.texture-sheet.cycle-count.info")}),O()],g.prototype,"cycleCount",2);S([z({type:A.Vector2,min:1,label:n("effects.renderer.texture-sheet.tiling.label"),info:n("effects.renderer.texture-sheet.tiling.info"),onChange(a,e,t){a.applyBoundPathChange("generator.textureSheetAnimation.tiling",A.Vector2,t)}}),O()],g.prototype,"tiling",2);S([z({customComponent:K,onChange:N,min:0,max:1,yRangeMode:"positive",label:n("effects.renderer.over-lifetime.frame.label")}),O()],g.prototype,"frameOverTime",2);S([V({getPath:"generator.velocityOverLifetime.space",setPath:"generator.velocityOverLifetime.space"}),z({type:A.Select,bindPath:"generator.velocityOverLifetime.space",value:0,label:n("effects.renderer.space-mode.label"),info:n("effects.renderer.space-mode.info"),options:[{label:n("effects.renderer.space-mode.options.local"),value:Y.Local},{label:n("effects.renderer.space-mode.options.world"),value:Y.World}]}),O()],g.prototype,"spaceMode",2);S([V({getPath:"generator.forceOverLifetime.space",setPath:"generator.forceOverLifetime.space"}),z({type:A.Select,bindPath:"generator.forceOverLifetime.space",value:0,label:n("effects.renderer.space-mode.label"),info:n("effects.renderer.space-mode.info-force"),options:[{label:"Local",value:Y.Local},{label:"World",value:Y.World}]}),O()],g.prototype,"forceSpaceMode",2);S([z({customComponent:K,onChange:N,label:n("effects.renderer.velocity.x.label"),info:n("effects.renderer.velocity.x.info")}),O()],g.prototype,"velocityX",2);S([z({customComponent:K,onChange:N,label:n("effects.renderer.velocity.y.label")}),O()],g.prototype,"velocityY",2);S([z({customComponent:K,onChange:N,label:n("effects.renderer.velocity.z.label")}),O()],g.prototype,"velocityZ",2);S([z({module:"limitVelocityOverLifetime",toggleProps:"separateAxes",toggleLabel:"effects.curve.separate-axes",axisX:"speedX",axisY:"speedY",axisZ:"speedZ",mainAxis:"x",customComponent:he,onChange:fe("separateAxes"),min:0,yRangeMode:"positive",label:n("effects.renderer.limit-velocity.limit.label")}),O()],g.prototype,"speed",2);S([V({getPath:"generator.limitVelocityOverLifetime.space",setPath:"generator.limitVelocityOverLifetime.space"}),z({type:A.Select,bindPath:"generator.limitVelocityOverLifetime.space",value:0,when:a=>a.speed.enabled,label:n("effects.renderer.space-mode.label"),info:n("effects.renderer.limit-velocity.space.info"),options:[{label:n("effects.renderer.space-mode.options.local"),value:Y.Local},{label:n("effects.renderer.space-mode.options.world"),value:Y.World}]}),O()],g.prototype,"limitVelocitySpaceMode",2);S([V({getPath:"generator.limitVelocityOverLifetime.dampen",setPath:"generator.limitVelocityOverLifetime.dampen"}),z({bindPath:"generator.limitVelocityOverLifetime.dampen",min:0,max:1,step:.01,dragStep:.01,label:n("effects.renderer.limit-velocity.dampen.label"),info:n("effects.renderer.limit-velocity.dampen.info")}),O()],g.prototype,"dampen",2);S([z({customComponent:K,onChange:N,min:0,yRangeMode:"positive",label:n("effects.renderer.limit-velocity.drag.label"),info:n("effects.renderer.limit-velocity.drag.info")}),O()],g.prototype,"drag",2);S([V({getPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleSize",setPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleSize"}),z({type:A.Toggle,bindPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleSize",label:n("effects.renderer.limit-velocity.multiply-drag-by-size.label"),info:n("effects.renderer.limit-velocity.multiply-drag-by-size.info")}),O()],g.prototype,"multiplyDragByParticleSize",2);S([V({getPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleVelocity",setPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleVelocity"}),z({type:A.Toggle,bindPath:"generator.limitVelocityOverLifetime.multiplyDragByParticleVelocity",label:n("effects.renderer.limit-velocity.multiply-drag-by-velocity.label"),info:n("effects.renderer.limit-velocity.multiply-drag-by-velocity.info")}),O()],g.prototype,"multiplyDragByParticleVelocity",2);S([z({customComponent:K,onChange:N}),O()],g.prototype,"forceX",2);S([z({customComponent:K,onChange:N}),O()],g.prototype,"forceY",2);S([z({customComponent:K,onChange:N}),O()],g.prototype,"forceZ",2);S([z({customComponent:Qa,onChange:er,label:n("effects.renderer.color-over-lifetime.label")}),O()],g.prototype,"color",2);S([z({customComponent:ar,label:n("effects.renderer.noise.preview.label")})],g.prototype,"noisePreview",2);S([z({module:"noise",toggleProps:"separateAxes",toggleLabel:"effects.curve.separate-axes",axisX:"strengthX",axisY:"strengthY",axisZ:"strengthZ",mainAxis:"x",customComponent:he,onChange:(a,e,t)=>{fe("separateAxes")(a,"strength",t)},label:n("effects.renderer.noise.strength.label")}),O()],g.prototype,"noiseStrength",2);S([V({getPath:"generator.noise.frequency",setPath:"generator.noise.frequency"}),z({bindPath:"generator.noise.frequency",min:1e-6,step:.1,dragStep:.1,label:n("effects.renderer.noise.frequency.label")}),O()],g.prototype,"noiseFrequency",2);S([V({getPath:"generator.noise.scrollSpeed",setPath:"generator.noise.scrollSpeed"}),z({bindPath:"generator.noise.scrollSpeed",min:0,step:.01,dragStep:.01,label:n("effects.renderer.noise.scroll-speed.label")}),O()],g.prototype,"noiseScrollSpeed",2);S([V({getPath:"generator.noise.octaveCount",setPath:"generator.noise.octaveCount"}),z({bindPath:"generator.noise.octaveCount",min:1,max:3,step:1,dragStep:1,label:n("effects.renderer.noise.octave-count.label")}),O()],g.prototype,"noiseOctaveCount",2);S([V({getPath:"generator.noise.octaveIntensityMultiplier",setPath:"generator.noise.octaveIntensityMultiplier"}),z({bindPath:"generator.noise.octaveIntensityMultiplier",min:0,max:1,step:.01,dragStep:.01,when:a=>a.noiseOctaveCount>1,label:n("effects.renderer.noise.octave-intensity-multiplier.label")}),O()],g.prototype,"noiseOctaveIntensityMultiplier",2);S([V({getPath:"generator.noise.octaveFrequencyMultiplier",setPath:"generator.noise.octaveFrequencyMultiplier"}),z({bindPath:"generator.noise.octaveFrequencyMultiplier",min:1,max:4,step:.1,dragStep:.1,when:a=>a.noiseOctaveCount>1,label:n("effects.renderer.noise.octave-frequency-multiplier.label")}),O()],g.prototype,"noiseOctaveFrequencyMultiplier",2);g=S([xa({type:"ParticleRenderer",customInspector:Ea,componentsMenu:{group:"effects",label:n("component.particle-renderer.title")}})],g);export{g as ParticleRendererComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var y=Object.defineProperty;var M=(t,i,e)=>i in t?y(t,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[i]=e;var r=(t,i,e)=>(M(t,typeof i!="symbol"?i+"":i,e),e);import{j as h,P as a,k as d,p as l,C as b,m,n as v,e as C,o as F,q as P}from"./index-aec7e708.js";import"./index-e8a45e82.js";var f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,c=(t,i,e,n)=>{for(var o=n>1?void 0:n?g(i,e):i,u=t.length-1,p;u>=0;u--)(p=t[u])&&(o=(n?p(i,e,o):p(o))||o);return n&&o&&f(i,e,o),o};let s=class extends h{constructor(i){super(i);r(this,"dynamicFriction",.6);r(this,"staticFriction",.6);r(this,"bounciness",0);r(this,"frictionCombine",a.Average);r(this,"bounceCombine",a.Average)}async initByMain(i){const e=JSON.parse(await i.text()),n=new d;n.dynamicFriction=this.dynamicFriction=e.dynamicFriction,n.staticFriction=this.staticFriction=e.staticFriction,n.bounciness=this.bounciness=e.bounciness,n.frictionCombine=this.frictionCombine=e.frictionCombine,n.bounceCombine=this.bounceCombine=e.bounceCombine,this.bindEngineObject(n)}async initByCreation(){return this.getMainData()}destroy(){var i;super.destroy(),(i=this.engineObject)==null||i.destroy()}};c([l({type:b.Number,label:"DynamicFriction",bindPath:"dynamicFriction"}),m()],s.prototype,"dynamicFriction",2);c([l({type:b.Number,label:"StaticFriction",bindPath:"staticFriction"}),m()],s.prototype,"staticFriction",2);c([l({type:b.Number,min:0,max:1,label:"Bounciness",bindPath:"bounciness"}),m()],s.prototype,"bounciness",2);c([l({type:b.Select,label:"FrictionCombine",bindPath:"frictionCombine",options:[{label:"Average",value:a.Average},{label:"Minimum",value:a.Minimum},{label:"Multiply",value:a.Multiply},{label:"Maximum",value:a.Maximum}]}),m()],s.prototype,"frictionCombine",2);c([l({type:b.Select,label:"BounceCombine",bindPath:"bounceCombine",options:[{label:"Average",value:a.Average},{label:"Minimum",value:a.Minimum},{label:"Multiply",value:a.Multiply},{label:"Maximum",value:a.Maximum}]}),m()],s.prototype,"bounceCombine",2);s=c([v({type:"PhysicsMaterial",label:C("asset.physics-material.title"),extname:"physMat",importMenuConfig:{type:F.Add},dragLayer:P.PhysicsMaterial,async bundle({content:t}){return{content:t}}})],s);export{s as PhysicsMaterialAsset};
|