ode-explorer 2.6.12-develop-integration.20261001195358 → 2.6.12-develop-integration.20261001200043
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/index.js
CHANGED
|
@@ -276,7 +276,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
276
276
|
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
277
277
|
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
278
278
|
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
279
|
-
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r0)}var __rest$2=function(e0,_e){var i0={};for(var r0 in e0)Object.prototype.hasOwnProperty.call(e0,r0)&&_e.indexOf(r0)<0&&(i0[r0]=e0[r0]);if(e0!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t0=0,r0=Object.getOwnPropertySymbols(e0);t0<r0.length;t0++)_e.indexOf(r0[t0])<0&&Object.prototype.propertyIsEnumerable.call(e0,r0[t0])&&(i0[r0[t0]]=e0[r0[t0]]);return i0};const unitless={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},ignore={motionBase:!0,motionUnit:!0},preserve={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},getComputedToken=(e0,_e,i0)=>{const r0=i0.getDerivativeToken(e0),{override:t0}=_e,n0=__rest$2(_e,["override"]);let s0=Object.assign(Object.assign({},r0),{override:t0});return s0=formatToken(s0),n0&&Object.entries(n0).forEach(([o0,a0])=>{const{theme:f0}=a0,l0=__rest$2(a0,["theme"]);let u0=l0;f0&&(u0=getComputedToken(Object.assign(Object.assign({},s0),l0),{override:l0},f0)),s0[o0]=u0}),s0};function useToken(){const{token:e0,hashed:_e,theme:i0,override:r0,cssVar:t0}=React$4.useContext(DesignTokenContext),n0=`${version}-${_e||""}`,s0=i0||defaultTheme,[o0,a0,f0]=useCacheToken(s0,[seedToken,e0],{salt:n0,override:r0,getComputedToken,formatToken,cssVar:t0&&{prefix:t0.prefix,key:t0.key,unitless,ignore,preserve}});return[s0,f0,_e?a0:"",o0,t0]}const resetComponent=(e0,_e=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e0.colorText,fontSize:e0.fontSize,lineHeight:e0.lineHeight,listStyle:"none",fontFamily:_e?"inherit":e0.fontFamily}),resetIcon=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),genLinkStyle=e0=>({a:{color:e0.colorLink,textDecoration:e0.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e0.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e0.colorLinkHover},"&:active":{color:e0.colorLinkActive},"&:active, &:hover":{textDecoration:e0.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e0.linkFocusDecoration,outline:0},"&[disabled]":{color:e0.colorTextDisabled,cursor:"not-allowed"}}}),genCommonStyle=(e0,_e,i0,r0)=>{const t0=`[class^="${_e}"], [class*=" ${_e}"]`,n0=i0?`.${i0}`:t0,s0={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let o0={};return r0!==!1&&(o0={fontFamily:e0.fontFamily,fontSize:e0.fontSize}),{[n0]:Object.assign(Object.assign(Object.assign({},o0),s0),{[t0]:s0})}},genIconStyle=e0=>({[`.${e0}`]:Object.assign(Object.assign({},resetIcon()),{[`.${e0} .${e0}-icon`]:{display:"block"}})}),{genStyleHooks}=genStyleUtils({usePrefix:()=>{const{getPrefixCls:e0,iconPrefixCls:_e}=reactExports.useContext(ConfigContext);return{rootPrefixCls:e0(),iconPrefixCls:_e}},useToken:()=>{const[e0,_e,i0,r0,t0]=useToken();return{theme:e0,realToken:_e,hashId:i0,token:r0,cssVar:t0}},useCSP:()=>{const{csp:e0}=reactExports.useContext(ConfigContext);return e0??{}},getResetStyles:(e0,_e)=>{var i0;const r0=genLinkStyle(e0);return[r0,{"&":r0},genIconStyle((i0=_e==null?void 0:_e.prefix.iconPrefixCls)!==null&&i0!==void 0?i0:defaultIconPrefixCls)]},getCommonStyle:genCommonStyle,getCompUnitless:()=>unitless}),useResetIconStyle=(e0,_e)=>{const[i0,r0]=useToken();return useStyleRegister({token:r0,hashId:"",path:["ant-design-icons",e0],nonce:()=>_e==null?void 0:_e.nonce,layer:{name:"antd"}},()=>genIconStyle(e0))},fullClone=Object.assign({},React$5),{useId}=fullClone,useEmptyId=()=>"",useThemeKey=typeof useId>"u"?useEmptyId:useId;function useTheme(e0,_e,i0){var r0;const t0=e0||{},n0=t0.inherit===!1||!_e?Object.assign(Object.assign({},defaultConfig),{hashed:(r0=_e==null?void 0:_e.hashed)!==null&&r0!==void 0?r0:defaultConfig.hashed,cssVar:_e==null?void 0:_e.cssVar}):_e,s0=useThemeKey();return useMemo$1(()=>{var o0,a0;if(!e0)return _e;const f0=Object.assign({},n0.components);Object.keys(e0.components||{}).forEach(A0=>{f0[A0]=Object.assign(Object.assign({},f0[A0]),e0.components[A0])});const l0=`css-var-${s0.replace(/:/g,"")}`,u0=((o0=t0.cssVar)!==null&&o0!==void 0?o0:n0.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:i0==null?void 0:i0.prefixCls},typeof n0.cssVar=="object"?n0.cssVar:{}),typeof t0.cssVar=="object"?t0.cssVar:{}),{key:typeof t0.cssVar=="object"&&((a0=t0.cssVar)===null||a0===void 0?void 0:a0.key)||l0});return Object.assign(Object.assign(Object.assign({},n0),t0),{token:Object.assign(Object.assign({},n0.token),t0.token),components:f0,cssVar:u0})},[t0,n0],(o0,a0)=>o0.some((f0,l0)=>{const u0=a0[l0];return!isEqual(f0,u0,!0)}))}var _excluded$1=["children"],Context=reactExports.createContext({});function MotionProvider(e0){var _e=e0.children,i0=_objectWithoutProperties(e0,_excluded$1);return reactExports.createElement(Context.Provider,{value:i0},_e)}var DomWrapper=function(e0){_inherits(i0,e0);var _e=_createSuper(i0);function i0(){return _classCallCheck(this,i0),_e.apply(this,arguments)}return _createClass(i0,[{key:"render",value:function(){return this.props.children}}]),i0}(reactExports.Component);function useSyncState(e0){var _e=reactExports.useReducer(function(o0){return o0+1},0),i0=_slicedToArray$1(_e,2),r0=i0[1],t0=reactExports.useRef(e0),n0=useEvent$1(function(){return t0.current}),s0=useEvent$1(function(o0){t0.current=typeof o0=="function"?o0(t0.current):o0,r0()});return[n0,s0]}var STATUS_NONE="none",STATUS_APPEAR="appear",STATUS_ENTER="enter",STATUS_LEAVE="leave",STEP_NONE="none",STEP_PREPARE="prepare",STEP_START="start",STEP_ACTIVE="active",STEP_ACTIVATED="end",STEP_PREPARED="prepared";function makePrefixMap(e0,_e){var i0={};return i0[e0.toLowerCase()]=_e.toLowerCase(),i0["Webkit".concat(e0)]="webkit".concat(_e),i0["Moz".concat(e0)]="moz".concat(_e),i0["ms".concat(e0)]="MS".concat(_e),i0["O".concat(e0)]="o".concat(_e.toLowerCase()),i0}function getVendorPrefixes(e0,_e){var i0={animationend:makePrefixMap("Animation","AnimationEnd"),transitionend:makePrefixMap("Transition","TransitionEnd")};return e0&&("AnimationEvent"in _e||delete i0.animationend.animation,"TransitionEvent"in _e||delete i0.transitionend.transition),i0}var vendorPrefixes=getVendorPrefixes(canUseDom(),typeof window<"u"?window:{}),style={};if(canUseDom()){var _document$createEleme=document.createElement("div");style=_document$createEleme.style}var prefixedEventNames={};function getVendorPrefixedEventName(e0){if(prefixedEventNames[e0])return prefixedEventNames[e0];var _e=vendorPrefixes[e0];if(_e)for(var i0=Object.keys(_e),r0=i0.length,t0=0;t0<r0;t0+=1){var n0=i0[t0];if(Object.prototype.hasOwnProperty.call(_e,n0)&&n0 in style)return prefixedEventNames[e0]=_e[n0],prefixedEventNames[e0]}return""}var internalAnimationEndName=getVendorPrefixedEventName("animationend"),internalTransitionEndName=getVendorPrefixedEventName("transitionend"),supportTransition=!!(internalAnimationEndName&&internalTransitionEndName),animationEndName=internalAnimationEndName||"animationend",transitionEndName=internalTransitionEndName||"transitionend";function getTransitionName(e0,_e){if(!e0)return null;if(_typeof$1(e0)==="object"){var i0=_e.replace(/-\w/g,function(r0){return r0[1].toUpperCase()});return e0[i0]}return"".concat(e0,"-").concat(_e)}const useDomMotionEvents=function(e0){var _e=reactExports.useRef();function i0(t0){t0&&(t0.removeEventListener(transitionEndName,e0),t0.removeEventListener(animationEndName,e0))}function r0(t0){_e.current&&_e.current!==t0&&i0(_e.current),t0&&t0!==_e.current&&(t0.addEventListener(transitionEndName,e0),t0.addEventListener(animationEndName,e0),_e.current=t0)}return reactExports.useEffect(function(){return function(){i0(_e.current)}},[]),[r0,i0]};var useIsomorphicLayoutEffect$3=canUseDom()?reactExports.useLayoutEffect:reactExports.useEffect;const useNextFrame=function(){var e0=reactExports.useRef(null);function _e(){wrapperRaf.cancel(e0.current)}function i0(r0){var t0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;_e();var n0=wrapperRaf(function(){t0<=1?r0({isCanceled:function(){return n0!==e0.current}}):i0(r0,t0-1)});e0.current=n0}return reactExports.useEffect(function(){return function(){_e()}},[]),[i0,_e]};var FULL_STEP_QUEUE=[STEP_PREPARE,STEP_START,STEP_ACTIVE,STEP_ACTIVATED],SIMPLE_STEP_QUEUE=[STEP_PREPARE,STEP_PREPARED],SkipStep=!1,DoStep=!0;function isActive(e0){return e0===STEP_ACTIVE||e0===STEP_ACTIVATED}const useStepQueue=function(e0,_e,i0){var r0=useSafeState(STEP_NONE),t0=_slicedToArray$1(r0,2),n0=t0[0],s0=t0[1],o0=useNextFrame(),a0=_slicedToArray$1(o0,2),f0=a0[0],l0=a0[1];function u0(){s0(STEP_PREPARE,!0)}var A0=_e?SIMPLE_STEP_QUEUE:FULL_STEP_QUEUE;return useIsomorphicLayoutEffect$3(function(){if(n0!==STEP_NONE&&n0!==STEP_ACTIVATED){var c0=A0.indexOf(n0),k0=A0[c0+1],d0=i0(n0);d0===SkipStep?s0(k0,!0):k0&&f0(function(h0){function b0(){h0.isCanceled()||s0(k0,!0)}d0===!0?b0():Promise.resolve(d0).then(b0)})}},[e0,n0]),reactExports.useEffect(function(){return function(){l0()}},[]),[u0,n0]};function useStatus(e0,_e,i0,r0){var t0=r0.motionEnter,n0=t0===void 0?!0:t0,s0=r0.motionAppear,o0=s0===void 0?!0:s0,a0=r0.motionLeave,f0=a0===void 0?!0:a0,l0=r0.motionDeadline,u0=r0.motionLeaveImmediately,A0=r0.onAppearPrepare,c0=r0.onEnterPrepare,k0=r0.onLeavePrepare,d0=r0.onAppearStart,h0=r0.onEnterStart,b0=r0.onLeaveStart,p0=r0.onAppearActive,m0=r0.onEnterActive,g0=r0.onLeaveActive,v0=r0.onAppearEnd,x0=r0.onEnterEnd,w0=r0.onLeaveEnd,_0=r0.onVisibleChanged,y0=useSafeState(),S0=_slicedToArray$1(y0,2),B0=S0[0],I0=S0[1],T0=useSyncState(STATUS_NONE),R0=_slicedToArray$1(T0,2),E0=R0[0],C0=R0[1],G0=useSafeState(null),F0=_slicedToArray$1(G0,2),M0=F0[0],j0=F0[1],D0=E0(),$0=reactExports.useRef(!1),X0=reactExports.useRef(null);function Z0(){return i0()}var N0=reactExports.useRef(!1);function Q0(){C0(STATUS_NONE),j0(null,!0)}var z0=useEvent$1(function(P0){var V0=E0();if(V0!==STATUS_NONE){var O0=Z0();if(!(P0&&!P0.deadline&&P0.target!==O0)){var _i=N0.current,U0;V0===STATUS_APPEAR&&_i?U0=v0==null?void 0:v0(O0,P0):V0===STATUS_ENTER&&_i?U0=x0==null?void 0:x0(O0,P0):V0===STATUS_LEAVE&&_i&&(U0=w0==null?void 0:w0(O0,P0)),_i&&U0!==!1&&Q0()}}}),K0=useDomMotionEvents(z0),H0=_slicedToArray$1(K0,1),J0=H0[0],Y0=function(V0){switch(V0){case STATUS_APPEAR:return _defineProperty(_defineProperty(_defineProperty({},STEP_PREPARE,A0),STEP_START,d0),STEP_ACTIVE,p0);case STATUS_ENTER:return _defineProperty(_defineProperty(_defineProperty({},STEP_PREPARE,c0),STEP_START,h0),STEP_ACTIVE,m0);case STATUS_LEAVE:return _defineProperty(_defineProperty(_defineProperty({},STEP_PREPARE,k0),STEP_START,b0),STEP_ACTIVE,g0);default:return{}}},e2=reactExports.useMemo(function(){return Y0(D0)},[D0]),s2=useStepQueue(D0,!e0,function(P0){if(P0===STEP_PREPARE){var V0=e2[STEP_PREPARE];return V0?V0(Z0()):SkipStep}if(k2 in e2){var O0;j0(((O0=e2[k2])===null||O0===void 0?void 0:O0.call(e2,Z0(),null))||null)}return k2===STEP_ACTIVE&&D0!==STATUS_NONE&&(J0(Z0()),l0>0&&(clearTimeout(X0.current),X0.current=setTimeout(function(){z0({deadline:!0})},l0))),k2===STEP_PREPARED&&Q0(),DoStep}),u2=_slicedToArray$1(s2,2),A2=u2[0],k2=u2[1],b2=isActive(k2);N0.current=b2;var v2=reactExports.useRef(null);useIsomorphicLayoutEffect$3(function(){if(!($0.current&&v2.current===_e)){I0(_e);var P0=$0.current;$0.current=!0;var V0;!P0&&_e&&o0&&(V0=STATUS_APPEAR),P0&&_e&&n0&&(V0=STATUS_ENTER),(P0&&!_e&&f0||!P0&&u0&&!_e&&f0)&&(V0=STATUS_LEAVE);var O0=Y0(V0);V0&&(e0||O0[STEP_PREPARE])?(C0(V0),A2()):C0(STATUS_NONE),v2.current=_e}},[_e]),reactExports.useEffect(function(){(D0===STATUS_APPEAR&&!o0||D0===STATUS_ENTER&&!n0||D0===STATUS_LEAVE&&!f0)&&C0(STATUS_NONE)},[o0,n0,f0]),reactExports.useEffect(function(){return function(){$0.current=!1,clearTimeout(X0.current)}},[]);var x2=reactExports.useRef(!1);reactExports.useEffect(function(){B0&&(x2.current=!0),B0!==void 0&&D0===STATUS_NONE&&((x2.current||B0)&&(_0==null||_0(B0)),x2.current=!0)},[B0,D0]);var p2=M0;return e2[STEP_PREPARE]&&k2===STEP_START&&(p2=_objectSpread2$5({transition:"none"},p2)),[D0,k2,p2,B0??_e]}function genCSSMotion(e0){var _e=e0;_typeof$1(e0)==="object"&&(_e=e0.transitionSupport);function i0(t0,n0){return!!(t0.motionName&&_e&&n0!==!1)}var r0=reactExports.forwardRef(function(t0,n0){var s0=t0.visible,o0=s0===void 0?!0:s0,a0=t0.removeOnLeave,f0=a0===void 0?!0:a0,l0=t0.forceRender,u0=t0.children,A0=t0.motionName,c0=t0.leavedClassName,k0=t0.eventProps,d0=reactExports.useContext(Context),h0=d0.motion,b0=i0(t0,h0),p0=reactExports.useRef(),m0=reactExports.useRef();function g0(){try{return p0.current instanceof HTMLElement?p0.current:findDOMNode(m0.current)}catch{return null}}var v0=useStatus(b0,o0,g0,t0),x0=_slicedToArray$1(v0,4),w0=x0[0],_0=x0[1],y0=x0[2],S0=x0[3],B0=reactExports.useRef(S0);S0&&(B0.current=!0);var I0=reactExports.useCallback(function(F0){p0.current=F0,fillRef(n0,F0)},[n0]),T0,R0=_objectSpread2$5(_objectSpread2$5({},k0),{},{visible:o0});if(!u0)T0=null;else if(w0===STATUS_NONE)S0?T0=u0(_objectSpread2$5({},R0),I0):!f0&&B0.current&&c0?T0=u0(_objectSpread2$5(_objectSpread2$5({},R0),{},{className:c0}),I0):l0||!f0&&!c0?T0=u0(_objectSpread2$5(_objectSpread2$5({},R0),{},{style:{display:"none"}}),I0):T0=null;else{var E0;_0===STEP_PREPARE?E0="prepare":isActive(_0)?E0="active":_0===STEP_START&&(E0="start");var C0=getTransitionName(A0,"".concat(w0,"-").concat(E0));T0=u0(_objectSpread2$5(_objectSpread2$5({},R0),{},{className:classNames(getTransitionName(A0,w0),_defineProperty(_defineProperty({},C0,C0&&E0),A0,typeof A0=="string")),style:y0}),I0)}if(reactExports.isValidElement(T0)&&supportRef(T0)){var G0=getNodeRef(T0);G0||(T0=reactExports.cloneElement(T0,{ref:I0}))}return reactExports.createElement(DomWrapper,{ref:m0},T0)});return r0.displayName="CSSMotion",r0}const CSSMotion=genCSSMotion(supportTransition);var STATUS_ADD="add",STATUS_KEEP="keep",STATUS_REMOVE="remove",STATUS_REMOVED="removed";function wrapKeyToObject(e0){var _e;return e0&&_typeof$1(e0)==="object"&&"key"in e0?_e=e0:_e={key:e0},_objectSpread2$5(_objectSpread2$5({},_e),{},{key:String(_e.key)})}function parseKeys(){var e0=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e0.map(wrapKeyToObject)}function diffKeys(){var e0=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i0=[],r0=0,t0=_e.length,n0=parseKeys(e0),s0=parseKeys(_e);n0.forEach(function(f0){for(var l0=!1,u0=r0;u0<t0;u0+=1){var A0=s0[u0];if(A0.key===f0.key){r0<u0&&(i0=i0.concat(s0.slice(r0,u0).map(function(c0){return _objectSpread2$5(_objectSpread2$5({},c0),{},{status:STATUS_ADD})})),r0=u0),i0.push(_objectSpread2$5(_objectSpread2$5({},A0),{},{status:STATUS_KEEP})),r0+=1,l0=!0;break}}l0||i0.push(_objectSpread2$5(_objectSpread2$5({},f0),{},{status:STATUS_REMOVE}))}),r0<t0&&(i0=i0.concat(s0.slice(r0).map(function(f0){return _objectSpread2$5(_objectSpread2$5({},f0),{},{status:STATUS_ADD})})));var o0={};i0.forEach(function(f0){var l0=f0.key;o0[l0]=(o0[l0]||0)+1});var a0=Object.keys(o0).filter(function(f0){return o0[f0]>1});return a0.forEach(function(f0){i0=i0.filter(function(l0){var u0=l0.key,A0=l0.status;return u0!==f0||A0!==STATUS_REMOVE}),i0.forEach(function(l0){l0.key===f0&&(l0.status=STATUS_KEEP)})}),i0}var _excluded=["component","children","onVisibleChanged","onAllRemoved"],_excluded2=["status"],MOTION_PROP_NAMES=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function genCSSMotionList(e0){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:CSSMotion,i0=function(r0){_inherits(n0,r0);var t0=_createSuper(n0);function n0(){var s0;_classCallCheck(this,n0);for(var o0=arguments.length,a0=new Array(o0),f0=0;f0<o0;f0++)a0[f0]=arguments[f0];return s0=t0.call.apply(t0,[this].concat(a0)),_defineProperty(_assertThisInitialized(s0),"state",{keyEntities:[]}),_defineProperty(_assertThisInitialized(s0),"removeKey",function(l0){s0.setState(function(u0){var A0=u0.keyEntities.map(function(c0){return c0.key!==l0?c0:_objectSpread2$5(_objectSpread2$5({},c0),{},{status:STATUS_REMOVED})});return{keyEntities:A0}},function(){var u0=s0.state.keyEntities,A0=u0.filter(function(c0){var k0=c0.status;return k0!==STATUS_REMOVED}).length;A0===0&&s0.props.onAllRemoved&&s0.props.onAllRemoved()})}),s0}return _createClass(n0,[{key:"render",value:function(){var o0=this,a0=this.state.keyEntities,f0=this.props,l0=f0.component,u0=f0.children,A0=f0.onVisibleChanged;f0.onAllRemoved;var c0=_objectWithoutProperties(f0,_excluded),k0=l0||reactExports.Fragment,d0={};return MOTION_PROP_NAMES.forEach(function(h0){d0[h0]=c0[h0],delete c0[h0]}),delete c0.keys,reactExports.createElement(k0,c0,a0.map(function(h0,b0){var p0=h0.status,m0=_objectWithoutProperties(h0,_excluded2),g0=p0===STATUS_ADD||p0===STATUS_KEEP;return reactExports.createElement(_e,_extends$1({},d0,{key:m0.key,visible:g0,eventProps:m0,onVisibleChanged:function(x0){A0==null||A0(x0,{key:m0.key}),x0||o0.removeKey(m0.key)}}),function(v0,x0){return u0(_objectSpread2$5(_objectSpread2$5({},v0),{},{index:b0}),x0)})}))}}],[{key:"getDerivedStateFromProps",value:function(o0,a0){var f0=o0.keys,l0=a0.keyEntities,u0=parseKeys(f0),A0=diffKeys(l0,u0);return{keyEntities:A0.filter(function(c0){var k0=l0.find(function(d0){var h0=d0.key;return c0.key===h0});return!(k0&&k0.status===STATUS_REMOVED&&c0.status===STATUS_REMOVE)})}}}]),n0}(reactExports.Component);return _defineProperty(i0,"defaultProps",{component:"div"}),i0}genCSSMotionList(supportTransition);const MotionCacheContext=reactExports.createContext(!0);function MotionWrapper(e0){const _e=reactExports.useContext(MotionCacheContext),{children:i0}=e0,[,r0]=useToken(),{motion:t0}=r0,n0=reactExports.useRef(!1);return n0.current||(n0.current=_e!==t0),n0.current?reactExports.createElement(MotionCacheContext.Provider,{value:t0},reactExports.createElement(MotionProvider,{motion:t0},i0)):i0}const PropWarning=()=>null;var __rest$1=function(e0,_e){var i0={};for(var r0 in e0)Object.prototype.hasOwnProperty.call(e0,r0)&&_e.indexOf(r0)<0&&(i0[r0]=e0[r0]);if(e0!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t0=0,r0=Object.getOwnPropertySymbols(e0);t0<r0.length;t0++)_e.indexOf(r0[t0])<0&&Object.prototype.propertyIsEnumerable.call(e0,r0[t0])&&(i0[r0[t0]]=e0[r0[t0]]);return i0};const PASSED_PROPS=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let globalPrefixCls;function getGlobalPrefixCls(){return globalPrefixCls||defaultPrefixCls}function isLegacyTheme(e0){return Object.keys(e0).some(_e=>_e.endsWith("Color"))}const setGlobalConfig=e0=>{const{prefixCls:_e,iconPrefixCls:i0,theme:r0,holderRender:t0}=e0;_e!==void 0&&(globalPrefixCls=_e),r0&&isLegacyTheme(r0)&®isterTheme(getGlobalPrefixCls(),r0)},ProviderChildren=e0=>{const{children:_e,csp:i0,autoInsertSpaceInButton:r0,alert:t0,anchor:n0,form:s0,locale:o0,componentSize:a0,direction:f0,space:l0,splitter:u0,virtual:A0,dropdownMatchSelectWidth:c0,popupMatchSelectWidth:k0,popupOverflow:d0,legacyLocale:h0,parentContext:b0,iconPrefixCls:p0,theme:m0,componentDisabled:g0,segmented:v0,statistic:x0,spin:w0,calendar:_0,carousel:y0,cascader:S0,collapse:B0,typography:I0,checkbox:T0,descriptions:R0,divider:E0,drawer:C0,skeleton:G0,steps:F0,image:M0,layout:j0,list:D0,mentions:$0,modal:X0,progress:Z0,result:N0,slider:Q0,breadcrumb:z0,menu:K0,pagination:H0,input:J0,textArea:Y0,empty:e2,badge:s2,radio:u2,rate:A2,switch:k2,transfer:b2,avatar:v2,message:x2,tag:p2,table:P0,card:V0,tabs:O0,timeline:_i,timePicker:U0,upload:L0,notification:q0,tree:r2,colorPicker:f2,datePicker:d2,rangePicker:a2,flex:t2,wave:E2,dropdown:O2,warning:X2,tour:Xr,tooltip:br,popover:$r,popconfirm:Cr,floatButton:nt,floatButtonGroup:_2,variant:R2,inputNumber:S2,treeSelect:Q2}=e0,T2=reactExports.useCallback((m2,y2)=>{const{prefixCls:L2}=e0;if(y2)return y2;const z2=L2||b0.getPrefixCls("");return m2?`${z2}-${m2}`:z2},[b0.getPrefixCls,e0.prefixCls]),B2=p0||b0.iconPrefixCls||defaultIconPrefixCls,I2=i0||b0.csp;useResetIconStyle(B2,I2);const U2=useTheme(m0,b0.theme,{prefixCls:T2("")}),G2={csp:I2,autoInsertSpaceInButton:r0,alert:t0,anchor:n0,locale:o0||h0,direction:f0,space:l0,splitter:u0,virtual:A0,popupMatchSelectWidth:k0??c0,popupOverflow:d0,getPrefixCls:T2,iconPrefixCls:B2,theme:U2,segmented:v0,statistic:x0,spin:w0,calendar:_0,carousel:y0,cascader:S0,collapse:B0,typography:I0,checkbox:T0,descriptions:R0,divider:E0,drawer:C0,skeleton:G0,steps:F0,image:M0,input:J0,textArea:Y0,layout:j0,list:D0,mentions:$0,modal:X0,progress:Z0,result:N0,slider:Q0,breadcrumb:z0,menu:K0,pagination:H0,empty:e2,badge:s2,radio:u2,rate:A2,switch:k2,transfer:b2,avatar:v2,message:x2,tag:p2,table:P0,card:V0,tabs:O0,timeline:_i,timePicker:U0,upload:L0,notification:q0,tree:r2,colorPicker:f2,datePicker:d2,rangePicker:a2,flex:t2,wave:E2,dropdown:O2,warning:X2,tour:Xr,tooltip:br,popover:$r,popconfirm:Cr,floatButton:nt,floatButtonGroup:_2,variant:R2,inputNumber:S2,treeSelect:Q2},D2=Object.assign({},b0);Object.keys(G2).forEach(m2=>{G2[m2]!==void 0&&(D2[m2]=G2[m2])}),PASSED_PROPS.forEach(m2=>{const y2=e0[m2];y2&&(D2[m2]=y2)}),typeof r0<"u"&&(D2.button=Object.assign({autoInsertSpace:r0},D2.button));const N2=useMemo$1(()=>D2,D2,(m2,y2)=>{const L2=Object.keys(m2),z2=Object.keys(y2);return L2.length!==z2.length||L2.some(Kr=>m2[Kr]!==y2[Kr])}),{layer:mr}=reactExports.useContext(StyleContext),Rr=reactExports.useMemo(()=>({prefixCls:B2,csp:I2,layer:mr?"antd":void 0}),[B2,I2,mr]);let w2=reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(PropWarning,{dropdownMatchSelectWidth:c0}),_e);const sr=reactExports.useMemo(()=>{var m2,y2,L2,z2;return merge$1(((m2=localeValues$5.Form)===null||m2===void 0?void 0:m2.defaultValidateMessages)||{},((L2=(y2=N2.locale)===null||y2===void 0?void 0:y2.Form)===null||L2===void 0?void 0:L2.defaultValidateMessages)||{},((z2=N2.form)===null||z2===void 0?void 0:z2.validateMessages)||{},(s0==null?void 0:s0.validateMessages)||{})},[N2,s0==null?void 0:s0.validateMessages]);Object.keys(sr).length>0&&(w2=reactExports.createElement(ValidateMessagesContext.Provider,{value:sr},w2)),o0&&(w2=reactExports.createElement(LocaleProvider,{locale:o0,_ANT_MARK__:ANT_MARK},w2)),w2=reactExports.createElement(IconContext.Provider,{value:Rr},w2),a0&&(w2=reactExports.createElement(SizeContextProvider,{size:a0},w2)),w2=reactExports.createElement(MotionWrapper,null,w2);const gr=reactExports.useMemo(()=>{const m2=U2||{},{algorithm:y2,token:L2,components:z2,cssVar:Kr}=m2,c1=__rest$1(m2,["algorithm","token","components","cssVar"]),yt=y2&&(!Array.isArray(y2)||y2.length>0)?createTheme(y2):defaultTheme,st={};Object.entries(z2||{}).forEach(([k1,d1])=>{const er=Object.assign({},d1);"algorithm"in er&&(er.algorithm===!0?er.theme=yt:(Array.isArray(er.algorithm)||typeof er.algorithm=="function")&&(er.theme=createTheme(er.algorithm)),delete er.algorithm),st[k1]=er});const Et=Object.assign(Object.assign({},seedToken),L2);return Object.assign(Object.assign({},c1),{theme:yt,token:Et,components:st,override:Object.assign({override:Et},st),cssVar:Kr})},[U2]);return m0&&(w2=reactExports.createElement(DesignTokenContext.Provider,{value:gr},w2)),N2.warning&&(w2=reactExports.createElement(WarningContext.Provider,{value:N2.warning},w2)),g0!==void 0&&(w2=reactExports.createElement(DisabledContextProvider,{disabled:g0},w2)),reactExports.createElement(ConfigContext.Provider,{value:N2},w2)},ConfigProvider=e0=>{const _e=reactExports.useContext(ConfigContext),i0=reactExports.useContext(LocaleContext);return reactExports.createElement(ProviderChildren,Object.assign({parentContext:_e,legacyLocale:i0},e0))};ConfigProvider.ConfigContext=ConfigContext;ConfigProvider.SizeContext=SizeContext;ConfigProvider.config=setGlobalConfig;ConfigProvider.useConfig=useConfig;Object.defineProperty(ConfigProvider,"SizeContext",{get:()=>SizeContext});const useSize=e0=>{const _e=React$4.useContext(SizeContext);return React$4.useMemo(()=>e0?typeof e0=="string"?e0??_e:typeof e0=="function"?e0(_e):_e:_e,[e0,_e])};var dayjs_min={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal$1,function(){var i0=1e3,r0=6e4,t0=36e5,n0="millisecond",s0="second",o0="minute",a0="hour",f0="day",l0="week",u0="month",A0="quarter",c0="year",k0="date",d0="Invalid Date",h0=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b0=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p0={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R0){var E0=["th","st","nd","rd"],C0=R0%100;return"["+R0+(E0[(C0-20)%10]||E0[C0]||E0[0])+"]"}},m0=function(R0,E0,C0){var G0=String(R0);return!G0||G0.length>=E0?R0:""+Array(E0+1-G0.length).join(C0)+R0},g0={s:m0,z:function(R0){var E0=-R0.utcOffset(),C0=Math.abs(E0),G0=Math.floor(C0/60),F0=C0%60;return(E0<=0?"+":"-")+m0(G0,2,"0")+":"+m0(F0,2,"0")},m:function R0(E0,C0){if(E0.date()<C0.date())return-R0(C0,E0);var G0=12*(C0.year()-E0.year())+(C0.month()-E0.month()),F0=E0.clone().add(G0,u0),M0=C0-F0<0,j0=E0.clone().add(G0+(M0?-1:1),u0);return+(-(G0+(C0-F0)/(M0?F0-j0:j0-F0))||0)},a:function(R0){return R0<0?Math.ceil(R0)||0:Math.floor(R0)},p:function(R0){return{M:u0,y:c0,w:l0,d:f0,D:k0,h:a0,m:o0,s:s0,ms:n0,Q:A0}[R0]||String(R0||"").toLowerCase().replace(/s$/,"")},u:function(R0){return R0===void 0}},v0="en",x0={};x0[v0]=p0;var w0="$isDayjsObject",_0=function(R0){return R0 instanceof I0||!(!R0||!R0[w0])},y0=function R0(E0,C0,G0){var F0;if(!E0)return v0;if(typeof E0=="string"){var M0=E0.toLowerCase();x0[M0]&&(F0=M0),C0&&(x0[M0]=C0,F0=M0);var j0=E0.split("-");if(!F0&&j0.length>1)return R0(j0[0])}else{var D0=E0.name;x0[D0]=E0,F0=D0}return!G0&&F0&&(v0=F0),F0||!G0&&v0},S0=function(R0,E0){if(_0(R0))return R0.clone();var C0=typeof E0=="object"?E0:{};return C0.date=R0,C0.args=arguments,new I0(C0)},B0=g0;B0.l=y0,B0.i=_0,B0.w=function(R0,E0){return S0(R0,{locale:E0.$L,utc:E0.$u,x:E0.$x,$offset:E0.$offset})};var I0=function(){function R0(C0){this.$L=y0(C0.locale,null,!0),this.parse(C0),this.$x=this.$x||C0.x||{},this[w0]=!0}var E0=R0.prototype;return E0.parse=function(C0){this.$d=function(G0){var F0=G0.date,M0=G0.utc;if(F0===null)return new Date(NaN);if(B0.u(F0))return new Date;if(F0 instanceof Date)return new Date(F0);if(typeof F0=="string"&&!/Z$/i.test(F0)){var j0=F0.match(h0);if(j0){var D0=j0[2]-1||0,$0=(j0[7]||"0").substring(0,3);return M0?new Date(Date.UTC(j0[1],D0,j0[3]||1,j0[4]||0,j0[5]||0,j0[6]||0,$0)):new Date(j0[1],D0,j0[3]||1,j0[4]||0,j0[5]||0,j0[6]||0,$0)}}return new Date(F0)}(C0),this.init()},E0.init=function(){var C0=this.$d;this.$y=C0.getFullYear(),this.$M=C0.getMonth(),this.$D=C0.getDate(),this.$W=C0.getDay(),this.$H=C0.getHours(),this.$m=C0.getMinutes(),this.$s=C0.getSeconds(),this.$ms=C0.getMilliseconds()},E0.$utils=function(){return B0},E0.isValid=function(){return this.$d.toString()!==d0},E0.isSame=function(C0,G0){var F0=S0(C0);return this.startOf(G0)<=F0&&F0<=this.endOf(G0)},E0.isAfter=function(C0,G0){return S0(C0)<this.startOf(G0)},E0.isBefore=function(C0,G0){return this.endOf(G0)<S0(C0)},E0.$g=function(C0,G0,F0){return B0.u(C0)?this[G0]:this.set(F0,C0)},E0.unix=function(){return Math.floor(this.valueOf()/1e3)},E0.valueOf=function(){return this.$d.getTime()},E0.startOf=function(C0,G0){var F0=this,M0=!!B0.u(G0)||G0,j0=B0.p(C0),D0=function(H0,J0){var Y0=B0.w(F0.$u?Date.UTC(F0.$y,J0,H0):new Date(F0.$y,J0,H0),F0);return M0?Y0:Y0.endOf(f0)},$0=function(H0,J0){return B0.w(F0.toDate()[H0].apply(F0.toDate("s"),(M0?[0,0,0,0]:[23,59,59,999]).slice(J0)),F0)},X0=this.$W,Z0=this.$M,N0=this.$D,Q0="set"+(this.$u?"UTC":"");switch(j0){case c0:return M0?D0(1,0):D0(31,11);case u0:return M0?D0(1,Z0):D0(0,Z0+1);case l0:var z0=this.$locale().weekStart||0,K0=(X0<z0?X0+7:X0)-z0;return D0(M0?N0-K0:N0+(6-K0),Z0);case f0:case k0:return $0(Q0+"Hours",0);case a0:return $0(Q0+"Minutes",1);case o0:return $0(Q0+"Seconds",2);case s0:return $0(Q0+"Milliseconds",3);default:return this.clone()}},E0.endOf=function(C0){return this.startOf(C0,!1)},E0.$set=function(C0,G0){var F0,M0=B0.p(C0),j0="set"+(this.$u?"UTC":""),D0=(F0={},F0[f0]=j0+"Date",F0[k0]=j0+"Date",F0[u0]=j0+"Month",F0[c0]=j0+"FullYear",F0[a0]=j0+"Hours",F0[o0]=j0+"Minutes",F0[s0]=j0+"Seconds",F0[n0]=j0+"Milliseconds",F0)[M0],$0=M0===f0?this.$D+(G0-this.$W):G0;if(M0===u0||M0===c0){var X0=this.clone().set(k0,1);X0.$d[D0]($0),X0.init(),this.$d=X0.set(k0,Math.min(this.$D,X0.daysInMonth())).$d}else D0&&this.$d[D0]($0);return this.init(),this},E0.set=function(C0,G0){return this.clone().$set(C0,G0)},E0.get=function(C0){return this[B0.p(C0)]()},E0.add=function(C0,G0){var F0,M0=this;C0=Number(C0);var j0=B0.p(G0),D0=function(Z0){var N0=S0(M0);return B0.w(N0.date(N0.date()+Math.round(Z0*C0)),M0)};if(j0===u0)return this.set(u0,this.$M+C0);if(j0===c0)return this.set(c0,this.$y+C0);if(j0===f0)return D0(1);if(j0===l0)return D0(7);var $0=(F0={},F0[o0]=r0,F0[a0]=t0,F0[s0]=i0,F0)[j0]||1,X0=this.$d.getTime()+C0*$0;return B0.w(X0,this)},E0.subtract=function(C0,G0){return this.add(-1*C0,G0)},E0.format=function(C0){var G0=this,F0=this.$locale();if(!this.isValid())return F0.invalidDate||d0;var M0=C0||"YYYY-MM-DDTHH:mm:ssZ",j0=B0.z(this),D0=this.$H,$0=this.$m,X0=this.$M,Z0=F0.weekdays,N0=F0.months,Q0=F0.meridiem,z0=function(J0,Y0,e2,s2){return J0&&(J0[Y0]||J0(G0,M0))||e2[Y0].slice(0,s2)},K0=function(J0){return B0.s(D0%12||12,J0,"0")},H0=Q0||function(J0,Y0,e2){var s2=J0<12?"AM":"PM";return e2?s2.toLowerCase():s2};return M0.replace(b0,function(J0,Y0){return Y0||function(e2){switch(e2){case"YY":return String(G0.$y).slice(-2);case"YYYY":return B0.s(G0.$y,4,"0");case"M":return X0+1;case"MM":return B0.s(X0+1,2,"0");case"MMM":return z0(F0.monthsShort,X0,N0,3);case"MMMM":return z0(N0,X0);case"D":return G0.$D;case"DD":return B0.s(G0.$D,2,"0");case"d":return String(G0.$W);case"dd":return z0(F0.weekdaysMin,G0.$W,Z0,2);case"ddd":return z0(F0.weekdaysShort,G0.$W,Z0,3);case"dddd":return Z0[G0.$W];case"H":return String(D0);case"HH":return B0.s(D0,2,"0");case"h":return K0(1);case"hh":return K0(2);case"a":return H0(D0,$0,!0);case"A":return H0(D0,$0,!1);case"m":return String($0);case"mm":return B0.s($0,2,"0");case"s":return String(G0.$s);case"ss":return B0.s(G0.$s,2,"0");case"SSS":return B0.s(G0.$ms,3,"0");case"Z":return j0}return null}(J0)||j0.replace(":","")})},E0.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E0.diff=function(C0,G0,F0){var M0,j0=this,D0=B0.p(G0),$0=S0(C0),X0=($0.utcOffset()-this.utcOffset())*r0,Z0=this-$0,N0=function(){return B0.m(j0,$0)};switch(D0){case c0:M0=N0()/12;break;case u0:M0=N0();break;case A0:M0=N0()/3;break;case l0:M0=(Z0-X0)/6048e5;break;case f0:M0=(Z0-X0)/864e5;break;case a0:M0=Z0/t0;break;case o0:M0=Z0/r0;break;case s0:M0=Z0/i0;break;default:M0=Z0}return F0?M0:B0.a(M0)},E0.daysInMonth=function(){return this.endOf(u0).$D},E0.$locale=function(){return x0[this.$L]},E0.locale=function(C0,G0){if(!C0)return this.$L;var F0=this.clone(),M0=y0(C0,G0,!0);return M0&&(F0.$L=M0),F0},E0.clone=function(){return B0.w(this.$d,this)},E0.toDate=function(){return new Date(this.valueOf())},E0.toJSON=function(){return this.isValid()?this.toISOString():null},E0.toISOString=function(){return this.$d.toISOString()},E0.toString=function(){return this.$d.toUTCString()},R0}(),T0=I0.prototype;return S0.prototype=T0,[["$ms",n0],["$s",s0],["$m",o0],["$H",a0],["$W",f0],["$M",u0],["$y",c0],["$D",k0]].forEach(function(R0){T0[R0[1]]=function(E0){return this.$g(E0,R0[0],R0[1])}}),S0.extend=function(R0,E0){return R0.$i||(R0(E0,I0,S0),R0.$i=!0),S0},S0.locale=y0,S0.isDayjs=_0,S0.unix=function(R0){return S0(1e3*R0)},S0.en=x0[v0],S0.Ls=x0,S0.p={},S0})})(dayjs_min);var dayjs_minExports=dayjs_min.exports;const dayjs=getDefaultExportFromCjs$1(dayjs_minExports);var customParseFormat$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal$1,function(){var i0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r0=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,t0=/\d/,n0=/\d\d/,s0=/\d\d?/,o0=/\d*[^-_:/,()\s\d]+/,a0={},f0=function(h0){return(h0=+h0)+(h0>68?1900:2e3)},l0=function(h0){return function(b0){this[h0]=+b0}},u0=[/[+-]\d\d:?(\d\d)?|Z/,function(h0){(this.zone||(this.zone={})).offset=function(b0){if(!b0||b0==="Z")return 0;var p0=b0.match(/([+-]|\d\d)/g),m0=60*p0[1]+(+p0[2]||0);return m0===0?0:p0[0]==="+"?-m0:m0}(h0)}],A0=function(h0){var b0=a0[h0];return b0&&(b0.indexOf?b0:b0.s.concat(b0.f))},c0=function(h0,b0){var p0,m0=a0.meridiem;if(m0){for(var g0=1;g0<=24;g0+=1)if(h0.indexOf(m0(g0,0,b0))>-1){p0=g0>12;break}}else p0=h0===(b0?"pm":"PM");return p0},k0={A:[o0,function(h0){this.afternoon=c0(h0,!1)}],a:[o0,function(h0){this.afternoon=c0(h0,!0)}],Q:[t0,function(h0){this.month=3*(h0-1)+1}],S:[t0,function(h0){this.milliseconds=100*+h0}],SS:[n0,function(h0){this.milliseconds=10*+h0}],SSS:[/\d{3}/,function(h0){this.milliseconds=+h0}],s:[s0,l0("seconds")],ss:[s0,l0("seconds")],m:[s0,l0("minutes")],mm:[s0,l0("minutes")],H:[s0,l0("hours")],h:[s0,l0("hours")],HH:[s0,l0("hours")],hh:[s0,l0("hours")],D:[s0,l0("day")],DD:[n0,l0("day")],Do:[o0,function(h0){var b0=a0.ordinal,p0=h0.match(/\d+/);if(this.day=p0[0],b0)for(var m0=1;m0<=31;m0+=1)b0(m0).replace(/\[|\]/g,"")===h0&&(this.day=m0)}],w:[s0,l0("week")],ww:[n0,l0("week")],M:[s0,l0("month")],MM:[n0,l0("month")],MMM:[o0,function(h0){var b0=A0("months"),p0=(A0("monthsShort")||b0.map(function(m0){return m0.slice(0,3)})).indexOf(h0)+1;if(p0<1)throw new Error;this.month=p0%12||p0}],MMMM:[o0,function(h0){var b0=A0("months").indexOf(h0)+1;if(b0<1)throw new Error;this.month=b0%12||b0}],Y:[/[+-]?\d+/,l0("year")],YY:[n0,function(h0){this.year=f0(h0)}],YYYY:[/\d{4}/,l0("year")],Z:u0,ZZ:u0};function d0(h0){var b0,p0;b0=h0,p0=a0&&a0.formats;for(var m0=(h0=b0.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S0,B0,I0){var T0=I0&&I0.toUpperCase();return B0||p0[I0]||i0[I0]||p0[T0].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(R0,E0,C0){return E0||C0.slice(1)})})).match(r0),g0=m0.length,v0=0;v0<g0;v0+=1){var x0=m0[v0],w0=k0[x0],_0=w0&&w0[0],y0=w0&&w0[1];m0[v0]=y0?{regex:_0,parser:y0}:x0.replace(/^\[|\]$/g,"")}return function(S0){for(var B0={},I0=0,T0=0;I0<g0;I0+=1){var R0=m0[I0];if(typeof R0=="string")T0+=R0.length;else{var E0=R0.regex,C0=R0.parser,G0=S0.slice(T0),F0=E0.exec(G0)[0];C0.call(B0,F0),S0=S0.replace(F0,"")}}return function(M0){var j0=M0.afternoon;if(j0!==void 0){var D0=M0.hours;j0?D0<12&&(M0.hours+=12):D0===12&&(M0.hours=0),delete M0.afternoon}}(B0),B0}}return function(h0,b0,p0){p0.p.customParseFormat=!0,h0&&h0.parseTwoDigitYear&&(f0=h0.parseTwoDigitYear);var m0=b0.prototype,g0=m0.parse;m0.parse=function(v0){var x0=v0.date,w0=v0.utc,_0=v0.args;this.$u=w0;var y0=_0[1];if(typeof y0=="string"){var S0=_0[2]===!0,B0=_0[3]===!0,I0=S0||B0,T0=_0[2];B0&&(T0=_0[2]),a0=this.$locale(),!S0&&T0&&(a0=p0.Ls[T0]),this.$d=function(G0,F0,M0,j0){try{if(["x","X"].indexOf(F0)>-1)return new Date((F0==="X"?1e3:1)*G0);var D0=d0(F0)(G0),$0=D0.year,X0=D0.month,Z0=D0.day,N0=D0.hours,Q0=D0.minutes,z0=D0.seconds,K0=D0.milliseconds,H0=D0.zone,J0=D0.week,Y0=new Date,e2=Z0||($0||X0?1:Y0.getDate()),s2=$0||Y0.getFullYear(),u2=0;$0&&!X0||(u2=X0>0?X0-1:Y0.getMonth());var A2,k2=N0||0,b2=Q0||0,v2=z0||0,x2=K0||0;return H0?new Date(Date.UTC(s2,u2,e2,k2,b2,v2,x2+60*H0.offset*1e3)):M0?new Date(Date.UTC(s2,u2,e2,k2,b2,v2,x2)):(A2=new Date(s2,u2,e2,k2,b2,v2,x2),J0&&(A2=j0(A2).week(J0).toDate()),A2)}catch{return new Date("")}}(x0,y0,w0,p0),this.init(),T0&&T0!==!0&&(this.$L=this.locale(T0).$L),I0&&x0!=this.format(y0)&&(this.$d=new Date("")),a0={}}else if(y0 instanceof Array)for(var R0=y0.length,E0=1;E0<=R0;E0+=1){_0[1]=y0[E0-1];var C0=p0.apply(this,_0);if(C0.isValid()){this.$d=C0.$d,this.$L=C0.$L,this.init();break}E0===R0&&(this.$d=new Date(""))}else g0.call(this,v0)}}})})(customParseFormat$1);var customParseFormatExports=customParseFormat$1.exports;const customParseFormat=getDefaultExportFromCjs$1(customParseFormatExports),genSizeDividerStyle=e0=>{const{componentCls:_e}=e0;return{[_e]:{"&-horizontal":{[`&${_e}`]:{"&-sm":{marginBlock:e0.marginXS},"&-md":{marginBlock:e0.margin}}}}}},genSharedDividerStyle=e0=>{const{componentCls:_e,sizePaddingEdgeHorizontal:i0,colorSplit:r0,lineWidth:t0,textPaddingInline:n0,orientationMargin:s0,verticalMarginInline:o0}=e0;return{[_e]:Object.assign(Object.assign({},resetComponent(e0)),{borderBlockStart:`${unit$1(t0)} solid ${r0}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:o0,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${unit$1(t0)} solid ${r0}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${unit$1(e0.marginLG)} 0`},[`&-horizontal${_e}-with-text`]:{display:"flex",alignItems:"center",margin:`${unit$1(e0.dividerHorizontalWithTextGutterMargin)} 0`,color:e0.colorTextHeading,fontWeight:500,fontSize:e0.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r0}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${unit$1(t0)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${_e}-with-text-start`]:{"&::before":{width:`calc(${s0} * 100%)`},"&::after":{width:`calc(100% - ${s0} * 100%)`}},[`&-horizontal${_e}-with-text-end`]:{"&::before":{width:`calc(100% - ${s0} * 100%)`},"&::after":{width:`calc(${s0} * 100%)`}},[`${_e}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:n0},"&-dashed":{background:"none",borderColor:r0,borderStyle:"dashed",borderWidth:`${unit$1(t0)} 0 0`},[`&-horizontal${_e}-with-text${_e}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${_e}-dashed`]:{borderInlineStartWidth:t0,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r0,borderStyle:"dotted",borderWidth:`${unit$1(t0)} 0 0`},[`&-horizontal${_e}-with-text${_e}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${_e}-dotted`]:{borderInlineStartWidth:t0,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${_e}-with-text`]:{color:e0.colorText,fontWeight:"normal",fontSize:e0.fontSize},[`&-horizontal${_e}-with-text-start${_e}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${_e}-inner-text`]:{paddingInlineStart:i0}},[`&-horizontal${_e}-with-text-end${_e}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${_e}-inner-text`]:{paddingInlineEnd:i0}}})}},prepareComponentToken=e0=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e0.marginXS}),useStyle=genStyleHooks("Divider",e0=>{const _e=merge(e0,{dividerHorizontalWithTextGutterMargin:e0.margin,sizePaddingEdgeHorizontal:0});return[genSharedDividerStyle(_e),genSizeDividerStyle(_e)]},prepareComponentToken,{unitless:{orientationMargin:!0}});var __rest=function(e0,_e){var i0={};for(var r0 in e0)Object.prototype.hasOwnProperty.call(e0,r0)&&_e.indexOf(r0)<0&&(i0[r0]=e0[r0]);if(e0!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t0=0,r0=Object.getOwnPropertySymbols(e0);t0<r0.length;t0++)_e.indexOf(r0[t0])<0&&Object.prototype.propertyIsEnumerable.call(e0,r0[t0])&&(i0[r0[t0]]=e0[r0[t0]]);return i0};const sizeClassNameMap={small:"sm",middle:"md"},Divider$1=e0=>{const{getPrefixCls:_e,direction:i0,className:r0,style:t0}=useComponentConfig("divider"),{prefixCls:n0,type:s0="horizontal",orientation:o0="center",orientationMargin:a0,className:f0,rootClassName:l0,children:u0,dashed:A0,variant:c0="solid",plain:k0,style:d0,size:h0}=e0,b0=__rest(e0,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),p0=_e("divider",n0),[m0,g0,v0]=useStyle(p0),x0=useSize(h0),w0=sizeClassNameMap[x0],_0=!!u0,y0=reactExports.useMemo(()=>o0==="left"?i0==="rtl"?"end":"start":o0==="right"?i0==="rtl"?"start":"end":o0,[i0,o0]),S0=y0==="start"&&a0!=null,B0=y0==="end"&&a0!=null,I0=classNames(p0,r0,g0,v0,`${p0}-${s0}`,{[`${p0}-with-text`]:_0,[`${p0}-with-text-${y0}`]:_0,[`${p0}-dashed`]:!!A0,[`${p0}-${c0}`]:c0!=="solid",[`${p0}-plain`]:!!k0,[`${p0}-rtl`]:i0==="rtl",[`${p0}-no-default-orientation-margin-start`]:S0,[`${p0}-no-default-orientation-margin-end`]:B0,[`${p0}-${w0}`]:!!w0},f0,l0),T0=reactExports.useMemo(()=>typeof a0=="number"?a0:/^\d+$/.test(a0)?Number(a0):a0,[a0]),R0={marginInlineStart:S0?T0:void 0,marginInlineEnd:B0?T0:void 0};return m0(reactExports.createElement("div",Object.assign({className:I0,style:Object.assign(Object.assign({},t0),d0)},b0,{role:"separator"}),u0&&s0!=="vertical"&&reactExports.createElement("span",{className:`${p0}-inner-text`,style:R0},u0)))};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e0){return e0&&e0.__esModule&&Object.prototype.hasOwnProperty.call(e0,"default")?e0.default:e0}var de={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal$1,function(i0){function r0(a0){return a0&&typeof a0=="object"&&"default"in a0?a0:{default:a0}}var t0=r0(i0),n0={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function s0(a0,f0,l0){var u0=n0[l0];return Array.isArray(u0)&&(u0=u0[f0?0:1]),u0.replace("%d",a0)}var o0={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(a0){return a0+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:s0,m:s0,mm:s0,h:s0,hh:s0,d:s0,dd:s0,M:s0,MM:s0,y:s0,yy:s0}};return t0.default.locale(o0,null,!0),o0})})(de);var es={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal$1,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(s0){return s0+"º"}};return t0.default.locale(n0,null,!0),n0})})(es);var fr={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal$1,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(s0){return""+s0+(s0===1?"er":"")}};return t0.default.locale(n0,null,!0),n0})})(fr);var it={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal$1,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(s0){return s0+"º"}};return t0.default.locale(n0,null,!0),n0})})(it);var pt={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal$1,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"pt",weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sab".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sa".split("_"),months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),ordinal:function(s0){return s0+"º"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},relativeTime:{future:"em %s",past:"há %s",s:"alguns segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"}};return t0.default.locale(n0,null,!0),n0})})(pt);const Divider=({children:e0,vertical:_e=!1,className:i0="border-gray-500",style:r0})=>jsxRuntimeExports.jsx(Divider$1,{plain:!0,children:e0,type:_e?"vertical":"horizontal",className:i0,orientation:"center",style:r0}),canUseDOM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function isWindow(e0){const _e=Object.prototype.toString.call(e0);return _e==="[object Window]"||_e==="[object global]"}function isNode$1(e0){return"nodeType"in e0}function getWindow$1(e0){var _e,i0;return e0?isWindow(e0)?e0:isNode$1(e0)&&(_e=(i0=e0.ownerDocument)==null?void 0:i0.defaultView)!=null?_e:window:window}function isDocument$1(e0){const{Document:_e}=getWindow$1(e0);return e0 instanceof _e}function isHTMLElement$1(e0){return isWindow(e0)?!1:e0 instanceof getWindow$1(e0).HTMLElement}function isSVGElement(e0){return e0 instanceof getWindow$1(e0).SVGElement}function getOwnerDocument(e0){return e0?isWindow(e0)?e0.document:isNode$1(e0)?isDocument$1(e0)?e0:isHTMLElement$1(e0)||isSVGElement(e0)?e0.ownerDocument:document:document:document}const useIsomorphicLayoutEffect$2=canUseDOM?reactExports.useLayoutEffect:reactExports.useEffect;function useEvent(e0){const _e=reactExports.useRef(e0);return useIsomorphicLayoutEffect$2(()=>{_e.current=e0}),reactExports.useCallback(function(){for(var i0=arguments.length,r0=new Array(i0),t0=0;t0<i0;t0++)r0[t0]=arguments[t0];return _e.current==null?void 0:_e.current(...r0)},[])}function useInterval(){const e0=reactExports.useRef(null),_e=reactExports.useCallback((r0,t0)=>{e0.current=setInterval(r0,t0)},[]),i0=reactExports.useCallback(()=>{e0.current!==null&&(clearInterval(e0.current),e0.current=null)},[]);return[_e,i0]}function useLatestValue(e0,_e){_e===void 0&&(_e=[e0]);const i0=reactExports.useRef(e0);return useIsomorphicLayoutEffect$2(()=>{i0.current!==e0&&(i0.current=e0)},_e),i0}function useLazyMemo(e0,_e){const i0=reactExports.useRef();return reactExports.useMemo(()=>{const r0=e0(i0.current);return i0.current=r0,r0},[..._e])}function useNodeRef(e0){const _e=useEvent(e0),i0=reactExports.useRef(null),r0=reactExports.useCallback(t0=>{t0!==i0.current&&(_e==null||_e(t0,i0.current)),i0.current=t0},[]);return[i0,r0]}function usePrevious(e0){const _e=reactExports.useRef();return reactExports.useEffect(()=>{_e.current=e0},[e0]),_e.current}let ids={};function useUniqueId(e0,_e){return reactExports.useMemo(()=>{if(_e)return _e;const i0=ids[e0]==null?0:ids[e0]+1;return ids[e0]=i0,e0+"-"+i0},[e0,_e])}function createAdjustmentFn(e0){return function(_e){for(var i0=arguments.length,r0=new Array(i0>1?i0-1:0),t0=1;t0<i0;t0++)r0[t0-1]=arguments[t0];return r0.reduce((n0,s0)=>{const o0=Object.entries(s0);for(const[a0,f0]of o0){const l0=n0[a0];l0!=null&&(n0[a0]=l0+e0*f0)}return n0},{..._e})}}const add=createAdjustmentFn(1),subtract=createAdjustmentFn(-1);function hasViewportRelativeCoordinates(e0){return"clientX"in e0&&"clientY"in e0}function isKeyboardEvent(e0){if(!e0)return!1;const{KeyboardEvent:_e}=getWindow$1(e0.target);return _e&&e0 instanceof _e}function isTouchEvent(e0){if(!e0)return!1;const{TouchEvent:_e}=getWindow$1(e0.target);return _e&&e0 instanceof _e}function getEventCoordinates(e0){if(isTouchEvent(e0)){if(e0.touches&&e0.touches.length){const{clientX:_e,clientY:i0}=e0.touches[0];return{x:_e,y:i0}}else if(e0.changedTouches&&e0.changedTouches.length){const{clientX:_e,clientY:i0}=e0.changedTouches[0];return{x:_e,y:i0}}}return hasViewportRelativeCoordinates(e0)?{x:e0.clientX,y:e0.clientY}:null}const SELECTOR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function findFirstFocusableNode(e0){return e0.matches(SELECTOR)?e0:e0.querySelector(SELECTOR)}const hiddenStyles={display:"none"};function HiddenText(e0){let{id:_e,value:i0}=e0;return React$4.createElement("div",{id:_e,style:hiddenStyles},i0)}function LiveRegion(e0){let{id:_e,announcement:i0,ariaLiveType:r0="assertive"}=e0;const t0={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return React$4.createElement("div",{id:_e,style:t0,role:"status","aria-live":r0,"aria-atomic":!0},i0)}function useAnnouncement(){const[e0,_e]=reactExports.useState("");return{announce:reactExports.useCallback(r0=>{r0!=null&&_e(r0)},[]),announcement:e0}}var Action$1;(function(e0){e0.DragStart="dragStart",e0.DragMove="dragMove",e0.DragEnd="dragEnd",e0.DragCancel="dragCancel",e0.DragOver="dragOver",e0.RegisterDroppable="registerDroppable",e0.SetDroppableDisabled="setDroppableDisabled",e0.UnregisterDroppable="unregisterDroppable"})(Action$1||(Action$1={}));function noop$1(){}const defaultCoordinates$1=Object.freeze({x:0,y:0});var Direction$1;(function(e0){e0[e0.Forward=1]="Forward",e0[e0.Backward=-1]="Backward"})(Direction$1||(Direction$1={}));var EventName$1;(function(e0){e0.Click="click",e0.DragStart="dragstart",e0.Keydown="keydown",e0.ContextMenu="contextmenu",e0.Resize="resize",e0.SelectionChange="selectionchange",e0.VisibilityChange="visibilitychange"})(EventName$1||(EventName$1={}));var KeyboardCode$1;(function(e0){e0.Space="Space",e0.Down="ArrowDown",e0.Right="ArrowRight",e0.Left="ArrowLeft",e0.Up="ArrowUp",e0.Esc="Escape",e0.Enter="Enter",e0.Tab="Tab"})(KeyboardCode$1||(KeyboardCode$1={}));KeyboardCode$1.Space,KeyboardCode$1.Enter,KeyboardCode$1.Esc,KeyboardCode$1.Space,KeyboardCode$1.Enter,KeyboardCode$1.Tab;var MouseButton$1;(function(e0){e0[e0.RightClick=2]="RightClick"})(MouseButton$1||(MouseButton$1={}));var AutoScrollActivator$1;(function(e0){e0[e0.Pointer=0]="Pointer",e0[e0.DraggableRect=1]="DraggableRect"})(AutoScrollActivator$1||(AutoScrollActivator$1={}));var TraversalOrder$1;(function(e0){e0[e0.TreeOrder=0]="TreeOrder",e0[e0.ReversedTreeOrder=1]="ReversedTreeOrder"})(TraversalOrder$1||(TraversalOrder$1={}));Direction$1.Backward+"",Direction$1.Forward+"",Direction$1.Backward+"",Direction$1.Forward+"";var MeasuringStrategy$1;(function(e0){e0[e0.Always=0]="Always",e0[e0.BeforeDragging=1]="BeforeDragging",e0[e0.WhileDragging=2]="WhileDragging"})(MeasuringStrategy$1||(MeasuringStrategy$1={}));var MeasuringFrequency$1;(function(e0){e0.Optimized="optimized"})(MeasuringFrequency$1||(MeasuringFrequency$1={}));function useResizeObserver$1(e0){let{callback:_e,disabled:i0}=e0;const r0=useEvent(_e),t0=reactExports.useMemo(()=>{if(i0||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:n0}=window;return new n0(r0)},[i0]);return reactExports.useEffect(()=>()=>t0==null?void 0:t0.disconnect(),[t0]),t0}MeasuringStrategy$1.WhileDragging,MeasuringFrequency$1.Optimized;const defaultInternalContext$1={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:noop$1,draggableNodes:new Map,over:null,measureDroppableContainers:noop$1},InternalContext$1=reactExports.createContext(defaultInternalContext$1);({...defaultCoordinates$1});var Status$1;(function(e0){e0[e0.Uninitialized=0]="Uninitialized",e0[e0.Initializing=1]="Initializing",e0[e0.Initialized=2]="Initialized"})(Status$1||(Status$1={}));const ID_PREFIX$1$1="Droppable",defaultResizeObserverConfig$1={timeout:25};function useDroppable$1(e0){let{data:_e,disabled:i0=!1,id:r0,resizeObserverConfig:t0}=e0;const n0=useUniqueId(ID_PREFIX$1$1),{active:s0,dispatch:o0,over:a0,measureDroppableContainers:f0}=reactExports.useContext(InternalContext$1),l0=reactExports.useRef({disabled:i0}),u0=reactExports.useRef(!1),A0=reactExports.useRef(null),c0=reactExports.useRef(null),{disabled:k0,updateMeasurementsFor:d0,timeout:h0}={...defaultResizeObserverConfig$1,...t0},b0=useLatestValue(d0??r0),p0=reactExports.useCallback(()=>{if(!u0.current){u0.current=!0;return}c0.current!=null&&clearTimeout(c0.current),c0.current=setTimeout(()=>{f0(Array.isArray(b0.current)?b0.current:[b0.current]),c0.current=null},h0)},[h0]),m0=useResizeObserver$1({callback:p0,disabled:k0||!s0}),g0=reactExports.useCallback((_0,y0)=>{m0&&(y0&&(m0.unobserve(y0),u0.current=!1),_0&&m0.observe(_0))},[m0]),[v0,x0]=useNodeRef(g0),w0=useLatestValue(_e);return reactExports.useEffect(()=>{!m0||!v0.current||(m0.disconnect(),u0.current=!1,m0.observe(v0.current))},[v0,m0]),reactExports.useEffect(()=>(o0({type:Action$1.RegisterDroppable,element:{id:r0,key:n0,disabled:i0,node:v0,rect:A0,data:w0}}),()=>o0({type:Action$1.UnregisterDroppable,key:n0,id:r0})),[r0]),reactExports.useEffect(()=>{i0!==l0.current.disabled&&(o0({type:Action$1.SetDroppableDisabled,id:r0,key:n0,disabled:i0}),l0.current.disabled=i0)},[r0,n0,i0,o0]),{active:s0,rect:A0,isOver:(a0==null?void 0:a0.id)===r0,node:v0,over:a0,setNodeRef:x0}}const DropzoneContext=reactExports.createContext(null);function useDropzoneContext(){const e0=reactExports.useContext(DropzoneContext);if(!e0)throw new Error("Cannot be rendered outside Dropzone Provider");return e0}const DropzoneDrag=()=>{const{t:e0}=useTranslation();return jsxRuntimeExports.jsx("div",{className:"drop-wrapper",children:jsxRuntimeExports.jsx("div",{className:"drop-content",children:jsxRuntimeExports.jsx("p",{className:"drop-text",children:e0("dropzone.drop")})})})},DropzoneFile=({children:e0,multiple:_e})=>{const{t:i0}=useTranslation(),{files:r0,inputRef:t0}=useDropzoneContext(),n0=r0&&r0.length>0,s0=clsx("drop-file-wrapper",{"d-block":n0,"d-none":!n0});return jsxRuntimeExports.jsxs("div",{className:s0,children:[jsxRuntimeExports.jsx("div",{className:"drop-file-content",children:jsxRuntimeExports.jsx("div",{className:"add-button p-4",children:jsxRuntimeExports.jsx(Button,{variant:"ghost",leftIcon:jsxRuntimeExports.jsx(SvgIconPlus,{}),disabled:!_e,onClick:()=>{var o0;return(o0=t0==null?void 0:t0.current)==null?void 0:o0.click()},children:i0("dropzone.add.more")})})}),jsxRuntimeExports.jsx("div",{className:"p-8",children:e0})]})},DropzoneImport=()=>{const{t:e0}=useTranslation(),{files:_e,inputRef:i0}=useDropzoneContext(),r0=_e&&_e.length>0,t0=clsx("dropzone-import-wrapper",{"d-flex":!r0,"d-none":r0});return jsxRuntimeExports.jsxs("div",{className:t0,children:[jsxRuntimeExports.jsx(SvgIconDownload,{height:48,width:48}),jsxRuntimeExports.jsx("p",{className:"my-16",children:e0("dropzone.text")}),jsxRuntimeExports.jsx(Button,{onClick:()=>{var n0;return(n0=i0==null?void 0:i0.current)==null?void 0:n0.click()},children:e0("dropzone.import")})]})},scriptRel="modulepreload",assetsURL=function(e0){return"/"+e0},seen={},__vitePreload=function e0(_e,i0,r0){let t0=Promise.resolve();if(i0&&i0.length>0){document.getElementsByTagName("link");const n0=document.querySelector("meta[property=csp-nonce]"),s0=(n0==null?void 0:n0.nonce)||(n0==null?void 0:n0.getAttribute("nonce"));t0=Promise.all(i0.map(o0=>{if(o0=assetsURL(o0),o0 in seen)return;seen[o0]=!0;const a0=o0.endsWith(".css"),f0=a0?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o0}"]${f0}`))return;const l0=document.createElement("link");if(l0.rel=a0?"stylesheet":scriptRel,a0||(l0.as="script",l0.crossOrigin=""),l0.href=o0,s0&&l0.setAttribute("nonce",s0),document.head.appendChild(l0),a0)return new Promise((u0,A0)=>{l0.addEventListener("load",u0),l0.addEventListener("error",()=>A0(new Error(`Unable to preload CSS for ${o0}`)))})}))}return t0.then(()=>_e()).catch(n0=>{const s0=new Event("vite:preloadError",{cancelable:!0});if(s0.payload=n0,window.dispatchEvent(s0),!s0.defaultPrevented)throw n0})},HEIC_MIME_TYPES=["image/heic","image/heif"],useDropzone=e0=>{const[_e,i0]=reactExports.useState(!1),[r0,t0]=reactExports.useState([]),n0=reactExports.useRef(null),s0=h0=>{l0([h0])},o0=h0=>{t0(b0=>b0.filter(p0=>p0.name!==h0.name))},a0=(h0,b0)=>{t0(p0=>{if(0<=h0&&h0<p0.length){const m0=p0.slice(0,h0),g0=h0===p0.length-1?[]:p0.slice(h0+1);return[...m0,b0,...g0]}return p0})},f0=h0=>{var b0;let p0=h0;if((b0=n0.current)!=null&&b0.accept){const m0=n0.current.accept.split(",").map(x0=>x0.trim().toLowerCase()),g0=m0.filter(x0=>x0.startsWith(".")),v0=m0.filter(x0=>!x0.startsWith(".")).map(x0=>x0.replace("*",""));p0=[],h0.forEach(x0=>{const w0=x0.name.toLowerCase();(g0.some(_0=>w0.endsWith(_0))||v0.some(_0=>x0.type.includes(_0)))&&p0.push(x0)})}return p0},l0=async h0=>{let b0=(await u0(h0)).sort((p0,m0)=>m0.lastModified-p0.lastModified).map(p0=>new File([p0],p0.name.replace(/[!:,;="']/g,""),{type:p0.type}));b0.reverse(),e0!=null&&e0.forceFilters?(b0=f0(b0),b0&&b0.length&&t0(p0=>[...p0,...b0])):t0(p0=>[...p0,...h0])},u0=async h0=>{if(h0===null||h0.length===0)return[];let b0;return h0.some(p0=>HEIC_MIME_TYPES.includes(p0.type))&&(b0=await __vitePreload(()=>Promise.resolve().then(()=>heicTo),void 0)),Promise.all(h0.map(async p0=>{if(b0&&b0.isHeic(p0))try{const m0=await b0.heicTo({blob:p0,toType:"image/jpeg"});return new File([m0],p0.name.replace(/\.(heic|heif)$/i,".jpeg"),{type:"image/jpeg"})}catch(m0){return console.error(`Failed to convert HEIC image: ${p0.name}`,m0),p0}return p0}))},A0=()=>{t0([])},c0=h0=>{const b0=h0.target.files;b0&&l0([...b0])},k0=h0=>{h0.preventDefault(),h0.stopPropagation(),i0(!0)},d0=h0=>{h0.preventDefault(),h0.stopPropagation(),i0(!1)};return{inputRef:n0,files:r0,dragging:_e,handleDragging:k0,handleDragLeave:d0,handleDrop:async h0=>{var b0;d0(h0);const p0=(b0=h0.dataTransfer)==null?void 0:b0.files;p0&&(await l0([...p0]),n0!=null&&n0.current&&(n0.current.files=p0))},replaceFileAt:a0,deleteFile:o0,addFile:s0,addFiles:l0,cleanFiles:A0,handleOnChange:c0}},Dropzone=({className:e0,accept:_e,multiple:i0=!0,handle:r0=!1,children:t0})=>{const{inputRef:n0,dragging:s0,files:o0,addFile:a0,deleteFile:f0,replaceFileAt:l0,handleDragLeave:u0,handleDragging:A0,handleDrop:c0,handleOnChange:k0}=useDropzone(_e?{forceFilters:!0}:void 0),d0=clsx("dropzone",{"is-dragging":(i0||o0.length<1)&&s0,"is-drop-files":!(o0.length!==0&&!r0)},e0),h0=reactExports.useMemo(()=>({inputRef:n0,files:o0,addFile:a0,deleteFile:f0,replaceFileAt:l0}),[a0,f0,l0,o0,n0]);return jsxRuntimeExports.jsx(DropzoneContext.Provider,{value:h0,children:jsxRuntimeExports.jsxs("div",{className:d0,onDragEnter:A0,onDragOver:A0,onDragLeave:u0,onDrop:o0.length>0&&!i0?void 0:c0,children:[jsxRuntimeExports.jsxs("div",{className:"d-flex flex-fill",children:[r0?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Dropzone.File,{multiple:i0,children:t0}),jsxRuntimeExports.jsx(Dropzone.Import,{})]}),jsxRuntimeExports.jsx(Dropzone.Drag,{})]}),jsxRuntimeExports.jsx("input",{ref:n0,accept:_e==null?void 0:_e.join(","),multiple:i0,type:"file",name:"attachment-input",id:"attachment-input",onChange:k0,hidden:!0})]})})};Dropzone.File=DropzoneFile;Dropzone.Import=DropzoneImport;Dropzone.Drag=DropzoneDrag;const SvgIconCode=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M17.327 5.76a1 1 0 0 1 1.413.067l5 5.5a1 1 0 0 1 0 1.346l-5 5.5a1 1 0 1 1-1.48-1.346L21.648 12 17.26 7.173a1 1 0 0 1 .067-1.413M6.673 5.76a1 1 0 0 1 .067 1.413L2.35 12l4.389 4.827a1 1 0 0 1-1.48 1.346l-5-5.5a1 1 0 0 1 0-1.346l5-5.5a1 1 0 0 1 1.413-.067M8.979 21.609a1 1 0 0 1-.658-1.252l5.375-17.29a1 1 0 1 1 1.91.594L10.23 20.95a1 1 0 0 1-1.251.658",clipRule:"evenodd"})]}),TextArea=reactExports.forwardRef(({noValidationIcon:e0,placeholder:_e,size:i0="md",height:r0="md",className:t0,showCounter:n0=!1,...s0},o0)=>{var a0;const{id:f0,isRequired:l0,isReadOnly:u0,status:A0}=useFormControl(),[c0,k0]=reactExports.useState(((a0=s0.defaultValue)==null?void 0:a0.toString().length)||0),d0=clsx({"form-control":!u0,"form-control-lg":i0==="lg","form-control-sm":i0==="sm","textarea-height-lg":r0==="lg","textarea-height-md":r0==="md","textarea-height-sm":r0==="sm","is-invalid":A0==="invalid","is-valid":A0==="valid","form-control-plaintext":u0,"no-validation-icon":e0},t0);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("textarea",{ref:o0,id:f0,className:d0,placeholder:_e,required:l0,readOnly:u0,...s0,onChange:h0=>{var b0;k0(h0.target.value.length),(b0=s0.onChange)==null||b0.call(s0,h0)}}),n0&&!A0&&jsxRuntimeExports.jsx(Textcounter,{currentLength:c0,maxLength:s0.maxLength??0})]})}),Embed=({onSuccess:e0})=>{const{t:_e}=useTranslation(),[i0,r0]=reactExports.useState();function t0(n0){const s0=n0.target.value;r0(s0),s0!=null&&s0.length?e0(s0):e0()}return jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column flex-fill",children:[jsxRuntimeExports.jsx("div",{className:"mb-32",children:_e("bbm.embed.description")}),jsxRuntimeExports.jsxs("div",{className:"mb-8 d-flex",children:[jsxRuntimeExports.jsx(SvgIconCode,{className:"me-8"}),_e("bbm.embed.title")]}),jsxRuntimeExports.jsx(FormControl,{id:"iframeContent",children:jsxRuntimeExports.jsx(TextArea,{size:"md",height:"sm",placeholder:_e("bbm.embed.placeholder"),onChange:t0})}),!!(i0!=null&&i0.length)&&jsxRuntimeExports.jsx("div",{className:"embed-preview mt-12",dangerouslySetInnerHTML:{__html:i0}}),!(i0!=null&&i0.length)&&jsxRuntimeExports.jsx("div",{className:"embed-preview mt-12 d-flex align-items-center justify-content-center bg-gray-300 text-black-50 rounded-3",children:jsxRuntimeExports.jsx("strong",{children:_e("bbm.embed.preview")})})]})},EmptyScreen=({imageSrc:e0,imageAlt:_e="",title:i0,text:r0,size:t0=250,className:n0})=>{const s0=clsx("text",n0);return jsxRuntimeExports.jsxs("div",{className:"emptyscreen",children:[e0&&jsxRuntimeExports.jsx("div",{className:"emptyscreen-image mb-12",children:jsxRuntimeExports.jsx("img",{className:"mx-auto",src:e0,alt:_e,width:t0,height:t0})}),i0&&jsxRuntimeExports.jsx(Heading,{level:"h2",headingStyle:"h2",className:"text-secondary mb-8",children:i0}),r0&&jsxRuntimeExports.jsx("div",{className:s0,children:r0})]})},SvgIconLandscape=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.222 5.037c-.895 0-1.222.555-1.222.792v12.675c0 .237.327.792 1.222.792h1.364l9.707-9.886a.987.987 0 0 1 1.414 0L21 13.782V5.829c0-.237-.328-.792-1.222-.792zM23 16.224V5.829C23 4.066 21.337 3 19.778 3H4.222C2.662 3 1 4.066 1 5.83v12.674c0 1.763 1.662 2.829 3.222 2.829h15.556c1.56 0 3.222-1.066 3.222-2.83v-2.279m-2 .439-5-5.093-7.585 7.726h11.363c.894 0 1.222-.555 1.222-.792zM8 8.093c-.552 0-1 .455-1 1.018a1.01 1.01 0 0 0 1 1.018c.552 0 1-.456 1-1.018a1.01 1.01 0 0 0-1-1.019M5 9.11c0-1.688 1.343-3.056 3-3.056s3 1.368 3 3.056-1.343 3.055-3 3.055-3-1.368-3-3.055",clipRule:"evenodd"})]}),SvgIconTextPage=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.286 3c-.35 0-.68.135-.92.368-.238.231-.366.54-.366.854v15.556c0 .315.128.623.367.854.239.233.569.368.919.368h11.428c.35 0 .68-.135.92-.368.238-.231.366-.54.366-.854V8h-3a2 2 0 0 1-2-2V3zM16 6h1.986L16 4.08zm5 13.778V6.556a1 1 0 0 0-.305-.72L15.98 1.281A1 1 0 0 0 15.286 1h-9a3.32 3.32 0 0 0-2.314.934A3.2 3.2 0 0 0 3 4.222v15.556c0 .864.353 1.686.972 2.288S5.423 23 6.286 23h11.428c.863 0 1.695-.333 2.314-.934.619-.602.972-1.424.972-2.288M8 6a1 1 0 0 0 0 2h3a1 1 0 1 0 0-2zm-1 6a1 1 0 0 1 1-1h8a1 1 0 1 1 0 2H8a1 1 0 0 1-1-1m5 4a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2z",clipRule:"evenodd"})]}),SvgIconVideo=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 4.962C4 4.376 4.435 4 4.853 4H6.5v2H4zM4 8h2.5v3H4zm-2 4V4.962C2 3.381 3.224 2 4.853 2h13.294C19.776 2 21 3.38 21 4.962v14.076C21 20.619 19.776 22 18.147 22H4.853C3.224 22 2 20.62 2 19.038zm17-6V4.962c0-.586-.435-.962-.853-.962H16.5v2zm0 2h-2.5v3H19zm-2.5 5H19v3h-2.5zm0 5H19v1.038c0 .586-.435.962-.853.962H16.5zm-2-7V4h-6v7zm-6 2h6v7h-6zm-2 5v2H4.853C4.435 20 4 19.624 4 19.038V18zm0-2v-3H4v3z",clipRule:"evenodd"})]}),FileIcon=({type:e0,roleMap:_e})=>{const i0=typeof(_e==null?void 0:_e.icon)!="string"&&e0!=="unknown"&&(_e==null?void 0:_e.hasShadow)!==!1,r0=clsx("position-absolute rounded-circle top-50 start-50 translate-middle",{"p-12 rounded-circle shadow":i0},_e==null?void 0:_e.color);return jsxRuntimeExports.jsx("div",{className:r0,children:(_e==null?void 0:_e.icon)??jsxRuntimeExports.jsx(SvgIconPaperclip,{})})};var observerMap=new Map,RootIds=new WeakMap,rootId=0,unsupportedValue=void 0;function getRootId(e0){return e0?(RootIds.has(e0)||(rootId+=1,RootIds.set(e0,rootId.toString())),RootIds.get(e0)):"0"}function optionsToId(e0){return Object.keys(e0).sort().filter(_e=>e0[_e]!==void 0).map(_e=>`${_e}_${_e==="root"?getRootId(e0.root):e0[_e]}`).toString()}function createObserver(e0){let _e=optionsToId(e0),i0=observerMap.get(_e);if(!i0){const r0=new Map;let t0;const n0=new IntersectionObserver(s0=>{s0.forEach(o0=>{var a0;const f0=o0.isIntersecting&&t0.some(l0=>o0.intersectionRatio>=l0);e0.trackVisibility&&typeof o0.isVisible>"u"&&(o0.isVisible=f0),(a0=r0.get(o0.target))==null||a0.forEach(l0=>{l0(f0,o0)})})},e0);t0=n0.thresholds||(Array.isArray(e0.threshold)?e0.threshold:[e0.threshold||0]),i0={id:_e,observer:n0,elements:r0},observerMap.set(_e,i0)}return i0}function observe(e0,_e,i0={},r0=unsupportedValue){if(typeof window.IntersectionObserver>"u"&&r0!==void 0){const a0=e0.getBoundingClientRect();return _e(r0,{isIntersecting:r0,target:e0,intersectionRatio:typeof i0.threshold=="number"?i0.threshold:0,time:0,boundingClientRect:a0,intersectionRect:a0,rootBounds:a0}),()=>{}}const{id:t0,observer:n0,elements:s0}=createObserver(i0);let o0=s0.get(e0)||[];return s0.has(e0)||s0.set(e0,o0),o0.push(_e),n0.observe(e0),function(){o0.splice(o0.indexOf(_e),1),o0.length===0&&(s0.delete(e0),n0.unobserve(e0)),s0.size===0&&(n0.disconnect(),observerMap.delete(t0))}}function useInView({threshold:e0,delay:_e,trackVisibility:i0,rootMargin:r0,root:t0,triggerOnce:n0,skip:s0,initialInView:o0,fallbackInView:a0,onChange:f0}={}){var l0;const[u0,A0]=reactExports.useState(null),c0=reactExports.useRef(),[k0,d0]=reactExports.useState({inView:!!o0,entry:void 0});c0.current=f0,reactExports.useEffect(()=>{if(s0||!u0)return;let m0;return m0=observe(u0,(g0,v0)=>{d0({inView:g0,entry:v0}),c0.current&&c0.current(g0,v0),v0.isIntersecting&&n0&&m0&&(m0(),m0=void 0)},{root:t0,rootMargin:r0,threshold:e0,trackVisibility:i0,delay:_e},a0),()=>{m0&&m0()}},[Array.isArray(e0)?e0.toString():e0,u0,t0,r0,n0,s0,i0,a0,_e]);const h0=(l0=k0.entry)==null?void 0:l0.target,b0=reactExports.useRef();!u0&&h0&&!n0&&!s0&&b0.current!==h0&&(b0.current=h0,d0({inView:!!o0,entry:void 0}));const p0=[A0,k0.inView,k0.entry];return p0.ref=p0[0],p0.inView=p0[1],p0.entry=p0[2],p0}function useThumbnail(e0,_e){const[i0,r0]=reactExports.useState(null),{ref:t0,inView:n0}=useInView({triggerOnce:!0,..._e==null?void 0:_e.intersectionOptions});return reactExports.useEffect(()=>{var s0;(s0=_e==null?void 0:_e.ref)!=null&&s0.current&&(t0==null||t0(_e.ref.current))},[_e==null?void 0:_e.ref,t0]),reactExports.useEffect(()=>{if((_e==null?void 0:_e.ref)===void 0||n0){if(!e0){r0(!1);return}const s0=new Image;return s0.src=e0,s0.onload=()=>{r0(!0)},s0.onerror=()=>{r0(!1)},()=>{s0.onload=null,s0.onerror=null,r0(null)}}},[n0,e0]),i0}const FileCard=({doc:e0,isClickable:_e=!0,isSelectable:i0=!1,isSelected:r0=!1,onClick:t0,className:n0,onSelect:s0,isFocused:o0,app:a0,customIcon:f0,customColor:l0})=>{const u0=reactExports.useRef(null),A0=DocumentHelper.getRole(e0);function c0(m0){if(f0!==void 0||l0!==void 0)return{icon:f0||jsxRuntimeExports.jsx(SvgIconTextPage,{width:22,height:22}),color:l0||"bg-gray-300",hasShadow:!1};const g0={csv:{icon:".CSV",color:"bg-orange-200"},xls:{icon:".XLS",color:"bg-green-200"},doc:{icon:".DOC",color:"bg-blue-200"},txt:{icon:".TXT",color:"bg-blue-200"},pdf:{icon:".PDF",color:"bg-red-200"},audio:{icon:jsxRuntimeExports.jsx(SvgIconMic,{width:22,height:22}),color:"bg-red-200"},ppt:{icon:".PPT",color:"bg-red-200"},img:{icon:jsxRuntimeExports.jsx(SvgIconLandscape,{width:22,height:22}),color:"bg-green-200"},video:{icon:jsxRuntimeExports.jsx(SvgIconVideo,{width:22,height:22}),color:"bg-purple-200"},zip:{icon:".ZIP",color:"bg-gray-300"},md:{icon:".MD",color:"bg-blue-200"},unknown:{icon:jsxRuntimeExports.jsx(SvgIconTextPage,{width:22,height:22}),color:"bg-gray-300"}};return g0[m0]||g0.unknown}const k0=c0(A0??"unknown"),d0=clsx("file position-relative rounded",(k0==null?void 0:k0.color)??"bg-yellow-200"),h0=e0.eType==="resource"?e0.thumbnail:A0==="img"||A0==="video"?odeServices.workspace().getThumbnailUrl(e0):null,b0=useThumbnail(h0,{ref:u0}),p0=b0&&{backgroundImage:`url(${h0})`,backgroundSize:"cover"};return jsxRuntimeExports.jsx(Card,{className:clsx("card-file",n0),isClickable:_e,isSelectable:i0,isSelected:r0,onClick:t0,app:a0,isFocused:o0,onSelect:s0,children:jsxRuntimeExports.jsxs(Card.Body,{space:"8",children:[jsxRuntimeExports.jsx("div",{ref:u0,className:d0,style:{aspectRatio:"16/10",...p0},children:A0!=="img"||A0==="img"&&!b0?jsxRuntimeExports.jsx(FileIcon,{type:A0,roleMap:k0}):null}),jsxRuntimeExports.jsxs("div",{className:"mt-4",children:[jsxRuntimeExports.jsx(Card.Text,{children:e0.name}),jsxRuntimeExports.jsx(Card.Text,{className:"text-black-50",children:e0==null?void 0:e0.ownerName})]})]})})},SvgIconSortAscendingLetters=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.133 6.173c-.026.023-.133.118-.133.541v.715h2v-.715c0-.423-.107-.518-.133-.541C17.805 6.12 17.594 6 17 6s-.805.12-.867.173M20 6.714c0-.76-.203-1.521-.832-2.06C18.575 4.145 17.786 4 17 4s-1.575.145-2.168.654c-.629.539-.832 1.3-.832 2.06V11a1 1 0 1 0 2 0V9.429h2V11a1 1 0 1 0 2 0zM14 14a1 1 0 0 1 1-1h4a1 1 0 0 1 .832 1.555L16.87 19H19a1 1 0 1 1 0 2h-4a1 1 0 0 1-.832-1.555L17.132 15H15a1 1 0 0 1-1-1M3.293 16.293a1 1 0 0 1 1.414 0L7 18.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-3 3a1 1 0 0 1-1.414 0l-3-3a1 1 0 0 1 0-1.414",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7 4a1 1 0 0 1 1 1v15a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1",clipRule:"evenodd"})]}),SvgIconSortDescendingLetters=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.133 6.173c-.026.023-.133.118-.133.541v.715h2v-.715c0-.423-.107-.518-.133-.541C17.805 6.12 17.594 6 17 6s-.805.12-.867.173M20 6.714c0-.76-.203-1.521-.832-2.06C18.575 4.145 17.786 4 17 4s-1.575.145-2.168.654c-.629.539-.832 1.3-.832 2.06V11a1 1 0 1 0 2 0V9.429h2V11a1 1 0 1 0 2 0zM14 14a1 1 0 0 1 1-1h4a1 1 0 0 1 .832 1.555L16.87 19H19a1 1 0 1 1 0 2h-4a1 1 0 0 1-.832-1.555L17.132 15H15a1 1 0 0 1-1-1M3.293 8.707a1 1 0 0 0 1.414 0L7 6.414l2.293 2.293a1 1 0 0 0 1.414-1.414l-3-3a1 1 0 0 0-1.414 0l-3 3a1 1 0 0 0 0 1.414",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7 21a1 1 0 0 0 1-1V5a1 1 0 0 0-2 0v15a1 1 0 0 0 1 1",clipRule:"evenodd"})]}),SvgIconSortTime=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.509 6.027a6.138 6.138 0 1 1-.28 12.099 1 1 0 1 0-.383 1.963A8.138 8.138 0 1 0 9.653 5.488a1 1 0 1 0 1.168 1.624 6.1 6.1 0 0 1 2.688-1.085",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.38 8.252a1 1 0 0 0-1 1v3.8a1 1 0 0 0 .456.838l2.052 1.332a1 1 0 0 0 1.089-1.678l-1.597-1.036V9.252a1 1 0 0 0-1-1M1.793 16.293a1 1 0 0 1 1.414 0L5.5 18.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-3 3a1 1 0 0 1-1.414 0l-3-3a1 1 0 0 1 0-1.414",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.5 4a1 1 0 0 0-1 1v15a1 1 0 1 0 2 0V5a1 1 0 0 0-1-1",clipRule:"evenodd"})]}),illuError="/assets/js/ode-explorer/illu-error.svg",illuError$1=Object.freeze(Object.defineProperty({__proto__:null,default:illuError},Symbol.toStringTag,{value:"Module"})),illuTrash="/assets/js/ode-explorer/illu-trash.svg",illuTrash$1=Object.freeze(Object.defineProperty({__proto__:null,default:illuTrash},Symbol.toStringTag,{value:"Module"})),EdificeThemeContext=reactExports.createContext(null);function useEdificeTheme(){const e0=reactExports.useContext(EdificeThemeContext);if(!e0)throw new Error("Cannot be used outside of EdificeThemeProvider");return e0}function useUser(){const{user:e0,userDescription:_e}=useEdificeClient(),{theme:i0}=useEdificeTheme();function r0(){let t0=_e==null?void 0:_e.picture;return(!t0||t0==="no-avatar.jpg"||t0==="no-avatar.svg")&&(t0=`${i0==null?void 0:i0.basePath}/img/illustrations/no-avatar.svg`),t0}return{user:e0,avatar:r0(),userDescription:_e}}function useGoogleDriveSearch(e0,_e,i0){const[r0,t0]=reactExports.useState({id:e0,name:_e,section:!0}),n0=reactExports.useCallback((l0,u0,A0)=>{t0(c0=>{const k0=findNodeById$1(c0,l0);if(!k0)return c0;const d0=u0.map(h0=>{var b0;const p0=(b0=k0.children)==null?void 0:b0.find(m0=>m0.id===h0.id);return p0?{...p0,name:h0.name}:{id:h0.id,name:h0.name}});return modifyNode$1(c0,h0=>h0.id===k0.id?{...h0,children:d0,files:A0}:h0)})},[]),s0=useQueryClient(),[o0,a0]=reactExports.useState(null),f0=reactExports.useCallback(async l0=>{if(!i0)return;const u0=l0===e0?void 0:l0;try{const A0=await s0.fetchQuery({queryKey:["googledrive","documents",i0,u0??"root"],queryFn:()=>odeServices.googledrive().listDocuments(i0,u0),staleTime:6e4}),c0=[],k0=[];A0.filter(d0=>d0.id!==u0).forEach(d0=>{d0.isFolder?c0.push(d0):k0.push(d0)}),a0(null),n0(l0,c0,k0)}catch(A0){a0(A0)}},[e0,i0,s0,n0]);return{root:r0,needsAuth:!1,isCheckingAuth:!1,isAuthError:!1,refetchAuthStatus:()=>{},loadContent:f0,loadError:o0}}const Grid=({children:e0,className:_e,...i0})=>{const r0=clsx("grid",_e);return jsxRuntimeExports.jsx("div",{className:r0,...i0,children:e0})},Column=({sm:e0,md:_e,lg:i0,xl:r0,children:t0,className:n0,as:s0,...o0})=>{const a0=s0||"div",f0=clsx({[`g-col-${e0}`]:e0,[_e?`g-col-md-${_e}`:""]:_e,[i0?`g-col-lg-${i0}`:""]:i0,[r0?`g-col-xl-${r0}`:""]:r0},n0);return jsxRuntimeExports.jsx(a0,{className:f0,...o0,children:t0})};Grid.Col=Column;const loadingScreen="/assets/js/ode-explorer/screen-loading.gif",LoadingScreen=reactExports.forwardRef(({position:e0=!0,caption:_e},i0)=>{const r0=clsx("top-0 end-0 start-0 bottom-0 d-grid justify-content-center align-content-center align-items-center z-2000",{"position-fixed":!e0,"position-static":e0}),t0=clsx("text-center pt-12",{"text-white":!e0});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{ref:i0,className:r0,children:[jsxRuntimeExports.jsx("div",{className:"bg-white rounded-circle mx-auto w-25",children:jsxRuntimeExports.jsx("img",{src:loadingScreen,alt:"loading"})}),_e&&jsxRuntimeExports.jsx("div",{className:t0,children:_e})]}),!e0&&jsxRuntimeExports.jsx("div",{className:"modal-backdrop fade show"})]})}),roleMappings$1={csv:{icon:".CSV",color:"bg-orange-200"},xls:{icon:".XLS",color:"bg-green-200"},doc:{icon:".DOC",color:"bg-blue-200"},txt:{icon:".TXT",color:"bg-blue-200"},pdf:{icon:".PDF",color:"bg-red-200"},audio:{icon:jsxRuntimeExports.jsx(SvgIconMic,{width:22,height:22}),color:"bg-red-200"},ppt:{icon:".PPT",color:"bg-red-200"},img:{icon:jsxRuntimeExports.jsx(SvgIconLandscape,{width:22,height:22}),color:"bg-green-200"},video:{icon:jsxRuntimeExports.jsx(SvgIconVideo,{width:22,height:22}),color:"bg-purple-200"},zip:{icon:".ZIP",color:"bg-gray-300"},md:{icon:".MD",color:"bg-blue-200"},unknown:{icon:jsxRuntimeExports.jsx(SvgIconTextPage,{width:22,height:22}),color:"bg-gray-300"}};function getRoleMap$1(e0,_e,i0){return _e!==void 0||i0!==void 0?{icon:_e||jsxRuntimeExports.jsx(SvgIconTextPage,{width:22,height:22}),color:i0||"bg-gray-300",hasShadow:!1}:roleMappings$1[e0]??roleMappings$1.unknown}const GoogleDriveFileCard=({doc:e0,userId:_e,isClickable:i0=!0,isSelectable:r0=!1,isSelected:t0=!1,onClick:n0,className:s0,onSelect:o0,isFocused:a0,app:f0,customIcon:l0,customColor:u0})=>{const A0=reactExports.useRef(null),c0=DocumentHelper.role(e0.contentType,!1),k0=getRoleMap$1(c0??"unknown",l0,u0),d0=clsx("file position-relative rounded",(k0==null?void 0:k0.color)??"bg-yellow-200"),h0=c0==="img"?odeServices.googledrive().getFileUrl(_e,e0):null,b0=useThumbnail(h0,{ref:A0}),p0=b0&&{backgroundImage:`url(${h0})`,backgroundSize:"cover"};return jsxRuntimeExports.jsx(Card,{className:clsx("card-file",s0),isClickable:i0,isSelectable:r0,isSelected:t0,onClick:n0,app:f0,isFocused:a0,onSelect:o0,children:jsxRuntimeExports.jsxs(Card.Body,{space:"8",children:[jsxRuntimeExports.jsx("div",{ref:A0,className:d0,style:{aspectRatio:"16/10",...p0},children:c0!=="img"||!b0?jsxRuntimeExports.jsx(FileIcon,{type:c0,roleMap:k0}):null}),jsxRuntimeExports.jsxs("div",{className:"mt-4",children:[jsxRuntimeExports.jsx(Card.Text,{children:e0.name}),jsxRuntimeExports.jsx(Card.Text,{className:"text-black-50",children:e0==null?void 0:e0.ownerDisplayName})]})]})})},ROOT_ID$1="root";function compare$1(e0,_e){return e0===_e?0:e0===void 0?-1:_e===void 0?1:e0.localeCompare(_e)}const GoogleDrive$1=({onSelect:e0,multiple:_e=!0,roles:i0,className:r0})=>{const{t:t0}=useTranslation(),{user:n0}=useUser(),{root:s0,loadContent:o0,loadError:a0}=useGoogleDriveSearch(ROOT_ID$1,t0("google-drive.mydrive"),n0==null?void 0:n0.userId),[f0,l0]=reactExports.useState(ROOT_ID$1),u0=findNodeById$1(s0,f0)??s0,[A0,c0]=reactExports.useState(void 0),[k0,d0]=reactExports.useState(["modified","desc"]),[h0,b0]=reactExports.useState([]),p0=reactExports.useCallback(y0=>{l0(y0),o0(y0)},[o0]);reactExports.useEffect(()=>{o0(ROOT_ID$1)},[o0]);const m0=reactExports.useMemo(()=>{if(!u0.files)return;const y0=T0=>{if(!i0)return!0;const R0=DocumentHelper.role(T0.contentType,!1);return Array.isArray(i0)?i0.includes(R0):i0===R0},S0=A0==null?void 0:A0.toLowerCase(),B0=u0.files.filter(T0=>(!S0||T0.name.toLowerCase().includes(S0))&&y0(T0));let I0;return k0[0]==="name"?I0=k0[1]==="asc"?(T0,R0)=>compare$1(T0.name,R0.name):(T0,R0)=>compare$1(R0.name,T0.name):I0=(T0,R0)=>compare$1(R0.lastModified,T0.lastModified),B0.sort(I0)},[u0,A0,k0,i0]),g0=reactExports.useMemo(()=>new Set(h0.map(y0=>y0.id)),[h0]),v0=reactExports.useCallback(y0=>{c0(y0.target.value)},[c0]);function x0(){return k0[0]==="name"?k0[1]==="asc"?t0("sort.order.alpha.asc"):t0("sort.order.alpha.desc"):t0("sort.order.modify.desc")}function w0(y0){let S0=[...h0];_e?S0.some(B0=>B0.id===y0.id)?S0=S0.filter(B0=>B0.id!==y0.id):S0=[...S0,y0]:S0=[y0],b0(S0),e0(S0)}const _0=clsx("workspace flex-grow-1 gap-0",r0);return jsxRuntimeExports.jsxs(Grid,{className:_0,children:[jsxRuntimeExports.jsx(Grid.Col,{sm:"12",md:"3",xl:"4",className:"workspace-folders p-12 pt-0 gap-12",children:jsxRuntimeExports.jsx("div",{style:{position:"sticky",top:0,paddingTop:"1.2rem"},children:jsxRuntimeExports.jsx(Tree,{nodes:s0,selectedNodeId:f0,showIcon:!0,onTreeItemClick:p0,onTreeItemUnfold:p0})})}),jsxRuntimeExports.jsx(Grid.Col,{sm:"12",md:"5",xl:"8",children:jsxRuntimeExports.jsxs(Grid,{className:"flex-grow-1 gap-0",children:[jsxRuntimeExports.jsxs(Grid.Col,{sm:"4",md:"8",xl:"12",children:[jsxRuntimeExports.jsx("div",{className:"workspace-search px-16 py-8 ",children:jsxRuntimeExports.jsx(SearchBar,{isVariant:!0,className:"gap-16",onChange:v0})}),jsxRuntimeExports.jsxs(Flex,{className:"px-8 py-4",align:"center",justify:"end",children:[jsxRuntimeExports.jsx("small",{className:"text-muted",children:t0("workspace.search.order")}),jsxRuntimeExports.jsxs(Dropdown,{children:[jsxRuntimeExports.jsx(Dropdown.Trigger,{size:"sm",label:x0(),variant:"ghost"}),jsxRuntimeExports.jsxs(Dropdown.Menu,{children:[jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortTime,{}),onClick:()=>d0(["modified","desc"]),children:t0("sort.order.modify.desc")}),jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortAscendingLetters,{}),onClick:()=>d0(["name","asc"]),children:t0("sort.order.alpha.asc")}),jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortDescendingLetters,{}),onClick:()=>d0(["name","desc"]),children:t0("sort.order.alpha.desc")})]})]})]})]}),jsxRuntimeExports.jsx(Grid.Col,{sm:"4",md:"8",xl:"12",className:"p-8 gap-8",children:a0?jsxRuntimeExports.jsxs(Flex,{direction:"column",gap:"12",className:"h-full w-100",justify:"center",align:"center",children:[jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuError,title:t0("google-drive.error.title"),text:t0("google-drive.error.description")}),jsxRuntimeExports.jsx(Button,{onClick:()=>o0(f0),children:t0("retry")})]}):m0?m0.length!==0?jsxRuntimeExports.jsx("div",{className:"grid grid-workspace",children:m0.map(y0=>{const S0=g0.has(y0.id);return jsxRuntimeExports.jsx(GoogleDriveFileCard,{doc:y0,userId:n0.userId,isSelected:S0,onClick:()=>w0(y0)},y0.id)})}):jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuTrash,text:t0("workspace.empty.docSpace"),title:t0("explorer.emptyScreen.trash.title")}):jsxRuntimeExports.jsx(LoadingScreen,{})})]})})]})};var ExtensionType=(e0=>(e0.Application="application",e0.WebGLPipes="webgl-pipes",e0.WebGLPipesAdaptor="webgl-pipes-adaptor",e0.WebGLSystem="webgl-system",e0.WebGPUPipes="webgpu-pipes",e0.WebGPUPipesAdaptor="webgpu-pipes-adaptor",e0.WebGPUSystem="webgpu-system",e0.CanvasSystem="canvas-system",e0.CanvasPipesAdaptor="canvas-pipes-adaptor",e0.CanvasPipes="canvas-pipes",e0.Asset="asset",e0.LoadParser="load-parser",e0.ResolveParser="resolve-parser",e0.CacheParser="cache-parser",e0.DetectionParser="detection-parser",e0.MaskEffect="mask-effect",e0.BlendMode="blend-mode",e0.TextureSource="texture-source",e0.Environment="environment",e0.ShapeBuilder="shape-builder",e0.Batcher="batcher",e0))(ExtensionType||{});const normalizeExtension=e0=>{if(typeof e0=="function"||typeof e0=="object"&&e0.extension){if(!e0.extension)throw new Error("Extension class must have an extension object");e0={...typeof e0.extension!="object"?{type:e0.extension}:e0.extension,ref:e0}}if(typeof e0=="object")e0={...e0};else throw new Error("Invalid extension type");return typeof e0.type=="string"&&(e0.type=[e0.type]),e0},normalizeExtensionPriority=(e0,_e)=>normalizeExtension(e0).priority??_e,extensions={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e0){return e0.map(normalizeExtension).forEach(_e=>{_e.type.forEach(i0=>{var r0,t0;return(t0=(r0=this._removeHandlers)[i0])==null?void 0:t0.call(r0,_e)})}),this},add(...e0){return e0.map(normalizeExtension).forEach(_e=>{_e.type.forEach(i0=>{var n0,s0;const r0=this._addHandlers,t0=this._queue;r0[i0]?(s0=r0[i0])==null||s0.call(r0,_e):(t0[i0]=t0[i0]||[],(n0=t0[i0])==null||n0.push(_e))})}),this},handle(e0,_e,i0){var s0;const r0=this._addHandlers,t0=this._removeHandlers;if(r0[e0]||t0[e0])throw new Error(`Extension type ${e0} already has a handler`);r0[e0]=_e,t0[e0]=i0;const n0=this._queue;return n0[e0]&&((s0=n0[e0])==null||s0.forEach(o0=>_e(o0)),delete n0[e0]),this},handleByMap(e0,_e){return this.handle(e0,i0=>{i0.name&&(_e[i0.name]=i0.ref)},i0=>{i0.name&&delete _e[i0.name]})},handleByNamedList(e0,_e,i0=-1){return this.handle(e0,r0=>{_e.findIndex(n0=>n0.name===r0.name)>=0||(_e.push({name:r0.name,value:r0.ref}),_e.sort((n0,s0)=>normalizeExtensionPriority(s0.value,i0)-normalizeExtensionPriority(n0.value,i0)))},r0=>{const t0=_e.findIndex(n0=>n0.name===r0.name);t0!==-1&&_e.splice(t0,1)})},handleByList(e0,_e,i0=-1){return this.handle(e0,r0=>{_e.includes(r0.ref)||(_e.push(r0.ref),_e.sort((t0,n0)=>normalizeExtensionPriority(n0,i0)-normalizeExtensionPriority(t0,i0)))},r0=>{const t0=_e.indexOf(r0.ref);t0!==-1&&_e.splice(t0,1)})},mixin(e0,..._e){for(const i0 of _e)Object.defineProperties(e0.prototype,Object.getOwnPropertyDescriptors(i0))}},browserExt={extension:{type:ExtensionType.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await __vitePreload(()=>Promise.resolve().then(()=>browserAll),void 0)}},webworkerExt={extension:{type:ExtensionType.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await __vitePreload(()=>Promise.resolve().then(()=>webworkerAll),void 0)}};class ObservablePoint{constructor(_e,i0,r0){this._x=i0||0,this._y=r0||0,this._observer=_e}clone(_e){return new ObservablePoint(_e??this._observer,this._x,this._y)}set(_e=0,i0=_e){return(this._x!==_e||this._y!==i0)&&(this._x=_e,this._y=i0,this._observer._onUpdate(this)),this}copyFrom(_e){return(this._x!==_e.x||this._y!==_e.y)&&(this._x=_e.x,this._y=_e.y,this._observer._onUpdate(this)),this}copyTo(_e){return _e.set(this._x,this._y),_e}equals(_e){return _e.x===this._x&&_e.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(_e){this._x!==_e&&(this._x=_e,this._observer._onUpdate(this))}get y(){return this._y}set y(_e){this._y!==_e&&(this._y=_e,this._observer._onUpdate(this))}}var eventemitter3={exports:{}};(function(e0){var _e=Object.prototype.hasOwnProperty,i0="~";function r0(){}Object.create&&(r0.prototype=Object.create(null),new r0().__proto__||(i0=!1));function t0(a0,f0,l0){this.fn=a0,this.context=f0,this.once=l0||!1}function n0(a0,f0,l0,u0,A0){if(typeof l0!="function")throw new TypeError("The listener must be a function");var c0=new t0(l0,u0||a0,A0),k0=i0?i0+f0:f0;return a0._events[k0]?a0._events[k0].fn?a0._events[k0]=[a0._events[k0],c0]:a0._events[k0].push(c0):(a0._events[k0]=c0,a0._eventsCount++),a0}function s0(a0,f0){--a0._eventsCount===0?a0._events=new r0:delete a0._events[f0]}function o0(){this._events=new r0,this._eventsCount=0}o0.prototype.eventNames=function(){var f0=[],l0,u0;if(this._eventsCount===0)return f0;for(u0 in l0=this._events)_e.call(l0,u0)&&f0.push(i0?u0.slice(1):u0);return Object.getOwnPropertySymbols?f0.concat(Object.getOwnPropertySymbols(l0)):f0},o0.prototype.listeners=function(f0){var l0=i0?i0+f0:f0,u0=this._events[l0];if(!u0)return[];if(u0.fn)return[u0.fn];for(var A0=0,c0=u0.length,k0=new Array(c0);A0<c0;A0++)k0[A0]=u0[A0].fn;return k0},o0.prototype.listenerCount=function(f0){var l0=i0?i0+f0:f0,u0=this._events[l0];return u0?u0.fn?1:u0.length:0},o0.prototype.emit=function(f0,l0,u0,A0,c0,k0){var d0=i0?i0+f0:f0;if(!this._events[d0])return!1;var h0=this._events[d0],b0=arguments.length,p0,m0;if(h0.fn){switch(h0.once&&this.removeListener(f0,h0.fn,void 0,!0),b0){case 1:return h0.fn.call(h0.context),!0;case 2:return h0.fn.call(h0.context,l0),!0;case 3:return h0.fn.call(h0.context,l0,u0),!0;case 4:return h0.fn.call(h0.context,l0,u0,A0),!0;case 5:return h0.fn.call(h0.context,l0,u0,A0,c0),!0;case 6:return h0.fn.call(h0.context,l0,u0,A0,c0,k0),!0}for(m0=1,p0=new Array(b0-1);m0<b0;m0++)p0[m0-1]=arguments[m0];h0.fn.apply(h0.context,p0)}else{var g0=h0.length,v0;for(m0=0;m0<g0;m0++)switch(h0[m0].once&&this.removeListener(f0,h0[m0].fn,void 0,!0),b0){case 1:h0[m0].fn.call(h0[m0].context);break;case 2:h0[m0].fn.call(h0[m0].context,l0);break;case 3:h0[m0].fn.call(h0[m0].context,l0,u0);break;case 4:h0[m0].fn.call(h0[m0].context,l0,u0,A0);break;default:if(!p0)for(v0=1,p0=new Array(b0-1);v0<b0;v0++)p0[v0-1]=arguments[v0];h0[m0].fn.apply(h0[m0].context,p0)}}return!0},o0.prototype.on=function(f0,l0,u0){return n0(this,f0,l0,u0,!1)},o0.prototype.once=function(f0,l0,u0){return n0(this,f0,l0,u0,!0)},o0.prototype.removeListener=function(f0,l0,u0,A0){var c0=i0?i0+f0:f0;if(!this._events[c0])return this;if(!l0)return s0(this,c0),this;var k0=this._events[c0];if(k0.fn)k0.fn===l0&&(!A0||k0.once)&&(!u0||k0.context===u0)&&s0(this,c0);else{for(var d0=0,h0=[],b0=k0.length;d0<b0;d0++)(k0[d0].fn!==l0||A0&&!k0[d0].once||u0&&k0[d0].context!==u0)&&h0.push(k0[d0]);h0.length?this._events[c0]=h0.length===1?h0[0]:h0:s0(this,c0)}return this},o0.prototype.removeAllListeners=function(f0){var l0;return f0?(l0=i0?i0+f0:f0,this._events[l0]&&s0(this,l0)):(this._events=new r0,this._eventsCount=0),this},o0.prototype.off=o0.prototype.removeListener,o0.prototype.addListener=o0.prototype.on,o0.prefixed=i0,o0.EventEmitter=o0,e0.exports=o0})(eventemitter3);var eventemitter3Exports=eventemitter3.exports;const EventEmitter=getDefaultExportFromCjs$1(eventemitter3Exports),PI_2=Math.PI*2,RAD_TO_DEG=180/Math.PI,DEG_TO_RAD=Math.PI/180;class Point{constructor(_e=0,i0=0){this.x=0,this.y=0,this.x=_e,this.y=i0}clone(){return new Point(this.x,this.y)}copyFrom(_e){return this.set(_e.x,_e.y),this}copyTo(_e){return _e.set(this.x,this.y),_e}equals(_e){return _e.x===this.x&&_e.y===this.y}set(_e=0,i0=_e){return this.x=_e,this.y=i0,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return tempPoint.x=0,tempPoint.y=0,tempPoint}}const tempPoint=new Point;class Matrix{constructor(_e=1,i0=0,r0=0,t0=1,n0=0,s0=0){this.array=null,this.a=_e,this.b=i0,this.c=r0,this.d=t0,this.tx=n0,this.ty=s0}fromArray(_e){this.a=_e[0],this.b=_e[1],this.c=_e[3],this.d=_e[4],this.tx=_e[2],this.ty=_e[5]}set(_e,i0,r0,t0,n0,s0){return this.a=_e,this.b=i0,this.c=r0,this.d=t0,this.tx=n0,this.ty=s0,this}toArray(_e,i0){this.array||(this.array=new Float32Array(9));const r0=i0||this.array;return _e?(r0[0]=this.a,r0[1]=this.b,r0[2]=0,r0[3]=this.c,r0[4]=this.d,r0[5]=0,r0[6]=this.tx,r0[7]=this.ty,r0[8]=1):(r0[0]=this.a,r0[1]=this.c,r0[2]=this.tx,r0[3]=this.b,r0[4]=this.d,r0[5]=this.ty,r0[6]=0,r0[7]=0,r0[8]=1),r0}apply(_e,i0){i0=i0||new Point;const r0=_e.x,t0=_e.y;return i0.x=this.a*r0+this.c*t0+this.tx,i0.y=this.b*r0+this.d*t0+this.ty,i0}applyInverse(_e,i0){i0=i0||new Point;const r0=this.a,t0=this.b,n0=this.c,s0=this.d,o0=this.tx,a0=this.ty,f0=1/(r0*s0+n0*-t0),l0=_e.x,u0=_e.y;return i0.x=s0*f0*l0+-n0*f0*u0+(a0*n0-o0*s0)*f0,i0.y=r0*f0*u0+-t0*f0*l0+(-a0*r0+o0*t0)*f0,i0}translate(_e,i0){return this.tx+=_e,this.ty+=i0,this}scale(_e,i0){return this.a*=_e,this.d*=i0,this.c*=_e,this.b*=i0,this.tx*=_e,this.ty*=i0,this}rotate(_e){const i0=Math.cos(_e),r0=Math.sin(_e),t0=this.a,n0=this.c,s0=this.tx;return this.a=t0*i0-this.b*r0,this.b=t0*r0+this.b*i0,this.c=n0*i0-this.d*r0,this.d=n0*r0+this.d*i0,this.tx=s0*i0-this.ty*r0,this.ty=s0*r0+this.ty*i0,this}append(_e){const i0=this.a,r0=this.b,t0=this.c,n0=this.d;return this.a=_e.a*i0+_e.b*t0,this.b=_e.a*r0+_e.b*n0,this.c=_e.c*i0+_e.d*t0,this.d=_e.c*r0+_e.d*n0,this.tx=_e.tx*i0+_e.ty*t0+this.tx,this.ty=_e.tx*r0+_e.ty*n0+this.ty,this}appendFrom(_e,i0){const r0=_e.a,t0=_e.b,n0=_e.c,s0=_e.d,o0=_e.tx,a0=_e.ty,f0=i0.a,l0=i0.b,u0=i0.c,A0=i0.d;return this.a=r0*f0+t0*u0,this.b=r0*l0+t0*A0,this.c=n0*f0+s0*u0,this.d=n0*l0+s0*A0,this.tx=o0*f0+a0*u0+i0.tx,this.ty=o0*l0+a0*A0+i0.ty,this}setTransform(_e,i0,r0,t0,n0,s0,o0,a0,f0){return this.a=Math.cos(o0+f0)*n0,this.b=Math.sin(o0+f0)*n0,this.c=-Math.sin(o0-a0)*s0,this.d=Math.cos(o0-a0)*s0,this.tx=_e-(r0*this.a+t0*this.c),this.ty=i0-(r0*this.b+t0*this.d),this}prepend(_e){const i0=this.tx;if(_e.a!==1||_e.b!==0||_e.c!==0||_e.d!==1){const r0=this.a,t0=this.c;this.a=r0*_e.a+this.b*_e.c,this.b=r0*_e.b+this.b*_e.d,this.c=t0*_e.a+this.d*_e.c,this.d=t0*_e.b+this.d*_e.d}return this.tx=i0*_e.a+this.ty*_e.c+_e.tx,this.ty=i0*_e.b+this.ty*_e.d+_e.ty,this}decompose(_e){const i0=this.a,r0=this.b,t0=this.c,n0=this.d,s0=_e.pivot,o0=-Math.atan2(-t0,n0),a0=Math.atan2(r0,i0),f0=Math.abs(o0+a0);return f0<1e-5||Math.abs(PI_2-f0)<1e-5?(_e.rotation=a0,_e.skew.x=_e.skew.y=0):(_e.rotation=0,_e.skew.x=o0,_e.skew.y=a0),_e.scale.x=Math.sqrt(i0*i0+r0*r0),_e.scale.y=Math.sqrt(t0*t0+n0*n0),_e.position.x=this.tx+(s0.x*i0+s0.y*t0),_e.position.y=this.ty+(s0.x*r0+s0.y*n0),_e}invert(){const _e=this.a,i0=this.b,r0=this.c,t0=this.d,n0=this.tx,s0=_e*t0-i0*r0;return this.a=t0/s0,this.b=-i0/s0,this.c=-r0/s0,this.d=_e/s0,this.tx=(r0*this.ty-t0*n0)/s0,this.ty=-(_e*this.ty-i0*n0)/s0,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const _e=new Matrix;return _e.a=this.a,_e.b=this.b,_e.c=this.c,_e.d=this.d,_e.tx=this.tx,_e.ty=this.ty,_e}copyTo(_e){return _e.a=this.a,_e.b=this.b,_e.c=this.c,_e.d=this.d,_e.tx=this.tx,_e.ty=this.ty,_e}copyFrom(_e){return this.a=_e.a,this.b=_e.b,this.c=_e.c,this.d=_e.d,this.tx=_e.tx,this.ty=_e.ty,this}equals(_e){return _e.a===this.a&&_e.b===this.b&&_e.c===this.c&&_e.d===this.d&&_e.tx===this.tx&&_e.ty===this.ty}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return identityMatrix$1.identity()}static get shared(){return tempMatrix$5.identity()}}const tempMatrix$5=new Matrix,identityMatrix$1=new Matrix,ux=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],uy=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],vx=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],vy=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],rotationCayley=[],rotationMatrices=[],signum=Math.sign;function init(){for(let e0=0;e0<16;e0++){const _e=[];rotationCayley.push(_e);for(let i0=0;i0<16;i0++){const r0=signum(ux[e0]*ux[i0]+vx[e0]*uy[i0]),t0=signum(uy[e0]*ux[i0]+vy[e0]*uy[i0]),n0=signum(ux[e0]*vx[i0]+vx[e0]*vy[i0]),s0=signum(uy[e0]*vx[i0]+vy[e0]*vy[i0]);for(let o0=0;o0<16;o0++)if(ux[o0]===r0&&uy[o0]===t0&&vx[o0]===n0&&vy[o0]===s0){_e.push(o0);break}}}for(let e0=0;e0<16;e0++){const _e=new Matrix;_e.set(ux[e0],uy[e0],vx[e0],vy[e0],0,0),rotationMatrices.push(_e)}}init();const groupD8={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e0=>ux[e0],uY:e0=>uy[e0],vX:e0=>vx[e0],vY:e0=>vy[e0],inv:e0=>e0&8?e0&15:-e0&7,add:(e0,_e)=>rotationCayley[e0][_e],sub:(e0,_e)=>rotationCayley[e0][groupD8.inv(_e)],rotate180:e0=>e0^4,isVertical:e0=>(e0&3)===2,byDirection:(e0,_e)=>Math.abs(e0)*2<=Math.abs(_e)?_e>=0?groupD8.S:groupD8.N:Math.abs(_e)*2<=Math.abs(e0)?e0>0?groupD8.E:groupD8.W:_e>0?e0>0?groupD8.SE:groupD8.SW:e0>0?groupD8.NE:groupD8.NW,matrixAppendRotationInv:(e0,_e,i0=0,r0=0)=>{const t0=rotationMatrices[groupD8.inv(_e)];t0.tx=i0,t0.ty=r0,e0.append(t0)},transformRectCoords:(e0,_e,i0,r0)=>{const{x:t0,y:n0,width:s0,height:o0}=e0,{x:a0,y:f0,width:l0,height:u0}=_e;return i0===groupD8.E?(r0.set(t0+a0,n0+f0,s0,o0),r0):i0===groupD8.S?r0.set(l0-n0-o0+a0,t0+f0,o0,s0):i0===groupD8.W?r0.set(l0-t0-s0+a0,u0-n0-o0+f0,s0,o0):i0===groupD8.N?r0.set(n0+a0,u0-t0-s0+f0,o0,s0):r0.set(t0+a0,n0+f0,s0,o0)}},tempPoints=[new Point,new Point,new Point,new Point];class Rectangle{constructor(_e=0,i0=0,r0=0,t0=0){this.type="rectangle",this.x=Number(_e),this.y=Number(i0),this.width=Number(r0),this.height=Number(t0)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new Rectangle(0,0,0,0)}clone(){return new Rectangle(this.x,this.y,this.width,this.height)}copyFromBounds(_e){return this.x=_e.minX,this.y=_e.minY,this.width=_e.maxX-_e.minX,this.height=_e.maxY-_e.minY,this}copyFrom(_e){return this.x=_e.x,this.y=_e.y,this.width=_e.width,this.height=_e.height,this}copyTo(_e){return _e.copyFrom(this),_e}contains(_e,i0){return this.width<=0||this.height<=0?!1:_e>=this.x&&_e<this.x+this.width&&i0>=this.y&&i0<this.y+this.height}strokeContains(_e,i0,r0,t0=.5){const{width:n0,height:s0}=this;if(n0<=0||s0<=0)return!1;const o0=this.x,a0=this.y,f0=r0*(1-t0),l0=r0-f0,u0=o0-f0,A0=o0+n0+f0,c0=a0-f0,k0=a0+s0+f0,d0=o0+l0,h0=o0+n0-l0,b0=a0+l0,p0=a0+s0-l0;return _e>=u0&&_e<=A0&&i0>=c0&&i0<=k0&&!(_e>d0&&_e<h0&&i0>b0&&i0<p0)}intersects(_e,i0){if(!i0){const _0=this.x<_e.x?_e.x:this.x;if((this.right>_e.right?_e.right:this.right)<=_0)return!1;const S0=this.y<_e.y?_e.y:this.y;return(this.bottom>_e.bottom?_e.bottom:this.bottom)>S0}const r0=this.left,t0=this.right,n0=this.top,s0=this.bottom;if(t0<=r0||s0<=n0)return!1;const o0=tempPoints[0].set(_e.left,_e.top),a0=tempPoints[1].set(_e.left,_e.bottom),f0=tempPoints[2].set(_e.right,_e.top),l0=tempPoints[3].set(_e.right,_e.bottom);if(f0.x<=o0.x||a0.y<=o0.y)return!1;const u0=Math.sign(i0.a*i0.d-i0.b*i0.c);if(u0===0||(i0.apply(o0,o0),i0.apply(a0,a0),i0.apply(f0,f0),i0.apply(l0,l0),Math.max(o0.x,a0.x,f0.x,l0.x)<=r0||Math.min(o0.x,a0.x,f0.x,l0.x)>=t0||Math.max(o0.y,a0.y,f0.y,l0.y)<=n0||Math.min(o0.y,a0.y,f0.y,l0.y)>=s0))return!1;const A0=u0*(a0.y-o0.y),c0=u0*(o0.x-a0.x),k0=A0*r0+c0*n0,d0=A0*t0+c0*n0,h0=A0*r0+c0*s0,b0=A0*t0+c0*s0;if(Math.max(k0,d0,h0,b0)<=A0*o0.x+c0*o0.y||Math.min(k0,d0,h0,b0)>=A0*l0.x+c0*l0.y)return!1;const p0=u0*(o0.y-f0.y),m0=u0*(f0.x-o0.x),g0=p0*r0+m0*n0,v0=p0*t0+m0*n0,x0=p0*r0+m0*s0,w0=p0*t0+m0*s0;return!(Math.max(g0,v0,x0,w0)<=p0*o0.x+m0*o0.y||Math.min(g0,v0,x0,w0)>=p0*l0.x+m0*l0.y)}pad(_e=0,i0=_e){return this.x-=_e,this.y-=i0,this.width+=_e*2,this.height+=i0*2,this}fit(_e){const i0=Math.max(this.x,_e.x),r0=Math.min(this.x+this.width,_e.x+_e.width),t0=Math.max(this.y,_e.y),n0=Math.min(this.y+this.height,_e.y+_e.height);return this.x=i0,this.width=Math.max(r0-i0,0),this.y=t0,this.height=Math.max(n0-t0,0),this}ceil(_e=1,i0=.001){const r0=Math.ceil((this.x+this.width-i0)*_e)/_e,t0=Math.ceil((this.y+this.height-i0)*_e)/_e;return this.x=Math.floor((this.x+i0)*_e)/_e,this.y=Math.floor((this.y+i0)*_e)/_e,this.width=r0-this.x,this.height=t0-this.y,this}scale(_e,i0=_e){return this.x*=_e,this.y*=i0,this.width*=_e,this.height*=i0,this}enlarge(_e){const i0=Math.min(this.x,_e.x),r0=Math.max(this.x+this.width,_e.x+_e.width),t0=Math.min(this.y,_e.y),n0=Math.max(this.y+this.height,_e.y+_e.height);return this.x=i0,this.width=r0-i0,this.y=t0,this.height=n0-t0,this}getBounds(_e){return _e||(_e=new Rectangle),_e.copyFrom(this),_e}containsRect(_e){if(this.width<=0||this.height<=0)return!1;const i0=_e.x,r0=_e.y,t0=_e.x+_e.width,n0=_e.y+_e.height;return i0>=this.x&&i0<this.x+this.width&&r0>=this.y&&r0<this.y+this.height&&t0>=this.x&&t0<this.x+this.width&&n0>=this.y&&n0<this.y+this.height}set(_e,i0,r0,t0){return this.x=_e,this.y=i0,this.width=r0,this.height=t0,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const uidCache={default:-1};function uid$1(e0="default"){return uidCache[e0]===void 0&&(uidCache[e0]=-1),++uidCache[e0]}const warnings=new Set,v8_0_0="8.0.0",v8_3_4="8.3.4",deprecationState={quiet:!1,noColor:!1},deprecation=(e0,_e,i0=3)=>{if(deprecationState.quiet||warnings.has(_e))return;let r0=new Error().stack;const t0=`${_e}
|
|
279
|
+
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r0)}var __rest$2=function(e0,_e){var i0={};for(var r0 in e0)Object.prototype.hasOwnProperty.call(e0,r0)&&_e.indexOf(r0)<0&&(i0[r0]=e0[r0]);if(e0!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t0=0,r0=Object.getOwnPropertySymbols(e0);t0<r0.length;t0++)_e.indexOf(r0[t0])<0&&Object.prototype.propertyIsEnumerable.call(e0,r0[t0])&&(i0[r0[t0]]=e0[r0[t0]]);return i0};const unitless={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},ignore={motionBase:!0,motionUnit:!0},preserve={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},getComputedToken=(e0,_e,i0)=>{const r0=i0.getDerivativeToken(e0),{override:t0}=_e,n0=__rest$2(_e,["override"]);let s0=Object.assign(Object.assign({},r0),{override:t0});return s0=formatToken(s0),n0&&Object.entries(n0).forEach(([o0,a0])=>{const{theme:f0}=a0,l0=__rest$2(a0,["theme"]);let u0=l0;f0&&(u0=getComputedToken(Object.assign(Object.assign({},s0),l0),{override:l0},f0)),s0[o0]=u0}),s0};function useToken(){const{token:e0,hashed:_e,theme:i0,override:r0,cssVar:t0}=React$4.useContext(DesignTokenContext),n0=`${version}-${_e||""}`,s0=i0||defaultTheme,[o0,a0,f0]=useCacheToken(s0,[seedToken,e0],{salt:n0,override:r0,getComputedToken,formatToken,cssVar:t0&&{prefix:t0.prefix,key:t0.key,unitless,ignore,preserve}});return[s0,f0,_e?a0:"",o0,t0]}const resetComponent=(e0,_e=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e0.colorText,fontSize:e0.fontSize,lineHeight:e0.lineHeight,listStyle:"none",fontFamily:_e?"inherit":e0.fontFamily}),resetIcon=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),genLinkStyle=e0=>({a:{color:e0.colorLink,textDecoration:e0.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e0.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e0.colorLinkHover},"&:active":{color:e0.colorLinkActive},"&:active, &:hover":{textDecoration:e0.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e0.linkFocusDecoration,outline:0},"&[disabled]":{color:e0.colorTextDisabled,cursor:"not-allowed"}}}),genCommonStyle=(e0,_e,i0,r0)=>{const t0=`[class^="${_e}"], [class*=" ${_e}"]`,n0=i0?`.${i0}`:t0,s0={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let o0={};return r0!==!1&&(o0={fontFamily:e0.fontFamily,fontSize:e0.fontSize}),{[n0]:Object.assign(Object.assign(Object.assign({},o0),s0),{[t0]:s0})}},genIconStyle=e0=>({[`.${e0}`]:Object.assign(Object.assign({},resetIcon()),{[`.${e0} .${e0}-icon`]:{display:"block"}})}),{genStyleHooks}=genStyleUtils({usePrefix:()=>{const{getPrefixCls:e0,iconPrefixCls:_e}=reactExports.useContext(ConfigContext);return{rootPrefixCls:e0(),iconPrefixCls:_e}},useToken:()=>{const[e0,_e,i0,r0,t0]=useToken();return{theme:e0,realToken:_e,hashId:i0,token:r0,cssVar:t0}},useCSP:()=>{const{csp:e0}=reactExports.useContext(ConfigContext);return e0??{}},getResetStyles:(e0,_e)=>{var i0;const r0=genLinkStyle(e0);return[r0,{"&":r0},genIconStyle((i0=_e==null?void 0:_e.prefix.iconPrefixCls)!==null&&i0!==void 0?i0:defaultIconPrefixCls)]},getCommonStyle:genCommonStyle,getCompUnitless:()=>unitless}),useResetIconStyle=(e0,_e)=>{const[i0,r0]=useToken();return useStyleRegister({token:r0,hashId:"",path:["ant-design-icons",e0],nonce:()=>_e==null?void 0:_e.nonce,layer:{name:"antd"}},()=>genIconStyle(e0))},fullClone=Object.assign({},React$5),{useId}=fullClone,useEmptyId=()=>"",useThemeKey=typeof useId>"u"?useEmptyId:useId;function useTheme(e0,_e,i0){var r0;const t0=e0||{},n0=t0.inherit===!1||!_e?Object.assign(Object.assign({},defaultConfig),{hashed:(r0=_e==null?void 0:_e.hashed)!==null&&r0!==void 0?r0:defaultConfig.hashed,cssVar:_e==null?void 0:_e.cssVar}):_e,s0=useThemeKey();return useMemo$1(()=>{var o0,a0;if(!e0)return _e;const f0=Object.assign({},n0.components);Object.keys(e0.components||{}).forEach(A0=>{f0[A0]=Object.assign(Object.assign({},f0[A0]),e0.components[A0])});const l0=`css-var-${s0.replace(/:/g,"")}`,u0=((o0=t0.cssVar)!==null&&o0!==void 0?o0:n0.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:i0==null?void 0:i0.prefixCls},typeof n0.cssVar=="object"?n0.cssVar:{}),typeof t0.cssVar=="object"?t0.cssVar:{}),{key:typeof t0.cssVar=="object"&&((a0=t0.cssVar)===null||a0===void 0?void 0:a0.key)||l0});return Object.assign(Object.assign(Object.assign({},n0),t0),{token:Object.assign(Object.assign({},n0.token),t0.token),components:f0,cssVar:u0})},[t0,n0],(o0,a0)=>o0.some((f0,l0)=>{const u0=a0[l0];return!isEqual(f0,u0,!0)}))}var _excluded$1=["children"],Context=reactExports.createContext({});function MotionProvider(e0){var _e=e0.children,i0=_objectWithoutProperties(e0,_excluded$1);return reactExports.createElement(Context.Provider,{value:i0},_e)}var DomWrapper=function(e0){_inherits(i0,e0);var _e=_createSuper(i0);function i0(){return _classCallCheck(this,i0),_e.apply(this,arguments)}return _createClass(i0,[{key:"render",value:function(){return this.props.children}}]),i0}(reactExports.Component);function useSyncState(e0){var _e=reactExports.useReducer(function(o0){return o0+1},0),i0=_slicedToArray$1(_e,2),r0=i0[1],t0=reactExports.useRef(e0),n0=useEvent$1(function(){return t0.current}),s0=useEvent$1(function(o0){t0.current=typeof o0=="function"?o0(t0.current):o0,r0()});return[n0,s0]}var STATUS_NONE="none",STATUS_APPEAR="appear",STATUS_ENTER="enter",STATUS_LEAVE="leave",STEP_NONE="none",STEP_PREPARE="prepare",STEP_START="start",STEP_ACTIVE="active",STEP_ACTIVATED="end",STEP_PREPARED="prepared";function makePrefixMap(e0,_e){var i0={};return i0[e0.toLowerCase()]=_e.toLowerCase(),i0["Webkit".concat(e0)]="webkit".concat(_e),i0["Moz".concat(e0)]="moz".concat(_e),i0["ms".concat(e0)]="MS".concat(_e),i0["O".concat(e0)]="o".concat(_e.toLowerCase()),i0}function getVendorPrefixes(e0,_e){var i0={animationend:makePrefixMap("Animation","AnimationEnd"),transitionend:makePrefixMap("Transition","TransitionEnd")};return e0&&("AnimationEvent"in _e||delete i0.animationend.animation,"TransitionEvent"in _e||delete i0.transitionend.transition),i0}var vendorPrefixes=getVendorPrefixes(canUseDom(),typeof window<"u"?window:{}),style={};if(canUseDom()){var _document$createEleme=document.createElement("div");style=_document$createEleme.style}var prefixedEventNames={};function getVendorPrefixedEventName(e0){if(prefixedEventNames[e0])return prefixedEventNames[e0];var _e=vendorPrefixes[e0];if(_e)for(var i0=Object.keys(_e),r0=i0.length,t0=0;t0<r0;t0+=1){var n0=i0[t0];if(Object.prototype.hasOwnProperty.call(_e,n0)&&n0 in style)return prefixedEventNames[e0]=_e[n0],prefixedEventNames[e0]}return""}var internalAnimationEndName=getVendorPrefixedEventName("animationend"),internalTransitionEndName=getVendorPrefixedEventName("transitionend"),supportTransition=!!(internalAnimationEndName&&internalTransitionEndName),animationEndName=internalAnimationEndName||"animationend",transitionEndName=internalTransitionEndName||"transitionend";function getTransitionName(e0,_e){if(!e0)return null;if(_typeof$1(e0)==="object"){var i0=_e.replace(/-\w/g,function(r0){return r0[1].toUpperCase()});return e0[i0]}return"".concat(e0,"-").concat(_e)}const useDomMotionEvents=function(e0){var _e=reactExports.useRef();function i0(t0){t0&&(t0.removeEventListener(transitionEndName,e0),t0.removeEventListener(animationEndName,e0))}function r0(t0){_e.current&&_e.current!==t0&&i0(_e.current),t0&&t0!==_e.current&&(t0.addEventListener(transitionEndName,e0),t0.addEventListener(animationEndName,e0),_e.current=t0)}return reactExports.useEffect(function(){return function(){i0(_e.current)}},[]),[r0,i0]};var useIsomorphicLayoutEffect$3=canUseDom()?reactExports.useLayoutEffect:reactExports.useEffect;const useNextFrame=function(){var e0=reactExports.useRef(null);function _e(){wrapperRaf.cancel(e0.current)}function i0(r0){var t0=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;_e();var n0=wrapperRaf(function(){t0<=1?r0({isCanceled:function(){return n0!==e0.current}}):i0(r0,t0-1)});e0.current=n0}return reactExports.useEffect(function(){return function(){_e()}},[]),[i0,_e]};var FULL_STEP_QUEUE=[STEP_PREPARE,STEP_START,STEP_ACTIVE,STEP_ACTIVATED],SIMPLE_STEP_QUEUE=[STEP_PREPARE,STEP_PREPARED],SkipStep=!1,DoStep=!0;function isActive(e0){return e0===STEP_ACTIVE||e0===STEP_ACTIVATED}const useStepQueue=function(e0,_e,i0){var r0=useSafeState(STEP_NONE),t0=_slicedToArray$1(r0,2),n0=t0[0],s0=t0[1],o0=useNextFrame(),a0=_slicedToArray$1(o0,2),f0=a0[0],l0=a0[1];function u0(){s0(STEP_PREPARE,!0)}var A0=_e?SIMPLE_STEP_QUEUE:FULL_STEP_QUEUE;return useIsomorphicLayoutEffect$3(function(){if(n0!==STEP_NONE&&n0!==STEP_ACTIVATED){var c0=A0.indexOf(n0),k0=A0[c0+1],d0=i0(n0);d0===SkipStep?s0(k0,!0):k0&&f0(function(h0){function b0(){h0.isCanceled()||s0(k0,!0)}d0===!0?b0():Promise.resolve(d0).then(b0)})}},[e0,n0]),reactExports.useEffect(function(){return function(){l0()}},[]),[u0,n0]};function useStatus(e0,_e,i0,r0){var t0=r0.motionEnter,n0=t0===void 0?!0:t0,s0=r0.motionAppear,o0=s0===void 0?!0:s0,a0=r0.motionLeave,f0=a0===void 0?!0:a0,l0=r0.motionDeadline,u0=r0.motionLeaveImmediately,A0=r0.onAppearPrepare,c0=r0.onEnterPrepare,k0=r0.onLeavePrepare,d0=r0.onAppearStart,h0=r0.onEnterStart,b0=r0.onLeaveStart,p0=r0.onAppearActive,m0=r0.onEnterActive,g0=r0.onLeaveActive,v0=r0.onAppearEnd,x0=r0.onEnterEnd,w0=r0.onLeaveEnd,_0=r0.onVisibleChanged,y0=useSafeState(),S0=_slicedToArray$1(y0,2),B0=S0[0],I0=S0[1],T0=useSyncState(STATUS_NONE),R0=_slicedToArray$1(T0,2),E0=R0[0],C0=R0[1],G0=useSafeState(null),F0=_slicedToArray$1(G0,2),M0=F0[0],j0=F0[1],D0=E0(),$0=reactExports.useRef(!1),X0=reactExports.useRef(null);function Z0(){return i0()}var N0=reactExports.useRef(!1);function Q0(){C0(STATUS_NONE),j0(null,!0)}var z0=useEvent$1(function(P0){var V0=E0();if(V0!==STATUS_NONE){var O0=Z0();if(!(P0&&!P0.deadline&&P0.target!==O0)){var _i=N0.current,U0;V0===STATUS_APPEAR&&_i?U0=v0==null?void 0:v0(O0,P0):V0===STATUS_ENTER&&_i?U0=x0==null?void 0:x0(O0,P0):V0===STATUS_LEAVE&&_i&&(U0=w0==null?void 0:w0(O0,P0)),_i&&U0!==!1&&Q0()}}}),K0=useDomMotionEvents(z0),H0=_slicedToArray$1(K0,1),J0=H0[0],Y0=function(V0){switch(V0){case STATUS_APPEAR:return _defineProperty(_defineProperty(_defineProperty({},STEP_PREPARE,A0),STEP_START,d0),STEP_ACTIVE,p0);case STATUS_ENTER:return _defineProperty(_defineProperty(_defineProperty({},STEP_PREPARE,c0),STEP_START,h0),STEP_ACTIVE,m0);case STATUS_LEAVE:return _defineProperty(_defineProperty(_defineProperty({},STEP_PREPARE,k0),STEP_START,b0),STEP_ACTIVE,g0);default:return{}}},e2=reactExports.useMemo(function(){return Y0(D0)},[D0]),s2=useStepQueue(D0,!e0,function(P0){if(P0===STEP_PREPARE){var V0=e2[STEP_PREPARE];return V0?V0(Z0()):SkipStep}if(k2 in e2){var O0;j0(((O0=e2[k2])===null||O0===void 0?void 0:O0.call(e2,Z0(),null))||null)}return k2===STEP_ACTIVE&&D0!==STATUS_NONE&&(J0(Z0()),l0>0&&(clearTimeout(X0.current),X0.current=setTimeout(function(){z0({deadline:!0})},l0))),k2===STEP_PREPARED&&Q0(),DoStep}),u2=_slicedToArray$1(s2,2),A2=u2[0],k2=u2[1],b2=isActive(k2);N0.current=b2;var v2=reactExports.useRef(null);useIsomorphicLayoutEffect$3(function(){if(!($0.current&&v2.current===_e)){I0(_e);var P0=$0.current;$0.current=!0;var V0;!P0&&_e&&o0&&(V0=STATUS_APPEAR),P0&&_e&&n0&&(V0=STATUS_ENTER),(P0&&!_e&&f0||!P0&&u0&&!_e&&f0)&&(V0=STATUS_LEAVE);var O0=Y0(V0);V0&&(e0||O0[STEP_PREPARE])?(C0(V0),A2()):C0(STATUS_NONE),v2.current=_e}},[_e]),reactExports.useEffect(function(){(D0===STATUS_APPEAR&&!o0||D0===STATUS_ENTER&&!n0||D0===STATUS_LEAVE&&!f0)&&C0(STATUS_NONE)},[o0,n0,f0]),reactExports.useEffect(function(){return function(){$0.current=!1,clearTimeout(X0.current)}},[]);var x2=reactExports.useRef(!1);reactExports.useEffect(function(){B0&&(x2.current=!0),B0!==void 0&&D0===STATUS_NONE&&((x2.current||B0)&&(_0==null||_0(B0)),x2.current=!0)},[B0,D0]);var p2=M0;return e2[STEP_PREPARE]&&k2===STEP_START&&(p2=_objectSpread2$5({transition:"none"},p2)),[D0,k2,p2,B0??_e]}function genCSSMotion(e0){var _e=e0;_typeof$1(e0)==="object"&&(_e=e0.transitionSupport);function i0(t0,n0){return!!(t0.motionName&&_e&&n0!==!1)}var r0=reactExports.forwardRef(function(t0,n0){var s0=t0.visible,o0=s0===void 0?!0:s0,a0=t0.removeOnLeave,f0=a0===void 0?!0:a0,l0=t0.forceRender,u0=t0.children,A0=t0.motionName,c0=t0.leavedClassName,k0=t0.eventProps,d0=reactExports.useContext(Context),h0=d0.motion,b0=i0(t0,h0),p0=reactExports.useRef(),m0=reactExports.useRef();function g0(){try{return p0.current instanceof HTMLElement?p0.current:findDOMNode(m0.current)}catch{return null}}var v0=useStatus(b0,o0,g0,t0),x0=_slicedToArray$1(v0,4),w0=x0[0],_0=x0[1],y0=x0[2],S0=x0[3],B0=reactExports.useRef(S0);S0&&(B0.current=!0);var I0=reactExports.useCallback(function(F0){p0.current=F0,fillRef(n0,F0)},[n0]),T0,R0=_objectSpread2$5(_objectSpread2$5({},k0),{},{visible:o0});if(!u0)T0=null;else if(w0===STATUS_NONE)S0?T0=u0(_objectSpread2$5({},R0),I0):!f0&&B0.current&&c0?T0=u0(_objectSpread2$5(_objectSpread2$5({},R0),{},{className:c0}),I0):l0||!f0&&!c0?T0=u0(_objectSpread2$5(_objectSpread2$5({},R0),{},{style:{display:"none"}}),I0):T0=null;else{var E0;_0===STEP_PREPARE?E0="prepare":isActive(_0)?E0="active":_0===STEP_START&&(E0="start");var C0=getTransitionName(A0,"".concat(w0,"-").concat(E0));T0=u0(_objectSpread2$5(_objectSpread2$5({},R0),{},{className:classNames(getTransitionName(A0,w0),_defineProperty(_defineProperty({},C0,C0&&E0),A0,typeof A0=="string")),style:y0}),I0)}if(reactExports.isValidElement(T0)&&supportRef(T0)){var G0=getNodeRef(T0);G0||(T0=reactExports.cloneElement(T0,{ref:I0}))}return reactExports.createElement(DomWrapper,{ref:m0},T0)});return r0.displayName="CSSMotion",r0}const CSSMotion=genCSSMotion(supportTransition);var STATUS_ADD="add",STATUS_KEEP="keep",STATUS_REMOVE="remove",STATUS_REMOVED="removed";function wrapKeyToObject(e0){var _e;return e0&&_typeof$1(e0)==="object"&&"key"in e0?_e=e0:_e={key:e0},_objectSpread2$5(_objectSpread2$5({},_e),{},{key:String(_e.key)})}function parseKeys(){var e0=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e0.map(wrapKeyToObject)}function diffKeys(){var e0=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],_e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i0=[],r0=0,t0=_e.length,n0=parseKeys(e0),s0=parseKeys(_e);n0.forEach(function(f0){for(var l0=!1,u0=r0;u0<t0;u0+=1){var A0=s0[u0];if(A0.key===f0.key){r0<u0&&(i0=i0.concat(s0.slice(r0,u0).map(function(c0){return _objectSpread2$5(_objectSpread2$5({},c0),{},{status:STATUS_ADD})})),r0=u0),i0.push(_objectSpread2$5(_objectSpread2$5({},A0),{},{status:STATUS_KEEP})),r0+=1,l0=!0;break}}l0||i0.push(_objectSpread2$5(_objectSpread2$5({},f0),{},{status:STATUS_REMOVE}))}),r0<t0&&(i0=i0.concat(s0.slice(r0).map(function(f0){return _objectSpread2$5(_objectSpread2$5({},f0),{},{status:STATUS_ADD})})));var o0={};i0.forEach(function(f0){var l0=f0.key;o0[l0]=(o0[l0]||0)+1});var a0=Object.keys(o0).filter(function(f0){return o0[f0]>1});return a0.forEach(function(f0){i0=i0.filter(function(l0){var u0=l0.key,A0=l0.status;return u0!==f0||A0!==STATUS_REMOVE}),i0.forEach(function(l0){l0.key===f0&&(l0.status=STATUS_KEEP)})}),i0}var _excluded=["component","children","onVisibleChanged","onAllRemoved"],_excluded2=["status"],MOTION_PROP_NAMES=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function genCSSMotionList(e0){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:CSSMotion,i0=function(r0){_inherits(n0,r0);var t0=_createSuper(n0);function n0(){var s0;_classCallCheck(this,n0);for(var o0=arguments.length,a0=new Array(o0),f0=0;f0<o0;f0++)a0[f0]=arguments[f0];return s0=t0.call.apply(t0,[this].concat(a0)),_defineProperty(_assertThisInitialized(s0),"state",{keyEntities:[]}),_defineProperty(_assertThisInitialized(s0),"removeKey",function(l0){s0.setState(function(u0){var A0=u0.keyEntities.map(function(c0){return c0.key!==l0?c0:_objectSpread2$5(_objectSpread2$5({},c0),{},{status:STATUS_REMOVED})});return{keyEntities:A0}},function(){var u0=s0.state.keyEntities,A0=u0.filter(function(c0){var k0=c0.status;return k0!==STATUS_REMOVED}).length;A0===0&&s0.props.onAllRemoved&&s0.props.onAllRemoved()})}),s0}return _createClass(n0,[{key:"render",value:function(){var o0=this,a0=this.state.keyEntities,f0=this.props,l0=f0.component,u0=f0.children,A0=f0.onVisibleChanged;f0.onAllRemoved;var c0=_objectWithoutProperties(f0,_excluded),k0=l0||reactExports.Fragment,d0={};return MOTION_PROP_NAMES.forEach(function(h0){d0[h0]=c0[h0],delete c0[h0]}),delete c0.keys,reactExports.createElement(k0,c0,a0.map(function(h0,b0){var p0=h0.status,m0=_objectWithoutProperties(h0,_excluded2),g0=p0===STATUS_ADD||p0===STATUS_KEEP;return reactExports.createElement(_e,_extends$1({},d0,{key:m0.key,visible:g0,eventProps:m0,onVisibleChanged:function(x0){A0==null||A0(x0,{key:m0.key}),x0||o0.removeKey(m0.key)}}),function(v0,x0){return u0(_objectSpread2$5(_objectSpread2$5({},v0),{},{index:b0}),x0)})}))}}],[{key:"getDerivedStateFromProps",value:function(o0,a0){var f0=o0.keys,l0=a0.keyEntities,u0=parseKeys(f0),A0=diffKeys(l0,u0);return{keyEntities:A0.filter(function(c0){var k0=l0.find(function(d0){var h0=d0.key;return c0.key===h0});return!(k0&&k0.status===STATUS_REMOVED&&c0.status===STATUS_REMOVE)})}}}]),n0}(reactExports.Component);return _defineProperty(i0,"defaultProps",{component:"div"}),i0}genCSSMotionList(supportTransition);const MotionCacheContext=reactExports.createContext(!0);function MotionWrapper(e0){const _e=reactExports.useContext(MotionCacheContext),{children:i0}=e0,[,r0]=useToken(),{motion:t0}=r0,n0=reactExports.useRef(!1);return n0.current||(n0.current=_e!==t0),n0.current?reactExports.createElement(MotionCacheContext.Provider,{value:t0},reactExports.createElement(MotionProvider,{motion:t0},i0)):i0}const PropWarning=()=>null;var __rest$1=function(e0,_e){var i0={};for(var r0 in e0)Object.prototype.hasOwnProperty.call(e0,r0)&&_e.indexOf(r0)<0&&(i0[r0]=e0[r0]);if(e0!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t0=0,r0=Object.getOwnPropertySymbols(e0);t0<r0.length;t0++)_e.indexOf(r0[t0])<0&&Object.prototype.propertyIsEnumerable.call(e0,r0[t0])&&(i0[r0[t0]]=e0[r0[t0]]);return i0};const PASSED_PROPS=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let globalPrefixCls;function getGlobalPrefixCls(){return globalPrefixCls||defaultPrefixCls}function isLegacyTheme(e0){return Object.keys(e0).some(_e=>_e.endsWith("Color"))}const setGlobalConfig=e0=>{const{prefixCls:_e,iconPrefixCls:i0,theme:r0,holderRender:t0}=e0;_e!==void 0&&(globalPrefixCls=_e),r0&&isLegacyTheme(r0)&®isterTheme(getGlobalPrefixCls(),r0)},ProviderChildren=e0=>{const{children:_e,csp:i0,autoInsertSpaceInButton:r0,alert:t0,anchor:n0,form:s0,locale:o0,componentSize:a0,direction:f0,space:l0,splitter:u0,virtual:A0,dropdownMatchSelectWidth:c0,popupMatchSelectWidth:k0,popupOverflow:d0,legacyLocale:h0,parentContext:b0,iconPrefixCls:p0,theme:m0,componentDisabled:g0,segmented:v0,statistic:x0,spin:w0,calendar:_0,carousel:y0,cascader:S0,collapse:B0,typography:I0,checkbox:T0,descriptions:R0,divider:E0,drawer:C0,skeleton:G0,steps:F0,image:M0,layout:j0,list:D0,mentions:$0,modal:X0,progress:Z0,result:N0,slider:Q0,breadcrumb:z0,menu:K0,pagination:H0,input:J0,textArea:Y0,empty:e2,badge:s2,radio:u2,rate:A2,switch:k2,transfer:b2,avatar:v2,message:x2,tag:p2,table:P0,card:V0,tabs:O0,timeline:_i,timePicker:U0,upload:L0,notification:q0,tree:r2,colorPicker:f2,datePicker:d2,rangePicker:a2,flex:t2,wave:E2,dropdown:O2,warning:X2,tour:Xr,tooltip:br,popover:$r,popconfirm:Cr,floatButton:nt,floatButtonGroup:_2,variant:R2,inputNumber:S2,treeSelect:Q2}=e0,T2=reactExports.useCallback((m2,y2)=>{const{prefixCls:L2}=e0;if(y2)return y2;const z2=L2||b0.getPrefixCls("");return m2?`${z2}-${m2}`:z2},[b0.getPrefixCls,e0.prefixCls]),B2=p0||b0.iconPrefixCls||defaultIconPrefixCls,I2=i0||b0.csp;useResetIconStyle(B2,I2);const U2=useTheme(m0,b0.theme,{prefixCls:T2("")}),G2={csp:I2,autoInsertSpaceInButton:r0,alert:t0,anchor:n0,locale:o0||h0,direction:f0,space:l0,splitter:u0,virtual:A0,popupMatchSelectWidth:k0??c0,popupOverflow:d0,getPrefixCls:T2,iconPrefixCls:B2,theme:U2,segmented:v0,statistic:x0,spin:w0,calendar:_0,carousel:y0,cascader:S0,collapse:B0,typography:I0,checkbox:T0,descriptions:R0,divider:E0,drawer:C0,skeleton:G0,steps:F0,image:M0,input:J0,textArea:Y0,layout:j0,list:D0,mentions:$0,modal:X0,progress:Z0,result:N0,slider:Q0,breadcrumb:z0,menu:K0,pagination:H0,empty:e2,badge:s2,radio:u2,rate:A2,switch:k2,transfer:b2,avatar:v2,message:x2,tag:p2,table:P0,card:V0,tabs:O0,timeline:_i,timePicker:U0,upload:L0,notification:q0,tree:r2,colorPicker:f2,datePicker:d2,rangePicker:a2,flex:t2,wave:E2,dropdown:O2,warning:X2,tour:Xr,tooltip:br,popover:$r,popconfirm:Cr,floatButton:nt,floatButtonGroup:_2,variant:R2,inputNumber:S2,treeSelect:Q2},D2=Object.assign({},b0);Object.keys(G2).forEach(m2=>{G2[m2]!==void 0&&(D2[m2]=G2[m2])}),PASSED_PROPS.forEach(m2=>{const y2=e0[m2];y2&&(D2[m2]=y2)}),typeof r0<"u"&&(D2.button=Object.assign({autoInsertSpace:r0},D2.button));const N2=useMemo$1(()=>D2,D2,(m2,y2)=>{const L2=Object.keys(m2),z2=Object.keys(y2);return L2.length!==z2.length||L2.some(Kr=>m2[Kr]!==y2[Kr])}),{layer:mr}=reactExports.useContext(StyleContext),Rr=reactExports.useMemo(()=>({prefixCls:B2,csp:I2,layer:mr?"antd":void 0}),[B2,I2,mr]);let w2=reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(PropWarning,{dropdownMatchSelectWidth:c0}),_e);const sr=reactExports.useMemo(()=>{var m2,y2,L2,z2;return merge$1(((m2=localeValues$5.Form)===null||m2===void 0?void 0:m2.defaultValidateMessages)||{},((L2=(y2=N2.locale)===null||y2===void 0?void 0:y2.Form)===null||L2===void 0?void 0:L2.defaultValidateMessages)||{},((z2=N2.form)===null||z2===void 0?void 0:z2.validateMessages)||{},(s0==null?void 0:s0.validateMessages)||{})},[N2,s0==null?void 0:s0.validateMessages]);Object.keys(sr).length>0&&(w2=reactExports.createElement(ValidateMessagesContext.Provider,{value:sr},w2)),o0&&(w2=reactExports.createElement(LocaleProvider,{locale:o0,_ANT_MARK__:ANT_MARK},w2)),w2=reactExports.createElement(IconContext.Provider,{value:Rr},w2),a0&&(w2=reactExports.createElement(SizeContextProvider,{size:a0},w2)),w2=reactExports.createElement(MotionWrapper,null,w2);const gr=reactExports.useMemo(()=>{const m2=U2||{},{algorithm:y2,token:L2,components:z2,cssVar:Kr}=m2,c1=__rest$1(m2,["algorithm","token","components","cssVar"]),yt=y2&&(!Array.isArray(y2)||y2.length>0)?createTheme(y2):defaultTheme,st={};Object.entries(z2||{}).forEach(([k1,d1])=>{const er=Object.assign({},d1);"algorithm"in er&&(er.algorithm===!0?er.theme=yt:(Array.isArray(er.algorithm)||typeof er.algorithm=="function")&&(er.theme=createTheme(er.algorithm)),delete er.algorithm),st[k1]=er});const Et=Object.assign(Object.assign({},seedToken),L2);return Object.assign(Object.assign({},c1),{theme:yt,token:Et,components:st,override:Object.assign({override:Et},st),cssVar:Kr})},[U2]);return m0&&(w2=reactExports.createElement(DesignTokenContext.Provider,{value:gr},w2)),N2.warning&&(w2=reactExports.createElement(WarningContext.Provider,{value:N2.warning},w2)),g0!==void 0&&(w2=reactExports.createElement(DisabledContextProvider,{disabled:g0},w2)),reactExports.createElement(ConfigContext.Provider,{value:N2},w2)},ConfigProvider=e0=>{const _e=reactExports.useContext(ConfigContext),i0=reactExports.useContext(LocaleContext);return reactExports.createElement(ProviderChildren,Object.assign({parentContext:_e,legacyLocale:i0},e0))};ConfigProvider.ConfigContext=ConfigContext;ConfigProvider.SizeContext=SizeContext;ConfigProvider.config=setGlobalConfig;ConfigProvider.useConfig=useConfig;Object.defineProperty(ConfigProvider,"SizeContext",{get:()=>SizeContext});const useSize=e0=>{const _e=React$4.useContext(SizeContext);return React$4.useMemo(()=>e0?typeof e0=="string"?e0??_e:typeof e0=="function"?e0(_e):_e:_e,[e0,_e])};var dayjs_min={exports:{}},hasRequiredDayjs_min;function requireDayjs_min(){return hasRequiredDayjs_min||(hasRequiredDayjs_min=1,function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal$1,function(){var i0=1e3,r0=6e4,t0=36e5,n0="millisecond",s0="second",o0="minute",a0="hour",f0="day",l0="week",u0="month",A0="quarter",c0="year",k0="date",d0="Invalid Date",h0=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b0=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p0={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R0){var E0=["th","st","nd","rd"],C0=R0%100;return"["+R0+(E0[(C0-20)%10]||E0[C0]||E0[0])+"]"}},m0=function(R0,E0,C0){var G0=String(R0);return!G0||G0.length>=E0?R0:""+Array(E0+1-G0.length).join(C0)+R0},g0={s:m0,z:function(R0){var E0=-R0.utcOffset(),C0=Math.abs(E0),G0=Math.floor(C0/60),F0=C0%60;return(E0<=0?"+":"-")+m0(G0,2,"0")+":"+m0(F0,2,"0")},m:function R0(E0,C0){if(E0.date()<C0.date())return-R0(C0,E0);var G0=12*(C0.year()-E0.year())+(C0.month()-E0.month()),F0=E0.clone().add(G0,u0),M0=C0-F0<0,j0=E0.clone().add(G0+(M0?-1:1),u0);return+(-(G0+(C0-F0)/(M0?F0-j0:j0-F0))||0)},a:function(R0){return R0<0?Math.ceil(R0)||0:Math.floor(R0)},p:function(R0){return{M:u0,y:c0,w:l0,d:f0,D:k0,h:a0,m:o0,s:s0,ms:n0,Q:A0}[R0]||String(R0||"").toLowerCase().replace(/s$/,"")},u:function(R0){return R0===void 0}},v0="en",x0={};x0[v0]=p0;var w0="$isDayjsObject",_0=function(R0){return R0 instanceof I0||!(!R0||!R0[w0])},y0=function R0(E0,C0,G0){var F0;if(!E0)return v0;if(typeof E0=="string"){var M0=E0.toLowerCase();x0[M0]&&(F0=M0),C0&&(x0[M0]=C0,F0=M0);var j0=E0.split("-");if(!F0&&j0.length>1)return R0(j0[0])}else{var D0=E0.name;x0[D0]=E0,F0=D0}return!G0&&F0&&(v0=F0),F0||!G0&&v0},S0=function(R0,E0){if(_0(R0))return R0.clone();var C0=typeof E0=="object"?E0:{};return C0.date=R0,C0.args=arguments,new I0(C0)},B0=g0;B0.l=y0,B0.i=_0,B0.w=function(R0,E0){return S0(R0,{locale:E0.$L,utc:E0.$u,x:E0.$x,$offset:E0.$offset})};var I0=function(){function R0(C0){this.$L=y0(C0.locale,null,!0),this.parse(C0),this.$x=this.$x||C0.x||{},this[w0]=!0}var E0=R0.prototype;return E0.parse=function(C0){this.$d=function(G0){var F0=G0.date,M0=G0.utc;if(F0===null)return new Date(NaN);if(B0.u(F0))return new Date;if(F0 instanceof Date)return new Date(F0);if(typeof F0=="string"&&!/Z$/i.test(F0)){var j0=F0.match(h0);if(j0){var D0=j0[2]-1||0,$0=(j0[7]||"0").substring(0,3);return M0?new Date(Date.UTC(j0[1],D0,j0[3]||1,j0[4]||0,j0[5]||0,j0[6]||0,$0)):new Date(j0[1],D0,j0[3]||1,j0[4]||0,j0[5]||0,j0[6]||0,$0)}}return new Date(F0)}(C0),this.init()},E0.init=function(){var C0=this.$d;this.$y=C0.getFullYear(),this.$M=C0.getMonth(),this.$D=C0.getDate(),this.$W=C0.getDay(),this.$H=C0.getHours(),this.$m=C0.getMinutes(),this.$s=C0.getSeconds(),this.$ms=C0.getMilliseconds()},E0.$utils=function(){return B0},E0.isValid=function(){return this.$d.toString()!==d0},E0.isSame=function(C0,G0){var F0=S0(C0);return this.startOf(G0)<=F0&&F0<=this.endOf(G0)},E0.isAfter=function(C0,G0){return S0(C0)<this.startOf(G0)},E0.isBefore=function(C0,G0){return this.endOf(G0)<S0(C0)},E0.$g=function(C0,G0,F0){return B0.u(C0)?this[G0]:this.set(F0,C0)},E0.unix=function(){return Math.floor(this.valueOf()/1e3)},E0.valueOf=function(){return this.$d.getTime()},E0.startOf=function(C0,G0){var F0=this,M0=!!B0.u(G0)||G0,j0=B0.p(C0),D0=function(H0,J0){var Y0=B0.w(F0.$u?Date.UTC(F0.$y,J0,H0):new Date(F0.$y,J0,H0),F0);return M0?Y0:Y0.endOf(f0)},$0=function(H0,J0){return B0.w(F0.toDate()[H0].apply(F0.toDate("s"),(M0?[0,0,0,0]:[23,59,59,999]).slice(J0)),F0)},X0=this.$W,Z0=this.$M,N0=this.$D,Q0="set"+(this.$u?"UTC":"");switch(j0){case c0:return M0?D0(1,0):D0(31,11);case u0:return M0?D0(1,Z0):D0(0,Z0+1);case l0:var z0=this.$locale().weekStart||0,K0=(X0<z0?X0+7:X0)-z0;return D0(M0?N0-K0:N0+(6-K0),Z0);case f0:case k0:return $0(Q0+"Hours",0);case a0:return $0(Q0+"Minutes",1);case o0:return $0(Q0+"Seconds",2);case s0:return $0(Q0+"Milliseconds",3);default:return this.clone()}},E0.endOf=function(C0){return this.startOf(C0,!1)},E0.$set=function(C0,G0){var F0,M0=B0.p(C0),j0="set"+(this.$u?"UTC":""),D0=(F0={},F0[f0]=j0+"Date",F0[k0]=j0+"Date",F0[u0]=j0+"Month",F0[c0]=j0+"FullYear",F0[a0]=j0+"Hours",F0[o0]=j0+"Minutes",F0[s0]=j0+"Seconds",F0[n0]=j0+"Milliseconds",F0)[M0],$0=M0===f0?this.$D+(G0-this.$W):G0;if(M0===u0||M0===c0){var X0=this.clone().set(k0,1);X0.$d[D0]($0),X0.init(),this.$d=X0.set(k0,Math.min(this.$D,X0.daysInMonth())).$d}else D0&&this.$d[D0]($0);return this.init(),this},E0.set=function(C0,G0){return this.clone().$set(C0,G0)},E0.get=function(C0){return this[B0.p(C0)]()},E0.add=function(C0,G0){var F0,M0=this;C0=Number(C0);var j0=B0.p(G0),D0=function(Z0){var N0=S0(M0);return B0.w(N0.date(N0.date()+Math.round(Z0*C0)),M0)};if(j0===u0)return this.set(u0,this.$M+C0);if(j0===c0)return this.set(c0,this.$y+C0);if(j0===f0)return D0(1);if(j0===l0)return D0(7);var $0=(F0={},F0[o0]=r0,F0[a0]=t0,F0[s0]=i0,F0)[j0]||1,X0=this.$d.getTime()+C0*$0;return B0.w(X0,this)},E0.subtract=function(C0,G0){return this.add(-1*C0,G0)},E0.format=function(C0){var G0=this,F0=this.$locale();if(!this.isValid())return F0.invalidDate||d0;var M0=C0||"YYYY-MM-DDTHH:mm:ssZ",j0=B0.z(this),D0=this.$H,$0=this.$m,X0=this.$M,Z0=F0.weekdays,N0=F0.months,Q0=F0.meridiem,z0=function(J0,Y0,e2,s2){return J0&&(J0[Y0]||J0(G0,M0))||e2[Y0].slice(0,s2)},K0=function(J0){return B0.s(D0%12||12,J0,"0")},H0=Q0||function(J0,Y0,e2){var s2=J0<12?"AM":"PM";return e2?s2.toLowerCase():s2};return M0.replace(b0,function(J0,Y0){return Y0||function(e2){switch(e2){case"YY":return String(G0.$y).slice(-2);case"YYYY":return B0.s(G0.$y,4,"0");case"M":return X0+1;case"MM":return B0.s(X0+1,2,"0");case"MMM":return z0(F0.monthsShort,X0,N0,3);case"MMMM":return z0(N0,X0);case"D":return G0.$D;case"DD":return B0.s(G0.$D,2,"0");case"d":return String(G0.$W);case"dd":return z0(F0.weekdaysMin,G0.$W,Z0,2);case"ddd":return z0(F0.weekdaysShort,G0.$W,Z0,3);case"dddd":return Z0[G0.$W];case"H":return String(D0);case"HH":return B0.s(D0,2,"0");case"h":return K0(1);case"hh":return K0(2);case"a":return H0(D0,$0,!0);case"A":return H0(D0,$0,!1);case"m":return String($0);case"mm":return B0.s($0,2,"0");case"s":return String(G0.$s);case"ss":return B0.s(G0.$s,2,"0");case"SSS":return B0.s(G0.$ms,3,"0");case"Z":return j0}return null}(J0)||j0.replace(":","")})},E0.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E0.diff=function(C0,G0,F0){var M0,j0=this,D0=B0.p(G0),$0=S0(C0),X0=($0.utcOffset()-this.utcOffset())*r0,Z0=this-$0,N0=function(){return B0.m(j0,$0)};switch(D0){case c0:M0=N0()/12;break;case u0:M0=N0();break;case A0:M0=N0()/3;break;case l0:M0=(Z0-X0)/6048e5;break;case f0:M0=(Z0-X0)/864e5;break;case a0:M0=Z0/t0;break;case o0:M0=Z0/r0;break;case s0:M0=Z0/i0;break;default:M0=Z0}return F0?M0:B0.a(M0)},E0.daysInMonth=function(){return this.endOf(u0).$D},E0.$locale=function(){return x0[this.$L]},E0.locale=function(C0,G0){if(!C0)return this.$L;var F0=this.clone(),M0=y0(C0,G0,!0);return M0&&(F0.$L=M0),F0},E0.clone=function(){return B0.w(this.$d,this)},E0.toDate=function(){return new Date(this.valueOf())},E0.toJSON=function(){return this.isValid()?this.toISOString():null},E0.toISOString=function(){return this.$d.toISOString()},E0.toString=function(){return this.$d.toUTCString()},R0}(),T0=I0.prototype;return S0.prototype=T0,[["$ms",n0],["$s",s0],["$m",o0],["$H",a0],["$W",f0],["$M",u0],["$y",c0],["$D",k0]].forEach(function(R0){T0[R0[1]]=function(E0){return this.$g(E0,R0[0],R0[1])}}),S0.extend=function(R0,E0){return R0.$i||(R0(E0,I0,S0),R0.$i=!0),S0},S0.locale=y0,S0.isDayjs=_0,S0.unix=function(R0){return S0(1e3*R0)},S0.en=x0[v0],S0.Ls=x0,S0.p={},S0})}(dayjs_min)),dayjs_min.exports}var dayjs_minExports=requireDayjs_min();const dayjs=getDefaultExportFromCjs$1(dayjs_minExports);var customParseFormat$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal$1,function(){var i0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r0=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,t0=/\d/,n0=/\d\d/,s0=/\d\d?/,o0=/\d*[^-_:/,()\s\d]+/,a0={},f0=function(h0){return(h0=+h0)+(h0>68?1900:2e3)},l0=function(h0){return function(b0){this[h0]=+b0}},u0=[/[+-]\d\d:?(\d\d)?|Z/,function(h0){(this.zone||(this.zone={})).offset=function(b0){if(!b0||b0==="Z")return 0;var p0=b0.match(/([+-]|\d\d)/g),m0=60*p0[1]+(+p0[2]||0);return m0===0?0:p0[0]==="+"?-m0:m0}(h0)}],A0=function(h0){var b0=a0[h0];return b0&&(b0.indexOf?b0:b0.s.concat(b0.f))},c0=function(h0,b0){var p0,m0=a0.meridiem;if(m0){for(var g0=1;g0<=24;g0+=1)if(h0.indexOf(m0(g0,0,b0))>-1){p0=g0>12;break}}else p0=h0===(b0?"pm":"PM");return p0},k0={A:[o0,function(h0){this.afternoon=c0(h0,!1)}],a:[o0,function(h0){this.afternoon=c0(h0,!0)}],Q:[t0,function(h0){this.month=3*(h0-1)+1}],S:[t0,function(h0){this.milliseconds=100*+h0}],SS:[n0,function(h0){this.milliseconds=10*+h0}],SSS:[/\d{3}/,function(h0){this.milliseconds=+h0}],s:[s0,l0("seconds")],ss:[s0,l0("seconds")],m:[s0,l0("minutes")],mm:[s0,l0("minutes")],H:[s0,l0("hours")],h:[s0,l0("hours")],HH:[s0,l0("hours")],hh:[s0,l0("hours")],D:[s0,l0("day")],DD:[n0,l0("day")],Do:[o0,function(h0){var b0=a0.ordinal,p0=h0.match(/\d+/);if(this.day=p0[0],b0)for(var m0=1;m0<=31;m0+=1)b0(m0).replace(/\[|\]/g,"")===h0&&(this.day=m0)}],w:[s0,l0("week")],ww:[n0,l0("week")],M:[s0,l0("month")],MM:[n0,l0("month")],MMM:[o0,function(h0){var b0=A0("months"),p0=(A0("monthsShort")||b0.map(function(m0){return m0.slice(0,3)})).indexOf(h0)+1;if(p0<1)throw new Error;this.month=p0%12||p0}],MMMM:[o0,function(h0){var b0=A0("months").indexOf(h0)+1;if(b0<1)throw new Error;this.month=b0%12||b0}],Y:[/[+-]?\d+/,l0("year")],YY:[n0,function(h0){this.year=f0(h0)}],YYYY:[/\d{4}/,l0("year")],Z:u0,ZZ:u0};function d0(h0){var b0,p0;b0=h0,p0=a0&&a0.formats;for(var m0=(h0=b0.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S0,B0,I0){var T0=I0&&I0.toUpperCase();return B0||p0[I0]||i0[I0]||p0[T0].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(R0,E0,C0){return E0||C0.slice(1)})})).match(r0),g0=m0.length,v0=0;v0<g0;v0+=1){var x0=m0[v0],w0=k0[x0],_0=w0&&w0[0],y0=w0&&w0[1];m0[v0]=y0?{regex:_0,parser:y0}:x0.replace(/^\[|\]$/g,"")}return function(S0){for(var B0={},I0=0,T0=0;I0<g0;I0+=1){var R0=m0[I0];if(typeof R0=="string")T0+=R0.length;else{var E0=R0.regex,C0=R0.parser,G0=S0.slice(T0),F0=E0.exec(G0)[0];C0.call(B0,F0),S0=S0.replace(F0,"")}}return function(M0){var j0=M0.afternoon;if(j0!==void 0){var D0=M0.hours;j0?D0<12&&(M0.hours+=12):D0===12&&(M0.hours=0),delete M0.afternoon}}(B0),B0}}return function(h0,b0,p0){p0.p.customParseFormat=!0,h0&&h0.parseTwoDigitYear&&(f0=h0.parseTwoDigitYear);var m0=b0.prototype,g0=m0.parse;m0.parse=function(v0){var x0=v0.date,w0=v0.utc,_0=v0.args;this.$u=w0;var y0=_0[1];if(typeof y0=="string"){var S0=_0[2]===!0,B0=_0[3]===!0,I0=S0||B0,T0=_0[2];B0&&(T0=_0[2]),a0=this.$locale(),!S0&&T0&&(a0=p0.Ls[T0]),this.$d=function(G0,F0,M0,j0){try{if(["x","X"].indexOf(F0)>-1)return new Date((F0==="X"?1e3:1)*G0);var D0=d0(F0)(G0),$0=D0.year,X0=D0.month,Z0=D0.day,N0=D0.hours,Q0=D0.minutes,z0=D0.seconds,K0=D0.milliseconds,H0=D0.zone,J0=D0.week,Y0=new Date,e2=Z0||($0||X0?1:Y0.getDate()),s2=$0||Y0.getFullYear(),u2=0;$0&&!X0||(u2=X0>0?X0-1:Y0.getMonth());var A2,k2=N0||0,b2=Q0||0,v2=z0||0,x2=K0||0;return H0?new Date(Date.UTC(s2,u2,e2,k2,b2,v2,x2+60*H0.offset*1e3)):M0?new Date(Date.UTC(s2,u2,e2,k2,b2,v2,x2)):(A2=new Date(s2,u2,e2,k2,b2,v2,x2),J0&&(A2=j0(A2).week(J0).toDate()),A2)}catch{return new Date("")}}(x0,y0,w0,p0),this.init(),T0&&T0!==!0&&(this.$L=this.locale(T0).$L),I0&&x0!=this.format(y0)&&(this.$d=new Date("")),a0={}}else if(y0 instanceof Array)for(var R0=y0.length,E0=1;E0<=R0;E0+=1){_0[1]=y0[E0-1];var C0=p0.apply(this,_0);if(C0.isValid()){this.$d=C0.$d,this.$L=C0.$L,this.init();break}E0===R0&&(this.$d=new Date(""))}else g0.call(this,v0)}}})})(customParseFormat$1);var customParseFormatExports=customParseFormat$1.exports;const customParseFormat=getDefaultExportFromCjs$1(customParseFormatExports),genSizeDividerStyle=e0=>{const{componentCls:_e}=e0;return{[_e]:{"&-horizontal":{[`&${_e}`]:{"&-sm":{marginBlock:e0.marginXS},"&-md":{marginBlock:e0.margin}}}}}},genSharedDividerStyle=e0=>{const{componentCls:_e,sizePaddingEdgeHorizontal:i0,colorSplit:r0,lineWidth:t0,textPaddingInline:n0,orientationMargin:s0,verticalMarginInline:o0}=e0;return{[_e]:Object.assign(Object.assign({},resetComponent(e0)),{borderBlockStart:`${unit$1(t0)} solid ${r0}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:o0,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${unit$1(t0)} solid ${r0}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${unit$1(e0.marginLG)} 0`},[`&-horizontal${_e}-with-text`]:{display:"flex",alignItems:"center",margin:`${unit$1(e0.dividerHorizontalWithTextGutterMargin)} 0`,color:e0.colorTextHeading,fontWeight:500,fontSize:e0.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r0}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${unit$1(t0)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${_e}-with-text-start`]:{"&::before":{width:`calc(${s0} * 100%)`},"&::after":{width:`calc(100% - ${s0} * 100%)`}},[`&-horizontal${_e}-with-text-end`]:{"&::before":{width:`calc(100% - ${s0} * 100%)`},"&::after":{width:`calc(${s0} * 100%)`}},[`${_e}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:n0},"&-dashed":{background:"none",borderColor:r0,borderStyle:"dashed",borderWidth:`${unit$1(t0)} 0 0`},[`&-horizontal${_e}-with-text${_e}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${_e}-dashed`]:{borderInlineStartWidth:t0,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:r0,borderStyle:"dotted",borderWidth:`${unit$1(t0)} 0 0`},[`&-horizontal${_e}-with-text${_e}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${_e}-dotted`]:{borderInlineStartWidth:t0,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${_e}-with-text`]:{color:e0.colorText,fontWeight:"normal",fontSize:e0.fontSize},[`&-horizontal${_e}-with-text-start${_e}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${_e}-inner-text`]:{paddingInlineStart:i0}},[`&-horizontal${_e}-with-text-end${_e}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${_e}-inner-text`]:{paddingInlineEnd:i0}}})}},prepareComponentToken=e0=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e0.marginXS}),useStyle=genStyleHooks("Divider",e0=>{const _e=merge(e0,{dividerHorizontalWithTextGutterMargin:e0.margin,sizePaddingEdgeHorizontal:0});return[genSharedDividerStyle(_e),genSizeDividerStyle(_e)]},prepareComponentToken,{unitless:{orientationMargin:!0}});var __rest=function(e0,_e){var i0={};for(var r0 in e0)Object.prototype.hasOwnProperty.call(e0,r0)&&_e.indexOf(r0)<0&&(i0[r0]=e0[r0]);if(e0!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t0=0,r0=Object.getOwnPropertySymbols(e0);t0<r0.length;t0++)_e.indexOf(r0[t0])<0&&Object.prototype.propertyIsEnumerable.call(e0,r0[t0])&&(i0[r0[t0]]=e0[r0[t0]]);return i0};const sizeClassNameMap={small:"sm",middle:"md"},Divider$1=e0=>{const{getPrefixCls:_e,direction:i0,className:r0,style:t0}=useComponentConfig("divider"),{prefixCls:n0,type:s0="horizontal",orientation:o0="center",orientationMargin:a0,className:f0,rootClassName:l0,children:u0,dashed:A0,variant:c0="solid",plain:k0,style:d0,size:h0}=e0,b0=__rest(e0,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),p0=_e("divider",n0),[m0,g0,v0]=useStyle(p0),x0=useSize(h0),w0=sizeClassNameMap[x0],_0=!!u0,y0=reactExports.useMemo(()=>o0==="left"?i0==="rtl"?"end":"start":o0==="right"?i0==="rtl"?"start":"end":o0,[i0,o0]),S0=y0==="start"&&a0!=null,B0=y0==="end"&&a0!=null,I0=classNames(p0,r0,g0,v0,`${p0}-${s0}`,{[`${p0}-with-text`]:_0,[`${p0}-with-text-${y0}`]:_0,[`${p0}-dashed`]:!!A0,[`${p0}-${c0}`]:c0!=="solid",[`${p0}-plain`]:!!k0,[`${p0}-rtl`]:i0==="rtl",[`${p0}-no-default-orientation-margin-start`]:S0,[`${p0}-no-default-orientation-margin-end`]:B0,[`${p0}-${w0}`]:!!w0},f0,l0),T0=reactExports.useMemo(()=>typeof a0=="number"?a0:/^\d+$/.test(a0)?Number(a0):a0,[a0]),R0={marginInlineStart:S0?T0:void 0,marginInlineEnd:B0?T0:void 0};return m0(reactExports.createElement("div",Object.assign({className:I0,style:Object.assign(Object.assign({},t0),d0)},b0,{role:"separator"}),u0&&s0!=="vertical"&&reactExports.createElement("span",{className:`${p0}-inner-text`,style:R0},u0)))};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e0){return e0&&e0.__esModule&&Object.prototype.hasOwnProperty.call(e0,"default")?e0.default:e0}var de={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(requireDayjs_min())})(commonjsGlobal$1,function(i0){function r0(a0){return a0&&typeof a0=="object"&&"default"in a0?a0:{default:a0}}var t0=r0(i0),n0={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function s0(a0,f0,l0){var u0=n0[l0];return Array.isArray(u0)&&(u0=u0[f0?0:1]),u0.replace("%d",a0)}var o0={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(a0){return a0+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:s0,m:s0,mm:s0,h:s0,hh:s0,d:s0,dd:s0,M:s0,MM:s0,y:s0,yy:s0}};return t0.default.locale(o0,null,!0),o0})})(de);var es={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(requireDayjs_min())})(commonjsGlobal$1,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(s0){return s0+"º"}};return t0.default.locale(n0,null,!0),n0})})(es);var fr={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(requireDayjs_min())})(commonjsGlobal$1,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(s0){return""+s0+(s0===1?"er":"")}};return t0.default.locale(n0,null,!0),n0})})(fr);var it={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(requireDayjs_min())})(commonjsGlobal$1,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(s0){return s0+"º"}};return t0.default.locale(n0,null,!0),n0})})(it);var pt={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(requireDayjs_min())})(commonjsGlobal$1,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"pt",weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sab".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sa".split("_"),months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),ordinal:function(s0){return s0+"º"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},relativeTime:{future:"em %s",past:"há %s",s:"alguns segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"}};return t0.default.locale(n0,null,!0),n0})})(pt);const Divider=({children:e0,vertical:_e=!1,className:i0="border-gray-500",style:r0})=>jsxRuntimeExports.jsx(Divider$1,{plain:!0,children:e0,type:_e?"vertical":"horizontal",className:i0,orientation:"center",style:r0}),canUseDOM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function isWindow(e0){const _e=Object.prototype.toString.call(e0);return _e==="[object Window]"||_e==="[object global]"}function isNode$1(e0){return"nodeType"in e0}function getWindow$1(e0){var _e,i0;return e0?isWindow(e0)?e0:isNode$1(e0)&&(_e=(i0=e0.ownerDocument)==null?void 0:i0.defaultView)!=null?_e:window:window}function isDocument$1(e0){const{Document:_e}=getWindow$1(e0);return e0 instanceof _e}function isHTMLElement$1(e0){return isWindow(e0)?!1:e0 instanceof getWindow$1(e0).HTMLElement}function isSVGElement(e0){return e0 instanceof getWindow$1(e0).SVGElement}function getOwnerDocument(e0){return e0?isWindow(e0)?e0.document:isNode$1(e0)?isDocument$1(e0)?e0:isHTMLElement$1(e0)||isSVGElement(e0)?e0.ownerDocument:document:document:document}const useIsomorphicLayoutEffect$2=canUseDOM?reactExports.useLayoutEffect:reactExports.useEffect;function useEvent(e0){const _e=reactExports.useRef(e0);return useIsomorphicLayoutEffect$2(()=>{_e.current=e0}),reactExports.useCallback(function(){for(var i0=arguments.length,r0=new Array(i0),t0=0;t0<i0;t0++)r0[t0]=arguments[t0];return _e.current==null?void 0:_e.current(...r0)},[])}function useInterval(){const e0=reactExports.useRef(null),_e=reactExports.useCallback((r0,t0)=>{e0.current=setInterval(r0,t0)},[]),i0=reactExports.useCallback(()=>{e0.current!==null&&(clearInterval(e0.current),e0.current=null)},[]);return[_e,i0]}function useLatestValue(e0,_e){_e===void 0&&(_e=[e0]);const i0=reactExports.useRef(e0);return useIsomorphicLayoutEffect$2(()=>{i0.current!==e0&&(i0.current=e0)},_e),i0}function useLazyMemo(e0,_e){const i0=reactExports.useRef();return reactExports.useMemo(()=>{const r0=e0(i0.current);return i0.current=r0,r0},[..._e])}function useNodeRef(e0){const _e=useEvent(e0),i0=reactExports.useRef(null),r0=reactExports.useCallback(t0=>{t0!==i0.current&&(_e==null||_e(t0,i0.current)),i0.current=t0},[]);return[i0,r0]}function usePrevious(e0){const _e=reactExports.useRef();return reactExports.useEffect(()=>{_e.current=e0},[e0]),_e.current}let ids={};function useUniqueId(e0,_e){return reactExports.useMemo(()=>{if(_e)return _e;const i0=ids[e0]==null?0:ids[e0]+1;return ids[e0]=i0,e0+"-"+i0},[e0,_e])}function createAdjustmentFn(e0){return function(_e){for(var i0=arguments.length,r0=new Array(i0>1?i0-1:0),t0=1;t0<i0;t0++)r0[t0-1]=arguments[t0];return r0.reduce((n0,s0)=>{const o0=Object.entries(s0);for(const[a0,f0]of o0){const l0=n0[a0];l0!=null&&(n0[a0]=l0+e0*f0)}return n0},{..._e})}}const add=createAdjustmentFn(1),subtract=createAdjustmentFn(-1);function hasViewportRelativeCoordinates(e0){return"clientX"in e0&&"clientY"in e0}function isKeyboardEvent(e0){if(!e0)return!1;const{KeyboardEvent:_e}=getWindow$1(e0.target);return _e&&e0 instanceof _e}function isTouchEvent(e0){if(!e0)return!1;const{TouchEvent:_e}=getWindow$1(e0.target);return _e&&e0 instanceof _e}function getEventCoordinates(e0){if(isTouchEvent(e0)){if(e0.touches&&e0.touches.length){const{clientX:_e,clientY:i0}=e0.touches[0];return{x:_e,y:i0}}else if(e0.changedTouches&&e0.changedTouches.length){const{clientX:_e,clientY:i0}=e0.changedTouches[0];return{x:_e,y:i0}}}return hasViewportRelativeCoordinates(e0)?{x:e0.clientX,y:e0.clientY}:null}const SELECTOR="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function findFirstFocusableNode(e0){return e0.matches(SELECTOR)?e0:e0.querySelector(SELECTOR)}const hiddenStyles={display:"none"};function HiddenText(e0){let{id:_e,value:i0}=e0;return React$4.createElement("div",{id:_e,style:hiddenStyles},i0)}function LiveRegion(e0){let{id:_e,announcement:i0,ariaLiveType:r0="assertive"}=e0;const t0={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return React$4.createElement("div",{id:_e,style:t0,role:"status","aria-live":r0,"aria-atomic":!0},i0)}function useAnnouncement(){const[e0,_e]=reactExports.useState("");return{announce:reactExports.useCallback(r0=>{r0!=null&&_e(r0)},[]),announcement:e0}}var Action$1;(function(e0){e0.DragStart="dragStart",e0.DragMove="dragMove",e0.DragEnd="dragEnd",e0.DragCancel="dragCancel",e0.DragOver="dragOver",e0.RegisterDroppable="registerDroppable",e0.SetDroppableDisabled="setDroppableDisabled",e0.UnregisterDroppable="unregisterDroppable"})(Action$1||(Action$1={}));function noop$1(){}const defaultCoordinates$1=Object.freeze({x:0,y:0});var Direction$1;(function(e0){e0[e0.Forward=1]="Forward",e0[e0.Backward=-1]="Backward"})(Direction$1||(Direction$1={}));var EventName$1;(function(e0){e0.Click="click",e0.DragStart="dragstart",e0.Keydown="keydown",e0.ContextMenu="contextmenu",e0.Resize="resize",e0.SelectionChange="selectionchange",e0.VisibilityChange="visibilitychange"})(EventName$1||(EventName$1={}));var KeyboardCode$1;(function(e0){e0.Space="Space",e0.Down="ArrowDown",e0.Right="ArrowRight",e0.Left="ArrowLeft",e0.Up="ArrowUp",e0.Esc="Escape",e0.Enter="Enter",e0.Tab="Tab"})(KeyboardCode$1||(KeyboardCode$1={}));KeyboardCode$1.Space,KeyboardCode$1.Enter,KeyboardCode$1.Esc,KeyboardCode$1.Space,KeyboardCode$1.Enter,KeyboardCode$1.Tab;var MouseButton$1;(function(e0){e0[e0.RightClick=2]="RightClick"})(MouseButton$1||(MouseButton$1={}));var AutoScrollActivator$1;(function(e0){e0[e0.Pointer=0]="Pointer",e0[e0.DraggableRect=1]="DraggableRect"})(AutoScrollActivator$1||(AutoScrollActivator$1={}));var TraversalOrder$1;(function(e0){e0[e0.TreeOrder=0]="TreeOrder",e0[e0.ReversedTreeOrder=1]="ReversedTreeOrder"})(TraversalOrder$1||(TraversalOrder$1={}));Direction$1.Backward+"",Direction$1.Forward+"",Direction$1.Backward+"",Direction$1.Forward+"";var MeasuringStrategy$1;(function(e0){e0[e0.Always=0]="Always",e0[e0.BeforeDragging=1]="BeforeDragging",e0[e0.WhileDragging=2]="WhileDragging"})(MeasuringStrategy$1||(MeasuringStrategy$1={}));var MeasuringFrequency$1;(function(e0){e0.Optimized="optimized"})(MeasuringFrequency$1||(MeasuringFrequency$1={}));function useResizeObserver$1(e0){let{callback:_e,disabled:i0}=e0;const r0=useEvent(_e),t0=reactExports.useMemo(()=>{if(i0||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:n0}=window;return new n0(r0)},[i0]);return reactExports.useEffect(()=>()=>t0==null?void 0:t0.disconnect(),[t0]),t0}MeasuringStrategy$1.WhileDragging,MeasuringFrequency$1.Optimized;const defaultInternalContext$1={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:noop$1,draggableNodes:new Map,over:null,measureDroppableContainers:noop$1},InternalContext$1=reactExports.createContext(defaultInternalContext$1);({...defaultCoordinates$1});var Status$1;(function(e0){e0[e0.Uninitialized=0]="Uninitialized",e0[e0.Initializing=1]="Initializing",e0[e0.Initialized=2]="Initialized"})(Status$1||(Status$1={}));const ID_PREFIX$1$1="Droppable",defaultResizeObserverConfig$1={timeout:25};function useDroppable$1(e0){let{data:_e,disabled:i0=!1,id:r0,resizeObserverConfig:t0}=e0;const n0=useUniqueId(ID_PREFIX$1$1),{active:s0,dispatch:o0,over:a0,measureDroppableContainers:f0}=reactExports.useContext(InternalContext$1),l0=reactExports.useRef({disabled:i0}),u0=reactExports.useRef(!1),A0=reactExports.useRef(null),c0=reactExports.useRef(null),{disabled:k0,updateMeasurementsFor:d0,timeout:h0}={...defaultResizeObserverConfig$1,...t0},b0=useLatestValue(d0??r0),p0=reactExports.useCallback(()=>{if(!u0.current){u0.current=!0;return}c0.current!=null&&clearTimeout(c0.current),c0.current=setTimeout(()=>{f0(Array.isArray(b0.current)?b0.current:[b0.current]),c0.current=null},h0)},[h0]),m0=useResizeObserver$1({callback:p0,disabled:k0||!s0}),g0=reactExports.useCallback((_0,y0)=>{m0&&(y0&&(m0.unobserve(y0),u0.current=!1),_0&&m0.observe(_0))},[m0]),[v0,x0]=useNodeRef(g0),w0=useLatestValue(_e);return reactExports.useEffect(()=>{!m0||!v0.current||(m0.disconnect(),u0.current=!1,m0.observe(v0.current))},[v0,m0]),reactExports.useEffect(()=>(o0({type:Action$1.RegisterDroppable,element:{id:r0,key:n0,disabled:i0,node:v0,rect:A0,data:w0}}),()=>o0({type:Action$1.UnregisterDroppable,key:n0,id:r0})),[r0]),reactExports.useEffect(()=>{i0!==l0.current.disabled&&(o0({type:Action$1.SetDroppableDisabled,id:r0,key:n0,disabled:i0}),l0.current.disabled=i0)},[r0,n0,i0,o0]),{active:s0,rect:A0,isOver:(a0==null?void 0:a0.id)===r0,node:v0,over:a0,setNodeRef:x0}}const DropzoneContext=reactExports.createContext(null);function useDropzoneContext(){const e0=reactExports.useContext(DropzoneContext);if(!e0)throw new Error("Cannot be rendered outside Dropzone Provider");return e0}const DropzoneDrag=()=>{const{t:e0}=useTranslation();return jsxRuntimeExports.jsx("div",{className:"drop-wrapper",children:jsxRuntimeExports.jsx("div",{className:"drop-content",children:jsxRuntimeExports.jsx("p",{className:"drop-text",children:e0("dropzone.drop")})})})},DropzoneFile=({children:e0,multiple:_e})=>{const{t:i0}=useTranslation(),{files:r0,inputRef:t0}=useDropzoneContext(),n0=r0&&r0.length>0,s0=clsx("drop-file-wrapper",{"d-block":n0,"d-none":!n0});return jsxRuntimeExports.jsxs("div",{className:s0,children:[jsxRuntimeExports.jsx("div",{className:"drop-file-content",children:jsxRuntimeExports.jsx("div",{className:"add-button p-4",children:jsxRuntimeExports.jsx(Button,{variant:"ghost",leftIcon:jsxRuntimeExports.jsx(SvgIconPlus,{}),disabled:!_e,onClick:()=>{var o0;return(o0=t0==null?void 0:t0.current)==null?void 0:o0.click()},children:i0("dropzone.add.more")})})}),jsxRuntimeExports.jsx("div",{className:"p-8",children:e0})]})},DropzoneImport=()=>{const{t:e0}=useTranslation(),{files:_e,inputRef:i0}=useDropzoneContext(),r0=_e&&_e.length>0,t0=clsx("dropzone-import-wrapper",{"d-flex":!r0,"d-none":r0});return jsxRuntimeExports.jsxs("div",{className:t0,children:[jsxRuntimeExports.jsx(SvgIconDownload,{height:48,width:48}),jsxRuntimeExports.jsx("p",{className:"my-16",children:e0("dropzone.text")}),jsxRuntimeExports.jsx(Button,{onClick:()=>{var n0;return(n0=i0==null?void 0:i0.current)==null?void 0:n0.click()},children:e0("dropzone.import")})]})},scriptRel="modulepreload",assetsURL=function(e0){return"/"+e0},seen={},__vitePreload=function e0(_e,i0,r0){let t0=Promise.resolve();if(i0&&i0.length>0){document.getElementsByTagName("link");const n0=document.querySelector("meta[property=csp-nonce]"),s0=(n0==null?void 0:n0.nonce)||(n0==null?void 0:n0.getAttribute("nonce"));t0=Promise.all(i0.map(o0=>{if(o0=assetsURL(o0),o0 in seen)return;seen[o0]=!0;const a0=o0.endsWith(".css"),f0=a0?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o0}"]${f0}`))return;const l0=document.createElement("link");if(l0.rel=a0?"stylesheet":scriptRel,a0||(l0.as="script",l0.crossOrigin=""),l0.href=o0,s0&&l0.setAttribute("nonce",s0),document.head.appendChild(l0),a0)return new Promise((u0,A0)=>{l0.addEventListener("load",u0),l0.addEventListener("error",()=>A0(new Error(`Unable to preload CSS for ${o0}`)))})}))}return t0.then(()=>_e()).catch(n0=>{const s0=new Event("vite:preloadError",{cancelable:!0});if(s0.payload=n0,window.dispatchEvent(s0),!s0.defaultPrevented)throw n0})},HEIC_MIME_TYPES=["image/heic","image/heif"],useDropzone=e0=>{const[_e,i0]=reactExports.useState(!1),[r0,t0]=reactExports.useState([]),n0=reactExports.useRef(null),s0=h0=>{l0([h0])},o0=h0=>{t0(b0=>b0.filter(p0=>p0.name!==h0.name))},a0=(h0,b0)=>{t0(p0=>{if(0<=h0&&h0<p0.length){const m0=p0.slice(0,h0),g0=h0===p0.length-1?[]:p0.slice(h0+1);return[...m0,b0,...g0]}return p0})},f0=h0=>{var b0;let p0=h0;if((b0=n0.current)!=null&&b0.accept){const m0=n0.current.accept.split(",").map(x0=>x0.trim().toLowerCase()),g0=m0.filter(x0=>x0.startsWith(".")),v0=m0.filter(x0=>!x0.startsWith(".")).map(x0=>x0.replace("*",""));p0=[],h0.forEach(x0=>{const w0=x0.name.toLowerCase();(g0.some(_0=>w0.endsWith(_0))||v0.some(_0=>x0.type.includes(_0)))&&p0.push(x0)})}return p0},l0=async h0=>{let b0=(await u0(h0)).sort((p0,m0)=>m0.lastModified-p0.lastModified).map(p0=>new File([p0],p0.name.replace(/[!:,;="']/g,""),{type:p0.type}));b0.reverse(),e0!=null&&e0.forceFilters?(b0=f0(b0),b0&&b0.length&&t0(p0=>[...p0,...b0])):t0(p0=>[...p0,...h0])},u0=async h0=>{if(h0===null||h0.length===0)return[];let b0;return h0.some(p0=>HEIC_MIME_TYPES.includes(p0.type))&&(b0=await __vitePreload(()=>Promise.resolve().then(()=>heicTo),void 0)),Promise.all(h0.map(async p0=>{if(b0&&b0.isHeic(p0))try{const m0=await b0.heicTo({blob:p0,toType:"image/jpeg"});return new File([m0],p0.name.replace(/\.(heic|heif)$/i,".jpeg"),{type:"image/jpeg"})}catch(m0){return console.error(`Failed to convert HEIC image: ${p0.name}`,m0),p0}return p0}))},A0=()=>{t0([])},c0=h0=>{const b0=h0.target.files;b0&&l0([...b0])},k0=h0=>{h0.preventDefault(),h0.stopPropagation(),i0(!0)},d0=h0=>{h0.preventDefault(),h0.stopPropagation(),i0(!1)};return{inputRef:n0,files:r0,dragging:_e,handleDragging:k0,handleDragLeave:d0,handleDrop:async h0=>{var b0;d0(h0);const p0=(b0=h0.dataTransfer)==null?void 0:b0.files;p0&&(await l0([...p0]),n0!=null&&n0.current&&(n0.current.files=p0))},replaceFileAt:a0,deleteFile:o0,addFile:s0,addFiles:l0,cleanFiles:A0,handleOnChange:c0}},Dropzone=({className:e0,accept:_e,multiple:i0=!0,handle:r0=!1,children:t0})=>{const{inputRef:n0,dragging:s0,files:o0,addFile:a0,deleteFile:f0,replaceFileAt:l0,handleDragLeave:u0,handleDragging:A0,handleDrop:c0,handleOnChange:k0}=useDropzone(_e?{forceFilters:!0}:void 0),d0=clsx("dropzone",{"is-dragging":(i0||o0.length<1)&&s0,"is-drop-files":!(o0.length!==0&&!r0)},e0),h0=reactExports.useMemo(()=>({inputRef:n0,files:o0,addFile:a0,deleteFile:f0,replaceFileAt:l0}),[a0,f0,l0,o0,n0]);return jsxRuntimeExports.jsx(DropzoneContext.Provider,{value:h0,children:jsxRuntimeExports.jsxs("div",{className:d0,onDragEnter:A0,onDragOver:A0,onDragLeave:u0,onDrop:o0.length>0&&!i0?void 0:c0,children:[jsxRuntimeExports.jsxs("div",{className:"d-flex flex-fill",children:[r0?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Dropzone.File,{multiple:i0,children:t0}),jsxRuntimeExports.jsx(Dropzone.Import,{})]}),jsxRuntimeExports.jsx(Dropzone.Drag,{})]}),jsxRuntimeExports.jsx("input",{ref:n0,accept:_e==null?void 0:_e.join(","),multiple:i0,type:"file",name:"attachment-input",id:"attachment-input",onChange:k0,hidden:!0})]})})};Dropzone.File=DropzoneFile;Dropzone.Import=DropzoneImport;Dropzone.Drag=DropzoneDrag;const SvgIconCode=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M17.327 5.76a1 1 0 0 1 1.413.067l5 5.5a1 1 0 0 1 0 1.346l-5 5.5a1 1 0 1 1-1.48-1.346L21.648 12 17.26 7.173a1 1 0 0 1 .067-1.413M6.673 5.76a1 1 0 0 1 .067 1.413L2.35 12l4.389 4.827a1 1 0 0 1-1.48 1.346l-5-5.5a1 1 0 0 1 0-1.346l5-5.5a1 1 0 0 1 1.413-.067M8.979 21.609a1 1 0 0 1-.658-1.252l5.375-17.29a1 1 0 1 1 1.91.594L10.23 20.95a1 1 0 0 1-1.251.658",clipRule:"evenodd"})]}),TextArea=reactExports.forwardRef(({noValidationIcon:e0,placeholder:_e,size:i0="md",height:r0="md",className:t0,showCounter:n0=!1,...s0},o0)=>{var a0;const{id:f0,isRequired:l0,isReadOnly:u0,status:A0}=useFormControl(),[c0,k0]=reactExports.useState(((a0=s0.defaultValue)==null?void 0:a0.toString().length)||0),d0=clsx({"form-control":!u0,"form-control-lg":i0==="lg","form-control-sm":i0==="sm","textarea-height-lg":r0==="lg","textarea-height-md":r0==="md","textarea-height-sm":r0==="sm","is-invalid":A0==="invalid","is-valid":A0==="valid","form-control-plaintext":u0,"no-validation-icon":e0},t0);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("textarea",{ref:o0,id:f0,className:d0,placeholder:_e,required:l0,readOnly:u0,...s0,onChange:h0=>{var b0;k0(h0.target.value.length),(b0=s0.onChange)==null||b0.call(s0,h0)}}),n0&&!A0&&jsxRuntimeExports.jsx(Textcounter,{currentLength:c0,maxLength:s0.maxLength??0})]})}),Embed=({onSuccess:e0})=>{const{t:_e}=useTranslation(),[i0,r0]=reactExports.useState();function t0(n0){const s0=n0.target.value;r0(s0),s0!=null&&s0.length?e0(s0):e0()}return jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column flex-fill",children:[jsxRuntimeExports.jsx("div",{className:"mb-32",children:_e("bbm.embed.description")}),jsxRuntimeExports.jsxs("div",{className:"mb-8 d-flex",children:[jsxRuntimeExports.jsx(SvgIconCode,{className:"me-8"}),_e("bbm.embed.title")]}),jsxRuntimeExports.jsx(FormControl,{id:"iframeContent",children:jsxRuntimeExports.jsx(TextArea,{size:"md",height:"sm",placeholder:_e("bbm.embed.placeholder"),onChange:t0})}),!!(i0!=null&&i0.length)&&jsxRuntimeExports.jsx("div",{className:"embed-preview mt-12",dangerouslySetInnerHTML:{__html:i0}}),!(i0!=null&&i0.length)&&jsxRuntimeExports.jsx("div",{className:"embed-preview mt-12 d-flex align-items-center justify-content-center bg-gray-300 text-black-50 rounded-3",children:jsxRuntimeExports.jsx("strong",{children:_e("bbm.embed.preview")})})]})},EmptyScreen=({imageSrc:e0,imageAlt:_e="",title:i0,text:r0,size:t0=250,className:n0})=>{const s0=clsx("text",n0);return jsxRuntimeExports.jsxs("div",{className:"emptyscreen",children:[e0&&jsxRuntimeExports.jsx("div",{className:"emptyscreen-image mb-12",children:jsxRuntimeExports.jsx("img",{className:"mx-auto",src:e0,alt:_e,width:t0,height:t0})}),i0&&jsxRuntimeExports.jsx(Heading,{level:"h2",headingStyle:"h2",className:"text-secondary mb-8",children:i0}),r0&&jsxRuntimeExports.jsx("div",{className:s0,children:r0})]})},SvgIconLandscape=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.222 5.037c-.895 0-1.222.555-1.222.792v12.675c0 .237.327.792 1.222.792h1.364l9.707-9.886a.987.987 0 0 1 1.414 0L21 13.782V5.829c0-.237-.328-.792-1.222-.792zM23 16.224V5.829C23 4.066 21.337 3 19.778 3H4.222C2.662 3 1 4.066 1 5.83v12.674c0 1.763 1.662 2.829 3.222 2.829h15.556c1.56 0 3.222-1.066 3.222-2.83v-2.279m-2 .439-5-5.093-7.585 7.726h11.363c.894 0 1.222-.555 1.222-.792zM8 8.093c-.552 0-1 .455-1 1.018a1.01 1.01 0 0 0 1 1.018c.552 0 1-.456 1-1.018a1.01 1.01 0 0 0-1-1.019M5 9.11c0-1.688 1.343-3.056 3-3.056s3 1.368 3 3.056-1.343 3.055-3 3.055-3-1.368-3-3.055",clipRule:"evenodd"})]}),SvgIconTextPage=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.286 3c-.35 0-.68.135-.92.368-.238.231-.366.54-.366.854v15.556c0 .315.128.623.367.854.239.233.569.368.919.368h11.428c.35 0 .68-.135.92-.368.238-.231.366-.54.366-.854V8h-3a2 2 0 0 1-2-2V3zM16 6h1.986L16 4.08zm5 13.778V6.556a1 1 0 0 0-.305-.72L15.98 1.281A1 1 0 0 0 15.286 1h-9a3.32 3.32 0 0 0-2.314.934A3.2 3.2 0 0 0 3 4.222v15.556c0 .864.353 1.686.972 2.288S5.423 23 6.286 23h11.428c.863 0 1.695-.333 2.314-.934.619-.602.972-1.424.972-2.288M8 6a1 1 0 0 0 0 2h3a1 1 0 1 0 0-2zm-1 6a1 1 0 0 1 1-1h8a1 1 0 1 1 0 2H8a1 1 0 0 1-1-1m5 4a1 1 0 1 0 0 2h4a1 1 0 1 0 0-2z",clipRule:"evenodd"})]}),SvgIconVideo=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 4.962C4 4.376 4.435 4 4.853 4H6.5v2H4zM4 8h2.5v3H4zm-2 4V4.962C2 3.381 3.224 2 4.853 2h13.294C19.776 2 21 3.38 21 4.962v14.076C21 20.619 19.776 22 18.147 22H4.853C3.224 22 2 20.62 2 19.038zm17-6V4.962c0-.586-.435-.962-.853-.962H16.5v2zm0 2h-2.5v3H19zm-2.5 5H19v3h-2.5zm0 5H19v1.038c0 .586-.435.962-.853.962H16.5zm-2-7V4h-6v7zm-6 2h6v7h-6zm-2 5v2H4.853C4.435 20 4 19.624 4 19.038V18zm0-2v-3H4v3z",clipRule:"evenodd"})]}),FileIcon=({type:e0,roleMap:_e})=>{const i0=typeof(_e==null?void 0:_e.icon)!="string"&&e0!=="unknown"&&(_e==null?void 0:_e.hasShadow)!==!1,r0=clsx("position-absolute rounded-circle top-50 start-50 translate-middle",{"p-12 rounded-circle shadow":i0},_e==null?void 0:_e.color);return jsxRuntimeExports.jsx("div",{className:r0,children:(_e==null?void 0:_e.icon)??jsxRuntimeExports.jsx(SvgIconPaperclip,{})})};var observerMap=new Map,RootIds=new WeakMap,rootId=0,unsupportedValue=void 0;function getRootId(e0){return e0?(RootIds.has(e0)||(rootId+=1,RootIds.set(e0,rootId.toString())),RootIds.get(e0)):"0"}function optionsToId(e0){return Object.keys(e0).sort().filter(_e=>e0[_e]!==void 0).map(_e=>`${_e}_${_e==="root"?getRootId(e0.root):e0[_e]}`).toString()}function createObserver(e0){let _e=optionsToId(e0),i0=observerMap.get(_e);if(!i0){const r0=new Map;let t0;const n0=new IntersectionObserver(s0=>{s0.forEach(o0=>{var a0;const f0=o0.isIntersecting&&t0.some(l0=>o0.intersectionRatio>=l0);e0.trackVisibility&&typeof o0.isVisible>"u"&&(o0.isVisible=f0),(a0=r0.get(o0.target))==null||a0.forEach(l0=>{l0(f0,o0)})})},e0);t0=n0.thresholds||(Array.isArray(e0.threshold)?e0.threshold:[e0.threshold||0]),i0={id:_e,observer:n0,elements:r0},observerMap.set(_e,i0)}return i0}function observe(e0,_e,i0={},r0=unsupportedValue){if(typeof window.IntersectionObserver>"u"&&r0!==void 0){const a0=e0.getBoundingClientRect();return _e(r0,{isIntersecting:r0,target:e0,intersectionRatio:typeof i0.threshold=="number"?i0.threshold:0,time:0,boundingClientRect:a0,intersectionRect:a0,rootBounds:a0}),()=>{}}const{id:t0,observer:n0,elements:s0}=createObserver(i0);let o0=s0.get(e0)||[];return s0.has(e0)||s0.set(e0,o0),o0.push(_e),n0.observe(e0),function(){o0.splice(o0.indexOf(_e),1),o0.length===0&&(s0.delete(e0),n0.unobserve(e0)),s0.size===0&&(n0.disconnect(),observerMap.delete(t0))}}function useInView({threshold:e0,delay:_e,trackVisibility:i0,rootMargin:r0,root:t0,triggerOnce:n0,skip:s0,initialInView:o0,fallbackInView:a0,onChange:f0}={}){var l0;const[u0,A0]=reactExports.useState(null),c0=reactExports.useRef(),[k0,d0]=reactExports.useState({inView:!!o0,entry:void 0});c0.current=f0,reactExports.useEffect(()=>{if(s0||!u0)return;let m0;return m0=observe(u0,(g0,v0)=>{d0({inView:g0,entry:v0}),c0.current&&c0.current(g0,v0),v0.isIntersecting&&n0&&m0&&(m0(),m0=void 0)},{root:t0,rootMargin:r0,threshold:e0,trackVisibility:i0,delay:_e},a0),()=>{m0&&m0()}},[Array.isArray(e0)?e0.toString():e0,u0,t0,r0,n0,s0,i0,a0,_e]);const h0=(l0=k0.entry)==null?void 0:l0.target,b0=reactExports.useRef();!u0&&h0&&!n0&&!s0&&b0.current!==h0&&(b0.current=h0,d0({inView:!!o0,entry:void 0}));const p0=[A0,k0.inView,k0.entry];return p0.ref=p0[0],p0.inView=p0[1],p0.entry=p0[2],p0}function useThumbnail(e0,_e){const[i0,r0]=reactExports.useState(null),{ref:t0,inView:n0}=useInView({triggerOnce:!0,..._e==null?void 0:_e.intersectionOptions});return reactExports.useEffect(()=>{var s0;(s0=_e==null?void 0:_e.ref)!=null&&s0.current&&(t0==null||t0(_e.ref.current))},[_e==null?void 0:_e.ref,t0]),reactExports.useEffect(()=>{if((_e==null?void 0:_e.ref)===void 0||n0){if(!e0){r0(!1);return}const s0=new Image;return s0.src=e0,s0.onload=()=>{r0(!0)},s0.onerror=()=>{r0(!1)},()=>{s0.onload=null,s0.onerror=null,r0(null)}}},[n0,e0]),i0}const FileCard=({doc:e0,isClickable:_e=!0,isSelectable:i0=!1,isSelected:r0=!1,onClick:t0,className:n0,onSelect:s0,isFocused:o0,app:a0,customIcon:f0,customColor:l0})=>{const u0=reactExports.useRef(null),A0=DocumentHelper.getRole(e0);function c0(m0){if(f0!==void 0||l0!==void 0)return{icon:f0||jsxRuntimeExports.jsx(SvgIconTextPage,{width:22,height:22}),color:l0||"bg-gray-300",hasShadow:!1};const g0={csv:{icon:".CSV",color:"bg-orange-200"},xls:{icon:".XLS",color:"bg-green-200"},doc:{icon:".DOC",color:"bg-blue-200"},txt:{icon:".TXT",color:"bg-blue-200"},pdf:{icon:".PDF",color:"bg-red-200"},audio:{icon:jsxRuntimeExports.jsx(SvgIconMic,{width:22,height:22}),color:"bg-red-200"},ppt:{icon:".PPT",color:"bg-red-200"},img:{icon:jsxRuntimeExports.jsx(SvgIconLandscape,{width:22,height:22}),color:"bg-green-200"},video:{icon:jsxRuntimeExports.jsx(SvgIconVideo,{width:22,height:22}),color:"bg-purple-200"},zip:{icon:".ZIP",color:"bg-gray-300"},md:{icon:".MD",color:"bg-blue-200"},unknown:{icon:jsxRuntimeExports.jsx(SvgIconTextPage,{width:22,height:22}),color:"bg-gray-300"}};return g0[m0]||g0.unknown}const k0=c0(A0??"unknown"),d0=clsx("file position-relative rounded",(k0==null?void 0:k0.color)??"bg-yellow-200"),h0=e0.eType==="resource"?e0.thumbnail:A0==="img"||A0==="video"?odeServices.workspace().getThumbnailUrl(e0):null,b0=useThumbnail(h0,{ref:u0}),p0=b0&&{backgroundImage:`url(${h0})`,backgroundSize:"cover"};return jsxRuntimeExports.jsx(Card,{className:clsx("card-file",n0),isClickable:_e,isSelectable:i0,isSelected:r0,onClick:t0,app:a0,isFocused:o0,onSelect:s0,children:jsxRuntimeExports.jsxs(Card.Body,{space:"8",children:[jsxRuntimeExports.jsx("div",{ref:u0,className:d0,style:{aspectRatio:"16/10",...p0},children:A0!=="img"||A0==="img"&&!b0?jsxRuntimeExports.jsx(FileIcon,{type:A0,roleMap:k0}):null}),jsxRuntimeExports.jsxs("div",{className:"mt-4",children:[jsxRuntimeExports.jsx(Card.Text,{children:e0.name}),jsxRuntimeExports.jsx(Card.Text,{className:"text-black-50",children:e0==null?void 0:e0.ownerName})]})]})})},SvgIconSortAscendingLetters=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.133 6.173c-.026.023-.133.118-.133.541v.715h2v-.715c0-.423-.107-.518-.133-.541C17.805 6.12 17.594 6 17 6s-.805.12-.867.173M20 6.714c0-.76-.203-1.521-.832-2.06C18.575 4.145 17.786 4 17 4s-1.575.145-2.168.654c-.629.539-.832 1.3-.832 2.06V11a1 1 0 1 0 2 0V9.429h2V11a1 1 0 1 0 2 0zM14 14a1 1 0 0 1 1-1h4a1 1 0 0 1 .832 1.555L16.87 19H19a1 1 0 1 1 0 2h-4a1 1 0 0 1-.832-1.555L17.132 15H15a1 1 0 0 1-1-1M3.293 16.293a1 1 0 0 1 1.414 0L7 18.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-3 3a1 1 0 0 1-1.414 0l-3-3a1 1 0 0 1 0-1.414",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7 4a1 1 0 0 1 1 1v15a1 1 0 1 1-2 0V5a1 1 0 0 1 1-1",clipRule:"evenodd"})]}),SvgIconSortDescendingLetters=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.133 6.173c-.026.023-.133.118-.133.541v.715h2v-.715c0-.423-.107-.518-.133-.541C17.805 6.12 17.594 6 17 6s-.805.12-.867.173M20 6.714c0-.76-.203-1.521-.832-2.06C18.575 4.145 17.786 4 17 4s-1.575.145-2.168.654c-.629.539-.832 1.3-.832 2.06V11a1 1 0 1 0 2 0V9.429h2V11a1 1 0 1 0 2 0zM14 14a1 1 0 0 1 1-1h4a1 1 0 0 1 .832 1.555L16.87 19H19a1 1 0 1 1 0 2h-4a1 1 0 0 1-.832-1.555L17.132 15H15a1 1 0 0 1-1-1M3.293 8.707a1 1 0 0 0 1.414 0L7 6.414l2.293 2.293a1 1 0 0 0 1.414-1.414l-3-3a1 1 0 0 0-1.414 0l-3 3a1 1 0 0 0 0 1.414",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7 21a1 1 0 0 0 1-1V5a1 1 0 0 0-2 0v15a1 1 0 0 0 1 1",clipRule:"evenodd"})]}),SvgIconSortTime=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.509 6.027a6.138 6.138 0 1 1-.28 12.099 1 1 0 1 0-.383 1.963A8.138 8.138 0 1 0 9.653 5.488a1 1 0 1 0 1.168 1.624 6.1 6.1 0 0 1 2.688-1.085",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M14.38 8.252a1 1 0 0 0-1 1v3.8a1 1 0 0 0 .456.838l2.052 1.332a1 1 0 0 0 1.089-1.678l-1.597-1.036V9.252a1 1 0 0 0-1-1M1.793 16.293a1 1 0 0 1 1.414 0L5.5 18.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-3 3a1 1 0 0 1-1.414 0l-3-3a1 1 0 0 1 0-1.414",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.5 4a1 1 0 0 0-1 1v15a1 1 0 1 0 2 0V5a1 1 0 0 0-1-1",clipRule:"evenodd"})]}),illuError="/assets/js/ode-explorer/illu-error.svg",illuError$1=Object.freeze(Object.defineProperty({__proto__:null,default:illuError},Symbol.toStringTag,{value:"Module"})),illuTrash="/assets/js/ode-explorer/illu-trash.svg",illuTrash$1=Object.freeze(Object.defineProperty({__proto__:null,default:illuTrash},Symbol.toStringTag,{value:"Module"})),EdificeThemeContext=reactExports.createContext(null);function useEdificeTheme(){const e0=reactExports.useContext(EdificeThemeContext);if(!e0)throw new Error("Cannot be used outside of EdificeThemeProvider");return e0}function useUser(){const{user:e0,userDescription:_e}=useEdificeClient(),{theme:i0}=useEdificeTheme();function r0(){let t0=_e==null?void 0:_e.picture;return(!t0||t0==="no-avatar.jpg"||t0==="no-avatar.svg")&&(t0=`${i0==null?void 0:i0.basePath}/img/illustrations/no-avatar.svg`),t0}return{user:e0,avatar:r0(),userDescription:_e}}function useGoogleDriveSearch(e0,_e,i0){const[r0,t0]=reactExports.useState({id:e0,name:_e,section:!0}),n0=reactExports.useCallback((l0,u0,A0)=>{t0(c0=>{const k0=findNodeById$1(c0,l0);if(!k0)return c0;const d0=u0.map(h0=>{var b0;const p0=(b0=k0.children)==null?void 0:b0.find(m0=>m0.id===h0.id);return p0?{...p0,name:h0.name}:{id:h0.id,name:h0.name}});return modifyNode$1(c0,h0=>h0.id===k0.id?{...h0,children:d0,files:A0}:h0)})},[]),s0=useQueryClient(),[o0,a0]=reactExports.useState(null),f0=reactExports.useCallback(async l0=>{if(!i0)return;const u0=l0===e0?void 0:l0;try{const A0=await s0.fetchQuery({queryKey:["googledrive","documents",i0,u0??"root"],queryFn:()=>odeServices.googledrive().listDocuments(i0,u0),staleTime:6e4}),c0=[],k0=[];A0.filter(d0=>d0.id!==u0).forEach(d0=>{d0.isFolder?c0.push(d0):k0.push(d0)}),a0(null),n0(l0,c0,k0)}catch(A0){a0(A0)}},[e0,i0,s0,n0]);return{root:r0,needsAuth:!1,isCheckingAuth:!1,isAuthError:!1,refetchAuthStatus:()=>{},loadContent:f0,loadError:o0}}const Grid=({children:e0,className:_e,...i0})=>{const r0=clsx("grid",_e);return jsxRuntimeExports.jsx("div",{className:r0,...i0,children:e0})},Column=({sm:e0,md:_e,lg:i0,xl:r0,children:t0,className:n0,as:s0,...o0})=>{const a0=s0||"div",f0=clsx({[`g-col-${e0}`]:e0,[_e?`g-col-md-${_e}`:""]:_e,[i0?`g-col-lg-${i0}`:""]:i0,[r0?`g-col-xl-${r0}`:""]:r0},n0);return jsxRuntimeExports.jsx(a0,{className:f0,...o0,children:t0})};Grid.Col=Column;const loadingScreen="/assets/js/ode-explorer/screen-loading.gif",LoadingScreen=reactExports.forwardRef(({position:e0=!0,caption:_e},i0)=>{const r0=clsx("top-0 end-0 start-0 bottom-0 d-grid justify-content-center align-content-center align-items-center z-2000",{"position-fixed":!e0,"position-static":e0}),t0=clsx("text-center pt-12",{"text-white":!e0});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{ref:i0,className:r0,children:[jsxRuntimeExports.jsx("div",{className:"bg-white rounded-circle mx-auto w-25",children:jsxRuntimeExports.jsx("img",{src:loadingScreen,alt:"loading"})}),_e&&jsxRuntimeExports.jsx("div",{className:t0,children:_e})]}),!e0&&jsxRuntimeExports.jsx("div",{className:"modal-backdrop fade show"})]})}),roleMappings$1={csv:{icon:".CSV",color:"bg-orange-200"},xls:{icon:".XLS",color:"bg-green-200"},doc:{icon:".DOC",color:"bg-blue-200"},txt:{icon:".TXT",color:"bg-blue-200"},pdf:{icon:".PDF",color:"bg-red-200"},audio:{icon:jsxRuntimeExports.jsx(SvgIconMic,{width:22,height:22}),color:"bg-red-200"},ppt:{icon:".PPT",color:"bg-red-200"},img:{icon:jsxRuntimeExports.jsx(SvgIconLandscape,{width:22,height:22}),color:"bg-green-200"},video:{icon:jsxRuntimeExports.jsx(SvgIconVideo,{width:22,height:22}),color:"bg-purple-200"},zip:{icon:".ZIP",color:"bg-gray-300"},md:{icon:".MD",color:"bg-blue-200"},unknown:{icon:jsxRuntimeExports.jsx(SvgIconTextPage,{width:22,height:22}),color:"bg-gray-300"}};function getRoleMap$1(e0,_e,i0){return _e!==void 0||i0!==void 0?{icon:_e||jsxRuntimeExports.jsx(SvgIconTextPage,{width:22,height:22}),color:i0||"bg-gray-300",hasShadow:!1}:roleMappings$1[e0]??roleMappings$1.unknown}const GoogleDriveFileCard=({doc:e0,userId:_e,isClickable:i0=!0,isSelectable:r0=!1,isSelected:t0=!1,onClick:n0,className:s0,onSelect:o0,isFocused:a0,app:f0,customIcon:l0,customColor:u0})=>{const A0=reactExports.useRef(null),c0=DocumentHelper.role(e0.contentType,!1),k0=getRoleMap$1(c0??"unknown",l0,u0),d0=clsx("file position-relative rounded",(k0==null?void 0:k0.color)??"bg-yellow-200"),h0=c0==="img"?odeServices.googledrive().getFileUrl(_e,e0):null,b0=useThumbnail(h0,{ref:A0}),p0=b0&&{backgroundImage:`url(${h0})`,backgroundSize:"cover"};return jsxRuntimeExports.jsx(Card,{className:clsx("card-file",s0),isClickable:i0,isSelectable:r0,isSelected:t0,onClick:n0,app:f0,isFocused:a0,onSelect:o0,children:jsxRuntimeExports.jsxs(Card.Body,{space:"8",children:[jsxRuntimeExports.jsx("div",{ref:A0,className:d0,style:{aspectRatio:"16/10",...p0},children:c0!=="img"||!b0?jsxRuntimeExports.jsx(FileIcon,{type:c0,roleMap:k0}):null}),jsxRuntimeExports.jsxs("div",{className:"mt-4",children:[jsxRuntimeExports.jsx(Card.Text,{children:e0.name}),jsxRuntimeExports.jsx(Card.Text,{className:"text-black-50",children:e0==null?void 0:e0.ownerDisplayName})]})]})})},ROOT_ID$1="root";function compare$1(e0,_e){return e0===_e?0:e0===void 0?-1:_e===void 0?1:e0.localeCompare(_e)}const GoogleDrive$1=({onSelect:e0,multiple:_e=!0,roles:i0,className:r0})=>{const{t:t0}=useTranslation(),{user:n0}=useUser(),{root:s0,loadContent:o0,loadError:a0}=useGoogleDriveSearch(ROOT_ID$1,t0("google-drive.mydrive"),n0==null?void 0:n0.userId),[f0,l0]=reactExports.useState(ROOT_ID$1),u0=findNodeById$1(s0,f0)??s0,[A0,c0]=reactExports.useState(void 0),[k0,d0]=reactExports.useState(["modified","desc"]),[h0,b0]=reactExports.useState([]),p0=reactExports.useCallback(y0=>{l0(y0),o0(y0)},[o0]);reactExports.useEffect(()=>{o0(ROOT_ID$1)},[o0]);const m0=reactExports.useMemo(()=>{if(!u0.files)return;const y0=T0=>{if(!i0)return!0;const R0=DocumentHelper.role(T0.contentType,!1);return Array.isArray(i0)?i0.includes(R0):i0===R0},S0=A0==null?void 0:A0.toLowerCase(),B0=u0.files.filter(T0=>(!S0||T0.name.toLowerCase().includes(S0))&&y0(T0));let I0;return k0[0]==="name"?I0=k0[1]==="asc"?(T0,R0)=>compare$1(T0.name,R0.name):(T0,R0)=>compare$1(R0.name,T0.name):I0=(T0,R0)=>compare$1(R0.lastModified,T0.lastModified),B0.sort(I0)},[u0,A0,k0,i0]),g0=reactExports.useMemo(()=>new Set(h0.map(y0=>y0.id)),[h0]),v0=reactExports.useCallback(y0=>{c0(y0.target.value)},[c0]);function x0(){return k0[0]==="name"?k0[1]==="asc"?t0("sort.order.alpha.asc"):t0("sort.order.alpha.desc"):t0("sort.order.modify.desc")}function w0(y0){let S0=[...h0];_e?S0.some(B0=>B0.id===y0.id)?S0=S0.filter(B0=>B0.id!==y0.id):S0=[...S0,y0]:S0=[y0],b0(S0),e0(S0)}const _0=clsx("workspace flex-grow-1 gap-0",r0);return jsxRuntimeExports.jsxs(Grid,{className:_0,children:[jsxRuntimeExports.jsx(Grid.Col,{sm:"12",md:"3",xl:"4",className:"workspace-folders p-12 pt-0 gap-12",children:jsxRuntimeExports.jsx("div",{style:{position:"sticky",top:0,paddingTop:"1.2rem"},children:jsxRuntimeExports.jsx(Tree,{nodes:s0,selectedNodeId:f0,showIcon:!0,onTreeItemClick:p0,onTreeItemUnfold:p0})})}),jsxRuntimeExports.jsx(Grid.Col,{sm:"12",md:"5",xl:"8",children:jsxRuntimeExports.jsxs(Grid,{className:"flex-grow-1 gap-0",children:[jsxRuntimeExports.jsxs(Grid.Col,{sm:"4",md:"8",xl:"12",children:[jsxRuntimeExports.jsx("div",{className:"workspace-search px-16 py-8 ",children:jsxRuntimeExports.jsx(SearchBar,{isVariant:!0,className:"gap-16",onChange:v0})}),jsxRuntimeExports.jsxs(Flex,{className:"px-8 py-4",align:"center",justify:"end",children:[jsxRuntimeExports.jsx("small",{className:"text-muted",children:t0("workspace.search.order")}),jsxRuntimeExports.jsxs(Dropdown,{children:[jsxRuntimeExports.jsx(Dropdown.Trigger,{size:"sm",label:x0(),variant:"ghost"}),jsxRuntimeExports.jsxs(Dropdown.Menu,{children:[jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortTime,{}),onClick:()=>d0(["modified","desc"]),children:t0("sort.order.modify.desc")}),jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortAscendingLetters,{}),onClick:()=>d0(["name","asc"]),children:t0("sort.order.alpha.asc")}),jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortDescendingLetters,{}),onClick:()=>d0(["name","desc"]),children:t0("sort.order.alpha.desc")})]})]})]})]}),jsxRuntimeExports.jsx(Grid.Col,{sm:"4",md:"8",xl:"12",className:"p-8 gap-8",children:a0?jsxRuntimeExports.jsxs(Flex,{direction:"column",gap:"12",className:"h-full w-100",justify:"center",align:"center",children:[jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuError,title:t0("google-drive.error.title"),text:t0("google-drive.error.description")}),jsxRuntimeExports.jsx(Button,{onClick:()=>o0(f0),children:t0("retry")})]}):m0?m0.length!==0?jsxRuntimeExports.jsx("div",{className:"grid grid-workspace",children:m0.map(y0=>{const S0=g0.has(y0.id);return jsxRuntimeExports.jsx(GoogleDriveFileCard,{doc:y0,userId:n0.userId,isSelected:S0,onClick:()=>w0(y0)},y0.id)})}):jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuTrash,text:t0("workspace.empty.docSpace"),title:t0("explorer.emptyScreen.trash.title")}):jsxRuntimeExports.jsx(LoadingScreen,{})})]})})]})};var ExtensionType=(e0=>(e0.Application="application",e0.WebGLPipes="webgl-pipes",e0.WebGLPipesAdaptor="webgl-pipes-adaptor",e0.WebGLSystem="webgl-system",e0.WebGPUPipes="webgpu-pipes",e0.WebGPUPipesAdaptor="webgpu-pipes-adaptor",e0.WebGPUSystem="webgpu-system",e0.CanvasSystem="canvas-system",e0.CanvasPipesAdaptor="canvas-pipes-adaptor",e0.CanvasPipes="canvas-pipes",e0.Asset="asset",e0.LoadParser="load-parser",e0.ResolveParser="resolve-parser",e0.CacheParser="cache-parser",e0.DetectionParser="detection-parser",e0.MaskEffect="mask-effect",e0.BlendMode="blend-mode",e0.TextureSource="texture-source",e0.Environment="environment",e0.ShapeBuilder="shape-builder",e0.Batcher="batcher",e0))(ExtensionType||{});const normalizeExtension=e0=>{if(typeof e0=="function"||typeof e0=="object"&&e0.extension){if(!e0.extension)throw new Error("Extension class must have an extension object");e0={...typeof e0.extension!="object"?{type:e0.extension}:e0.extension,ref:e0}}if(typeof e0=="object")e0={...e0};else throw new Error("Invalid extension type");return typeof e0.type=="string"&&(e0.type=[e0.type]),e0},normalizeExtensionPriority=(e0,_e)=>normalizeExtension(e0).priority??_e,extensions={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e0){return e0.map(normalizeExtension).forEach(_e=>{_e.type.forEach(i0=>{var r0,t0;return(t0=(r0=this._removeHandlers)[i0])==null?void 0:t0.call(r0,_e)})}),this},add(...e0){return e0.map(normalizeExtension).forEach(_e=>{_e.type.forEach(i0=>{var n0,s0;const r0=this._addHandlers,t0=this._queue;r0[i0]?(s0=r0[i0])==null||s0.call(r0,_e):(t0[i0]=t0[i0]||[],(n0=t0[i0])==null||n0.push(_e))})}),this},handle(e0,_e,i0){var s0;const r0=this._addHandlers,t0=this._removeHandlers;if(r0[e0]||t0[e0])throw new Error(`Extension type ${e0} already has a handler`);r0[e0]=_e,t0[e0]=i0;const n0=this._queue;return n0[e0]&&((s0=n0[e0])==null||s0.forEach(o0=>_e(o0)),delete n0[e0]),this},handleByMap(e0,_e){return this.handle(e0,i0=>{i0.name&&(_e[i0.name]=i0.ref)},i0=>{i0.name&&delete _e[i0.name]})},handleByNamedList(e0,_e,i0=-1){return this.handle(e0,r0=>{_e.findIndex(n0=>n0.name===r0.name)>=0||(_e.push({name:r0.name,value:r0.ref}),_e.sort((n0,s0)=>normalizeExtensionPriority(s0.value,i0)-normalizeExtensionPriority(n0.value,i0)))},r0=>{const t0=_e.findIndex(n0=>n0.name===r0.name);t0!==-1&&_e.splice(t0,1)})},handleByList(e0,_e,i0=-1){return this.handle(e0,r0=>{_e.includes(r0.ref)||(_e.push(r0.ref),_e.sort((t0,n0)=>normalizeExtensionPriority(n0,i0)-normalizeExtensionPriority(t0,i0)))},r0=>{const t0=_e.indexOf(r0.ref);t0!==-1&&_e.splice(t0,1)})},mixin(e0,..._e){for(const i0 of _e)Object.defineProperties(e0.prototype,Object.getOwnPropertyDescriptors(i0))}},browserExt={extension:{type:ExtensionType.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await __vitePreload(()=>Promise.resolve().then(()=>browserAll),void 0)}},webworkerExt={extension:{type:ExtensionType.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await __vitePreload(()=>Promise.resolve().then(()=>webworkerAll),void 0)}};class ObservablePoint{constructor(_e,i0,r0){this._x=i0||0,this._y=r0||0,this._observer=_e}clone(_e){return new ObservablePoint(_e??this._observer,this._x,this._y)}set(_e=0,i0=_e){return(this._x!==_e||this._y!==i0)&&(this._x=_e,this._y=i0,this._observer._onUpdate(this)),this}copyFrom(_e){return(this._x!==_e.x||this._y!==_e.y)&&(this._x=_e.x,this._y=_e.y,this._observer._onUpdate(this)),this}copyTo(_e){return _e.set(this._x,this._y),_e}equals(_e){return _e.x===this._x&&_e.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(_e){this._x!==_e&&(this._x=_e,this._observer._onUpdate(this))}get y(){return this._y}set y(_e){this._y!==_e&&(this._y=_e,this._observer._onUpdate(this))}}var eventemitter3={exports:{}};(function(e0){var _e=Object.prototype.hasOwnProperty,i0="~";function r0(){}Object.create&&(r0.prototype=Object.create(null),new r0().__proto__||(i0=!1));function t0(a0,f0,l0){this.fn=a0,this.context=f0,this.once=l0||!1}function n0(a0,f0,l0,u0,A0){if(typeof l0!="function")throw new TypeError("The listener must be a function");var c0=new t0(l0,u0||a0,A0),k0=i0?i0+f0:f0;return a0._events[k0]?a0._events[k0].fn?a0._events[k0]=[a0._events[k0],c0]:a0._events[k0].push(c0):(a0._events[k0]=c0,a0._eventsCount++),a0}function s0(a0,f0){--a0._eventsCount===0?a0._events=new r0:delete a0._events[f0]}function o0(){this._events=new r0,this._eventsCount=0}o0.prototype.eventNames=function(){var f0=[],l0,u0;if(this._eventsCount===0)return f0;for(u0 in l0=this._events)_e.call(l0,u0)&&f0.push(i0?u0.slice(1):u0);return Object.getOwnPropertySymbols?f0.concat(Object.getOwnPropertySymbols(l0)):f0},o0.prototype.listeners=function(f0){var l0=i0?i0+f0:f0,u0=this._events[l0];if(!u0)return[];if(u0.fn)return[u0.fn];for(var A0=0,c0=u0.length,k0=new Array(c0);A0<c0;A0++)k0[A0]=u0[A0].fn;return k0},o0.prototype.listenerCount=function(f0){var l0=i0?i0+f0:f0,u0=this._events[l0];return u0?u0.fn?1:u0.length:0},o0.prototype.emit=function(f0,l0,u0,A0,c0,k0){var d0=i0?i0+f0:f0;if(!this._events[d0])return!1;var h0=this._events[d0],b0=arguments.length,p0,m0;if(h0.fn){switch(h0.once&&this.removeListener(f0,h0.fn,void 0,!0),b0){case 1:return h0.fn.call(h0.context),!0;case 2:return h0.fn.call(h0.context,l0),!0;case 3:return h0.fn.call(h0.context,l0,u0),!0;case 4:return h0.fn.call(h0.context,l0,u0,A0),!0;case 5:return h0.fn.call(h0.context,l0,u0,A0,c0),!0;case 6:return h0.fn.call(h0.context,l0,u0,A0,c0,k0),!0}for(m0=1,p0=new Array(b0-1);m0<b0;m0++)p0[m0-1]=arguments[m0];h0.fn.apply(h0.context,p0)}else{var g0=h0.length,v0;for(m0=0;m0<g0;m0++)switch(h0[m0].once&&this.removeListener(f0,h0[m0].fn,void 0,!0),b0){case 1:h0[m0].fn.call(h0[m0].context);break;case 2:h0[m0].fn.call(h0[m0].context,l0);break;case 3:h0[m0].fn.call(h0[m0].context,l0,u0);break;case 4:h0[m0].fn.call(h0[m0].context,l0,u0,A0);break;default:if(!p0)for(v0=1,p0=new Array(b0-1);v0<b0;v0++)p0[v0-1]=arguments[v0];h0[m0].fn.apply(h0[m0].context,p0)}}return!0},o0.prototype.on=function(f0,l0,u0){return n0(this,f0,l0,u0,!1)},o0.prototype.once=function(f0,l0,u0){return n0(this,f0,l0,u0,!0)},o0.prototype.removeListener=function(f0,l0,u0,A0){var c0=i0?i0+f0:f0;if(!this._events[c0])return this;if(!l0)return s0(this,c0),this;var k0=this._events[c0];if(k0.fn)k0.fn===l0&&(!A0||k0.once)&&(!u0||k0.context===u0)&&s0(this,c0);else{for(var d0=0,h0=[],b0=k0.length;d0<b0;d0++)(k0[d0].fn!==l0||A0&&!k0[d0].once||u0&&k0[d0].context!==u0)&&h0.push(k0[d0]);h0.length?this._events[c0]=h0.length===1?h0[0]:h0:s0(this,c0)}return this},o0.prototype.removeAllListeners=function(f0){var l0;return f0?(l0=i0?i0+f0:f0,this._events[l0]&&s0(this,l0)):(this._events=new r0,this._eventsCount=0),this},o0.prototype.off=o0.prototype.removeListener,o0.prototype.addListener=o0.prototype.on,o0.prefixed=i0,o0.EventEmitter=o0,e0.exports=o0})(eventemitter3);var eventemitter3Exports=eventemitter3.exports;const EventEmitter=getDefaultExportFromCjs$1(eventemitter3Exports),PI_2=Math.PI*2,RAD_TO_DEG=180/Math.PI,DEG_TO_RAD=Math.PI/180;class Point{constructor(_e=0,i0=0){this.x=0,this.y=0,this.x=_e,this.y=i0}clone(){return new Point(this.x,this.y)}copyFrom(_e){return this.set(_e.x,_e.y),this}copyTo(_e){return _e.set(this.x,this.y),_e}equals(_e){return _e.x===this.x&&_e.y===this.y}set(_e=0,i0=_e){return this.x=_e,this.y=i0,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return tempPoint.x=0,tempPoint.y=0,tempPoint}}const tempPoint=new Point;class Matrix{constructor(_e=1,i0=0,r0=0,t0=1,n0=0,s0=0){this.array=null,this.a=_e,this.b=i0,this.c=r0,this.d=t0,this.tx=n0,this.ty=s0}fromArray(_e){this.a=_e[0],this.b=_e[1],this.c=_e[3],this.d=_e[4],this.tx=_e[2],this.ty=_e[5]}set(_e,i0,r0,t0,n0,s0){return this.a=_e,this.b=i0,this.c=r0,this.d=t0,this.tx=n0,this.ty=s0,this}toArray(_e,i0){this.array||(this.array=new Float32Array(9));const r0=i0||this.array;return _e?(r0[0]=this.a,r0[1]=this.b,r0[2]=0,r0[3]=this.c,r0[4]=this.d,r0[5]=0,r0[6]=this.tx,r0[7]=this.ty,r0[8]=1):(r0[0]=this.a,r0[1]=this.c,r0[2]=this.tx,r0[3]=this.b,r0[4]=this.d,r0[5]=this.ty,r0[6]=0,r0[7]=0,r0[8]=1),r0}apply(_e,i0){i0=i0||new Point;const r0=_e.x,t0=_e.y;return i0.x=this.a*r0+this.c*t0+this.tx,i0.y=this.b*r0+this.d*t0+this.ty,i0}applyInverse(_e,i0){i0=i0||new Point;const r0=this.a,t0=this.b,n0=this.c,s0=this.d,o0=this.tx,a0=this.ty,f0=1/(r0*s0+n0*-t0),l0=_e.x,u0=_e.y;return i0.x=s0*f0*l0+-n0*f0*u0+(a0*n0-o0*s0)*f0,i0.y=r0*f0*u0+-t0*f0*l0+(-a0*r0+o0*t0)*f0,i0}translate(_e,i0){return this.tx+=_e,this.ty+=i0,this}scale(_e,i0){return this.a*=_e,this.d*=i0,this.c*=_e,this.b*=i0,this.tx*=_e,this.ty*=i0,this}rotate(_e){const i0=Math.cos(_e),r0=Math.sin(_e),t0=this.a,n0=this.c,s0=this.tx;return this.a=t0*i0-this.b*r0,this.b=t0*r0+this.b*i0,this.c=n0*i0-this.d*r0,this.d=n0*r0+this.d*i0,this.tx=s0*i0-this.ty*r0,this.ty=s0*r0+this.ty*i0,this}append(_e){const i0=this.a,r0=this.b,t0=this.c,n0=this.d;return this.a=_e.a*i0+_e.b*t0,this.b=_e.a*r0+_e.b*n0,this.c=_e.c*i0+_e.d*t0,this.d=_e.c*r0+_e.d*n0,this.tx=_e.tx*i0+_e.ty*t0+this.tx,this.ty=_e.tx*r0+_e.ty*n0+this.ty,this}appendFrom(_e,i0){const r0=_e.a,t0=_e.b,n0=_e.c,s0=_e.d,o0=_e.tx,a0=_e.ty,f0=i0.a,l0=i0.b,u0=i0.c,A0=i0.d;return this.a=r0*f0+t0*u0,this.b=r0*l0+t0*A0,this.c=n0*f0+s0*u0,this.d=n0*l0+s0*A0,this.tx=o0*f0+a0*u0+i0.tx,this.ty=o0*l0+a0*A0+i0.ty,this}setTransform(_e,i0,r0,t0,n0,s0,o0,a0,f0){return this.a=Math.cos(o0+f0)*n0,this.b=Math.sin(o0+f0)*n0,this.c=-Math.sin(o0-a0)*s0,this.d=Math.cos(o0-a0)*s0,this.tx=_e-(r0*this.a+t0*this.c),this.ty=i0-(r0*this.b+t0*this.d),this}prepend(_e){const i0=this.tx;if(_e.a!==1||_e.b!==0||_e.c!==0||_e.d!==1){const r0=this.a,t0=this.c;this.a=r0*_e.a+this.b*_e.c,this.b=r0*_e.b+this.b*_e.d,this.c=t0*_e.a+this.d*_e.c,this.d=t0*_e.b+this.d*_e.d}return this.tx=i0*_e.a+this.ty*_e.c+_e.tx,this.ty=i0*_e.b+this.ty*_e.d+_e.ty,this}decompose(_e){const i0=this.a,r0=this.b,t0=this.c,n0=this.d,s0=_e.pivot,o0=-Math.atan2(-t0,n0),a0=Math.atan2(r0,i0),f0=Math.abs(o0+a0);return f0<1e-5||Math.abs(PI_2-f0)<1e-5?(_e.rotation=a0,_e.skew.x=_e.skew.y=0):(_e.rotation=0,_e.skew.x=o0,_e.skew.y=a0),_e.scale.x=Math.sqrt(i0*i0+r0*r0),_e.scale.y=Math.sqrt(t0*t0+n0*n0),_e.position.x=this.tx+(s0.x*i0+s0.y*t0),_e.position.y=this.ty+(s0.x*r0+s0.y*n0),_e}invert(){const _e=this.a,i0=this.b,r0=this.c,t0=this.d,n0=this.tx,s0=_e*t0-i0*r0;return this.a=t0/s0,this.b=-i0/s0,this.c=-r0/s0,this.d=_e/s0,this.tx=(r0*this.ty-t0*n0)/s0,this.ty=-(_e*this.ty-i0*n0)/s0,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const _e=new Matrix;return _e.a=this.a,_e.b=this.b,_e.c=this.c,_e.d=this.d,_e.tx=this.tx,_e.ty=this.ty,_e}copyTo(_e){return _e.a=this.a,_e.b=this.b,_e.c=this.c,_e.d=this.d,_e.tx=this.tx,_e.ty=this.ty,_e}copyFrom(_e){return this.a=_e.a,this.b=_e.b,this.c=_e.c,this.d=_e.d,this.tx=_e.tx,this.ty=_e.ty,this}equals(_e){return _e.a===this.a&&_e.b===this.b&&_e.c===this.c&&_e.d===this.d&&_e.tx===this.tx&&_e.ty===this.ty}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return identityMatrix$1.identity()}static get shared(){return tempMatrix$5.identity()}}const tempMatrix$5=new Matrix,identityMatrix$1=new Matrix,ux=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],uy=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],vx=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],vy=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],rotationCayley=[],rotationMatrices=[],signum=Math.sign;function init(){for(let e0=0;e0<16;e0++){const _e=[];rotationCayley.push(_e);for(let i0=0;i0<16;i0++){const r0=signum(ux[e0]*ux[i0]+vx[e0]*uy[i0]),t0=signum(uy[e0]*ux[i0]+vy[e0]*uy[i0]),n0=signum(ux[e0]*vx[i0]+vx[e0]*vy[i0]),s0=signum(uy[e0]*vx[i0]+vy[e0]*vy[i0]);for(let o0=0;o0<16;o0++)if(ux[o0]===r0&&uy[o0]===t0&&vx[o0]===n0&&vy[o0]===s0){_e.push(o0);break}}}for(let e0=0;e0<16;e0++){const _e=new Matrix;_e.set(ux[e0],uy[e0],vx[e0],vy[e0],0,0),rotationMatrices.push(_e)}}init();const groupD8={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e0=>ux[e0],uY:e0=>uy[e0],vX:e0=>vx[e0],vY:e0=>vy[e0],inv:e0=>e0&8?e0&15:-e0&7,add:(e0,_e)=>rotationCayley[e0][_e],sub:(e0,_e)=>rotationCayley[e0][groupD8.inv(_e)],rotate180:e0=>e0^4,isVertical:e0=>(e0&3)===2,byDirection:(e0,_e)=>Math.abs(e0)*2<=Math.abs(_e)?_e>=0?groupD8.S:groupD8.N:Math.abs(_e)*2<=Math.abs(e0)?e0>0?groupD8.E:groupD8.W:_e>0?e0>0?groupD8.SE:groupD8.SW:e0>0?groupD8.NE:groupD8.NW,matrixAppendRotationInv:(e0,_e,i0=0,r0=0)=>{const t0=rotationMatrices[groupD8.inv(_e)];t0.tx=i0,t0.ty=r0,e0.append(t0)},transformRectCoords:(e0,_e,i0,r0)=>{const{x:t0,y:n0,width:s0,height:o0}=e0,{x:a0,y:f0,width:l0,height:u0}=_e;return i0===groupD8.E?(r0.set(t0+a0,n0+f0,s0,o0),r0):i0===groupD8.S?r0.set(l0-n0-o0+a0,t0+f0,o0,s0):i0===groupD8.W?r0.set(l0-t0-s0+a0,u0-n0-o0+f0,s0,o0):i0===groupD8.N?r0.set(n0+a0,u0-t0-s0+f0,o0,s0):r0.set(t0+a0,n0+f0,s0,o0)}},tempPoints=[new Point,new Point,new Point,new Point];class Rectangle{constructor(_e=0,i0=0,r0=0,t0=0){this.type="rectangle",this.x=Number(_e),this.y=Number(i0),this.width=Number(r0),this.height=Number(t0)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new Rectangle(0,0,0,0)}clone(){return new Rectangle(this.x,this.y,this.width,this.height)}copyFromBounds(_e){return this.x=_e.minX,this.y=_e.minY,this.width=_e.maxX-_e.minX,this.height=_e.maxY-_e.minY,this}copyFrom(_e){return this.x=_e.x,this.y=_e.y,this.width=_e.width,this.height=_e.height,this}copyTo(_e){return _e.copyFrom(this),_e}contains(_e,i0){return this.width<=0||this.height<=0?!1:_e>=this.x&&_e<this.x+this.width&&i0>=this.y&&i0<this.y+this.height}strokeContains(_e,i0,r0,t0=.5){const{width:n0,height:s0}=this;if(n0<=0||s0<=0)return!1;const o0=this.x,a0=this.y,f0=r0*(1-t0),l0=r0-f0,u0=o0-f0,A0=o0+n0+f0,c0=a0-f0,k0=a0+s0+f0,d0=o0+l0,h0=o0+n0-l0,b0=a0+l0,p0=a0+s0-l0;return _e>=u0&&_e<=A0&&i0>=c0&&i0<=k0&&!(_e>d0&&_e<h0&&i0>b0&&i0<p0)}intersects(_e,i0){if(!i0){const _0=this.x<_e.x?_e.x:this.x;if((this.right>_e.right?_e.right:this.right)<=_0)return!1;const S0=this.y<_e.y?_e.y:this.y;return(this.bottom>_e.bottom?_e.bottom:this.bottom)>S0}const r0=this.left,t0=this.right,n0=this.top,s0=this.bottom;if(t0<=r0||s0<=n0)return!1;const o0=tempPoints[0].set(_e.left,_e.top),a0=tempPoints[1].set(_e.left,_e.bottom),f0=tempPoints[2].set(_e.right,_e.top),l0=tempPoints[3].set(_e.right,_e.bottom);if(f0.x<=o0.x||a0.y<=o0.y)return!1;const u0=Math.sign(i0.a*i0.d-i0.b*i0.c);if(u0===0||(i0.apply(o0,o0),i0.apply(a0,a0),i0.apply(f0,f0),i0.apply(l0,l0),Math.max(o0.x,a0.x,f0.x,l0.x)<=r0||Math.min(o0.x,a0.x,f0.x,l0.x)>=t0||Math.max(o0.y,a0.y,f0.y,l0.y)<=n0||Math.min(o0.y,a0.y,f0.y,l0.y)>=s0))return!1;const A0=u0*(a0.y-o0.y),c0=u0*(o0.x-a0.x),k0=A0*r0+c0*n0,d0=A0*t0+c0*n0,h0=A0*r0+c0*s0,b0=A0*t0+c0*s0;if(Math.max(k0,d0,h0,b0)<=A0*o0.x+c0*o0.y||Math.min(k0,d0,h0,b0)>=A0*l0.x+c0*l0.y)return!1;const p0=u0*(o0.y-f0.y),m0=u0*(f0.x-o0.x),g0=p0*r0+m0*n0,v0=p0*t0+m0*n0,x0=p0*r0+m0*s0,w0=p0*t0+m0*s0;return!(Math.max(g0,v0,x0,w0)<=p0*o0.x+m0*o0.y||Math.min(g0,v0,x0,w0)>=p0*l0.x+m0*l0.y)}pad(_e=0,i0=_e){return this.x-=_e,this.y-=i0,this.width+=_e*2,this.height+=i0*2,this}fit(_e){const i0=Math.max(this.x,_e.x),r0=Math.min(this.x+this.width,_e.x+_e.width),t0=Math.max(this.y,_e.y),n0=Math.min(this.y+this.height,_e.y+_e.height);return this.x=i0,this.width=Math.max(r0-i0,0),this.y=t0,this.height=Math.max(n0-t0,0),this}ceil(_e=1,i0=.001){const r0=Math.ceil((this.x+this.width-i0)*_e)/_e,t0=Math.ceil((this.y+this.height-i0)*_e)/_e;return this.x=Math.floor((this.x+i0)*_e)/_e,this.y=Math.floor((this.y+i0)*_e)/_e,this.width=r0-this.x,this.height=t0-this.y,this}scale(_e,i0=_e){return this.x*=_e,this.y*=i0,this.width*=_e,this.height*=i0,this}enlarge(_e){const i0=Math.min(this.x,_e.x),r0=Math.max(this.x+this.width,_e.x+_e.width),t0=Math.min(this.y,_e.y),n0=Math.max(this.y+this.height,_e.y+_e.height);return this.x=i0,this.width=r0-i0,this.y=t0,this.height=n0-t0,this}getBounds(_e){return _e||(_e=new Rectangle),_e.copyFrom(this),_e}containsRect(_e){if(this.width<=0||this.height<=0)return!1;const i0=_e.x,r0=_e.y,t0=_e.x+_e.width,n0=_e.y+_e.height;return i0>=this.x&&i0<this.x+this.width&&r0>=this.y&&r0<this.y+this.height&&t0>=this.x&&t0<this.x+this.width&&n0>=this.y&&n0<this.y+this.height}set(_e,i0,r0,t0){return this.x=_e,this.y=i0,this.width=r0,this.height=t0,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const uidCache={default:-1};function uid$1(e0="default"){return uidCache[e0]===void 0&&(uidCache[e0]=-1),++uidCache[e0]}const warnings=new Set,v8_0_0="8.0.0",v8_3_4="8.3.4",deprecationState={quiet:!1,noColor:!1},deprecation=(e0,_e,i0=3)=>{if(deprecationState.quiet||warnings.has(_e))return;let r0=new Error().stack;const t0=`${_e}
|
|
280
280
|
Deprecated since v${e0}`,n0=typeof console.groupCollapsed=="function"&&!deprecationState.noColor;typeof r0>"u"?console.warn("PixiJS Deprecation Warning: ",t0):(r0=r0.split(`
|
|
281
281
|
`).splice(i0).join(`
|
|
282
282
|
`),n0?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",t0),console.warn(r0),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",t0),console.warn(r0))),warnings.add(_e)};Object.defineProperties(deprecation,{quiet:{get:()=>deprecationState.quiet,set:e0=>{deprecationState.quiet=e0},enumerable:!0,configurable:!1},noColor:{get:()=>deprecationState.noColor,set:e0=>{deprecationState.noColor=e0},enumerable:!0,configurable:!1}});const NOOP=()=>{};function nextPow2(e0){return e0+=e0===0?1:0,--e0,e0|=e0>>>1,e0|=e0>>>2,e0|=e0>>>4,e0|=e0>>>8,e0|=e0>>>16,e0+1}function isPow2(e0){return!(e0&e0-1)&&!!e0}function definedProps(e0){const _e={};for(const i0 in e0)e0[i0]!==void 0&&(_e[i0]=e0[i0]);return _e}const idHash$1=Object.create(null);function createResourceIdFromString(e0){const _e=idHash$1[e0];return _e===void 0&&(idHash$1[e0]=uid$1("resource")),_e}const _TextureStyle=class Ot extends EventEmitter{constructor(_e={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,_e={...Ot.defaultOptions,..._e},this.addressMode=_e.addressMode,this.addressModeU=_e.addressModeU??this.addressModeU,this.addressModeV=_e.addressModeV??this.addressModeV,this.addressModeW=_e.addressModeW??this.addressModeW,this.scaleMode=_e.scaleMode,this.magFilter=_e.magFilter??this.magFilter,this.minFilter=_e.minFilter??this.minFilter,this.mipmapFilter=_e.mipmapFilter??this.mipmapFilter,this.lodMinClamp=_e.lodMinClamp,this.lodMaxClamp=_e.lodMaxClamp,this.compare=_e.compare,this.maxAnisotropy=_e.maxAnisotropy??1}set addressMode(_e){this.addressModeU=_e,this.addressModeV=_e,this.addressModeW=_e}get addressMode(){return this.addressModeU}set wrapMode(_e){deprecation(v8_0_0,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=_e}get wrapMode(){return this.addressMode}set scaleMode(_e){this.magFilter=_e,this.minFilter=_e,this.mipmapFilter=_e}get scaleMode(){return this.magFilter}set maxAnisotropy(_e){this._maxAnisotropy=Math.min(_e,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this._sharedResourceId=null,this.emit("change",this)}_generateResourceId(){const _e=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=createResourceIdFromString(_e),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};_TextureStyle.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let TextureStyle=_TextureStyle;const _TextureSource=class Xt extends EventEmitter{constructor(_e={}){super(),this.options=_e,this._gpuData=Object.create(null),this._gcLastUsed=-1,this.uid=uid$1("textureSource"),this._resourceType="textureSource",this._resourceId=uid$1("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=!1,this.format="rgba8unorm",this.dimension="2d",this.antialias=!1,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,_e={...Xt.defaultOptions,..._e},this.label=_e.label??"",this.resource=_e.resource,this.autoGarbageCollect=_e.autoGarbageCollect,this._resolution=_e.resolution,_e.width?this.pixelWidth=_e.width*this._resolution:this.pixelWidth=this.resource?this.resourceWidth??1:1,_e.height?this.pixelHeight=_e.height*this._resolution:this.pixelHeight=this.resource?this.resourceHeight??1:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=_e.format,this.dimension=_e.dimensions,this.mipLevelCount=_e.mipLevelCount,this.autoGenerateMipmaps=_e.autoGenerateMipmaps,this.sampleCount=_e.sampleCount,this.antialias=_e.antialias,this.alphaMode=_e.alphaMode,this.style=new TextureStyle(definedProps(_e)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(_e){var i0,r0;this.style!==_e&&((i0=this._style)==null||i0.off("change",this._onStyleChange,this),this._style=_e,(r0=this._style)==null||r0.on("change",this._onStyleChange,this),this._onStyleChange())}set maxAnisotropy(_e){this._style.maxAnisotropy=_e}get maxAnisotropy(){return this._style.maxAnisotropy}get addressMode(){return this._style.addressMode}set addressMode(_e){this._style.addressMode=_e}get repeatMode(){return this._style.addressMode}set repeatMode(_e){this._style.addressMode=_e}get magFilter(){return this._style.magFilter}set magFilter(_e){this._style.magFilter=_e}get minFilter(){return this._style.minFilter}set minFilter(_e){this._style.minFilter=_e}get mipmapFilter(){return this._style.mipmapFilter}set mipmapFilter(_e){this._style.mipmapFilter=_e}get lodMinClamp(){return this._style.lodMinClamp}set lodMinClamp(_e){this._style.lodMinClamp=_e}get lodMaxClamp(){return this._style.lodMaxClamp}set lodMaxClamp(_e){this._style.lodMaxClamp=_e}_onStyleChange(){this.emit("styleChange",this)}update(){if(this.resource){const _e=this._resolution;if(this.resize(this.resourceWidth/_e,this.resourceHeight/_e))return}this.emit("update",this)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this._style&&(this._style.destroy(),this._style=null),this.uploadMethodId=null,this.resource=null,this.removeAllListeners()}unload(){var _e,i0;this._resourceId=uid$1("resource"),this.emit("change",this),this.emit("unload",this);for(const r0 in this._gpuData)(i0=(_e=this._gpuData[r0])==null?void 0:_e.destroy)==null||i0.call(_e);this._gpuData=Object.create(null)}get resourceWidth(){const{resource:_e}=this;return _e.naturalWidth||_e.videoWidth||_e.displayWidth||_e.width}get resourceHeight(){const{resource:_e}=this;return _e.naturalHeight||_e.videoHeight||_e.displayHeight||_e.height}get resolution(){return this._resolution}set resolution(_e){this._resolution!==_e&&(this._resolution=_e,this.width=this.pixelWidth/_e,this.height=this.pixelHeight/_e)}resize(_e,i0,r0){r0||(r0=this._resolution),_e||(_e=this.width),i0||(i0=this.height);const t0=Math.round(_e*r0),n0=Math.round(i0*r0);return this.width=t0/r0,this.height=n0/r0,this._resolution=r0,this.pixelWidth===t0&&this.pixelHeight===n0?!1:(this._refreshPOT(),this.pixelWidth=t0,this.pixelHeight=n0,this.emit("resize",this),this._resourceId=uid$1("resource"),this.emit("change",this),!0)}updateMipmaps(){this.autoGenerateMipmaps&&this.mipLevelCount>1&&this.emit("updateMipmaps",this)}set wrapMode(_e){this._style.wrapMode=_e}get wrapMode(){return this._style.wrapMode}set scaleMode(_e){this._style.scaleMode=_e}get scaleMode(){return this._style.scaleMode}_refreshPOT(){this.isPowerOfTwo=isPow2(this.pixelWidth)&&isPow2(this.pixelHeight)}static test(_e){throw new Error("Unimplemented")}};_TextureSource.defaultOptions={resolution:1,format:"bgra8unorm",alphaMode:"premultiply-alpha-on-upload",dimensions:"2d",mipLevelCount:1,autoGenerateMipmaps:!1,sampleCount:1,antialias:!1,autoGarbageCollect:!1};let TextureSource=_TextureSource;class BufferImageSource extends TextureSource{constructor(_e){const i0=_e.resource||new Float32Array(_e.width*_e.height*4);let r0=_e.format;r0||(i0 instanceof Float32Array?r0="rgba32float":i0 instanceof Int32Array||i0 instanceof Uint32Array?r0="rgba32uint":i0 instanceof Int16Array||i0 instanceof Uint16Array?r0="rgba16uint":(i0 instanceof Int8Array,r0="bgra8unorm")),super({..._e,resource:i0,format:r0}),this.uploadMethodId="buffer"}static test(_e){return _e instanceof Int8Array||_e instanceof Uint8Array||_e instanceof Uint8ClampedArray||_e instanceof Int16Array||_e instanceof Uint16Array||_e instanceof Int32Array||_e instanceof Uint32Array||_e instanceof Float32Array}}BufferImageSource.extension=ExtensionType.TextureSource;const tempMat=new Matrix;class TextureMatrix{constructor(_e,i0){this.mapCoord=new Matrix,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,typeof i0>"u"?this.clampMargin=_e.width<10?0:.5:this.clampMargin=i0,this.isSimple=!1,this.texture=_e}get texture(){return this._texture}set texture(_e){var i0;this.texture!==_e&&((i0=this._texture)==null||i0.removeListener("update",this.update,this),this._texture=_e,this._texture.addListener("update",this.update,this),this.update())}multiplyUvs(_e,i0){i0===void 0&&(i0=_e);const r0=this.mapCoord;for(let t0=0;t0<_e.length;t0+=2){const n0=_e[t0],s0=_e[t0+1];i0[t0]=n0*r0.a+s0*r0.c+r0.tx,i0[t0+1]=n0*r0.b+s0*r0.d+r0.ty}return i0}update(){const _e=this._texture;this._updateID++;const i0=_e.uvs;this.mapCoord.set(i0.x1-i0.x0,i0.y1-i0.y0,i0.x3-i0.x0,i0.y3-i0.y0,i0.x0,i0.y0);const r0=_e.orig,t0=_e.trim;t0&&(tempMat.set(r0.width/t0.width,0,0,r0.height/t0.height,-t0.x/t0.width,-t0.y/t0.height),this.mapCoord.append(tempMat));const n0=_e.source,s0=this.uClampFrame,o0=this.clampMargin/n0._resolution,a0=this.clampOffset/n0._resolution;return s0[0]=(_e.frame.x+o0+a0)/n0.width,s0[1]=(_e.frame.y+o0+a0)/n0.height,s0[2]=(_e.frame.x+_e.frame.width-o0+a0)/n0.width,s0[3]=(_e.frame.y+_e.frame.height-o0+a0)/n0.height,this.uClampOffset[0]=this.clampOffset/n0.pixelWidth,this.uClampOffset[1]=this.clampOffset/n0.pixelHeight,this.isSimple=_e.frame.width===n0.width&&_e.frame.height===n0.height&&_e.rotate===0,!0}}class Texture extends EventEmitter{constructor({source:_e,label:i0,frame:r0,orig:t0,trim:n0,defaultAnchor:s0,defaultBorders:o0,rotate:a0,dynamic:f0}={}){if(super(),this.uid=uid$1("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new Rectangle,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=i0,this.source=(_e==null?void 0:_e.source)??new TextureSource,this.noFrame=!r0,r0)this.frame.copyFrom(r0);else{const{width:l0,height:u0}=this._source;this.frame.width=l0,this.frame.height=u0}this.orig=t0||this.frame,this.trim=n0,this.rotate=a0??0,this.defaultAnchor=s0,this.defaultBorders=o0,this.destroyed=!1,this.dynamic=f0||!1,this.updateUvs()}set source(_e){this._source&&this._source.off("resize",this.update,this),this._source=_e,_e.on("resize",this.update,this),this.emit("update",this)}get source(){return this._source}get textureMatrix(){return this._textureMatrix||(this._textureMatrix=new TextureMatrix(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){const{uvs:_e,frame:i0}=this,{width:r0,height:t0}=this._source,n0=i0.x/r0,s0=i0.y/t0,o0=i0.width/r0,a0=i0.height/t0;let f0=this.rotate;if(f0){const l0=o0/2,u0=a0/2,A0=n0+l0,c0=s0+u0;f0=groupD8.add(f0,groupD8.NW),_e.x0=A0+l0*groupD8.uX(f0),_e.y0=c0+u0*groupD8.uY(f0),f0=groupD8.add(f0,2),_e.x1=A0+l0*groupD8.uX(f0),_e.y1=c0+u0*groupD8.uY(f0),f0=groupD8.add(f0,2),_e.x2=A0+l0*groupD8.uX(f0),_e.y2=c0+u0*groupD8.uY(f0),f0=groupD8.add(f0,2),_e.x3=A0+l0*groupD8.uX(f0),_e.y3=c0+u0*groupD8.uY(f0)}else _e.x0=n0,_e.y0=s0,_e.x1=n0+o0,_e.y1=s0,_e.x2=n0+o0,_e.y2=s0+a0,_e.x3=n0,_e.y3=s0+a0}destroy(_e=!1){this._source&&(this._source.off("resize",this.update,this),_e&&(this._source.destroy(),this._source=null)),this._textureMatrix=null,this.destroyed=!0,this.emit("destroy",this),this.removeAllListeners()}update(){this.noFrame&&(this.frame.width=this._source.width,this.frame.height=this._source.height),this.updateUvs(),this.emit("update",this)}get baseTexture(){return deprecation(v8_0_0,"Texture.baseTexture is now Texture.source"),this._source}}Texture.EMPTY=new Texture({label:"EMPTY",source:new TextureSource({label:"EMPTY"})});Texture.EMPTY.destroy=NOOP;Texture.WHITE=new Texture({source:new BufferImageSource({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});Texture.WHITE.destroy=NOOP;function updateQuadBounds(e0,_e,i0){const{width:r0,height:t0}=i0.orig,n0=i0.trim;if(n0){const s0=n0.width,o0=n0.height;e0.minX=n0.x-_e._x*r0,e0.maxX=e0.minX+s0,e0.minY=n0.y-_e._y*t0,e0.maxY=e0.minY+o0}else e0.minX=-_e._x*r0,e0.maxX=e0.minX+r0,e0.minY=-_e._y*t0,e0.maxY=e0.minY+t0}const defaultMatrix=new Matrix;class Bounds{constructor(_e=1/0,i0=1/0,r0=-1/0,t0=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=defaultMatrix,this.minX=_e,this.minY=i0,this.maxX=r0,this.maxY=t0}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new Rectangle);const _e=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(_e.x=0,_e.y=0,_e.width=0,_e.height=0):_e.copyFromBounds(this),_e}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=defaultMatrix,this}set(_e,i0,r0,t0){this.minX=_e,this.minY=i0,this.maxX=r0,this.maxY=t0}addFrame(_e,i0,r0,t0,n0){n0||(n0=this.matrix);const s0=n0.a,o0=n0.b,a0=n0.c,f0=n0.d,l0=n0.tx,u0=n0.ty;let A0=this.minX,c0=this.minY,k0=this.maxX,d0=this.maxY,h0=s0*_e+a0*i0+l0,b0=o0*_e+f0*i0+u0;h0<A0&&(A0=h0),b0<c0&&(c0=b0),h0>k0&&(k0=h0),b0>d0&&(d0=b0),h0=s0*r0+a0*i0+l0,b0=o0*r0+f0*i0+u0,h0<A0&&(A0=h0),b0<c0&&(c0=b0),h0>k0&&(k0=h0),b0>d0&&(d0=b0),h0=s0*_e+a0*t0+l0,b0=o0*_e+f0*t0+u0,h0<A0&&(A0=h0),b0<c0&&(c0=b0),h0>k0&&(k0=h0),b0>d0&&(d0=b0),h0=s0*r0+a0*t0+l0,b0=o0*r0+f0*t0+u0,h0<A0&&(A0=h0),b0<c0&&(c0=b0),h0>k0&&(k0=h0),b0>d0&&(d0=b0),this.minX=A0,this.minY=c0,this.maxX=k0,this.maxY=d0}addRect(_e,i0){this.addFrame(_e.x,_e.y,_e.x+_e.width,_e.y+_e.height,i0)}addBounds(_e,i0){this.addFrame(_e.minX,_e.minY,_e.maxX,_e.maxY,i0)}addBoundsMask(_e){this.minX=this.minX>_e.minX?this.minX:_e.minX,this.minY=this.minY>_e.minY?this.minY:_e.minY,this.maxX=this.maxX<_e.maxX?this.maxX:_e.maxX,this.maxY=this.maxY<_e.maxY?this.maxY:_e.maxY}applyMatrix(_e){const i0=this.minX,r0=this.minY,t0=this.maxX,n0=this.maxY,{a:s0,b:o0,c:a0,d:f0,tx:l0,ty:u0}=_e;let A0=s0*i0+a0*r0+l0,c0=o0*i0+f0*r0+u0;this.minX=A0,this.minY=c0,this.maxX=A0,this.maxY=c0,A0=s0*t0+a0*r0+l0,c0=o0*t0+f0*r0+u0,this.minX=A0<this.minX?A0:this.minX,this.minY=c0<this.minY?c0:this.minY,this.maxX=A0>this.maxX?A0:this.maxX,this.maxY=c0>this.maxY?c0:this.maxY,A0=s0*i0+a0*n0+l0,c0=o0*i0+f0*n0+u0,this.minX=A0<this.minX?A0:this.minX,this.minY=c0<this.minY?c0:this.minY,this.maxX=A0>this.maxX?A0:this.maxX,this.maxY=c0>this.maxY?c0:this.maxY,A0=s0*t0+a0*n0+l0,c0=o0*t0+f0*n0+u0,this.minX=A0<this.minX?A0:this.minX,this.minY=c0<this.minY?c0:this.minY,this.maxX=A0>this.maxX?A0:this.maxX,this.maxY=c0>this.maxY?c0:this.maxY}fit(_e){return this.minX<_e.left&&(this.minX=_e.left),this.maxX>_e.right&&(this.maxX=_e.right),this.minY<_e.top&&(this.minY=_e.top),this.maxY>_e.bottom&&(this.maxY=_e.bottom),this}fitBounds(_e,i0,r0,t0){return this.minX<_e&&(this.minX=_e),this.maxX>i0&&(this.maxX=i0),this.minY<r0&&(this.minY=r0),this.maxY>t0&&(this.maxY=t0),this}pad(_e,i0=_e){return this.minX-=_e,this.maxX+=_e,this.minY-=i0,this.maxY+=i0,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new Bounds(this.minX,this.minY,this.maxX,this.maxY)}scale(_e,i0=_e){return this.minX*=_e,this.minY*=i0,this.maxX*=_e,this.maxY*=i0,this}get x(){return this.minX}set x(_e){const i0=this.maxX-this.minX;this.minX=_e,this.maxX=_e+i0}get y(){return this.minY}set y(_e){const i0=this.maxY-this.minY;this.minY=_e,this.maxY=_e+i0}get width(){return this.maxX-this.minX}set width(_e){this.maxX=this.minX+_e}get height(){return this.maxY-this.minY}set height(_e){this.maxY=this.minY+_e}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(_e,i0,r0,t0){let n0=this.minX,s0=this.minY,o0=this.maxX,a0=this.maxY;t0||(t0=this.matrix);const f0=t0.a,l0=t0.b,u0=t0.c,A0=t0.d,c0=t0.tx,k0=t0.ty;for(let d0=i0;d0<r0;d0+=2){const h0=_e[d0],b0=_e[d0+1],p0=f0*h0+u0*b0+c0,m0=l0*h0+A0*b0+k0;n0=p0<n0?p0:n0,s0=m0<s0?m0:s0,o0=p0>o0?p0:o0,a0=m0>a0?m0:a0}this.minX=n0,this.minY=s0,this.maxX=o0,this.maxY=a0}containsPoint(_e,i0){return this.minX<=_e&&this.minY<=i0&&this.maxX>=_e&&this.maxY>=i0}toString(){return`[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(_e){return this.minX=_e.minX,this.minY=_e.minY,this.maxX=_e.maxX,this.maxY=_e.maxY,this}}var r$2={grad:.9,turn:360,rad:360/(2*Math.PI)},t$2=function(e0){return typeof e0=="string"?e0.length>0:typeof e0=="number"},n$2=function(e0,_e,i0){return _e===void 0&&(_e=0),i0===void 0&&(i0=Math.pow(10,_e)),Math.round(i0*e0)/i0+0},e$1=function(e0,_e,i0){return _e===void 0&&(_e=0),i0===void 0&&(i0=1),e0>i0?i0:e0>_e?e0:_e},u$2=function(e0){return(e0=isFinite(e0)?e0%360:0)>0?e0:e0+360},a=function(e0){return{r:e$1(e0.r,0,255),g:e$1(e0.g,0,255),b:e$1(e0.b,0,255),a:e$1(e0.a)}},o=function(e0){return{r:n$2(e0.r),g:n$2(e0.g),b:n$2(e0.b),a:n$2(e0.a,3)}},i$2=/^#([0-9a-f]{3,8})$/i,s=function(e0){var _e=e0.toString(16);return _e.length<2?"0"+_e:_e},h$2=function(e0){var _e=e0.r,i0=e0.g,r0=e0.b,t0=e0.a,n0=Math.max(_e,i0,r0),s0=n0-Math.min(_e,i0,r0),o0=s0?n0===_e?(i0-r0)/s0:n0===i0?2+(r0-_e)/s0:4+(_e-i0)/s0:0;return{h:60*(o0<0?o0+6:o0),s:n0?s0/n0*100:0,v:n0/255*100,a:t0}},b=function(e0){var _e=e0.h,i0=e0.s,r0=e0.v,t0=e0.a;_e=_e/360*6,i0/=100,r0/=100;var n0=Math.floor(_e),s0=r0*(1-i0),o0=r0*(1-(_e-n0)*i0),a0=r0*(1-(1-_e+n0)*i0),f0=n0%6;return{r:255*[r0,o0,s0,s0,a0,r0][f0],g:255*[a0,r0,r0,o0,s0,s0][f0],b:255*[s0,s0,a0,r0,r0,o0][f0],a:t0}},g$1=function(e0){return{h:u$2(e0.h),s:e$1(e0.s,0,100),l:e$1(e0.l,0,100),a:e$1(e0.a)}},d$1=function(e0){return{h:n$2(e0.h),s:n$2(e0.s),l:n$2(e0.l),a:n$2(e0.a,3)}},f=function(e0){return b((i0=(_e=e0).s,{h:_e.h,s:(i0*=((r0=_e.l)<50?r0:100-r0)/100)>0?2*i0/(r0+i0)*100:0,v:r0+i0,a:_e.a}));var _e,i0,r0},c=function(e0){return{h:(_e=h$2(e0)).h,s:(t0=(200-(i0=_e.s))*(r0=_e.v)/100)>0&&t0<200?i0*r0/100/(t0<=100?t0:200-t0)*100:0,l:t0/2,a:_e.a};var _e,i0,r0,t0},l$2=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,p$2=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,v$2=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,m$2=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,y={string:[[function(e0){var _e=i$2.exec(e0);return _e?(e0=_e[1]).length<=4?{r:parseInt(e0[0]+e0[0],16),g:parseInt(e0[1]+e0[1],16),b:parseInt(e0[2]+e0[2],16),a:e0.length===4?n$2(parseInt(e0[3]+e0[3],16)/255,2):1}:e0.length===6||e0.length===8?{r:parseInt(e0.substr(0,2),16),g:parseInt(e0.substr(2,2),16),b:parseInt(e0.substr(4,2),16),a:e0.length===8?n$2(parseInt(e0.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e0){var _e=v$2.exec(e0)||m$2.exec(e0);return _e?_e[2]!==_e[4]||_e[4]!==_e[6]?null:a({r:Number(_e[1])/(_e[2]?100/255:1),g:Number(_e[3])/(_e[4]?100/255:1),b:Number(_e[5])/(_e[6]?100/255:1),a:_e[7]===void 0?1:Number(_e[7])/(_e[8]?100:1)}):null},"rgb"],[function(e0){var _e=l$2.exec(e0)||p$2.exec(e0);if(!_e)return null;var i0,r0,t0=g$1({h:(i0=_e[1],r0=_e[2],r0===void 0&&(r0="deg"),Number(i0)*(r$2[r0]||1)),s:Number(_e[3]),l:Number(_e[4]),a:_e[5]===void 0?1:Number(_e[5])/(_e[6]?100:1)});return f(t0)},"hsl"]],object:[[function(e0){var _e=e0.r,i0=e0.g,r0=e0.b,t0=e0.a,n0=t0===void 0?1:t0;return t$2(_e)&&t$2(i0)&&t$2(r0)?a({r:Number(_e),g:Number(i0),b:Number(r0),a:Number(n0)}):null},"rgb"],[function(e0){var _e=e0.h,i0=e0.s,r0=e0.l,t0=e0.a,n0=t0===void 0?1:t0;if(!t$2(_e)||!t$2(i0)||!t$2(r0))return null;var s0=g$1({h:Number(_e),s:Number(i0),l:Number(r0),a:Number(n0)});return f(s0)},"hsl"],[function(e0){var _e=e0.h,i0=e0.s,r0=e0.v,t0=e0.a,n0=t0===void 0?1:t0;if(!t$2(_e)||!t$2(i0)||!t$2(r0))return null;var s0=function(o0){return{h:u$2(o0.h),s:e$1(o0.s,0,100),v:e$1(o0.v,0,100),a:e$1(o0.a)}}({h:Number(_e),s:Number(i0),v:Number(r0),a:Number(n0)});return b(s0)},"hsv"]]},N=function(e0,_e){for(var i0=0;i0<_e.length;i0++){var r0=_e[i0][0](e0);if(r0)return[r0,_e[i0][1]]}return[null,void 0]},x=function(e0){return typeof e0=="string"?N(e0.trim(),y.string):typeof e0=="object"&&e0!==null?N(e0,y.object):[null,void 0]},M=function(e0,_e){var i0=c(e0);return{h:i0.h,s:e$1(i0.s+100*_e,0,100),l:i0.l,a:i0.a}},H=function(e0){return(299*e0.r+587*e0.g+114*e0.b)/1e3/255},$=function(e0,_e){var i0=c(e0);return{h:i0.h,s:i0.s,l:e$1(i0.l+100*_e,0,100),a:i0.a}},j=function(){function e0(_e){this.parsed=x(_e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e0.prototype.isValid=function(){return this.parsed!==null},e0.prototype.brightness=function(){return n$2(H(this.rgba),2)},e0.prototype.isDark=function(){return H(this.rgba)<.5},e0.prototype.isLight=function(){return H(this.rgba)>=.5},e0.prototype.toHex=function(){return _e=o(this.rgba),i0=_e.r,r0=_e.g,t0=_e.b,s0=(n0=_e.a)<1?s(n$2(255*n0)):"","#"+s(i0)+s(r0)+s(t0)+s0;var _e,i0,r0,t0,n0,s0},e0.prototype.toRgb=function(){return o(this.rgba)},e0.prototype.toRgbString=function(){return _e=o(this.rgba),i0=_e.r,r0=_e.g,t0=_e.b,(n0=_e.a)<1?"rgba("+i0+", "+r0+", "+t0+", "+n0+")":"rgb("+i0+", "+r0+", "+t0+")";var _e,i0,r0,t0,n0},e0.prototype.toHsl=function(){return d$1(c(this.rgba))},e0.prototype.toHslString=function(){return _e=d$1(c(this.rgba)),i0=_e.h,r0=_e.s,t0=_e.l,(n0=_e.a)<1?"hsla("+i0+", "+r0+"%, "+t0+"%, "+n0+")":"hsl("+i0+", "+r0+"%, "+t0+"%)";var _e,i0,r0,t0,n0},e0.prototype.toHsv=function(){return _e=h$2(this.rgba),{h:n$2(_e.h),s:n$2(_e.s),v:n$2(_e.v),a:n$2(_e.a,3)};var _e},e0.prototype.invert=function(){return w$2({r:255-(_e=this.rgba).r,g:255-_e.g,b:255-_e.b,a:_e.a});var _e},e0.prototype.saturate=function(_e){return _e===void 0&&(_e=.1),w$2(M(this.rgba,_e))},e0.prototype.desaturate=function(_e){return _e===void 0&&(_e=.1),w$2(M(this.rgba,-_e))},e0.prototype.grayscale=function(){return w$2(M(this.rgba,-1))},e0.prototype.lighten=function(_e){return _e===void 0&&(_e=.1),w$2($(this.rgba,_e))},e0.prototype.darken=function(_e){return _e===void 0&&(_e=.1),w$2($(this.rgba,-_e))},e0.prototype.rotate=function(_e){return _e===void 0&&(_e=15),this.hue(this.hue()+_e)},e0.prototype.alpha=function(_e){return typeof _e=="number"?w$2({r:(i0=this.rgba).r,g:i0.g,b:i0.b,a:_e}):n$2(this.rgba.a,3);var i0},e0.prototype.hue=function(_e){var i0=c(this.rgba);return typeof _e=="number"?w$2({h:_e,s:i0.s,l:i0.l,a:i0.a}):n$2(i0.h)},e0.prototype.isEqual=function(_e){return this.toHex()===w$2(_e).toHex()},e0}(),w$2=function(e0){return e0 instanceof j?e0:new j(e0)},S=[],k$1=function(e0){e0.forEach(function(_e){S.indexOf(_e)<0&&(_e(j,y),S.push(_e))})};function namesPlugin(e0,_e){var i0={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r0={};for(var t0 in i0)r0[i0[t0]]=t0;var n0={};e0.prototype.toName=function(s0){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o0,a0,f0=r0[this.toHex()];if(f0)return f0;if(s0!=null&&s0.closest){var l0=this.toRgb(),u0=1/0,A0="black";if(!n0.length)for(var c0 in i0)n0[c0]=new e0(i0[c0]).toRgb();for(var k0 in i0){var d0=(o0=l0,a0=n0[k0],Math.pow(o0.r-a0.r,2)+Math.pow(o0.g-a0.g,2)+Math.pow(o0.b-a0.b,2));d0<u0&&(u0=d0,A0=k0)}return A0}},_e.string.push([function(s0){var o0=s0.toLowerCase(),a0=o0==="transparent"?"#0000":i0[o0];return a0?new e0(a0).toRgb():null},"name"])}k$1([namesPlugin]);const _Color=class Lr{constructor(_e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=_e}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(_e){return this.value=_e,this}set value(_e){if(_e instanceof Lr)this._value=this._cloneSource(_e._value),this._int=_e._int,this._components.set(_e._components);else{if(_e===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,_e))&&(this._value=this._cloneSource(_e),this._normalize(this._value))}}get value(){return this._value}_cloneSource(_e){return typeof _e=="string"||typeof _e=="number"||_e instanceof Number||_e===null?_e:Array.isArray(_e)||ArrayBuffer.isView(_e)?_e.slice(0):typeof _e=="object"&&_e!==null?{..._e}:_e}_isSourceEqual(_e,i0){const r0=typeof _e;if(r0!==typeof i0)return!1;if(r0==="number"||r0==="string"||_e instanceof Number)return _e===i0;if(Array.isArray(_e)&&Array.isArray(i0)||ArrayBuffer.isView(_e)&&ArrayBuffer.isView(i0))return _e.length!==i0.length?!1:_e.every((n0,s0)=>n0===i0[s0]);if(_e!==null&&i0!==null){const n0=Object.keys(_e),s0=Object.keys(i0);return n0.length!==s0.length?!1:n0.every(o0=>_e[o0]===i0[o0])}return _e===i0}toRgba(){const[_e,i0,r0,t0]=this._components;return{r:_e,g:i0,b:r0,a:t0}}toRgb(){const[_e,i0,r0]=this._components;return{r:_e,g:i0,b:r0}}toRgbaString(){const[_e,i0,r0]=this.toUint8RgbArray();return`rgba(${_e},${i0},${r0},${this.alpha})`}toUint8RgbArray(_e){const[i0,r0,t0]=this._components;return this._arrayRgb||(this._arrayRgb=[]),_e||(_e=this._arrayRgb),_e[0]=Math.round(i0*255),_e[1]=Math.round(r0*255),_e[2]=Math.round(t0*255),_e}toArray(_e){this._arrayRgba||(this._arrayRgba=[]),_e||(_e=this._arrayRgba);const[i0,r0,t0,n0]=this._components;return _e[0]=i0,_e[1]=r0,_e[2]=t0,_e[3]=n0,_e}toRgbArray(_e){this._arrayRgb||(this._arrayRgb=[]),_e||(_e=this._arrayRgb);const[i0,r0,t0]=this._components;return _e[0]=i0,_e[1]=r0,_e[2]=t0,_e}toNumber(){return this._int}toBgrNumber(){const[_e,i0,r0]=this.toUint8RgbArray();return(r0<<16)+(i0<<8)+_e}toLittleEndianNumber(){const _e=this._int;return(_e>>16)+(_e&65280)+((_e&255)<<16)}multiply(_e){const[i0,r0,t0,n0]=Lr._temp.setValue(_e)._components;return this._components[0]*=i0,this._components[1]*=r0,this._components[2]*=t0,this._components[3]*=n0,this._refreshInt(),this._value=null,this}premultiply(_e,i0=!0){return i0&&(this._components[0]*=_e,this._components[1]*=_e,this._components[2]*=_e),this._components[3]=_e,this._refreshInt(),this._value=null,this}toPremultiplied(_e,i0=!0){if(_e===1)return(255<<24)+this._int;if(_e===0)return i0?0:this._int;let r0=this._int>>16&255,t0=this._int>>8&255,n0=this._int&255;return i0&&(r0=r0*_e+.5|0,t0=t0*_e+.5|0,n0=n0*_e+.5|0),(_e*255<<24)+(r0<<16)+(t0<<8)+n0}toHex(){const _e=this._int.toString(16);return`#${"000000".substring(0,6-_e.length)+_e}`}toHexa(){const i0=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-i0.length)+i0}setAlpha(_e){return this._components[3]=this._clamp(_e),this}_normalize(_e){let i0,r0,t0,n0;if((typeof _e=="number"||_e instanceof Number)&&_e>=0&&_e<=16777215){const s0=_e;i0=(s0>>16&255)/255,r0=(s0>>8&255)/255,t0=(s0&255)/255,n0=1}else if((Array.isArray(_e)||_e instanceof Float32Array)&&_e.length>=3&&_e.length<=4)_e=this._clamp(_e),[i0,r0,t0,n0=1]=_e;else if((_e instanceof Uint8Array||_e instanceof Uint8ClampedArray)&&_e.length>=3&&_e.length<=4)_e=this._clamp(_e,0,255),[i0,r0,t0,n0=255]=_e,i0/=255,r0/=255,t0/=255,n0/=255;else if(typeof _e=="string"||typeof _e=="object"){if(typeof _e=="string"){const o0=Lr.HEX_PATTERN.exec(_e);o0&&(_e=`#${o0[2]}`)}const s0=w$2(_e);s0.isValid()&&({r:i0,g:r0,b:t0,a:n0}=s0.rgba,i0/=255,r0/=255,t0/=255)}if(i0!==void 0)this._components[0]=i0,this._components[1]=r0,this._components[2]=t0,this._components[3]=n0,this._refreshInt();else throw new Error(`Unable to convert color ${_e}`)}_refreshInt(){this._clamp(this._components);const[_e,i0,r0]=this._components;this._int=(_e*255<<16)+(i0*255<<8)+(r0*255|0)}_clamp(_e,i0=0,r0=1){return typeof _e=="number"?Math.min(Math.max(_e,i0),r0):(_e.forEach((t0,n0)=>{_e[n0]=Math.min(Math.max(t0,i0),r0)}),_e)}static isColorLike(_e){return typeof _e=="number"||typeof _e=="string"||_e instanceof Number||_e instanceof Lr||Array.isArray(_e)||_e instanceof Uint8Array||_e instanceof Uint8ClampedArray||_e instanceof Float32Array||_e.r!==void 0&&_e.g!==void 0&&_e.b!==void 0||_e.r!==void 0&&_e.g!==void 0&&_e.b!==void 0&&_e.a!==void 0||_e.h!==void 0&&_e.s!==void 0&&_e.l!==void 0||_e.h!==void 0&&_e.s!==void 0&&_e.l!==void 0&&_e.a!==void 0||_e.h!==void 0&&_e.s!==void 0&&_e.v!==void 0||_e.h!==void 0&&_e.s!==void 0&&_e.v!==void 0&&_e.a!==void 0}};_Color.shared=new _Color;_Color._temp=new _Color;_Color.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let Color=_Color;const cullingMixin={cullArea:null,cullable:!1,cullableChildren:!0};let warnCount=0;const maxWarnings=500;function warn(...e0){warnCount!==maxWarnings&&(warnCount++,warnCount===maxWarnings?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...e0))}const GlobalResourceRegistry={_registeredResources:new Set,register(e0){this._registeredResources.add(e0)},unregister(e0){this._registeredResources.delete(e0)},release(){this._registeredResources.forEach(e0=>e0.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(e0){return this._registeredResources.has(e0)},reset(){this._registeredResources.clear()}};class Pool{constructor(_e,i0){this._pool=[],this._count=0,this._index=0,this._classType=_e,i0&&this.prepopulate(i0)}prepopulate(_e){for(let i0=0;i0<_e;i0++)this._pool[this._index++]=new this._classType;this._count+=_e}get(_e){var r0;let i0;return this._index>0?i0=this._pool[--this._index]:(i0=new this._classType,this._count++),(r0=i0.init)==null||r0.call(i0,_e),i0}return(_e){var i0;(i0=_e.reset)==null||i0.call(_e),this._pool[this._index++]=_e}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){if(this._pool.length>0&&this._pool[0].destroy)for(let _e=0;_e<this._index;_e++)this._pool[_e].destroy();this._pool.length=0,this._count=0,this._index=0}}class PoolGroupClass{constructor(){this._poolsByClass=new Map}prepopulate(_e,i0){this.getPool(_e).prepopulate(i0)}get(_e,i0){return this.getPool(_e).get(i0)}return(_e){this.getPool(_e.constructor).return(_e)}getPool(_e){return this._poolsByClass.has(_e)||this._poolsByClass.set(_e,new Pool(_e)),this._poolsByClass.get(_e)}stats(){const _e={};return this._poolsByClass.forEach(i0=>{const r0=_e[i0._classType.name]?i0._classType.name+i0._classType.ID:i0._classType.name;_e[r0]={free:i0.totalFree,used:i0.totalUsed,size:i0.totalSize}}),_e}clear(){this._poolsByClass.forEach(_e=>_e.clear()),this._poolsByClass.clear()}}const BigPool=new PoolGroupClass;GlobalResourceRegistry.register(BigPool);const cacheAsTextureMixin={get isCachedAsTexture(){var e0;return!!((e0=this.renderGroup)!=null&&e0.isCachedAsTexture)},cacheAsTexture(e0){typeof e0=="boolean"&&e0===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(e0===!0?{}:e0))},updateCacheTexture(){var e0;(e0=this.renderGroup)==null||e0.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(e0){deprecation("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(e0)}};function removeItems(e0,_e,i0){const r0=e0.length;let t0;if(_e>=r0||i0===0)return;i0=_e+i0>r0?r0-_e:i0;const n0=r0-i0;for(t0=_e;t0<n0;++t0)e0[t0]=e0[t0+i0];e0.length=n0}const childrenHelperMixin={allowChildren:!0,removeChildren(e0=0,_e){var n0;const i0=_e??this.children.length,r0=i0-e0,t0=[];if(r0>0&&r0<=i0){for(let o0=i0-1;o0>=e0;o0--){const a0=this.children[o0];a0&&(t0.push(a0),a0.parent=null)}removeItems(this.children,e0,i0);const s0=this.renderGroup||this.parentRenderGroup;s0&&s0.removeChildren(t0);for(let o0=0;o0<t0.length;++o0){const a0=t0[o0];(n0=a0.parentRenderLayer)==null||n0.detach(a0),this.emit("childRemoved",a0,this,o0),t0[o0].emit("removed",this)}return t0.length>0&&this._didViewChangeTick++,t0}else if(r0===0&&this.children.length===0)return t0;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(e0){const _e=this.getChildAt(e0);return this.removeChild(_e)},getChildAt(e0){if(e0<0||e0>=this.children.length)throw new Error(`getChildAt: Index (${e0}) does not exist.`);return this.children[e0]},setChildIndex(e0,_e){if(_e<0||_e>=this.children.length)throw new Error(`The index ${_e} supplied is out of bounds ${this.children.length}`);this.getChildIndex(e0),this.addChildAt(e0,_e)},getChildIndex(e0){const _e=this.children.indexOf(e0);if(_e===-1)throw new Error("The supplied Container must be a child of the caller");return _e},addChildAt(e0,_e){this.allowChildren||deprecation(v8_0_0,"addChildAt: Only Containers will be allowed to add children in v8.0.0");const{children:i0}=this;if(_e<0||_e>i0.length)throw new Error(`${e0}addChildAt: The index ${_e} supplied is out of bounds ${i0.length}`);if(e0.parent){const t0=e0.parent.children.indexOf(e0);if(e0.parent===this&&t0===_e)return e0;t0!==-1&&e0.parent.children.splice(t0,1)}_e===i0.length?i0.push(e0):i0.splice(_e,0,e0),e0.parent=this,e0.didChange=!0,e0._updateFlags=15;const r0=this.renderGroup||this.parentRenderGroup;return r0&&r0.addChild(e0),this.sortableChildren&&(this.sortDirty=!0),this.emit("childAdded",e0,this,_e),e0.emit("added",this),e0},swapChildren(e0,_e){if(e0===_e)return;const i0=this.getChildIndex(e0),r0=this.getChildIndex(_e);this.children[i0]=_e,this.children[r0]=e0;const t0=this.renderGroup||this.parentRenderGroup;t0&&(t0.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){var e0;(e0=this.parent)==null||e0.removeChild(this)},reparentChild(...e0){return e0.length===1?this.reparentChildAt(e0[0],this.children.length):(e0.forEach(_e=>this.reparentChildAt(_e,this.children.length)),e0[0])},reparentChildAt(e0,_e){if(e0.parent===this)return this.setChildIndex(e0,_e),e0;const i0=e0.worldTransform.clone();e0.removeFromParent(),this.addChildAt(e0,_e);const r0=this.worldTransform.clone();return r0.invert(),i0.prepend(r0),e0.setFromMatrix(i0),e0},replaceChild(e0,_e){e0.updateLocalTransform(),this.addChildAt(_e,this.getChildIndex(e0)),_e.setFromMatrix(e0.localTransform),_e.updateLocalTransform(),this.removeChild(e0)}},collectRenderablesMixin={collectRenderables(e0,_e,i0){this.parentRenderLayer&&this.parentRenderLayer!==i0||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(e0,_e,i0):this.renderGroup?_e.renderPipes.renderGroup.addRenderGroup(this.renderGroup,e0):this.collectRenderablesWithEffects(e0,_e,i0))},collectRenderablesSimple(e0,_e,i0){const r0=this.children,t0=r0.length;for(let n0=0;n0<t0;n0++)r0[n0].collectRenderables(e0,_e,i0)},collectRenderablesWithEffects(e0,_e,i0){const{renderPipes:r0}=_e;for(let t0=0;t0<this.effects.length;t0++){const n0=this.effects[t0];r0[n0.pipe].push(n0,this,e0)}this.collectRenderablesSimple(e0,_e,i0);for(let t0=this.effects.length-1;t0>=0;t0--){const n0=this.effects[t0];r0[n0.pipe].pop(n0,this,e0)}}};class FilterEffect{constructor(){this.pipe="filter",this.priority=1}destroy(){for(let _e=0;_e<this.filters.length;_e++)this.filters[_e].destroy();this.filters=null,this.filterArea=null}}class MaskEffectManagerClass{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(_e=>{this.add({test:_e.test,maskClass:_e})}))}add(_e){this._tests.push(_e)}getMaskEffect(_e){this._initialized||this.init();for(let i0=0;i0<this._tests.length;i0++){const r0=this._tests[i0];if(r0.test(_e))return BigPool.get(r0.maskClass,_e)}return _e}returnMaskEffect(_e){BigPool.return(_e)}}const MaskEffectManager=new MaskEffectManagerClass;extensions.handleByList(ExtensionType.MaskEffect,MaskEffectManager._effectClasses);const effectsMixin={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){const e0=this.renderGroup||this.parentRenderGroup;e0&&(e0.structureDidChange=!0)},addEffect(e0){this.effects.indexOf(e0)===-1&&(this.effects.push(e0),this.effects.sort((i0,r0)=>i0.priority-r0.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(e0){const _e=this.effects.indexOf(e0);_e!==-1&&(this.effects.splice(_e,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(e0){const _e=this._maskEffect;(_e==null?void 0:_e.mask)!==e0&&(_e&&(this.removeEffect(_e),MaskEffectManager.returnMaskEffect(_e),this._maskEffect=null),e0!=null&&(this._maskEffect=MaskEffectManager.getMaskEffect(e0),this.addEffect(this._maskEffect)))},get mask(){var e0;return(e0=this._maskEffect)==null?void 0:e0.mask},setMask(e0){this._maskOptions={...this._maskOptions,...e0},e0.mask&&(this.mask=e0.mask),this._markStructureAsChanged()},set filters(e0){var n0;!Array.isArray(e0)&&e0&&(e0=[e0]);const _e=this._filterEffect||(this._filterEffect=new FilterEffect);e0=e0;const i0=(e0==null?void 0:e0.length)>0,r0=((n0=_e.filters)==null?void 0:n0.length)>0,t0=i0!==r0;e0=Array.isArray(e0)?e0.slice(0):e0,_e.filters=Object.freeze(e0),t0&&(i0?this.addEffect(_e):(this.removeEffect(_e),_e.filters=e0??null))},get filters(){var e0;return(e0=this._filterEffect)==null?void 0:e0.filters},set filterArea(e0){this._filterEffect||(this._filterEffect=new FilterEffect),this._filterEffect.filterArea=e0},get filterArea(){var e0;return(e0=this._filterEffect)==null?void 0:e0.filterArea}},findMixin={label:null,get name(){return deprecation(v8_0_0,"Container.name property has been removed, use Container.label instead"),this.label},set name(e0){deprecation(v8_0_0,"Container.name property has been removed, use Container.label instead"),this.label=e0},getChildByName(e0,_e=!1){return this.getChildByLabel(e0,_e)},getChildByLabel(e0,_e=!1){const i0=this.children;for(let r0=0;r0<i0.length;r0++){const t0=i0[r0];if(t0.label===e0||e0 instanceof RegExp&&e0.test(t0.label))return t0}if(_e)for(let r0=0;r0<i0.length;r0++){const n0=i0[r0].getChildByLabel(e0,!0);if(n0)return n0}return null},getChildrenByLabel(e0,_e=!1,i0=[]){const r0=this.children;for(let t0=0;t0<r0.length;t0++){const n0=r0[t0];(n0.label===e0||e0 instanceof RegExp&&e0.test(n0.label))&&i0.push(n0)}if(_e)for(let t0=0;t0<r0.length;t0++)r0[t0].getChildrenByLabel(e0,!0,i0);return i0}},matrixPool=BigPool.getPool(Matrix),boundsPool=BigPool.getPool(Bounds),tempMatrix$4=new Matrix,getFastGlobalBoundsMixin={getFastGlobalBounds(e0,_e){_e||(_e=new Bounds),_e.clear(),this._getGlobalBoundsRecursive(!!e0,_e,this.parentRenderLayer),_e.isValid||_e.set(0,0,0,0);const i0=this.renderGroup||this.parentRenderGroup;return _e.applyMatrix(i0.worldTransform),_e},_getGlobalBoundsRecursive(e0,_e,i0){let r0=_e;if(e0&&this.parentRenderLayer&&this.parentRenderLayer!==i0||this.localDisplayStatus!==7||!this.measurable)return;const t0=!!this.effects.length;if((this.renderGroup||t0)&&(r0=boundsPool.get().clear()),this.boundsArea)_e.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){const s0=this.bounds;r0.addFrame(s0.minX,s0.minY,s0.maxX,s0.maxY,this.groupTransform)}const n0=this.children;for(let s0=0;s0<n0.length;s0++)n0[s0]._getGlobalBoundsRecursive(e0,r0,i0)}if(t0){let n0=!1;const s0=this.renderGroup||this.parentRenderGroup;for(let o0=0;o0<this.effects.length;o0++)this.effects[o0].addBounds&&(n0||(n0=!0,r0.applyMatrix(s0.worldTransform)),this.effects[o0].addBounds(r0,!0));n0&&r0.applyMatrix(s0.worldTransform.copyTo(tempMatrix$4).invert()),_e.addBounds(r0),boundsPool.return(r0)}else this.renderGroup&&(_e.addBounds(r0,this.relativeGroupTransform),boundsPool.return(r0))}};function getGlobalBounds(e0,_e,i0){i0.clear();let r0,t0;return e0.parent?_e?r0=e0.parent.worldTransform:(t0=matrixPool.get().identity(),r0=updateTransformBackwards(e0,t0)):r0=Matrix.IDENTITY,_getGlobalBounds(e0,i0,r0,_e),t0&&matrixPool.return(t0),i0.isValid||i0.set(0,0,0,0),i0}function _getGlobalBounds(e0,_e,i0,r0){var o0,a0;if(!e0.visible||!e0.measurable)return;let t0;r0?t0=e0.worldTransform:(e0.updateLocalTransform(),t0=matrixPool.get(),t0.appendFrom(e0.localTransform,i0));const n0=_e,s0=!!e0.effects.length;if(s0&&(_e=boundsPool.get().clear()),e0.boundsArea)_e.addRect(e0.boundsArea,t0);else{const f0=e0.bounds;f0&&!f0.isEmpty()&&(_e.matrix=t0,_e.addBounds(f0));for(let l0=0;l0<e0.children.length;l0++)_getGlobalBounds(e0.children[l0],_e,t0,r0)}if(s0){for(let f0=0;f0<e0.effects.length;f0++)(a0=(o0=e0.effects[f0]).addBounds)==null||a0.call(o0,_e);n0.addBounds(_e,Matrix.IDENTITY),boundsPool.return(_e)}r0||matrixPool.return(t0)}function updateTransformBackwards(e0,_e){const i0=e0.parent;return i0&&(updateTransformBackwards(i0,_e),i0.updateLocalTransform(),_e.append(i0.localTransform)),_e}function multiplyHexColors(e0,_e){if(e0===16777215||!_e)return _e;if(_e===16777215||!e0)return e0;const i0=e0>>16&255,r0=e0>>8&255,t0=e0&255,n0=_e>>16&255,s0=_e>>8&255,o0=_e&255,a0=i0*n0/255|0,f0=r0*s0/255|0,l0=t0*o0/255|0;return(a0<<16)+(f0<<8)+l0}const WHITE_BGR=16777215;function multiplyColors(e0,_e){return e0===WHITE_BGR?_e:_e===WHITE_BGR?e0:multiplyHexColors(e0,_e)}function bgr2rgb(e0){return((e0&255)<<16)+(e0&65280)+(e0>>16&255)}const getGlobalMixin={getGlobalAlpha(e0){if(e0)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let _e=this.alpha,i0=this.parent;for(;i0;)_e*=i0.alpha,i0=i0.parent;return _e},getGlobalTransform(e0=new Matrix,_e){if(_e)return e0.copyFrom(this.worldTransform);this.updateLocalTransform();const i0=updateTransformBackwards(this,matrixPool.get().identity());return e0.appendFrom(this.localTransform,i0),matrixPool.return(i0),e0},getGlobalTint(e0){if(e0)return this.renderGroup?bgr2rgb(this.renderGroup.worldColor):this.parentRenderGroup?bgr2rgb(multiplyColors(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let _e=this.localColor,i0=this.parent;for(;i0;)_e=multiplyColors(_e,i0.localColor),i0=i0.parent;return bgr2rgb(_e)}};function getLocalBounds(e0,_e,i0){return _e.clear(),i0||(i0=Matrix.IDENTITY),_getLocalBounds(e0,_e,i0,e0,!0),_e.isValid||_e.set(0,0,0,0),_e}function _getLocalBounds(e0,_e,i0,r0,t0){var a0,f0;let n0;if(t0)n0=matrixPool.get(),n0=i0.copyTo(n0);else{if(!e0.visible||!e0.measurable)return;e0.updateLocalTransform();const l0=e0.localTransform;n0=matrixPool.get(),n0.appendFrom(l0,i0)}const s0=_e,o0=!!e0.effects.length;if(o0&&(_e=boundsPool.get().clear()),e0.boundsArea)_e.addRect(e0.boundsArea,n0);else{e0.renderPipeId&&(_e.matrix=n0,_e.addBounds(e0.bounds));const l0=e0.children;for(let u0=0;u0<l0.length;u0++)_getLocalBounds(l0[u0],_e,n0,r0,!1)}if(o0){for(let l0=0;l0<e0.effects.length;l0++)(f0=(a0=e0.effects[l0]).addLocalBounds)==null||f0.call(a0,_e,r0);s0.addBounds(_e,Matrix.IDENTITY),boundsPool.return(_e)}matrixPool.return(n0)}function checkChildrenDidChange(e0,_e){const i0=e0.children;for(let r0=0;r0<i0.length;r0++){const t0=i0[r0],n0=t0.uid,s0=(t0._didViewChangeTick&65535)<<16|t0._didContainerChangeTick&65535,o0=_e.index;(_e.data[o0]!==n0||_e.data[o0+1]!==s0)&&(_e.data[_e.index]=n0,_e.data[_e.index+1]=s0,_e.didChange=!0),_e.index=o0+2,t0.children.length&&checkChildrenDidChange(t0,_e)}return _e.didChange}const tempMatrix$3=new Matrix,measureMixin={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(e0,_e){const i0=Math.sign(this.scale.x)||1;_e!==0?this.scale.x=e0/_e*i0:this.scale.x=i0},_setHeight(e0,_e){const i0=Math.sign(this.scale.y)||1;_e!==0?this.scale.y=e0/_e*i0:this.scale.y=i0},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new Bounds});const e0=this._localBoundsCacheData;return e0.index=1,e0.didChange=!1,e0.data[0]!==this._didViewChangeTick&&(e0.didChange=!0,e0.data[0]=this._didViewChangeTick),checkChildrenDidChange(this,e0),e0.didChange&&getLocalBounds(this,e0.localBounds,tempMatrix$3),e0.localBounds},getBounds(e0,_e){return getGlobalBounds(this,e0,_e||new Bounds)}},onRenderMixin={_onRender:null,set onRender(e0){const _e=this.renderGroup||this.parentRenderGroup;if(!e0){this._onRender&&(_e==null||_e.removeOnRender(this)),this._onRender=null;return}this._onRender||_e==null||_e.addOnRender(this),this._onRender=e0},get onRender(){return this._onRender}},sortMixin={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(e0){this._zIndex!==e0&&(this._zIndex=e0,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(sortChildren))}};function sortChildren(e0,_e){return e0._zIndex-_e._zIndex}const toLocalGlobalMixin={getGlobalPosition(e0=new Point,_e=!1){return this.parent?this.parent.toGlobal(this._position,e0,_e):(e0.x=this._position.x,e0.y=this._position.y),e0},toGlobal(e0,_e,i0=!1){const r0=this.getGlobalTransform(matrixPool.get(),i0);return _e=r0.apply(e0,_e),matrixPool.return(r0),_e},toLocal(e0,_e,i0,r0){_e&&(e0=_e.toGlobal(e0,i0,r0));const t0=this.getGlobalTransform(matrixPool.get(),r0);return i0=t0.applyInverse(e0,i0),matrixPool.return(t0),i0}};class InstructionSet{constructor(){this.uid=uid$1("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0}reset(){this.instructionSize=0}destroy(){this.instructions.length=0,this.renderables.length=0,this.renderPipes=null,this.gcTick=0}add(_e){this.instructions[this.instructionSize++]=_e}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}let count=0;class TexturePoolClass{constructor(_e){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=_e||{},this.enableFullScreen=!1,this.textureStyle=new TextureStyle(this.textureOptions)}createTexture(_e,i0,r0){const t0=new TextureSource({...this.textureOptions,width:_e,height:i0,resolution:1,antialias:r0,autoGarbageCollect:!1});return new Texture({source:t0,label:`texturePool_${count++}`})}getOptimalTexture(_e,i0,r0=1,t0){let n0=Math.ceil(_e*r0-1e-6),s0=Math.ceil(i0*r0-1e-6);n0=nextPow2(n0),s0=nextPow2(s0);const o0=(n0<<17)+(s0<<1)+(t0?1:0);this._texturePool[o0]||(this._texturePool[o0]=[]);let a0=this._texturePool[o0].pop();return a0||(a0=this.createTexture(n0,s0,t0)),a0.source._resolution=r0,a0.source.width=n0/r0,a0.source.height=s0/r0,a0.source.pixelWidth=n0,a0.source.pixelHeight=s0,a0.frame.x=0,a0.frame.y=0,a0.frame.width=_e,a0.frame.height=i0,a0.updateUvs(),this._poolKeyHash[a0.uid]=o0,a0}getSameSizeTexture(_e,i0=!1){const r0=_e.source;return this.getOptimalTexture(_e.width,_e.height,r0._resolution,i0)}returnTexture(_e,i0=!1){const r0=this._poolKeyHash[_e.uid];i0&&(_e.source.style=this.textureStyle),this._texturePool[r0].push(_e)}clear(_e){if(_e=_e!==!1,_e)for(const i0 in this._texturePool){const r0=this._texturePool[i0];if(r0)for(let t0=0;t0<r0.length;t0++)r0[t0].destroy(!0)}this._texturePool={}}}const TexturePool=new TexturePoolClass;GlobalResourceRegistry.register(TexturePool);class RenderGroup{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new Matrix,this.worldColorAlpha=4294967295,this.worldColor=16777215,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new InstructionSet,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(_e){this.root=_e,_e._onRender&&this.addOnRender(_e),_e.didChange=!0;const i0=_e.children;for(let r0=0;r0<i0.length;r0++){const t0=i0[r0];t0._updateFlags=15,this.addChild(t0)}}enableCacheAsTexture(_e={}){this.textureOptions=_e,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(TexturePool.returnTexture(this.texture,!0),this.texture=null)}updateCacheTexture(){this.textureNeedsUpdate=!0;const _e=this._parentCacheAsTextureRenderGroup;_e&&!_e.textureNeedsUpdate&&_e.updateCacheTexture()}reset(){this.renderGroupChildren.length=0;for(const _e in this.childrenToUpdate){const i0=this.childrenToUpdate[_e];i0.list.fill(null),i0.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(_e){_e.renderGroupParent&&_e.renderGroupParent._removeRenderGroupChild(_e),_e.renderGroupParent=this,this.renderGroupChildren.push(_e)}_removeRenderGroupChild(_e){const i0=this.renderGroupChildren.indexOf(_e);i0>-1&&this.renderGroupChildren.splice(i0,1),_e.renderGroupParent=null}addChild(_e){if(this.structureDidChange=!0,_e.parentRenderGroup=this,_e.updateTick=-1,_e.parent===this.root?_e.relativeRenderGroupDepth=1:_e.relativeRenderGroupDepth=_e.parent.relativeRenderGroupDepth+1,_e.didChange=!0,this.onChildUpdate(_e),_e.renderGroup){this.addRenderGroupChild(_e.renderGroup);return}_e._onRender&&this.addOnRender(_e);const i0=_e.children;for(let r0=0;r0<i0.length;r0++)this.addChild(i0[r0])}removeChild(_e){if(this.structureDidChange=!0,_e._onRender&&(_e.renderGroup||this.removeOnRender(_e)),_e.parentRenderGroup=null,_e.renderGroup){this._removeRenderGroupChild(_e.renderGroup);return}const i0=_e.children;for(let r0=0;r0<i0.length;r0++)this.removeChild(i0[r0])}removeChildren(_e){for(let i0=0;i0<_e.length;i0++)this.removeChild(_e[i0])}onChildUpdate(_e){let i0=this.childrenToUpdate[_e.relativeRenderGroupDepth];i0||(i0=this.childrenToUpdate[_e.relativeRenderGroupDepth]={index:0,list:[]}),i0.list[i0.index++]=_e}updateRenderable(_e){_e.globalDisplayStatus<7||(this.instructionSet.renderPipes[_e.renderPipeId].updateRenderable(_e),_e.didViewUpdate=!1)}onChildViewUpdate(_e){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=_e}get isRenderable(){return this.root.localDisplayStatus===7&&this.worldAlpha>0}addOnRender(_e){this._onRenderContainers.push(_e)}removeOnRender(_e){this._onRenderContainers.splice(this._onRenderContainers.indexOf(_e),1)}runOnRender(_e){for(let i0=0;i0<this._onRenderContainers.length;i0++)this._onRenderContainers[i0]._onRender(_e)}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(_e=[]){const i0=this.root.children;for(let r0=0;r0<i0.length;r0++)this._getChildren(i0[r0],_e);return _e}_getChildren(_e,i0=[]){if(i0.push(_e),_e.renderGroup)return i0;const r0=_e.children;for(let t0=0;t0<r0.length;t0++)this._getChildren(r0[t0],i0);return i0}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return this._matrixDirty&1?(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new Matrix),this._inverseWorldTransform.copyFrom(this.worldTransform).invert()):this._inverseWorldTransform}get textureOffsetInverseTransform(){return this._matrixDirty&2?(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new Matrix),this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y)):this._textureOffsetInverseTransform}get inverseParentTextureTransform(){if(!(this._matrixDirty&4))return this._inverseParentTextureTransform;this._matrixDirty&=-5;const _e=this._parentCacheAsTextureRenderGroup;return _e?(this._inverseParentTextureTransform||(this._inverseParentTextureTransform=new Matrix),this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(_e.inverseWorldTransform).translate(-_e._textureBounds.x,-_e._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this.isCachedAsTexture?this.textureOffsetInverseTransform:this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}}function assignWithIgnore(e0,_e,i0={}){for(const r0 in _e)!i0[r0]&&_e[r0]!==void 0&&(e0[r0]=_e[r0])}const defaultSkew=new ObservablePoint(null),defaultPivot=new ObservablePoint(null),defaultScale=new ObservablePoint(null,1,1),defaultOrigin=new ObservablePoint(null),UPDATE_COLOR=1,UPDATE_BLEND=2,UPDATE_VISIBLE=4;class Container extends EventEmitter{constructor(_e={}){var i0,r0;super(),this.uid=uid$1("renderable"),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.parentRenderLayer=null,this.updateTick=-1,this.localTransform=new Matrix,this.relativeGroupTransform=new Matrix,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new ObservablePoint(this,0,0),this._scale=defaultScale,this._pivot=defaultPivot,this._origin=defaultOrigin,this._skew=defaultSkew,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=16777215,this.localAlpha=1,this.groupAlpha=1,this.groupColor=16777215,this.groupColorAlpha=4294967295,this.localBlendMode="inherit",this.groupBlendMode="normal",this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],assignWithIgnore(this,_e,{children:!0,parent:!0,effects:!0}),(i0=_e.children)==null||i0.forEach(t0=>this.addChild(t0)),(r0=_e.parent)==null||r0.addChild(this)}static mixin(_e){deprecation("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),extensions.mixin(Container,_e)}set _didChangeId(_e){this._didViewChangeTick=_e>>12&4095,this._didContainerChangeTick=_e&4095}get _didChangeId(){return this._didContainerChangeTick&4095|(this._didViewChangeTick&4095)<<12}addChild(..._e){if(this.allowChildren||deprecation(v8_0_0,"addChild: Only Containers will be allowed to add children in v8.0.0"),_e.length>1){for(let t0=0;t0<_e.length;t0++)this.addChild(_e[t0]);return _e[0]}const i0=_e[0],r0=this.renderGroup||this.parentRenderGroup;return i0.parent===this?(this.children.splice(this.children.indexOf(i0),1),this.children.push(i0),r0&&(r0.structureDidChange=!0),i0):(i0.parent&&i0.parent.removeChild(i0),this.children.push(i0),this.sortableChildren&&(this.sortDirty=!0),i0.parent=this,i0.didChange=!0,i0._updateFlags=15,r0&&r0.addChild(i0),this.emit("childAdded",i0,this,this.children.length-1),i0.emit("added",this),this._didViewChangeTick++,i0._zIndex!==0&&i0.depthOfChildModified(),i0)}removeChild(..._e){if(_e.length>1){for(let t0=0;t0<_e.length;t0++)this.removeChild(_e[t0]);return _e[0]}const i0=_e[0],r0=this.children.indexOf(i0);return r0>-1&&(this._didViewChangeTick++,this.children.splice(r0,1),this.renderGroup?this.renderGroup.removeChild(i0):this.parentRenderGroup&&this.parentRenderGroup.removeChild(i0),i0.parentRenderLayer&&i0.parentRenderLayer.detach(i0),i0.parent=null,this.emit("childRemoved",i0,this,r0),i0.emit("removed",this)),i0}_onUpdate(_e){_e&&_e===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(_e){!!this.renderGroup!==_e&&(_e?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;const _e=this.parentRenderGroup;_e==null||_e.removeChild(this),this.renderGroup=BigPool.get(RenderGroup,this),this.groupTransform=Matrix.IDENTITY,_e==null||_e.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;const _e=this.parentRenderGroup;_e==null||_e.removeChild(this),BigPool.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,_e==null||_e.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&this.effects.length===0}get worldTransform(){return this._worldTransform||(this._worldTransform=new Matrix),this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(_e){this._position.x=_e}get y(){return this._position.y}set y(_e){this._position.y=_e}get position(){return this._position}set position(_e){this._position.copyFrom(_e)}get rotation(){return this._rotation}set rotation(_e){this._rotation!==_e&&(this._rotation=_e,this._onUpdate(this._skew))}get angle(){return this.rotation*RAD_TO_DEG}set angle(_e){this.rotation=_e*DEG_TO_RAD}get pivot(){return this._pivot===defaultPivot&&(this._pivot=new ObservablePoint(this,0,0)),this._pivot}set pivot(_e){this._pivot===defaultPivot&&(this._pivot=new ObservablePoint(this,0,0),this._origin!==defaultOrigin&&warn("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof _e=="number"?this._pivot.set(_e):this._pivot.copyFrom(_e)}get skew(){return this._skew===defaultSkew&&(this._skew=new ObservablePoint(this,0,0)),this._skew}set skew(_e){this._skew===defaultSkew&&(this._skew=new ObservablePoint(this,0,0)),this._skew.copyFrom(_e)}get scale(){return this._scale===defaultScale&&(this._scale=new ObservablePoint(this,1,1)),this._scale}set scale(_e){this._scale===defaultScale&&(this._scale=new ObservablePoint(this,0,0)),typeof _e=="string"&&(_e=parseFloat(_e)),typeof _e=="number"?this._scale.set(_e):this._scale.copyFrom(_e)}get origin(){return this._origin===defaultOrigin&&(this._origin=new ObservablePoint(this,0,0)),this._origin}set origin(_e){this._origin===defaultOrigin&&(this._origin=new ObservablePoint(this,0,0),this._pivot!==defaultPivot&&warn("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof _e=="number"?this._origin.set(_e):this._origin.copyFrom(_e)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(_e){const i0=this.getLocalBounds().width;this._setWidth(_e,i0)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(_e){const i0=this.getLocalBounds().height;this._setHeight(_e,i0)}getSize(_e){_e||(_e={});const i0=this.getLocalBounds();return _e.width=Math.abs(this.scale.x*i0.width),_e.height=Math.abs(this.scale.y*i0.height),_e}setSize(_e,i0){const r0=this.getLocalBounds();typeof _e=="object"?(i0=_e.height??_e.width,_e=_e.width):i0??(i0=_e),_e!==void 0&&this._setWidth(_e,r0.width),i0!==void 0&&this._setHeight(i0,r0.height)}_updateSkew(){const _e=this._rotation,i0=this._skew;this._cx=Math.cos(_e+i0._y),this._sx=Math.sin(_e+i0._y),this._cy=-Math.sin(_e-i0._x),this._sy=Math.cos(_e-i0._x)}updateTransform(_e){return this.position.set(typeof _e.x=="number"?_e.x:this.position.x,typeof _e.y=="number"?_e.y:this.position.y),this.scale.set(typeof _e.scaleX=="number"?_e.scaleX||1:this.scale.x,typeof _e.scaleY=="number"?_e.scaleY||1:this.scale.y),this.rotation=typeof _e.rotation=="number"?_e.rotation:this.rotation,this.skew.set(typeof _e.skewX=="number"?_e.skewX:this.skew.x,typeof _e.skewY=="number"?_e.skewY:this.skew.y),this.pivot.set(typeof _e.pivotX=="number"?_e.pivotX:this.pivot.x,typeof _e.pivotY=="number"?_e.pivotY:this.pivot.y),this.origin.set(typeof _e.originX=="number"?_e.originX:this.origin.x,typeof _e.originY=="number"?_e.originY:this.origin.y),this}setFromMatrix(_e){_e.decompose(this)}updateLocalTransform(){const _e=this._didContainerChangeTick;if(this._didLocalTransformChangeId===_e)return;this._didLocalTransformChangeId=_e;const i0=this.localTransform,r0=this._scale,t0=this._pivot,n0=this._origin,s0=this._position,o0=r0._x,a0=r0._y,f0=t0._x,l0=t0._y,u0=-n0._x,A0=-n0._y;i0.a=this._cx*o0,i0.b=this._sx*o0,i0.c=this._cy*a0,i0.d=this._sy*a0,i0.tx=s0._x-(f0*i0.a+l0*i0.c)+(u0*i0.a+A0*i0.c)-u0,i0.ty=s0._y-(f0*i0.b+l0*i0.d)+(u0*i0.b+A0*i0.d)-A0}set alpha(_e){_e!==this.localAlpha&&(this.localAlpha=_e,this._updateFlags|=UPDATE_COLOR,this._onUpdate())}get alpha(){return this.localAlpha}set tint(_e){const r0=Color.shared.setValue(_e??16777215).toBgrNumber();r0!==this.localColor&&(this.localColor=r0,this._updateFlags|=UPDATE_COLOR,this._onUpdate())}get tint(){return bgr2rgb(this.localColor)}set blendMode(_e){this.localBlendMode!==_e&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=UPDATE_BLEND,this.localBlendMode=_e,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(_e){const i0=_e?2:0;(this.localDisplayStatus&2)!==i0&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=UPDATE_VISIBLE,this.localDisplayStatus^=2,this._onUpdate())}get culled(){return!(this.localDisplayStatus&4)}set culled(_e){const i0=_e?0:4;(this.localDisplayStatus&4)!==i0&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=UPDATE_VISIBLE,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(_e){const i0=_e?1:0;(this.localDisplayStatus&1)!==i0&&(this._updateFlags|=UPDATE_VISIBLE,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(_e=!1){var t0;if(this.destroyed)return;this.destroyed=!0;let i0;if(this.children.length&&(i0=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._origin=null,this._skew=null,this.emit("destroyed",this),this.removeAllListeners(),(typeof _e=="boolean"?_e:_e==null?void 0:_e.children)&&i0)for(let n0=0;n0<i0.length;++n0)i0[n0].destroy(_e);(t0=this.renderGroup)==null||t0.destroy(),this.renderGroup=null}}extensions.mixin(Container,childrenHelperMixin,getFastGlobalBoundsMixin,toLocalGlobalMixin,onRenderMixin,measureMixin,effectsMixin,findMixin,sortMixin,cullingMixin,cacheAsTextureMixin,getGlobalMixin,collectRenderablesMixin);class ViewContainer extends Container{constructor(_e){super(_e),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this._bounds=new Bounds(0,1,0,0),this._boundsDirty=!0,this.autoGarbageCollect=_e.autoGarbageCollect??!0}get bounds(){return this._boundsDirty?(this.updateBounds(),this._boundsDirty=!1,this._bounds):this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(_e){this._roundPixels=_e?1:0}containsPoint(_e){const i0=this.bounds,{x:r0,y:t0}=_e;return r0>=i0.minX&&r0<=i0.maxX&&t0>=i0.minY&&t0<=i0.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;const _e=this.renderGroup||this.parentRenderGroup;_e&&_e.onChildViewUpdate(this)}unload(){var _e;this.emit("unload",this);for(const i0 in this._gpuData)(_e=this._gpuData[i0])==null||_e.destroy();this._gpuData=Object.create(null),this.onViewUpdate()}destroy(_e){this.unload(),super.destroy(_e),this._bounds=null}collectRenderablesSimple(_e,i0,r0){const{renderPipes:t0}=i0;t0.blendMode.pushBlendMode(this,this.groupBlendMode,_e),t0[this.renderPipeId].addRenderable(this,_e),this.didViewUpdate=!1;const s0=this.children,o0=s0.length;for(let a0=0;a0<o0;a0++)s0[a0].collectRenderables(_e,i0,r0);t0.blendMode.popBlendMode(_e)}}class Sprite extends ViewContainer{constructor(_e=Texture.EMPTY){_e instanceof Texture&&(_e={texture:_e});const{texture:i0=Texture.EMPTY,anchor:r0,roundPixels:t0,width:n0,height:s0,...o0}=_e;super({label:"Sprite",...o0}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new ObservablePoint({_onUpdate:()=>{this.onViewUpdate()}}),r0?this.anchor=r0:i0.defaultAnchor&&(this.anchor=i0.defaultAnchor),this.texture=i0,this.allowChildren=!1,this.roundPixels=t0??!1,n0!==void 0&&(this.width=n0),s0!==void 0&&(this.height=s0)}static from(_e,i0=!1){return _e instanceof Texture?new Sprite(_e):new Sprite(Texture.from(_e,i0))}set texture(_e){_e||(_e=Texture.EMPTY);const i0=this._texture;i0!==_e&&(i0&&i0.dynamic&&i0.off("update",this.onViewUpdate,this),_e.dynamic&&_e.on("update",this.onViewUpdate,this),this._texture=_e,this._width&&this._setWidth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return updateQuadBounds(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return deprecation("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){const _e=this._anchor,i0=this._texture,r0=this._bounds,{width:t0,height:n0}=i0.orig;r0.minX=-_e._x*t0,r0.maxX=r0.minX+t0,r0.minY=-_e._y*n0,r0.maxY=r0.minY+n0}destroy(_e=!1){if(super.destroy(_e),typeof _e=="boolean"?_e:_e==null?void 0:_e.texture){const r0=typeof _e=="boolean"?_e:_e==null?void 0:_e.textureSource;this._texture.destroy(r0)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(_e){typeof _e=="number"?this._anchor.set(_e):this._anchor.copyFrom(_e)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(_e){this._setWidth(_e,this._texture.orig.width),this._width=_e}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(_e){this._setHeight(_e,this._texture.orig.height),this._height=_e}getSize(_e){return _e||(_e={}),_e.width=Math.abs(this.scale.x)*this._texture.orig.width,_e.height=Math.abs(this.scale.y)*this._texture.orig.height,_e}setSize(_e,i0){typeof _e=="object"?(i0=_e.height??_e.width,_e=_e.width):i0??(i0=_e),_e!==void 0&&this._setWidth(_e,this._texture.orig.width),i0!==void 0&&this._setHeight(i0,this._texture.orig.height)}}const tempBounds$3=new Bounds;function addMaskBounds(e0,_e,i0){const r0=tempBounds$3;e0.measurable=!0,getGlobalBounds(e0,i0,r0),_e.addBoundsMask(r0),e0.measurable=!1}function addMaskLocalBounds(e0,_e,i0){const r0=boundsPool.get();e0.measurable=!0;const t0=matrixPool.get().identity(),n0=getMatrixRelativeToParent(e0,i0,t0);getLocalBounds(e0,r0,n0),e0.measurable=!1,_e.addBoundsMask(r0),matrixPool.return(t0),boundsPool.return(r0)}function getMatrixRelativeToParent(e0,_e,i0){return e0?(e0!==_e&&(getMatrixRelativeToParent(e0.parent,_e,i0),e0.updateLocalTransform(),i0.append(e0.localTransform)),i0):(warn("Mask bounds, renderable is not inside the root container"),i0)}class AlphaMask{constructor(_e){this.priority=0,this.inverse=!1,this.pipe="alphaMask",_e!=null&&_e.mask&&this.init(_e.mask)}init(_e){this.mask=_e,this.renderMaskToTexture=!(_e instanceof Sprite),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask=null)}addBounds(_e,i0){this.inverse||addMaskBounds(this.mask,_e,i0)}addLocalBounds(_e,i0){addMaskLocalBounds(this.mask,_e,i0)}containsPoint(_e,i0){const r0=this.mask;return i0(r0,_e)}destroy(){this.reset()}static test(_e){return _e instanceof Sprite}}AlphaMask.extension=ExtensionType.MaskEffect;class ColorMask{constructor(_e){this.priority=0,this.pipe="colorMask",_e!=null&&_e.mask&&this.init(_e.mask)}init(_e){this.mask=_e}destroy(){}static test(_e){return typeof _e=="number"}}ColorMask.extension=ExtensionType.MaskEffect;class StencilMask{constructor(_e){this.priority=0,this.pipe="stencilMask",_e!=null&&_e.mask&&this.init(_e.mask)}init(_e){this.mask=_e,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null)}addBounds(_e,i0){addMaskBounds(this.mask,_e,i0)}addLocalBounds(_e,i0){addMaskLocalBounds(this.mask,_e,i0)}containsPoint(_e,i0){const r0=this.mask;return i0(r0,_e)}destroy(){this.reset()}static test(_e){return _e instanceof Container}}StencilMask.extension=ExtensionType.MaskEffect;const BrowserAdapter={createCanvas:(e0,_e)=>{const i0=document.createElement("canvas");return i0.width=e0,i0.height=_e,i0},createImage:()=>new Image,getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e0,_e)=>fetch(e0,_e),parseXML:e0=>new DOMParser().parseFromString(e0,"text/xml")};let currentAdapter=BrowserAdapter;const DOMAdapter={get(){return currentAdapter},set(e0){currentAdapter=e0}};class CanvasSource extends TextureSource{constructor(_e){_e.resource||(_e.resource=DOMAdapter.get().createCanvas()),_e.width||(_e.width=_e.resource.width,_e.autoDensity||(_e.width/=_e.resolution)),_e.height||(_e.height=_e.resource.height,_e.autoDensity||(_e.height/=_e.resolution)),super(_e),this.uploadMethodId="image",this.autoDensity=_e.autoDensity,this.resizeCanvas(),this.transparent=!!_e.transparent}resizeCanvas(){this.autoDensity&&"style"in this.resource&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(_e=this.width,i0=this.height,r0=this._resolution){const t0=super.resize(_e,i0,r0);return t0&&this.resizeCanvas(),t0}static test(_e){return globalThis.HTMLCanvasElement&&_e instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&_e instanceof OffscreenCanvas}get context2D(){return this._context2D||(this._context2D=this.resource.getContext("2d"))}}CanvasSource.extension=ExtensionType.TextureSource;class ImageSource extends TextureSource{constructor(_e){super(_e),this.uploadMethodId="image",this.autoGarbageCollect=!0}static test(_e){return globalThis.HTMLImageElement&&_e instanceof HTMLImageElement||typeof ImageBitmap<"u"&&_e instanceof ImageBitmap||globalThis.VideoFrame&&_e instanceof VideoFrame}}ImageSource.extension=ExtensionType.TextureSource;var UPDATE_PRIORITY=(e0=>(e0[e0.INTERACTION=50]="INTERACTION",e0[e0.HIGH=25]="HIGH",e0[e0.NORMAL=0]="NORMAL",e0[e0.LOW=-25]="LOW",e0[e0.UTILITY=-50]="UTILITY",e0))(UPDATE_PRIORITY||{});class TickerListener{constructor(_e,i0=null,r0=0,t0=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=_e,this._context=i0,this.priority=r0,this._once=t0}match(_e,i0=null){return this._fn===_e&&this._context===i0}emit(_e){this._fn&&(this._context?this._fn.call(this._context,_e):this._fn(_e));const i0=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),i0}connect(_e){this.previous=_e,_e.next&&(_e.next.previous=this),this.next=_e.next,_e.next=this}destroy(_e=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const i0=this.next;return this.next=_e?null:i0,this.previous=null,i0}}const _Ticker=class W2{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new TickerListener(null,null,1/0),this.deltaMS=1/W2.targetFPMS,this.elapsedMS=1/W2.targetFPMS,this._tick=_e=>{this._requestId=null,this.started&&(this.update(_e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(_e,i0,r0=UPDATE_PRIORITY.NORMAL){return this._addListener(new TickerListener(_e,i0,r0))}addOnce(_e,i0,r0=UPDATE_PRIORITY.NORMAL){return this._addListener(new TickerListener(_e,i0,r0,!0))}_addListener(_e){let i0=this._head.next,r0=this._head;if(!i0)_e.connect(r0);else{for(;i0;){if(_e.priority>i0.priority){_e.connect(r0);break}r0=i0,i0=i0.next}_e.previous||_e.connect(r0)}return this._startIfPossible(),this}remove(_e,i0){let r0=this._head.next;for(;r0;)r0.match(_e,i0)?r0=r0.destroy():r0=r0.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let _e=0,i0=this._head;for(;i0=i0.next;)_e++;return _e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let _e=this._head.next;for(;_e;)_e=_e.destroy(!0);this._head.destroy(),this._head=null}}update(_e=performance.now()){let i0;if(_e>this.lastTime){if(i0=this.elapsedMS=_e-this.lastTime,i0>this._maxElapsedMS&&(i0=this._maxElapsedMS),i0*=this.speed,this._minElapsedMS){const n0=_e-this._lastFrame|0;if(n0<this._minElapsedMS)return;this._lastFrame=_e-n0%this._minElapsedMS}this.deltaMS=i0,this.deltaTime=this.deltaMS*W2.targetFPMS;const r0=this._head;let t0=r0.next;for(;t0;)t0=t0.emit(this);r0.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=_e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(_e){const i0=Math.min(this.maxFPS,_e),r0=Math.min(Math.max(0,i0)/1e3,W2.targetFPMS);this._maxElapsedMS=1/r0}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(_e){if(_e===0)this._minElapsedMS=0;else{const i0=Math.max(this.minFPS,_e);this._minElapsedMS=1/(i0/1e3)}}static get shared(){if(!W2._shared){const _e=W2._shared=new W2;_e.autoStart=!0,_e._protected=!0}return W2._shared}static get system(){if(!W2._system){const _e=W2._system=new W2;_e.autoStart=!0,_e._protected=!0}return W2._system}};_Ticker.targetFPMS=.06;let Ticker=_Ticker,promise;async function detectVideoAlphaMode(){return promise??(promise=(async()=>{var s0;const _e=DOMAdapter.get().createCanvas(1,1).getContext("webgl");if(!_e)return"premultiply-alpha-on-upload";const i0=await new Promise(o0=>{const a0=document.createElement("video");a0.onloadeddata=()=>o0(a0),a0.onerror=()=>o0(null),a0.autoplay=!1,a0.crossOrigin="anonymous",a0.preload="auto",a0.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",a0.load()});if(!i0)return"premultiply-alpha-on-upload";const r0=_e.createTexture();_e.bindTexture(_e.TEXTURE_2D,r0);const t0=_e.createFramebuffer();_e.bindFramebuffer(_e.FRAMEBUFFER,t0),_e.framebufferTexture2D(_e.FRAMEBUFFER,_e.COLOR_ATTACHMENT0,_e.TEXTURE_2D,r0,0),_e.pixelStorei(_e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),_e.pixelStorei(_e.UNPACK_COLORSPACE_CONVERSION_WEBGL,_e.NONE),_e.texImage2D(_e.TEXTURE_2D,0,_e.RGBA,_e.RGBA,_e.UNSIGNED_BYTE,i0);const n0=new Uint8Array(4);return _e.readPixels(0,0,1,1,_e.RGBA,_e.UNSIGNED_BYTE,n0),_e.deleteFramebuffer(t0),_e.deleteTexture(r0),(s0=_e.getExtension("WEBGL_lose_context"))==null||s0.loseContext(),n0[0]<=n0[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),promise}const _VideoSource=class $t extends TextureSource{constructor(_e){super(_e),this.isReady=!1,this.uploadMethodId="video",_e={...$t.defaultOptions,..._e},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=_e.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=_e.autoPlay!==!1,this.alphaMode=_e.alphaMode??"premultiply-alpha-on-upload",this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),_e.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){const _e=Ticker.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-_e)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;const _e=this.resource,i0=this.options;return(_e.readyState===_e.HAVE_ENOUGH_DATA||_e.readyState===_e.HAVE_FUTURE_DATA)&&_e.width&&_e.height&&(_e.complete=!0),_e.addEventListener("play",this._onPlayStart),_e.addEventListener("pause",this._onPlayStop),_e.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._mediaReady():(i0.preload||_e.addEventListener("canplay",this._onCanPlay),_e.addEventListener("canplaythrough",this._onCanPlayThrough),_e.addEventListener("error",this._onError,!0)),this.alphaMode=await detectVideoAlphaMode(),this._load=new Promise((r0,t0)=>{this.isValid?r0(this):(this._resolve=r0,this._reject=t0,i0.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${i0.preloadTimeoutMs}ms`))})),_e.load())}),this._load}_onError(_e){this.resource.removeEventListener("error",this._onError,!0),this.emit("error",_e),this._reject&&(this._reject(_e),this._reject=null,this._resolve=null)}_isSourcePlaying(){const _e=this.resource;return!_e.paused&&!_e.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener("canplay",this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener("canplaythrough",this._onCanPlay),this._preloadTimeout&&(clearTimeout(this._preloadTimeout),this._preloadTimeout=void 0),this._mediaReady()}_mediaReady(){const _e=this.resource;this.isValid&&(this.isReady=!0,this.resize(_e.videoWidth,_e.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();const _e=this.resource;_e&&(_e.removeEventListener("play",this._onPlayStart),_e.removeEventListener("pause",this._onPlayStop),_e.removeEventListener("seeked",this._onSeeked),_e.removeEventListener("canplay",this._onCanPlay),_e.removeEventListener("canplaythrough",this._onCanPlayThrough),_e.removeEventListener("error",this._onError,!0),_e.pause(),_e.src="",_e.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(_e){_e!==this._autoUpdate&&(this._autoUpdate=_e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(_e){_e!==this._updateFPS&&(this._updateFPS=_e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(Ticker.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Ticker.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Ticker.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(_e){return globalThis.HTMLVideoElement&&_e instanceof HTMLVideoElement}};_VideoSource.extension=ExtensionType.TextureSource;_VideoSource.defaultOptions={...TextureSource.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};_VideoSource.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let VideoSource=_VideoSource;const convertToList=(e0,_e,i0=!1)=>(Array.isArray(e0)||(e0=[e0]),_e?e0.map(r0=>typeof r0=="string"||i0?_e(r0):r0):e0);class CacheClass{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(_e){return this._cache.has(_e)}get(_e){const i0=this._cache.get(_e);return i0||warn(`[Assets] Asset id ${_e} was not found in the Cache`),i0}set(_e,i0){const r0=convertToList(_e);let t0;for(let a0=0;a0<this.parsers.length;a0++){const f0=this.parsers[a0];if(f0.test(i0)){t0=f0.getCacheableAssets(r0,i0);break}}const n0=new Map(Object.entries(t0||{}));t0||r0.forEach(a0=>{n0.set(a0,i0)});const s0=[...n0.keys()],o0={cacheKeys:s0,keys:r0};r0.forEach(a0=>{this._cacheMap.set(a0,o0)}),s0.forEach(a0=>{const f0=t0?t0[a0]:i0;this._cache.has(a0)&&this._cache.get(a0)!==f0&&warn("[Cache] already has key:",a0),this._cache.set(a0,n0.get(a0))})}remove(_e){if(!this._cacheMap.has(_e)){warn(`[Assets] Asset id ${_e} was not found in the Cache`);return}const i0=this._cacheMap.get(_e);i0.cacheKeys.forEach(t0=>{this._cache.delete(t0)}),i0.keys.forEach(t0=>{this._cacheMap.delete(t0)})}get parsers(){return this._parsers}}const Cache=new CacheClass,sources=[];extensions.handleByList(ExtensionType.TextureSource,sources);function textureSourceFrom(e0={}){const _e=e0&&e0.resource,i0=_e?e0.resource:e0,r0=_e?e0:{resource:e0};for(let t0=0;t0<sources.length;t0++){const n0=sources[t0];if(n0.test(i0))return new n0(r0)}throw new Error(`Could not find a source type for resource: ${r0.resource}`)}function resourceToTexture(e0={},_e=!1){const i0=e0&&e0.resource,r0=i0?e0.resource:e0,t0=i0?e0:{resource:e0};if(!_e&&Cache.has(r0))return Cache.get(r0);const n0=new Texture({source:textureSourceFrom(t0)});return n0.on("destroy",()=>{Cache.has(r0)&&Cache.remove(r0)}),_e||Cache.set(r0,n0),n0}function textureFrom(e0,_e=!1){return typeof e0=="string"?Cache.get(e0):e0 instanceof TextureSource?new Texture({source:e0}):resourceToTexture(e0,_e)}Texture.from=textureFrom;TextureSource.from=textureSourceFrom;extensions.add(AlphaMask,ColorMask,StencilMask,VideoSource,ImageSource,CanvasSource,BufferImageSource);var LoaderParserPriority=(e0=>(e0[e0.Low=0]="Low",e0[e0.Normal=1]="Normal",e0[e0.High=2]="High",e0))(LoaderParserPriority||{});function assertPath(e0){if(typeof e0!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(e0)}`)}function removeUrlParams(e0){return e0.split("?")[0].split("#")[0]}function escapeRegExp(e0){return e0.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function replaceAll(e0,_e,i0){return e0.replace(new RegExp(escapeRegExp(_e),"g"),i0)}function normalizeStringPosix(e0,_e){let i0="",r0=0,t0=-1,n0=0,s0=-1;for(let o0=0;o0<=e0.length;++o0){if(o0<e0.length)s0=e0.charCodeAt(o0);else{if(s0===47)break;s0=47}if(s0===47){if(!(t0===o0-1||n0===1))if(t0!==o0-1&&n0===2){if(i0.length<2||r0!==2||i0.charCodeAt(i0.length-1)!==46||i0.charCodeAt(i0.length-2)!==46){if(i0.length>2){const a0=i0.lastIndexOf("/");if(a0!==i0.length-1){a0===-1?(i0="",r0=0):(i0=i0.slice(0,a0),r0=i0.length-1-i0.lastIndexOf("/")),t0=o0,n0=0;continue}}else if(i0.length===2||i0.length===1){i0="",r0=0,t0=o0,n0=0;continue}}}else i0.length>0?i0+=`/${e0.slice(t0+1,o0)}`:i0=e0.slice(t0+1,o0),r0=o0-t0-1;t0=o0,n0=0}else s0===46&&n0!==-1?++n0:n0=-1}return i0}const path={toPosix(e0){return replaceAll(e0,"\\","/")},isUrl(e0){return/^https?:/.test(this.toPosix(e0))},isDataUrl(e0){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(e0)},isBlobUrl(e0){return e0.startsWith("blob:")},hasProtocol(e0){return/^[^/:]+:/.test(this.toPosix(e0))},getProtocol(e0){assertPath(e0),e0=this.toPosix(e0);const _e=/^file:\/\/\//.exec(e0);if(_e)return _e[0];const i0=/^[^/:]+:\/{0,2}/.exec(e0);return i0?i0[0]:""},toAbsolute(e0,_e,i0){if(assertPath(e0),this.isDataUrl(e0)||this.isBlobUrl(e0))return e0;const r0=removeUrlParams(this.toPosix(_e??DOMAdapter.get().getBaseUrl())),t0=removeUrlParams(this.toPosix(i0??this.rootname(r0)));return e0=this.toPosix(e0),e0.startsWith("/")?path.join(t0,e0.slice(1)):this.isAbsolute(e0)?e0:this.join(r0,e0)},normalize(e0){if(assertPath(e0),e0.length===0)return".";if(this.isDataUrl(e0)||this.isBlobUrl(e0))return e0;e0=this.toPosix(e0);let _e="";const i0=e0.startsWith("/");this.hasProtocol(e0)&&(_e=this.rootname(e0),e0=e0.slice(_e.length));const r0=e0.endsWith("/");return e0=normalizeStringPosix(e0),e0.length>0&&r0&&(e0+="/"),i0?`/${e0}`:_e+e0},isAbsolute(e0){return assertPath(e0),e0=this.toPosix(e0),this.hasProtocol(e0)?!0:e0.startsWith("/")},join(...e0){if(e0.length===0)return".";let _e;for(let i0=0;i0<e0.length;++i0){const r0=e0[i0];if(assertPath(r0),r0.length>0)if(_e===void 0)_e=r0;else{const t0=e0[i0-1]??"";this.joinExtensions.includes(this.extname(t0).toLowerCase())?_e+=`/../${r0}`:_e+=`/${r0}`}}return _e===void 0?".":this.normalize(_e)},dirname(e0){if(assertPath(e0),e0.length===0)return".";e0=this.toPosix(e0);let _e=e0.charCodeAt(0);const i0=_e===47;let r0=-1,t0=!0;const n0=this.getProtocol(e0),s0=e0;e0=e0.slice(n0.length);for(let o0=e0.length-1;o0>=1;--o0)if(_e=e0.charCodeAt(o0),_e===47){if(!t0){r0=o0;break}}else t0=!1;return r0===-1?i0?"/":this.isUrl(s0)?n0+e0:n0:i0&&r0===1?"//":n0+e0.slice(0,r0)},rootname(e0){assertPath(e0),e0=this.toPosix(e0);let _e="";if(e0.startsWith("/")?_e="/":_e=this.getProtocol(e0),this.isUrl(e0)){const i0=e0.indexOf("/",_e.length);i0!==-1?_e=e0.slice(0,i0):_e=e0,_e.endsWith("/")||(_e+="/")}return _e},basename(e0,_e){assertPath(e0),_e&&assertPath(_e),e0=removeUrlParams(this.toPosix(e0));let i0=0,r0=-1,t0=!0,n0;if(_e!==void 0&&_e.length>0&&_e.length<=e0.length){if(_e.length===e0.length&&_e===e0)return"";let s0=_e.length-1,o0=-1;for(n0=e0.length-1;n0>=0;--n0){const a0=e0.charCodeAt(n0);if(a0===47){if(!t0){i0=n0+1;break}}else o0===-1&&(t0=!1,o0=n0+1),s0>=0&&(a0===_e.charCodeAt(s0)?--s0===-1&&(r0=n0):(s0=-1,r0=o0))}return i0===r0?r0=o0:r0===-1&&(r0=e0.length),e0.slice(i0,r0)}for(n0=e0.length-1;n0>=0;--n0)if(e0.charCodeAt(n0)===47){if(!t0){i0=n0+1;break}}else r0===-1&&(t0=!1,r0=n0+1);return r0===-1?"":e0.slice(i0,r0)},extname(e0){assertPath(e0),e0=removeUrlParams(this.toPosix(e0));let _e=-1,i0=0,r0=-1,t0=!0,n0=0;for(let s0=e0.length-1;s0>=0;--s0){const o0=e0.charCodeAt(s0);if(o0===47){if(!t0){i0=s0+1;break}continue}r0===-1&&(t0=!1,r0=s0+1),o0===46?_e===-1?_e=s0:n0!==1&&(n0=1):_e!==-1&&(n0=-1)}return _e===-1||r0===-1||n0===0||n0===1&&_e===r0-1&&_e===i0+1?"":e0.slice(_e,r0)},parse(e0){assertPath(e0);const _e={root:"",dir:"",base:"",ext:"",name:""};if(e0.length===0)return _e;e0=removeUrlParams(this.toPosix(e0));let i0=e0.charCodeAt(0);const r0=this.isAbsolute(e0);let t0;_e.root=this.rootname(e0),r0||this.hasProtocol(e0)?t0=1:t0=0;let n0=-1,s0=0,o0=-1,a0=!0,f0=e0.length-1,l0=0;for(;f0>=t0;--f0){if(i0=e0.charCodeAt(f0),i0===47){if(!a0){s0=f0+1;break}continue}o0===-1&&(a0=!1,o0=f0+1),i0===46?n0===-1?n0=f0:l0!==1&&(l0=1):n0!==-1&&(l0=-1)}return n0===-1||o0===-1||l0===0||l0===1&&n0===o0-1&&n0===s0+1?o0!==-1&&(s0===0&&r0?_e.base=_e.name=e0.slice(1,o0):_e.base=_e.name=e0.slice(s0,o0)):(s0===0&&r0?(_e.name=e0.slice(1,n0),_e.base=e0.slice(1,o0)):(_e.name=e0.slice(s0,n0),_e.base=e0.slice(s0,o0)),_e.ext=e0.slice(n0,o0)),_e.dir=this.dirname(e0),_e},sep:"/",delimiter:":",joinExtensions:[".html"]};function processX(e0,_e,i0,r0,t0){const n0=_e[i0];for(let s0=0;s0<n0.length;s0++){const o0=n0[s0];i0<_e.length-1?processX(e0.replace(r0[i0],o0),_e,i0+1,r0,t0):t0.push(e0.replace(r0[i0],o0))}}function createStringVariations(e0){const _e=/\{(.*?)\}/g,i0=e0.match(_e),r0=[];if(i0){const t0=[];i0.forEach(n0=>{const s0=n0.substring(1,n0.length-1).split(",");t0.push(s0)}),processX(e0,t0,0,i0,r0)}else r0.push(e0);return r0}const isSingleItem=e0=>!Array.isArray(e0);class Resolver{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(_e,i0)=>`${_e}${this._bundleIdConnector}${i0}`,extractAssetIdFromBundle:(_e,i0)=>i0.replace(`${_e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(_e){if(this._bundleIdConnector=_e.connector??this._bundleIdConnector,this._createBundleAssetId=_e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=_e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(..._e){_e.forEach(i0=>{this._preferredOrder.push(i0),i0.priority||(i0.priority=Object.keys(i0.params))}),this._resolverHash={}}set basePath(_e){this._basePath=_e}get basePath(){return this._basePath}set rootPath(_e){this._rootPath=_e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(_e){if(typeof _e=="string")this._defaultSearchParams=_e;else{const i0=_e;this._defaultSearchParams=Object.keys(i0).map(r0=>`${encodeURIComponent(r0)}=${encodeURIComponent(i0[r0])}`).join("&")}}getAlias(_e){const{alias:i0,src:r0}=_e;return convertToList(i0||r0,n0=>typeof n0=="string"?n0:Array.isArray(n0)?n0.map(s0=>(s0==null?void 0:s0.src)??s0):n0!=null&&n0.src?n0.src:n0,!0)}addManifest(_e){this._manifest&&warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=_e,_e.bundles.forEach(i0=>{this.addBundle(i0.name,i0.assets)})}addBundle(_e,i0){const r0=[];let t0=i0;Array.isArray(i0)||(t0=Object.entries(i0).map(([n0,s0])=>typeof s0=="string"||Array.isArray(s0)?{alias:n0,src:s0}:{alias:n0,...s0})),t0.forEach(n0=>{const s0=n0.src,o0=n0.alias;let a0;if(typeof o0=="string"){const f0=this._createBundleAssetId(_e,o0);r0.push(f0),a0=[o0,f0]}else{const f0=o0.map(l0=>this._createBundleAssetId(_e,l0));r0.push(...f0),a0=[...o0,...f0]}this.add({...n0,alias:a0,src:s0})}),this._bundles[_e]=r0}add(_e){const i0=[];Array.isArray(_e)?i0.push(..._e):i0.push(_e);let r0;r0=n0=>{this.hasKey(n0)&&warn(`[Resolver] already has key: ${n0} overwriting`)},convertToList(i0).forEach(n0=>{const{src:s0}=n0;let{data:o0,format:a0,loadParser:f0,parser:l0}=n0;const u0=convertToList(s0).map(d0=>typeof d0=="string"?createStringVariations(d0):Array.isArray(d0)?d0:[d0]),A0=this.getAlias(n0);Array.isArray(A0)?A0.forEach(r0):r0(A0);const c0=[],k0=d0=>{const h0=this._parsers.find(b0=>b0.test(d0));return{...h0==null?void 0:h0.parse(d0),src:d0}};u0.forEach(d0=>{d0.forEach(h0=>{let b0={};if(typeof h0!="object"?b0=k0(h0):(o0=h0.data??o0,a0=h0.format??a0,(h0.loadParser||h0.parser)&&(f0=h0.loadParser??f0,l0=h0.parser??l0),b0={...k0(h0.src),...h0}),!A0)throw new Error(`[Resolver] alias is undefined for this asset: ${b0.src}`);b0=this._buildResolvedAsset(b0,{aliases:A0,data:o0,format:a0,loadParser:f0,parser:l0,progressSize:n0.progressSize}),c0.push(b0)})}),A0.forEach(d0=>{this._assetMap[d0]=c0})})}resolveBundle(_e){const i0=isSingleItem(_e);_e=convertToList(_e);const r0={};return _e.forEach(t0=>{const n0=this._bundles[t0];if(n0){const s0=this.resolve(n0),o0={};for(const a0 in s0){const f0=s0[a0];o0[this._extractAssetIdFromBundle(t0,a0)]=f0}r0[t0]=o0}}),i0?r0[_e[0]]:r0}resolveUrl(_e){const i0=this.resolve(_e);if(typeof _e!="string"){const r0={};for(const t0 in i0)r0[t0]=i0[t0].src;return r0}return i0.src}resolve(_e){const i0=isSingleItem(_e);_e=convertToList(_e);const r0={};return _e.forEach(t0=>{if(!this._resolverHash[t0])if(this._assetMap[t0]){let n0=this._assetMap[t0];const s0=this._getPreferredOrder(n0);s0==null||s0.priority.forEach(o0=>{s0.params[o0].forEach(a0=>{const f0=n0.filter(l0=>l0[o0]?l0[o0]===a0:!1);f0.length&&(n0=f0)})}),this._resolverHash[t0]=n0[0]}else this._resolverHash[t0]=this._buildResolvedAsset({alias:[t0],src:t0},{});r0[t0]=this._resolverHash[t0]}),i0?r0[_e[0]]:r0}hasKey(_e){return!!this._assetMap[_e]}hasBundle(_e){return!!this._bundles[_e]}_getPreferredOrder(_e){for(let i0=0;i0<_e.length;i0++){const r0=_e[i0],t0=this._preferredOrder.find(n0=>n0.params.format.includes(r0.format));if(t0)return t0}return this._preferredOrder[0]}_appendDefaultSearchParams(_e){if(!this._defaultSearchParams)return _e;const i0=/\?/.test(_e)?"&":"?";return`${_e}${i0}${this._defaultSearchParams}`}_buildResolvedAsset(_e,i0){const{aliases:r0,data:t0,loadParser:n0,parser:s0,format:o0,progressSize:a0}=i0;return(this._basePath||this._rootPath)&&(_e.src=path.toAbsolute(_e.src,this._basePath,this._rootPath)),_e.alias=r0??_e.alias??[_e.src],_e.src=this._appendDefaultSearchParams(_e.src),_e.data={...t0||{},..._e.data},_e.loadParser=n0??_e.loadParser,_e.parser=s0??_e.parser,_e.format=o0??_e.format??getUrlExtension(_e.src),a0!==void 0&&(_e.progressSize=a0),_e}}Resolver.RETINA_PREFIX=/@([0-9\.]+)x/;function getUrlExtension(e0){return e0.split(".").pop().split("?").shift().split("#").shift()}const copySearchParams=(e0,_e)=>{const i0=_e.split("?")[1];return i0&&(e0+=`?${i0}`),e0},_Spritesheet=class zr{constructor(_e,i0){this.linkedSheets=[];let r0=_e;(_e==null?void 0:_e.source)instanceof TextureSource&&(r0={texture:_e,data:i0});const{texture:t0,data:n0,cachePrefix:s0=""}=r0;this.cachePrefix=s0,this._texture=t0 instanceof Texture?t0:null,this.textureSource=t0.source,this.textures={},this.animations={},this.data=n0;const o0=parseFloat(n0.meta.scale);o0?(this.resolution=o0,t0.source.resolution=this.resolution):this.resolution=t0.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(_e=>{this._callback=_e,this._batchIndex=0,this._frameKeys.length<=zr.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(_e){let i0=_e;const r0=zr.BATCH_SIZE;for(;i0-_e<r0&&i0<this._frameKeys.length;){const t0=this._frameKeys[i0],n0=this._frames[t0],s0=n0.frame;if(s0){let o0=null,a0=null;const f0=n0.trimmed!==!1&&n0.sourceSize?n0.sourceSize:n0.frame,l0=new Rectangle(0,0,Math.floor(f0.w)/this.resolution,Math.floor(f0.h)/this.resolution);n0.rotated?o0=new Rectangle(Math.floor(s0.x)/this.resolution,Math.floor(s0.y)/this.resolution,Math.floor(s0.h)/this.resolution,Math.floor(s0.w)/this.resolution):o0=new Rectangle(Math.floor(s0.x)/this.resolution,Math.floor(s0.y)/this.resolution,Math.floor(s0.w)/this.resolution,Math.floor(s0.h)/this.resolution),n0.trimmed!==!1&&n0.spriteSourceSize&&(a0=new Rectangle(Math.floor(n0.spriteSourceSize.x)/this.resolution,Math.floor(n0.spriteSourceSize.y)/this.resolution,Math.floor(s0.w)/this.resolution,Math.floor(s0.h)/this.resolution)),this.textures[t0]=new Texture({source:this.textureSource,frame:o0,orig:l0,trim:a0,rotate:n0.rotated?2:0,defaultAnchor:n0.anchor,defaultBorders:n0.borders,label:t0.toString()})}i0++}}_processAnimations(){const _e=this.data.animations||{};for(const i0 in _e){this.animations[i0]=[];for(let r0=0;r0<_e[i0].length;r0++){const t0=_e[i0][r0];this.animations[i0].push(this.textures[t0])}}}_parseComplete(){const _e=this._callback;this._callback=null,this._batchIndex=0,_e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*zr.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*zr.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(_e=!1){var i0;for(const r0 in this.textures)this.textures[r0].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,_e&&((i0=this._texture)==null||i0.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};_Spritesheet.BATCH_SIZE=1e3;let Spritesheet=_Spritesheet;const validImages=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];function getCacheableAssets(e0,_e,i0){const r0={};if(e0.forEach(t0=>{r0[t0]=_e}),Object.keys(_e.textures).forEach(t0=>{r0[`${_e.cachePrefix}${t0}`]=_e.textures[t0]}),!i0){const t0=path.dirname(e0[0]);_e.linkedSheets.forEach((n0,s0)=>{const o0=getCacheableAssets([`${t0}/${_e.data.meta.related_multi_packs[s0]}`],n0,!0);Object.assign(r0,o0)})}return r0}const spritesheetAsset={extension:ExtensionType.Asset,cache:{test:e0=>e0 instanceof Spritesheet,getCacheableAssets:(e0,_e)=>getCacheableAssets(e0,_e,!1)},resolver:{extension:{type:ExtensionType.ResolveParser,name:"resolveSpritesheet"},test:e0=>{const i0=e0.split("?")[0].split("."),r0=i0.pop(),t0=i0.pop();return r0==="json"&&validImages.includes(t0)},parse:e0=>{var i0;const _e=e0.split(".");return{resolution:parseFloat(((i0=Resolver.RETINA_PREFIX.exec(e0))==null?void 0:i0[1])??"1"),format:_e[_e.length-2],src:e0}}},loader:{name:"spritesheetLoader",id:"spritesheet",extension:{type:ExtensionType.LoadParser,priority:LoaderParserPriority.Normal,name:"spritesheetLoader"},async testParse(e0,_e){return path.extname(_e.src).toLowerCase()===".json"&&!!e0.frames},async parse(e0,_e,i0){var u0,A0;const{texture:r0,imageFilename:t0,textureOptions:n0,cachePrefix:s0}=(_e==null?void 0:_e.data)??{};let o0=path.dirname(_e.src);o0&&o0.lastIndexOf("/")!==o0.length-1&&(o0+="/");let a0;if(r0 instanceof Texture)a0=r0;else{const c0=copySearchParams(o0+(t0??e0.meta.image),_e.src);a0=(await i0.load([{src:c0,data:n0}]))[c0]}const f0=new Spritesheet({texture:a0.source,data:e0,cachePrefix:s0});await f0.parse();const l0=(u0=e0==null?void 0:e0.meta)==null?void 0:u0.related_multi_packs;if(Array.isArray(l0)){const c0=[];for(const d0 of l0){if(typeof d0!="string")continue;let h0=o0+d0;(A0=_e.data)!=null&&A0.ignoreMultiPack||(h0=copySearchParams(h0,_e.src),c0.push(i0.load({src:h0,data:{textureOptions:n0,ignoreMultiPack:!0}})))}const k0=await Promise.all(c0);f0.linkedSheets=k0,k0.forEach(d0=>{d0.linkedSheets=[f0].concat(f0.linkedSheets.filter(h0=>h0!==d0))})}return f0},async unload(e0,_e,i0){await i0.unload(e0.textureSource._sourceOrigin),e0.destroy(!1)}}};extensions.add(spritesheetAsset);class CanvasObserver{constructor(_e){this._lastTransform="",this._observer=null,this._tickerAttached=!1,this.updateTranslation=()=>{if(!this._canvas)return;const i0=this._canvas.getBoundingClientRect(),r0=this._canvas.width,t0=this._canvas.height,n0=i0.width/r0*this._renderer.resolution,s0=i0.height/t0*this._renderer.resolution,o0=i0.left,a0=i0.top,f0=`translate(${o0}px, ${a0}px) scale(${n0}, ${s0})`;f0!==this._lastTransform&&(this._domElement.style.transform=f0,this._lastTransform=f0)},this._domElement=_e.domElement,this._renderer=_e.renderer,!(globalThis.OffscreenCanvas&&this._renderer.canvas instanceof OffscreenCanvas)&&(this._canvas=this._renderer.canvas,this._attachObserver())}get canvas(){return this._canvas}ensureAttached(){!this._domElement.parentNode&&this._canvas.parentNode&&(this._canvas.parentNode.appendChild(this._domElement),this.updateTranslation())}_attachObserver(){"ResizeObserver"in globalThis?(this._observer&&(this._observer.disconnect(),this._observer=null),this._observer=new ResizeObserver(_e=>{for(const i0 of _e){if(i0.target!==this._canvas)continue;const r0=this.canvas.width,t0=this.canvas.height,n0=i0.contentRect.width/r0*this._renderer.resolution,s0=i0.contentRect.height/t0*this._renderer.resolution;(this._lastScaleX!==n0||this._lastScaleY!==s0)&&(this.updateTranslation(),this._lastScaleX=n0,this._lastScaleY=s0)}}),this._observer.observe(this._canvas)):this._tickerAttached||Ticker.shared.add(this.updateTranslation,this,UPDATE_PRIORITY.HIGH)}destroy(){this._observer?(this._observer.disconnect(),this._observer=null):this._tickerAttached&&Ticker.shared.remove(this.updateTranslation),this._domElement=null,this._renderer=null,this._canvas=null,this._tickerAttached=!1,this._lastTransform="",this._lastScaleX=null,this._lastScaleY=null}}class FederatedEvent{constructor(_e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=FederatedEvent.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Point,this.page=new Point,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=_e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(_e,i0,r0){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(_e,i0,r0,t0,n0){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}}var appleIphone=/iPhone/i,appleIpod=/iPod/i,appleTablet=/iPad/i,appleUniversal=/\biOS-universal(?:.+)Mac\b/i,androidPhone=/\bAndroid(?:.+)Mobile\b/i,androidTablet=/Android/i,amazonPhone=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,amazonTablet=/Silk/i,windowsPhone=/Windows Phone/i,windowsTablet=/\bWindows(?:.+)ARM\b/i,otherBlackBerry=/BlackBerry/i,otherBlackBerry10=/BB10/i,otherOpera=/Opera Mini/i,otherChrome=/\b(CriOS|Chrome)(?:.+)Mobile/i,otherFirefox=/Mobile(?:.+)Firefox\b/i,isAppleTabletOnIos13=function(e0){return typeof e0<"u"&&e0.platform==="MacIntel"&&typeof e0.maxTouchPoints=="number"&&e0.maxTouchPoints>1&&typeof MSStream>"u"};function createMatch(e0){return function(_e){return _e.test(e0)}}function isMobile$1(e0){var _e={userAgent:"",platform:"",maxTouchPoints:0};!e0&&typeof navigator<"u"?_e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e0=="string"?_e.userAgent=e0:e0&&e0.userAgent&&(_e={userAgent:e0.userAgent,platform:e0.platform,maxTouchPoints:e0.maxTouchPoints||0});var i0=_e.userAgent,r0=i0.split("[FBAN");typeof r0[1]<"u"&&(i0=r0[0]),r0=i0.split("Twitter"),typeof r0[1]<"u"&&(i0=r0[0]);var t0=createMatch(i0),n0={apple:{phone:t0(appleIphone)&&!t0(windowsPhone),ipod:t0(appleIpod),tablet:!t0(appleIphone)&&(t0(appleTablet)||isAppleTabletOnIos13(_e))&&!t0(windowsPhone),universal:t0(appleUniversal),device:(t0(appleIphone)||t0(appleIpod)||t0(appleTablet)||t0(appleUniversal)||isAppleTabletOnIos13(_e))&&!t0(windowsPhone)},amazon:{phone:t0(amazonPhone),tablet:!t0(amazonPhone)&&t0(amazonTablet),device:t0(amazonPhone)||t0(amazonTablet)},android:{phone:!t0(windowsPhone)&&t0(amazonPhone)||!t0(windowsPhone)&&t0(androidPhone),tablet:!t0(windowsPhone)&&!t0(amazonPhone)&&!t0(androidPhone)&&(t0(amazonTablet)||t0(androidTablet)),device:!t0(windowsPhone)&&(t0(amazonPhone)||t0(amazonTablet)||t0(androidPhone)||t0(androidTablet))||t0(/\bokhttp\b/i)},windows:{phone:t0(windowsPhone),tablet:t0(windowsTablet),device:t0(windowsPhone)||t0(windowsTablet)},other:{blackberry:t0(otherBlackBerry),blackberry10:t0(otherBlackBerry10),opera:t0(otherOpera),firefox:t0(otherFirefox),chrome:t0(otherChrome),device:t0(otherBlackBerry)||t0(otherBlackBerry10)||t0(otherOpera)||t0(otherFirefox)||t0(otherChrome)},any:!1,phone:!1,tablet:!1};return n0.any=n0.apple.device||n0.android.device||n0.windows.device||n0.other.device,n0.phone=n0.apple.phone||n0.android.phone||n0.windows.phone,n0.tablet=n0.apple.tablet||n0.android.tablet||n0.windows.tablet,n0}const isMobileCall=isMobile$1.default??isMobile$1,isMobile=isMobileCall(globalThis.navigator),KEY_CODE_TAB=9,DIV_TOUCH_SIZE=100,DIV_TOUCH_POS_X=0,DIV_TOUCH_POS_Y=0,DIV_TOUCH_ZINDEX=2,DIV_HOOK_SIZE=1,DIV_HOOK_POS_X=-1e3,DIV_HOOK_POS_Y=-1e3,DIV_HOOK_ZINDEX=2,_AccessibilitySystem=class Qt{constructor(_e,i0=isMobile){this._mobileInfo=i0,this.debug=!1,this._activateOnTab=!0,this._deactivateOnMouseMove=!0,this._isActive=!1,this._isMobileAccessibility=!1,this._div=null,this._pools={},this._renderId=0,this._children=[],this._androidUpdateCount=0,this._androidUpdateFrequency=500,this._isRunningTests=!1,this._boundOnKeyDown=this._onKeyDown.bind(this),this._boundOnMouseMove=this._onMouseMove.bind(this),this._hookDiv=null,(i0.tablet||i0.phone)&&this._createTouchHook(),this._renderer=_e}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}get hookDiv(){return this._hookDiv}get div(){return this._div}_createTouchHook(){const _e=document.createElement("button");_e.style.width=`${DIV_HOOK_SIZE}px`,_e.style.height=`${DIV_HOOK_SIZE}px`,_e.style.position="absolute",_e.style.top=`${DIV_HOOK_POS_X}px`,_e.style.left=`${DIV_HOOK_POS_Y}px`,_e.style.zIndex=DIV_HOOK_ZINDEX.toString(),_e.style.backgroundColor="#FF0000",_e.title="select to enable accessibility for this content",_e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this._activate(),this._destroyTouchHook()}),document.body.appendChild(_e),this._hookDiv=_e}_destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}_activate(){if(this._isActive)return;this._isActive=!0,this._div||(this._div=document.createElement("div"),this._div.style.position="absolute",this._div.style.top=`${DIV_TOUCH_POS_X}px`,this._div.style.left=`${DIV_TOUCH_POS_Y}px`,this._div.style.pointerEvents="none",this._div.style.zIndex=DIV_TOUCH_ZINDEX.toString(),this._canvasObserver=new CanvasObserver({domElement:this._div,renderer:this._renderer})),this._activateOnTab&&globalThis.addEventListener("keydown",this._boundOnKeyDown,!1),this._deactivateOnMouseMove&&globalThis.document.addEventListener("mousemove",this._boundOnMouseMove,!0);const _e=this._renderer.view.canvas;if(_e.parentNode)this._canvasObserver.ensureAttached(),this._initAccessibilitySetup();else{const i0=new MutationObserver(()=>{_e.parentNode&&(i0.disconnect(),this._canvasObserver.ensureAttached(),this._initAccessibilitySetup())});i0.observe(document.body,{childList:!0,subtree:!0})}}_initAccessibilitySetup(){this._renderer.runners.postrender.add(this),this._renderer.lastObjectRendered&&this._updateAccessibleObjects(this._renderer.lastObjectRendered)}_deactivate(){var _e,i0;if(!(!this._isActive||this._isMobileAccessibility)){this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._boundOnMouseMove,!0),this._activateOnTab&&globalThis.addEventListener("keydown",this._boundOnKeyDown,!1),this._renderer.runners.postrender.remove(this);for(const r0 of this._children)(_e=r0._accessibleDiv)!=null&&_e.parentNode&&(r0._accessibleDiv.parentNode.removeChild(r0._accessibleDiv),r0._accessibleDiv=null),r0._accessibleActive=!1;for(const r0 in this._pools)this._pools[r0].forEach(n0=>{n0.parentNode&&n0.parentNode.removeChild(n0)}),delete this._pools[r0];(i0=this._div)!=null&&i0.parentNode&&this._div.parentNode.removeChild(this._div),this._pools={},this._children=[]}}_updateAccessibleObjects(_e){if(!_e.visible||!_e.accessibleChildren)return;_e.accessible&&(_e._accessibleActive||this._addChild(_e),_e._renderId=this._renderId);const i0=_e.children;if(i0)for(let r0=0;r0<i0.length;r0++)this._updateAccessibleObjects(i0[r0])}init(_e){const r0={accessibilityOptions:{...Qt.defaultOptions,...(_e==null?void 0:_e.accessibilityOptions)||{}}};this.debug=r0.accessibilityOptions.debug,this._activateOnTab=r0.accessibilityOptions.activateOnTab,this._deactivateOnMouseMove=r0.accessibilityOptions.deactivateOnMouseMove,r0.accessibilityOptions.enabledByDefault&&this._activate(),this._renderer.runners.postrender.remove(this)}postrender(){const _e=performance.now();if(this._mobileInfo.android.device&&_e<this._androidUpdateCount||(this._androidUpdateCount=_e+this._androidUpdateFrequency,(!this._renderer.renderingToScreen||!this._renderer.view.canvas)&&!this._isRunningTests))return;const i0=new Set;if(this._renderer.lastObjectRendered){this._updateAccessibleObjects(this._renderer.lastObjectRendered);for(const r0 of this._children)r0._renderId===this._renderId&&i0.add(this._children.indexOf(r0))}for(let r0=this._children.length-1;r0>=0;r0--){const t0=this._children[r0];i0.has(r0)||(t0._accessibleDiv&&t0._accessibleDiv.parentNode&&(t0._accessibleDiv.parentNode.removeChild(t0._accessibleDiv),this._getPool(t0.accessibleType).push(t0._accessibleDiv),t0._accessibleDiv=null),t0._accessibleActive=!1,removeItems(this._children,r0,1))}this._renderer.renderingToScreen&&this._canvasObserver.ensureAttached();for(let r0=0;r0<this._children.length;r0++){const t0=this._children[r0];if(!t0._accessibleActive||!t0._accessibleDiv)continue;const n0=t0._accessibleDiv,s0=t0.hitArea||t0.getBounds().rectangle;if(t0.hitArea){const o0=t0.worldTransform;n0.style.left=`${o0.tx+s0.x*o0.a}px`,n0.style.top=`${o0.ty+s0.y*o0.d}px`,n0.style.width=`${s0.width*o0.a}px`,n0.style.height=`${s0.height*o0.d}px`}else this._capHitArea(s0),n0.style.left=`${s0.x}px`,n0.style.top=`${s0.y}px`,n0.style.width=`${s0.width}px`,n0.style.height=`${s0.height}px`}this._renderId++}_updateDebugHTML(_e){_e.innerHTML=`type: ${_e.type}</br> title : ${_e.title}</br> tabIndex: ${_e.tabIndex}`}_capHitArea(_e){_e.x<0&&(_e.width+=_e.x,_e.x=0),_e.y<0&&(_e.height+=_e.y,_e.y=0);const{width:i0,height:r0}=this._renderer;_e.x+_e.width>i0&&(_e.width=i0-_e.x),_e.y+_e.height>r0&&(_e.height=r0-_e.y)}_addChild(_e){let r0=this._getPool(_e.accessibleType).pop();r0?(r0.innerHTML="",r0.removeAttribute("title"),r0.removeAttribute("aria-label"),r0.tabIndex=0):(_e.accessibleType==="button"?r0=document.createElement("button"):(r0=document.createElement(_e.accessibleType),r0.style.cssText=`
|
|
@@ -1581,7 +1581,7 @@ fn mainFragment(
|
|
|
1581
1581
|
src: url('${i0}');
|
|
1582
1582
|
}`}const FontStylePromiseCache=new Map;async function getFontCss(e0){const _e=e0.filter(i0=>Cache.has(`${i0}-and-url`)).map(i0=>{if(!FontStylePromiseCache.has(i0)){const{entries:r0}=Cache.get(`${i0}-and-url`),t0=[];r0.forEach(n0=>{const s0=n0.url,a0=n0.faces.map(f0=>({weight:f0.weight,style:f0.style}));t0.push(...a0.map(f0=>loadFontCSS({fontWeight:f0.weight,fontStyle:f0.style,fontFamily:i0},s0)))}),FontStylePromiseCache.set(i0,Promise.all(t0).then(n0=>n0.join(`
|
|
1583
1583
|
`)))}return FontStylePromiseCache.get(i0)});return(await Promise.all(_e)).join(`
|
|
1584
|
-
`)}function getSVGUrl(e0,_e,i0,r0,t0){const{domElement:n0,styleElement:s0,svgRoot:o0}=t0;n0.innerHTML=`<style>${_e.cssStyle}</style><div style='padding:0;'>${e0}</div>`,n0.setAttribute("style",`transform: scale(${i0});transform-origin: top left; display: inline-block`),s0.textContent=r0;const{width:a0,height:f0}=t0.image;return o0.setAttribute("width",a0.toString()),o0.setAttribute("height",f0.toString()),new XMLSerializer().serializeToString(o0)}function getTemporaryCanvasFromImage(e0,_e){const i0=CanvasPool.getOptimalCanvasAndContext(e0.width,e0.height,_e),{context:r0}=i0;return r0.clearRect(0,0,e0.width,e0.height),r0.drawImage(e0,0,0),i0}function loadSVGImage(e0,_e,i0){return new Promise(async r0=>{i0&&await new Promise(t0=>setTimeout(t0,100)),e0.onload=()=>{r0()},e0.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(_e)}`,e0.crossOrigin="anonymous"})}class HTMLTextSystem{constructor(_e){this._activeTextures={},this._renderer=_e,this._createCanvas=_e.type===RendererType.WEBGPU}getTexture(_e){return this.getTexturePromise(_e)}getManagedTexture(_e){const i0=_e.styleKey;if(this._activeTextures[i0])return this._increaseReferenceCount(i0),this._activeTextures[i0].promise;const r0=this._buildTexturePromise(_e).then(t0=>(this._activeTextures[i0].texture=t0,t0));return this._activeTextures[i0]={texture:null,promise:r0,usageCount:1},r0}getReferenceCount(_e){var i0;return((i0=this._activeTextures[_e])==null?void 0:i0.usageCount)??null}_increaseReferenceCount(_e){this._activeTextures[_e].usageCount++}decreaseReferenceCount(_e){const i0=this._activeTextures[_e];i0&&(i0.usageCount--,i0.usageCount===0&&(i0.texture?this._cleanUp(i0.texture):i0.promise.then(r0=>{i0.texture=r0,this._cleanUp(i0.texture)}).catch(()=>{warn("HTMLTextSystem: Failed to clean texture")}),this._activeTextures[_e]=null))}getTexturePromise(_e){return this._buildTexturePromise(_e)}async _buildTexturePromise(_e){const{text:i0,style:r0,resolution:t0,textureStyle:n0}=_e,s0=BigPool.get(HTMLTextRenderData),o0=extractFontFamilies(i0,r0),a0=await getFontCss(o0),f0=measureHtmlText(i0,r0,a0,s0),l0=Math.ceil(Math.ceil(Math.max(1,f0.width)+r0.padding*2)*t0),u0=Math.ceil(Math.ceil(Math.max(1,f0.height)+r0.padding*2)*t0),A0=s0.image,c0=2;A0.width=(l0|0)+c0,A0.height=(u0|0)+c0;const k0=getSVGUrl(i0,r0,t0,a0,s0);await loadSVGImage(A0,k0,isSafari()&&o0.length>0);const d0=A0;let h0;this._createCanvas&&(h0=getTemporaryCanvasFromImage(A0,t0));const b0=getPo2TextureFromSource(h0?h0.canvas:d0,A0.width-c0,A0.height-c0,t0);return n0&&(b0.source.style=n0),this._createCanvas&&(this._renderer.texture.initSource(b0.source),CanvasPool.returnCanvasAndContext(h0)),BigPool.return(s0),b0}returnTexturePromise(_e){_e.then(i0=>{this._cleanUp(i0)}).catch(()=>{warn("HTMLTextSystem: Failed to clean texture")})}_cleanUp(_e){TexturePool.returnTexture(_e,!0),_e.source.resource=null,_e.source.uploadMethodId="unknown"}destroy(){this._renderer=null;for(const _e in this._activeTextures)this._activeTextures[_e]&&this.returnTexturePromise(this._activeTextures[_e].promise);this._activeTextures=null}}HTMLTextSystem.extension={type:[ExtensionType.WebGLSystem,ExtensionType.WebGPUSystem,ExtensionType.CanvasSystem],name:"htmlText"};class BatchableText extends BatchableSprite{}class CanvasTextPipe{constructor(_e){this._renderer=_e,_e.runners.resolutionChange.add(this),this._managedTexts=new GCManagedHash({renderer:_e,type:"renderable",onUnload:this.onTextUnload.bind(this),name:"canvasText"})}resolutionChange(){for(const _e in this._managedTexts.items){const i0=this._managedTexts.items[_e];i0!=null&&i0._autoResolution&&i0.onViewUpdate()}}validateRenderable(_e){const i0=this._getGpuText(_e),r0=_e.styleKey;return i0.currentKey!==r0?!0:_e._didTextUpdate}addRenderable(_e,i0){const r0=this._getGpuText(_e);if(_e._didTextUpdate){const t0=_e._autoResolution?this._renderer.resolution:_e.resolution;(r0.currentKey!==_e.styleKey||_e.resolution!==t0)&&this._updateGpuText(_e),_e._didTextUpdate=!1,updateTextBounds(r0,_e)}this._renderer.renderPipes.batch.addToBatch(r0,i0)}updateRenderable(_e){const i0=this._getGpuText(_e);i0._batcher.updateElement(i0)}_updateGpuText(_e){const i0=this._getGpuText(_e);i0.texture&&this._renderer.canvasText.decreaseReferenceCount(i0.currentKey),_e._resolution=_e._autoResolution?this._renderer.resolution:_e.resolution,i0.texture=this._renderer.canvasText.getManagedTexture(_e),i0.currentKey=_e.styleKey}_getGpuText(_e){return _e._gpuData[this._renderer.uid]||this.initGpuText(_e)}initGpuText(_e){const i0=new BatchableText;return i0.currentKey="--",i0.renderable=_e,i0.transform=_e.groupTransform,i0.bounds={minX:0,maxX:1,minY:0,maxY:0},i0.roundPixels=this._renderer._roundPixels|_e._roundPixels,_e._gpuData[this._renderer.uid]=i0,this._managedTexts.add(_e),i0}onTextUnload(_e){const i0=_e._gpuData[this._renderer.uid];if(!i0)return;const{canvasText:r0}=this._renderer;r0.getReferenceCount(i0.currentKey)>0?r0.decreaseReferenceCount(i0.currentKey):i0.texture&&r0.returnTexture(i0.texture)}destroy(){this._managedTexts.destroy(),this._renderer=null}}CanvasTextPipe.extension={type:[ExtensionType.WebGLPipes,ExtensionType.WebGPUPipes,ExtensionType.CanvasPipes],name:"text"};class CanvasTextSystem{constructor(_e){this._activeTextures={},this._renderer=_e}getTexture(_e,i0,r0,t0){typeof _e=="string"&&(deprecation("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),_e={text:_e,style:r0,resolution:i0}),_e.style instanceof TextStyle||(_e.style=new TextStyle(_e.style)),_e.textureStyle instanceof TextureStyle||(_e.textureStyle=new TextureStyle(_e.textureStyle)),typeof _e.text!="string"&&(_e.text=_e.text.toString());const{text:n0,style:s0,textureStyle:o0}=_e,a0=_e.resolution??this._renderer.resolution,{frame:f0,canvasAndContext:l0}=CanvasTextGenerator.getCanvasAndContext({text:n0,style:s0,resolution:a0}),u0=getPo2TextureFromSource(l0.canvas,f0.width,f0.height,a0);if(o0&&(u0.source.style=o0),s0.trim&&(f0.pad(s0.padding),u0.frame.copyFrom(f0),u0.frame.scale(1/a0),u0.updateUvs()),s0.filters){const A0=this._applyFilters(u0,s0.filters);return this.returnTexture(u0),CanvasTextGenerator.returnCanvasAndContext(l0),A0}return this._renderer.texture.initSource(u0._source),CanvasTextGenerator.returnCanvasAndContext(l0),u0}returnTexture(_e){const i0=_e.source;i0.resource=null,i0.uploadMethodId="unknown",i0.alphaMode="no-premultiply-alpha",TexturePool.returnTexture(_e,!0)}renderTextToCanvas(){deprecation("8.10.0","CanvasTextSystem.renderTextToCanvas: no longer supported, use CanvasTextSystem.getTexture instead")}getManagedTexture(_e){_e._resolution=_e._autoResolution?this._renderer.resolution:_e.resolution;const i0=_e.styleKey;if(this._activeTextures[i0])return this._increaseReferenceCount(i0),this._activeTextures[i0].texture;const r0=this.getTexture({text:_e.text,style:_e.style,resolution:_e._resolution,textureStyle:_e.textureStyle});return this._activeTextures[i0]={texture:r0,usageCount:1},r0}decreaseReferenceCount(_e){const i0=this._activeTextures[_e];i0.usageCount--,i0.usageCount===0&&(this.returnTexture(i0.texture),this._activeTextures[_e]=null)}getReferenceCount(_e){var i0;return((i0=this._activeTextures[_e])==null?void 0:i0.usageCount)??0}_increaseReferenceCount(_e){this._activeTextures[_e].usageCount++}_applyFilters(_e,i0){const r0=this._renderer.renderTarget.renderTarget,t0=this._renderer.filter.generateFilteredTexture({texture:_e,filters:i0});return this._renderer.renderTarget.bind(r0,!1),t0}destroy(){this._renderer=null;for(const _e in this._activeTextures)this._activeTextures[_e]&&this.returnTexture(this._activeTextures[_e].texture);this._activeTextures=null}}CanvasTextSystem.extension={type:[ExtensionType.WebGLSystem,ExtensionType.WebGPUSystem,ExtensionType.CanvasSystem],name:"canvasText"};extensions.add(browserExt,webworkerExt);const BLUR_LAYER_NAME="BLUR_LAYER",MIN_HEIGHT=100,MIN_WIDTH=100,MODAL_VERTICAL_PADDING=450,MODAL_HORIZONTAL_PADDING=64,DEFAULT_QUALITY=.5,DEFAULT_SPRITE_NAME="image";function updateImageFromBlob(e0,{spriteName:_e,imgDatasource:i0,settings:r0}){const t0=URL.createObjectURL(i0),n0=new Image;return n0.src=t0,new Promise((s0,o0)=>{n0.onload=async()=>{URL.revokeObjectURL(t0),await updateImage(e0,{spriteName:_e,imgDatasource:n0,settings:r0});const a0=e0==null?void 0:e0.stage.getChildByLabel(_e,!0);s0(a0)},n0.onerror=()=>{URL.revokeObjectURL(t0),o0(new Error("Failed to load image from Blob"))}})}async function updateImage(e0,{spriteName:_e,imgDatasource:i0,settings:r0}){if(e0===void 0||e0.stage===null)return;const t0=e0.stage.getChildByLabel(_e,!0);t0==null||t0.removeFromParent();const n0=e0.stage.getChildByLabel(BLUR_LAYER_NAME);n0==null||n0.removeFromParent();let s0;if(i0 instanceof Sprite)s0=i0;else if(i0 instanceof HTMLImageElement)s0=new Sprite(Texture.from(i0));else{const o0=new Image;o0.crossOrigin="anonymous",o0.src=i0,await new Promise((a0,f0)=>{o0.complete?a0():(o0.onload=()=>a0(),o0.onerror=f0)}),s0=new Sprite(Texture.from(o0))}if(s0.interactive=!0,s0.label=_e,r0){const{sprite:{anchor:o0,position:a0,scale:f0,size:l0,rotation:u0},stage:{size:A0}}=r0,c0=u0%Math.PI!==0;s0.anchor.x=o0.x,s0.anchor.y=o0.y,s0.position.x=a0.x,s0.position.y=a0.y,s0.scale.x=f0.x,s0.scale.y=f0.y,s0.width=c0?l0.height:l0.width,s0.height=c0?l0.width:l0.height,e0.stage.height=A0.height,e0.stage.width=A0.width,e0.renderer.resize(A0.width,A0.height),e0.stage.addChild(s0)}else e0.stage.addChild(s0),e0.renderer.resize(s0.width,s0.height);autoResize(e0,s0)}function autoResize(e0,_e){var i0;const r0=e0.canvas.parentNode,t0=window.innerWidth-MODAL_HORIZONTAL_PADDING,n0=Math.max((r0==null?void 0:r0.offsetWidth)??0,MIN_WIDTH),s0=constraintSize({width:_e.width,height:_e.height},{width:{max:Math.min(n0,t0),min:MIN_WIDTH},height:{min:MIN_HEIGHT,max:window.innerHeight-MODAL_VERTICAL_PADDING}}),{height:o0,width:a0}=s0;(i0=e0.canvas)!=null&&i0.style&&(e0.canvas.style.width=`${a0}px`,e0.canvas.style.height=`${o0}px`)}function constraintSize(e0,_e){const{height:i0,width:r0}=e0,t0=r0/i0,{height:n0,width:s0}=_e;let o0=s0.max,a0=s0.max/t0;return r0>s0.max&&(o0=s0.max,a0=o0/t0),a0>n0.max&&(a0=n0.max,o0=a0*t0),o0<s0.min&&(o0=s0.min,a0=o0/t0),a0<n0.min&&(a0=n0.min,o0=a0*t0),{width:o0,height:a0}}function saveAsBlob(e0){return new Promise((_e,i0)=>{var r0;(r0=e0==null?void 0:e0.canvas)!=null&&r0.toBlob?e0.canvas.toBlob(t0=>{t0?_e(t0):i0("EXTRACT_FAILED")},"image/jpeg",DEFAULT_QUALITY):i0("EXTRACT_FAILED")})}function saveAsDataURL(e0){var _e,i0;return(i0=(_e=e0.canvas).toDataURL)==null?void 0:i0.call(_e)}function getApplicationScale(e0){return e0.canvas.getBoundingClientRect?e0.canvas.getBoundingClientRect().width/e0.canvas.width:1}function toBlob(e0){return new Promise((_e,i0)=>{var r0,t0;(t0=(r0=e0.canvas).toBlob)==null||t0.call(r0,n0=>{n0?_e(n0):i0("EXTRACT_FAIL")},"image/png",1)})}function createImageSettings({application:e0,sprite:_e}){return{sprite:{rotation:_e.rotation,size:{width:_e.width,height:_e.height},position:{x:_e.position.x,y:_e.position.y},scale:{x:_e.scale.x,y:_e.scale.y},anchor:{x:_e.anchor.x,y:_e.anchor.y}},stage:{size:{width:e0.stage.width,height:e0.stage.height},scale:{x:e0.stage.scale.x,y:e0.stage.scale.y}}}}function resizeStage({application:e0,sprite:_e,newHeight:i0,newWidth:r0}){_e.anchor.x=.5,_e.anchor.y=.5,_e.position=new Point(r0/2,i0/2),e0.stage.height=i0,e0.stage.width=r0,e0.renderer.resize(r0,i0)}const DEFAULT_MAX_HISTORY=20,useHistoryTool=({maxSize:e0=DEFAULT_MAX_HISTORY,application:_e,spriteName:i0,onRestore:r0})=>{const[t0,n0]=reactExports.useState([]);reactExports.useEffect(()=>{n0([])},[_e]);const s0=async()=>{if(t0.length===0)return;const f0=t0[t0.length-1];r0(await f0.backup,f0),n0(t0.slice(0,-1))},o0=f0=>f0.length>e0?f0.slice(f0.length-e0):f0,a0=async f0=>{if(!_e)return;const l0=_e.stage.getChildByLabel(i0,!0);if(!l0)return;const u0=toBlob(_e),A0={backup:u0,sprite:{rotation:l0.rotation,size:{width:l0.width,height:l0.height},position:{x:l0.position.x,y:l0.position.y},scale:{x:l0.scale.x,y:l0.scale.y},anchor:{x:l0.anchor.x,y:l0.anchor.y}},stage:{size:{width:_e.stage.width,height:_e.stage.height},scale:{x:_e.stage.scale.x,y:_e.stage.scale.y}}};return n0(o0([...t0,A0])),await u0,f0.call(f0)};return{historyCount:t0.length,restore:s0,historize:a0}};function aggregate(e0,_e,i0){let r0;const t0=[];return function(n0){t0.push(_e(n0)),!r0&&(r0=setTimeout(()=>{const s0=[...t0];t0.splice(0,t0.length),i0(s0),r0=void 0},e0))}}const BRUSH_SIZE=20,DEBOUNCE=50,CURSOR_NAME="BRUSH_CURSOR";function getOrCreateBlurLayer(e0){let _e=e0.stage.getChildByLabel(BLUR_LAYER_NAME);return _e||(_e=new Container,_e.label=BLUR_LAYER_NAME,e0.stage.addChild(_e)),_e}function drawBrush(e0,_e){const i0=new Graphics;for(const r0 of e0)r0&&(i0.circle(r0.x,r0.y,BRUSH_SIZE/_e),i0.fill({color:16777215,alpha:1}));return i0}function drawBlurListener(e0,{spriteName:_e}){return aggregate(DEBOUNCE,i0=>e0.stage.toLocal(i0.global),i0=>{const r0=e0.stage.getChildByLabel(_e),t0=getApplicationScale(e0);if(!r0)return;const n0=r0,s0=new Sprite(n0.texture);s0.filters=[new BlurFilter({strength:8,quality:Math.min(Math.round(4*t0),4),resolution:Math.min(t0,1)})],s0.width=n0.width,s0.height=n0.height,s0.scale=new Point(1,1),s0.anchor=n0.anchor;const o0=getOrCreateBlurLayer(e0),a0=drawBrush(i0,t0);o0.addChild(a0),s0.mask=a0,o0.addChild(s0)})}function drawCursor(e0){removeCursor(e0);const _e=getApplicationScale(e0),i0=new Graphics;return i0.circle(0,0,BRUSH_SIZE/_e),i0.stroke({width:Math.max(1,1/_e),color:16711680}),i0.label=CURSOR_NAME,e0.stage.addChild(i0),i0}function removeCursor(e0){const _e=e0.stage.getChildByLabel(CURSOR_NAME);_e&&_e.removeFromParent()}function moveCursorListener(e0){return _e=>{if(!e0)return;const i0=e0.stage.toLocal(_e.global),r0=e0.stage.getChildByLabel(CURSOR_NAME,!0);r0&&(r0.position.x=i0.x,r0.position.y=i0.y)}}function start$2(e0,{spriteName:_e}){e0.stage.interactive=!0;const i0=drawCursor(e0),r0=moveCursorListener(e0);e0.stage.on("pointermove",r0);const t0=drawBlurListener(e0,{spriteName:_e});e0.stage.on("pointerdown",()=>{e0.stage.off("pointermove",t0),e0.stage.on("pointermove",t0)});const n0=()=>{var s0;(s0=e0==null?void 0:e0.stage)==null||s0.off("pointermove",t0)};globalThis.addEventListener("pointerup",n0),i0.once("destroyed",()=>{globalThis.removeEventListener("pointerup",n0)})}function stop$2(e0){removeCursor(e0),e0.stage.off("pointerdown"),e0.stage.off("pointermove")}const CORNERS=["TOP_LEFT","TOP_RIGHT","BOTTOM_LEFT","BOTTOM_RIGHT"],PADDING=0,POINT_RADIUS$1=20,CROP_BACKGROUND_NAME="CROP_BACKGROUND_NAME",CROP_MASK_NAME="CROP_MASK_NAME";function getCornerName$1(e0){return"CROP_CORNER_"+e0}function drawBackground(e0,{spriteName:_e}){removeBackground(e0);const i0=e0.stage.getChildByLabel(_e);if(!i0)return;const r0=i0.getBounds(),t0=e0.renderer.generateTexture(e0.stage),n0=new Sprite(t0);n0.height=r0.height,n0.width=r0.width,n0.position=new Point(0,0);const s0=new Container;s0.label=CROP_BACKGROUND_NAME,s0.position=new Point(r0.x,r0.y);const o0=new Graphics;o0.rect(0,0,r0.width,r0.height),o0.fill({color:16777215,alpha:.5});const a0=new Graphics;a0.rect(0,0,r0.width-2*PADDING,r0.height-2*PADDING),a0.fill({color:0,alpha:1}),a0.position=new Point(PADDING,PADDING),a0.label=CROP_MASK_NAME,n0.mask=a0,e0.stage.addChild(s0),s0.addChild(o0),s0.addChild(a0),s0.addChild(n0)}function removeBackground(e0){const _e=e0.stage.getChildByLabel(CROP_BACKGROUND_NAME,!0);_e==null||_e.removeFromParent()}function computeCornerPosition$1(e0,_e){switch(e0){case"TOP_LEFT":return{x:_e.x,y:_e.y,start:0,end:Math.PI/2};case"TOP_RIGHT":return{x:_e.x+_e.width,y:_e.y,start:Math.PI/2,end:Math.PI};case"BOTTOM_LEFT":return{x:_e.x,y:_e.y+_e.height,start:3*Math.PI/2,end:2*Math.PI};case"BOTTOM_RIGHT":return{x:_e.x+_e.width,y:_e.y+_e.height,start:Math.PI,end:3*Math.PI/2}}}function refreshCorners(e0){const _e=e0.stage.getChildByLabel(CROP_MASK_NAME,!0);_e&&CORNERS.forEach(i0=>{const r0=e0.stage.getChildByLabel(getCornerName$1(i0),!0);if(!r0)return;const t0=computeCornerPosition$1(i0,{height:_e.height,width:_e.width,x:_e.x,y:_e.y});r0.position=new Point(t0.x,t0.y)})}function drawCorner$1(e0,_e,{spriteName:i0}){const r0=e0.stage.getChildByLabel(getCornerName$1(_e),!0),t0=getApplicationScale(e0);r0==null||r0.removeFromParent();const n0=e0.stage.getChildByLabel(CROP_BACKGROUND_NAME,!0),s0=e0.stage.getChildByLabel(CROP_MASK_NAME,!0);if(!e0.stage.getChildByLabel(i0)||!n0||!s0)return;const o0=computeCornerPosition$1(_e,{height:s0.height,width:s0.width,x:s0.x,y:s0.y}),a0=new Graphics;a0.arc(0,0,POINT_RADIUS$1/t0,o0.start,o0.end),a0.lineTo(0,0),a0.fill({color:4960213,alpha:1}),a0.position=new Point(o0.x,o0.y),a0.label=getCornerName$1(_e),a0.interactive=!0;let f0=!1;const l0=c0=>{if(!f0)return;const k0=n0.toLocal(c0.global);a0.position.x=k0.x,a0.position.y=k0.y,moveMask(e0,_e,k0)};e0.stage.on("pointermove",l0);const u0=()=>{f0=!0};a0.on("pointerdown",u0);const A0=()=>{f0=!1};globalThis.addEventListener("pointerup",A0),a0.once("destroyed",()=>{a0.off("pointerdown"),e0.stage.off("pointermove",l0),globalThis.removeEventListener("pointerup",A0)}),n0.addChild(a0)}function moveMask(e0,_e,i0){const r0=e0.stage.getChildByLabel(CROP_MASK_NAME,!0);if(!r0)return;const t0=r0.position.x+r0.width,n0=r0.position.y+r0.height;switch(_e){case"TOP_LEFT":{r0.position.x=i0.x,r0.position.y=i0.y,r0.width=t0-i0.x,r0.height=n0-i0.y;break}case"TOP_RIGHT":{r0.position.y=i0.y,r0.width=i0.x-r0.position.x,r0.height=n0-i0.y;break}case"BOTTOM_LEFT":{r0.position.x=i0.x,r0.width=t0-i0.x,r0.height=i0.y-r0.position.y;break}case"BOTTOM_RIGHT":{r0.width=i0.x-r0.position.x,r0.height=i0.y-r0.position.y;break}}refreshCorners(e0)}function start$1(e0,{spriteName:_e}){stop$1(e0),e0.stage.interactive=!0,e0.stage.interactiveChildren=!0,drawBackground(e0,{spriteName:_e}),drawCorner$1(e0,"BOTTOM_LEFT",{spriteName:_e}),drawCorner$1(e0,"BOTTOM_RIGHT",{spriteName:_e}),drawCorner$1(e0,"TOP_LEFT",{spriteName:_e}),drawCorner$1(e0,"TOP_RIGHT",{spriteName:_e})}function stop$1(e0){removeBackground(e0),e0.stage.off("pointermove"),e0.render()}function save$1(e0){const _e=e0.stage.getChildByLabel(CROP_MASK_NAME,!0);if(!_e)return;const i0=e0.stage.getChildByLabel(CROP_BACKGROUND_NAME,!0),r0=(i0==null?void 0:i0.x)??0,t0=(i0==null?void 0:i0.y)??0,n0=new Rectangle(Math.floor(r0+_e.x),Math.floor(t0+_e.y),Math.floor(_e.width),Math.floor(_e.height));i0&&(i0.visible=!1);const s0=e0.renderer.generateTexture({target:e0.stage,frame:n0});return removeBackground(e0),e0.stage.off("pointermove"),new Sprite(s0)}const POINT_RADIUS=20,CONTROL_NAME="CONTROL_NAME";function getCornerName(e0){return"RESIZE_CORNER_"+e0}function computeCornerPosition(e0,_e){const i0=_e.x,r0=_e.y;switch(e0){case"TOP_LEFT":return{x:i0,y:r0,start:0,end:Math.PI/2};case"TOP_RIGHT":return{x:i0+_e.width,y:r0,start:Math.PI/2,end:Math.PI};case"BOTTOM_LEFT":return{x:i0,y:r0+_e.height,start:3*Math.PI/2,end:2*Math.PI};case"BOTTOM_RIGHT":return{x:i0+_e.width,y:r0+_e.height,start:Math.PI,end:3*Math.PI/2}}}function resizeContainer(e0,{container:_e,cornerType:i0,position:r0,spriteName:t0}){const n0=e0.stage.getChildByLabel(t0,!0);if(!n0)return;const s0=n0.rotation%Math.PI!==0,o0=s0?n0.height:n0.width,a0=s0?n0.width:n0.height;switch(i0){case"TOP_LEFT":{_e.position=new Point(r0.x,r0.y),_e.width=o0-2*r0.x,_e.height=a0-2*r0.y;break}case"TOP_RIGHT":{const f0=o0-r0.x;_e.position=new Point(f0,r0.y),_e.width=o0-2*f0,_e.height=a0-2*r0.y;break}case"BOTTOM_LEFT":{const f0=a0-r0.y;_e.position=new Point(r0.x,f0),_e.width=o0-2*r0.x,_e.height=a0-2*f0;break}case"BOTTOM_RIGHT":{const f0=a0-r0.y,l0=o0-r0.x;_e.position=new Point(l0,f0),_e.width=o0-2*l0,_e.height=a0-2*f0;break}}}function removeCorner(e0,_e){const i0=e0.stage.getChildByLabel(getCornerName(_e),!0);i0==null||i0.removeFromParent()}function drawCorner(e0,_e,{spriteName:i0}){removeCorner(e0,_e);const r0=e0.stage.getChildByLabel(i0,!0),t0=e0.stage.getChildByLabel(CONTROL_NAME,!0);if(!r0||!t0)return;const n0=computeCornerPosition(_e,t0),s0=new Graphics;s0.arc(0,0,POINT_RADIUS,n0.start,n0.end),s0.lineTo(0,0),s0.fill({color:4960213,alpha:1}),s0.position=new Point(n0.x,n0.y),s0.label=getCornerName(_e),s0.interactive=!0;let o0=!1;const a0=u0=>{if(!o0)return;const A0=e0.stage.toLocal(u0.global);resizeContainer(e0,{cornerType:_e,position:A0,container:t0,spriteName:i0})};e0.stage.on("pointermove",a0);const f0=()=>{o0=!0};s0.on("pointerdown",f0);const l0=()=>{o0=!1};globalThis.addEventListener("pointerup",l0),s0.once("destroyed",()=>{s0.off("pointerdown"),e0.stage.off("pointermove",a0),globalThis.removeEventListener("pointerup",l0)}),t0.addChild(s0)}function drawContainer(e0,_e){removeContainer(e0);const i0=e0.stage.getChildByLabel(_e,!0);if(!i0)return;const r0=e0.renderer.generateTexture(e0.stage),t0=new Sprite(r0);e0.stage.children.forEach(o0=>{o0.alpha=0});const n0=new Container;n0.label=CONTROL_NAME,n0.interactive=!0,n0.interactiveChildren=!0;const s0=new Graphics;s0.rect(0,0,i0.width,i0.height),s0.fill({color:0,alpha:0}),e0.stage.interactive=!0,e0.stage.interactiveChildren=!0,e0.stage.addChild(n0),n0.addChild(s0),n0.addChild(t0)}function removeContainer(e0){const _e=e0.stage.getChildByLabel(CONTROL_NAME,!0);_e==null||_e.removeFromParent(),e0.stage.children.forEach(i0=>{i0.alpha=1})}function drawControl(e0,_e){drawContainer(e0,_e),drawCorner(e0,"BOTTOM_LEFT",{spriteName:_e}),drawCorner(e0,"BOTTOM_RIGHT",{spriteName:_e}),drawCorner(e0,"TOP_LEFT",{spriteName:_e}),drawCorner(e0,"TOP_RIGHT",{spriteName:_e})}function removeControl(e0){removeContainer(e0),removeCorner(e0,"BOTTOM_LEFT"),removeCorner(e0,"BOTTOM_RIGHT"),removeCorner(e0,"TOP_LEFT"),removeCorner(e0,"TOP_RIGHT"),e0.stage.off("pointermove")}function start(e0,_e){drawControl(e0,_e)}function stop(e0){removeControl(e0),e0.stage.off("pointermove"),e0.render()}function save(e0){var _e;const i0=(_e=e0==null?void 0:e0.stage)==null?void 0:_e.getChildByLabel(CONTROL_NAME,!0),r0=i0?{height:i0.height,width:i0.width}:void 0;if(removeControl(e0),r0){const t0=e0.renderer.generateTexture(e0.stage),n0=new Sprite(t0);return n0.width=r0.width,n0.height=r0.height,n0}else return}async function rotate(e0,_e){const i0=e0==null?void 0:e0.stage.getChildByLabel(_e,!0);if(e0&&i0){const r0=await toBlob(e0),t0=await updateImageFromBlob(e0,{imgDatasource:r0,spriteName:_e,settings:createImageSettings({application:e0,sprite:i0})});if(!t0)return;let n0,s0;const o0=e0.canvas;o0.style&&(n0=o0.style.maxHeight??"",s0=o0.style.visibility??"",o0.style.maxHeight=`${o0.clientHeight}px`,o0.style.visibility="hidden"),t0.rotation+=Math.PI/2,resizeStage({application:e0,sprite:t0,newHeight:t0.width,newWidth:t0.height}),e0.render();const a0=await toBlob(e0);n0!==void 0&&(o0.style.maxHeight=n0),s0!==void 0&&(o0.style.visibility=s0),await updateImageFromBlob(e0,{imgDatasource:a0,spriteName:_e})}}function useImageEffects({application:e0,spriteName:_e,onSave:i0}){return{rotate:async()=>{e0&&await rotate(e0,_e)},startCrop:()=>{e0&&start$1(e0,{spriteName:_e})},stopCrop:r0=>{if(e0){if(r0){const t0=save$1(e0);if(t0){i0(t0);return}}stop$1(e0)}},startBlur:()=>{e0&&start$2(e0,{spriteName:_e})},stopBlur:()=>{e0&&stop$2(e0)},startResize:()=>{e0&&start(e0,_e)},stopResize:r0=>{if(e0){if(r0){const t0=save(e0);t0&&i0(t0)}stop(e0)}}}}function useImageEditor({imageSrc:e0,spriteName:_e=DEFAULT_SPRITE_NAME}){const[i0,r0]=reactExports.useState(void 0),[t0,n0]=reactExports.useState(!0),{rotate:s0,startBlur:o0,startCrop:a0,startResize:f0,stopBlur:l0,stopCrop:u0,stopResize:A0}=useImageEffects({spriteName:_e,application:i0,onSave(p0){i0&&updateImage(i0,{imgDatasource:p0,spriteName:_e})}}),c0=()=>i0?saveAsBlob(i0):Promise.resolve(void 0),k0=()=>{if(i0)return saveAsDataURL(i0)},{restore:d0,historize:h0,historyCount:b0}=useHistoryTool({application:i0,spriteName:_e,onRestore(p0,m0){i0&&updateImageFromBlob(i0,{imgDatasource:p0,spriteName:_e,settings:m0})}});return reactExports.useEffect(()=>{i0&&(n0(!0),updateImage(i0,{spriteName:_e,imgDatasource:e0}).finally(()=>n0(!1)))},[i0,e0,_e]),reactExports.useEffect(()=>{if(!i0)return;const p0=()=>{const m0=i0.stage.getChildByLabel(_e,!0);m0&&autoResize(i0,m0)};return window.addEventListener("resize",p0),()=>window.removeEventListener("resize",p0)},[i0,_e]),{historyCount:b0,setApplication:r0,restore:d0,stopCrop:u0,stopBlur:l0,stopResize:A0,startResize:async()=>{n0(!0),await h0(f0),n0(!1)},startCrop:async()=>{n0(!0),await h0(a0),n0(!1)},startBlur:async()=>{n0(!0),await h0(o0),n0(!1)},rotate:async()=>{n0(!0),await h0(s0),n0(!1)},toBlob:c0,toDataURL:k0,loading:t0}}const SvgIconBlur=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("g",{fill:"currentColor",fillRule:"evenodd",clipPath:"url(#icon-blur_svg__a)",clipRule:"evenodd",children:jsxRuntimeExports.jsx("path",{d:"M17.504 1.673a1 1 0 0 1 .932.491c.37.63.9 1.935 1.404 3.18l.08.197c.502 1.24.994 2.457 1.369 3.205l-.895.447.895-.447c.561 1.122 1.962 4.049 2.136 6.753.087 1.364-.125 2.839-1.094 3.978-.987 1.16-2.573 1.76-4.757 1.76-2.186 0-3.777-.6-4.777-1.752-.983-1.134-1.221-2.604-1.152-3.973.138-2.711 1.514-5.636 2.13-6.79.86-1.611 2.414-5.32 2.874-6.433a1 1 0 0 1 .855-.616m.104 3.492c-.657 1.533-1.496 3.425-2.07 4.5-.59 1.106-1.781 3.703-1.895 5.949-.057 1.11.158 1.976.665 2.56.49.565 1.427 1.063 3.266 1.063 1.84 0 2.76-.498 3.233-1.055.492-.579.694-1.44.622-2.555-.145-2.253-1.36-4.848-1.929-5.986-.412-.823-.932-2.108-1.417-3.308l-.097-.238q-.196-.487-.378-.93M12.843 22.535a1 1 0 0 1-1.034.964l-.259-.009a1 1 0 0 1-.257-.042q-.125.029-.26.024l-.257-.009a11 11 0 0 1-2.102-.279 1 1 0 0 1 .457-1.947 9 9 0 0 0 1.715.228l.258.009q.134.004.257.042.125-.028.26-.024l.257.009a1 1 0 0 1 .965 1.034m-6.615-1.329a1 1 0 0 1-1.396.226 10.9 10.9 0 0 1-2.877-3.086 1 1 0 1 1 1.7-1.054 8.9 8.9 0 0 0 2.347 2.518 1 1 0 0 1 .226 1.396M1.622 15.22a1 1 0 0 1-1.147-.827 10.9 10.9 0 0 1 .148-4.218 1 1 0 0 1 1.947.457 8.9 8.9 0 0 0-.12 3.441 1 1 0 0 1-.828 1.147m.978-7.49a1 1 0 0 1-.226-1.397A10.9 10.9 0 0 1 5.46 3.455a1 1 0 0 1 1.054 1.7 8.9 8.9 0 0 0-2.518 2.347 1 1 0 0 1-1.396.226m5.988-4.607a1 1 0 0 1 .827-1.147 11 11 0 0 1 2.116-.132l.258.01q.135.004.257.042.125-.03.26-.025l.258.01a1 1 0 0 1-.07 1.998l-.258-.009a1 1 0 0 1-.258-.043q-.125.03-.259.025l-.258-.009a9 9 0 0 0-1.727.108 1 1 0 0 1-1.146-.828"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-blur_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]}),SvgIconCrop=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("g",{clipPath:"url(#icon-crop_svg__a)",children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.13 1.009a1 1 0 1 0-2-.018l-.036 4.103-4.103.036a1 1 0 1 0 .018 2l4.068-.035L5 15.99V16a3 3 0 0 0 3 3h9v4a1 1 0 1 0 2 0v-4h4a1 1 0 1 0 0-2h-4V8a3 3 0 0 0-3-3l-8.905.077zm-.053 6.068L7 16.004A1 1 0 0 0 8 17h9V8a1 1 0 0 0-.996-1z",clipRule:"evenodd"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-crop_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]}),SvgIconReset=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.583 7.313 3.976 3.87a.996.996 0 1 0-1.96.346l1.012 5.747a.996.996 0 0 0 1.153.809l5.743-1.014a.997.997 0 0 0-.346-1.962l-3.3.582a7.754 7.754 0 0 1 8.399-4.254 7.76 7.76 0 0 1 .78 15.064 7.745 7.745 0 0 1-8.912-3.56.995.995 0 1 0-1.724.997 9.744 9.744 0 0 0 11.201 4.474 9.74 9.74 0 0 0 5.19-3.718 9.756 9.756 0 0 0-.625-12.055A9.74 9.74 0 0 0 8.73 3.117a9.75 9.75 0 0 0-4.147 4.196",clipRule:"evenodd"})]}),SvgIconUndo=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.707 13.707a1 1 0 0 0 0-1.414L5.414 8l4.293-4.293a1 1 0 0 0-1.414-1.414l-5 5a1 1 0 0 0 0 1.414l5 5a1 1 0 0 0 1.414 0",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20 20a1 1 0 0 0 1-1v-7a5 5 0 0 0-5-5H4a1 1 0 1 0 0 2h12a3 3 0 0 1 3 3v7a1 1 0 0 0 1 1",clipRule:"evenodd"})]}),ImageEditorToolbar=({historyCount:e0,handle:_e})=>{const{t:i0}=useTranslation(),[r0,t0]=reactExports.useState(void 0),n0=o0=>{t0(o0),_e(o0)},s0=[{type:"button",name:"undo",props:{color:"tertiary",leftIcon:jsxRuntimeExports.jsx(SvgIconUndo,{}),"aria-label":i0("cancel"),children:i0("cancel"),onClick:()=>n0("UNDO"),disabled:e0===0},tooltip:i0("cancel")},{type:"divider",name:"div-1"},{type:"button",name:"reset",props:{color:"tertiary",leftIcon:jsxRuntimeExports.jsx(SvgIconReset,{}),"aria-label":i0("rotate"),children:i0("rotate"),onClick:()=>n0("ROTATE")},tooltip:i0("rotate")},{type:"button",name:"crop",props:{color:"tertiary",leftIcon:jsxRuntimeExports.jsx(SvgIconCrop,{}),"aria-label":i0("crop"),children:i0("crop"),className:r0==="CROP"?"is-selected":"",onClick:()=>n0("CROP")},tooltip:i0("crop")},{type:"button",name:"blur",props:{color:"tertiary",leftIcon:jsxRuntimeExports.jsx(SvgIconBlur,{}),"aria-label":i0("blur"),children:i0("blur"),className:r0==="BLUR"?"is-selected":"",onClick:()=>n0("BLUR")},tooltip:i0("blur")}];return jsxRuntimeExports.jsx(Toolbar,{variant:"no-shadow",align:"left",isBlock:!0,items:s0})},ImageEditor$1=({altText:e0,legend:_e,image:i0,isOpen:r0,onCancel:t0,onError:n0,onSave:s0})=>{const{t:o0}=useTranslation(),[a0,f0]=reactExports.useState(void 0),[l0,u0]=reactExports.useState(!1),[A0,c0]=reactExports.useState(e0??""),[k0,d0]=reactExports.useState(_e??""),[h0,b0]=reactExports.useState(!1);reactExports.useEffect(()=>{c0(e0??""),d0(_e??""),b0(!1)},[e0,_e]);const{toBlob:p0,setApplication:m0,startBlur:g0,stopBlur:v0,restore:x0,rotate:w0,startCrop:_0,stopCrop:y0,startResize:S0,stopResize:B0,historyCount:I0,loading:T0}=useImageEditor({imageSrc:i0}),R0=reactExports.useRef(null),E0=reactExports.useCallback(j0=>{if(j0&&!R0.current){const D0=new Application;R0.current=D0,D0.init({backgroundAlpha:0,resolution:1,preserveDrawingBuffer:!0}).then(()=>{R0.current===D0&&(j0.appendChild(D0.canvas),m0(D0))}).catch(()=>{R0.current===D0&&(R0.current=null)})}!j0&&R0.current&&(R0.current.destroy(!0),R0.current=null)},[m0]),C0=()=>{v0(),y0(a0==="CROP"),B0(a0==="RESIZE")},G0=async()=>{try{u0(!0),C0();const j0=await p0();j0&&await s0({blob:j0,legend:k0,altText:A0})}catch(j0){n0==null||n0(`${j0}`)}finally{u0(!1)}},F0=()=>{t0()},M0=async j0=>{switch(C0(),f0(j0),b0(!0),j0){case"ROTATE":{await w0();break}case"UNDO":{await x0();break}case"CROP":{_0();break}case"RESIZE":{await S0();break}case"BLUR":{await g0();break}}};return jsxRuntimeExports.jsxs(Modal,{id:"image-editor",isOpen:r0,onModalClose:F0,size:"lg",children:[jsxRuntimeExports.jsx(Modal.Header,{onModalClose:F0,children:jsxRuntimeExports.jsx("span",{className:"h2",children:o0("imageeditor.title")})}),jsxRuntimeExports.jsx(Modal.Body,{className:"d-flex flex-column align-items-center",children:jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column gap-12 w-100 flex-grow-1",children:[jsxRuntimeExports.jsx(ImageEditorToolbar,{handle:M0,historyCount:I0}),jsxRuntimeExports.jsxs("div",{className:"position-relative d-flex flex-column align-items-center justify-content-center flex-grow-1 w-100 image-editor",children:[jsxRuntimeExports.jsx("div",{ref:E0,className:"d-flex justify-content-center w-100"}),T0&&jsxRuntimeExports.jsx("div",{className:"position-absolute top-0 start-0 bottom-0 end-0 m-10 d-flex align-items-center justify-content-center bg-black opacity-25",children:jsxRuntimeExports.jsx(LoadingScreen,{})})]}),jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column flex-md-row m-10 gap-12 w-100",children:[jsxRuntimeExports.jsxs(FormControl,{id:"alt",className:"flex-grow-1",children:[jsxRuntimeExports.jsx(Label,{children:o0("alttext")}),jsxRuntimeExports.jsx(Input,{value:A0,onChange:j0=>{b0(!0),c0(j0.target.value)},placeholder:o0("alttext.help"),size:"md",type:"text"})]}),jsxRuntimeExports.jsxs(FormControl,{id:"legend",className:"flex-grow-1",children:[jsxRuntimeExports.jsx(Label,{children:o0("legend")}),jsxRuntimeExports.jsx(Input,{value:k0,onChange:j0=>{b0(!0),d0(j0.target.value)},placeholder:o0("legend.help"),size:"md",type:"text"})]})]})]})}),jsxRuntimeExports.jsxs(Modal.Footer,{children:[jsxRuntimeExports.jsx(Button,{color:"tertiary",onClick:F0,type:"button",variant:"ghost",children:o0("imageeditor.cancel")}),jsxRuntimeExports.jsx(Button,{color:"primary",onClick:G0,type:"button",variant:"filled",isLoading:l0,disabled:l0||!h0,children:o0("imageeditor.save")})]})]})},ImageEditor$2=Object.freeze(Object.defineProperty({__proto__:null,default:ImageEditor$1},Symbol.toStringTag,{value:"Module"})),SvgIconEdit=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M1.879 3.879A3 3 0 0 1 4 3h7a1 1 0 1 1 0 2H4a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7a1 1 0 1 1 2 0v7a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3V6a3 3 0 0 1 .879-2.121",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20 2.879c-.297 0-.583.118-.793.328l-9.304 9.304-.529 2.115 2.115-.529 9.304-9.304A1.121 1.121 0 0 0 20 2.879m-2.207-1.086a3.121 3.121 0 0 1 4.414 4.414l-9.5 9.5a1 1 0 0 1-.464.263l-4 1a1 1 0 0 1-1.213-1.212l1-4a1 1 0 0 1 .263-.465z",clipRule:"evenodd"})]}),ImagePicker=({addButtonLabel:e0="Add image",deleteButtonLabel:_e="Delete image",src:i0,className:r0,mediaLibraryRef:t0,libraryMedia:n0,app:s0,onUploadImage:o0,onDeleteImage:a0})=>{const[f0,l0]=reactExports.useState(i0||"");reactExports.useEffect(()=>{n0&&(l0(n0),o0(n0))},[n0]);const u0=()=>{var k0;(k0=t0.current)==null||k0.show("image")},A0=()=>{l0(""),a0()},c0=clsx("image-input",r0);return jsxRuntimeExports.jsxs("div",{id:"image-input",className:c0,children:[jsxRuntimeExports.jsxs("div",{className:"image-input-actions gap-8",children:[jsxRuntimeExports.jsx(IconButton,{"aria-label":e0,color:"tertiary",icon:jsxRuntimeExports.jsx(SvgIconEdit,{}),onClick:u0,type:"button",variant:"ghost"}),jsxRuntimeExports.jsx(IconButton,{"aria-label":_e,color:"danger",disabled:!f0,icon:jsxRuntimeExports.jsx(SvgIconDelete,{}),onClick:A0,type:"button",variant:"ghost"})]}),f0?jsxRuntimeExports.jsx(Avatar,{alt:"",src:f0,size:"xl"}):jsxRuntimeExports.jsx(AppIcon,{app:s0,iconFit:"ratio",size:"160",variant:"rounded"})]})},Logo=reactExports.forwardRef(({src:e0,is1d:_e,translate:i0="Retour accueil"},r0)=>{const t0=clsx("navbar-brand d-none d-md-block");return jsxRuntimeExports.jsx("a",{ref:r0,className:t0,href:"/timeline/timeline","aria-label":i0,children:jsxRuntimeExports.jsx("img",{className:"logo",src:e0,alt:`logo ${_e?"ONE":"NEO"}`,width:"300",height:"52"})})}),LogoBeta=reactExports.forwardRef(({src:e0,is1d:_e,translate:i0="Retour accueil"},r0)=>{const t0=clsx("navbar-brand");return jsxRuntimeExports.jsx("a",{ref:r0,className:t0,href:"/timeline/timeline","aria-label":i0,children:jsxRuntimeExports.jsx("img",{className:"logo",src:e0,alt:`logo ${_e?"ONE":"NEO"}`,width:"300",height:"52"})})}),SvgIconApplications=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M1 3c0-1.1.9-2 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2zm8 0H3v6h6zm4 0c0-1.1.9-2 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2zm8 0h-6v6h6zm-8 12c0-1.1.9-2 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2zm8 0h-6v6h6zM1 15c0-1.1.9-2 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2zm8 0H3v6h6z",clipRule:"evenodd"})]}),SvgIconGlobe2=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsxs("g",{fill:"currentColor",fillRule:"evenodd",clipPath:"url(#icon-globe-2_svg__a)",clipRule:"evenodd",children:[jsxRuntimeExports.jsx("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10m0 2c6.627 0 12-5.373 12-12S18.627 0 12 0C5.372 0 0 5.373 0 12s5.372 12 12 12"}),jsxRuntimeExports.jsx("path",{d:"M16.944 2.761V2.76a.67.67 0 0 0 .09-.683l-.416.182-.057.129-.078.611a.63.63 0 0 0 .46-.238m-.571.224-.065-.025.096-.216zm.01.003.03-.267.146-.328-.08.606h-.052zm.235-.73.416-.18a7.3 7.3 0 0 1 .504 1.754c.047.324.07.701.007 1.064-.061.355-.234.847-.714 1.16l-.09.059-1.215.464a1.26 1.26 0 0 0-.82 1.012l-.002.008-.009.069c-.136.95-1.001 1.151-1.134 1.177-.414.082-1.113.007-1.519-.64l-.006-.011-.224-.377c-.35.728-.718 1.572-.809 2.32v.002a.44.44 0 0 0 .041.247l.023.043.478 1.161c.097.17.245.324.437.44.36.218 1.13.713 1.654 1.323.04.047.264.221.9.398.633.177 1.133.73 1.181 1.432.058.849.193 1.37.335 1.649a.6.6 0 0 0 .103.157l.033.001.05.007.02.001.056.002c.14 0 .375-.03.603-.19.318-.223.634-.703.755-1.68v-.001c.051-.404.12-.913.239-1.429l.064-.34a297 297 0 0 1 .31-1.625l.084-.403.015-.058a1.012 1.012 0 0 1 1.04-.758c.26.015.443.128.488.156h.001c.124.077.216.17.249.203.09.091.183.203.25.287.075.092.145.184.196.251l.062.084.018.024.005.007.002.003-.384.28.384-.28.013.018.012.018a.34.34 0 0 0 .221.138.39.39 0 0 0 .292-.06l1.04-.745a.66.66 0 0 0-.273.536h2c0 .443-.219.843-.562 1.09m0 0-1.04.744a2.38 2.38 0 0 1-2.411.21l-.047.248-.067.359-.004.022-.005.022c-.097.416-.157.848-.207 1.246-.159 1.279-.633 2.398-1.592 3.071a3.06 3.06 0 0 1-2.032.538c-.847-.043-1.428-.586-1.764-1.248-.29-.571-.449-1.306-.525-2.136-.634-.2-1.235-.49-1.626-.946-.3-.35-.829-.707-1.17-.913a3.23 3.23 0 0 1-1.193-1.259l-.021-.04-.483-1.171a2.44 2.44 0 0 1-.233-1.378l.993.122-.993-.121c.15-1.234.775-2.507 1.135-3.242l.025-.05a1.79 1.79 0 0 1 1.527-.994h.008c.516-.02 1.031.175 1.396.56a3.3 3.3 0 0 1 1.703-1.46l.771-.294q0-.115-.024-.301a5.3 5.3 0 0 0-.358-1.236c-.2-.459-.126-.985.183-1.37l.78.626-.78-.625v-.002c.31-.385.786-.551 1.232-.498h.01l.115.016q.192.024.376.105l-.499 1.128m3.692 9.553-.096.07zM6.045 14.091a1.84 1.84 0 0 1 1.507.163c.575.348.805.94.805 1.502v.747c0 .338.081.546.191.694.116.156.329.33.73.48l1.751.655c.534.2 1.02.485 1.443.854l.344.3c1.015.887 1.445 2.241 1.024 3.528l-.098.298-1.9-.624.097-.296c.152-.464.021-.998-.439-1.4l-.344-.3a2.7 2.7 0 0 0-.827-.486l-1.75-.655c-.656-.245-1.23-.615-1.635-1.16-.411-.552-.587-1.201-.587-1.888v-.382l-3.93 1.605-.755-1.852 4.338-1.772zM8.876 2.991c.084.494.124.996.124 1.32m0 .84v-.84zm0 0c0 .847-.41 1.658-1.001 2.268L6.196 9.276a.82.82 0 0 0-.187.831 1.825 1.825 0 0 1-1.017 2.245L1.4 13.917l-.798-1.834 3.462-1.508a2.82 2.82 0 0 1 .698-2.692l1.803-1.857C6.885 5.695 7 5.36 7 5.15v-.84c0-.196-.028-.584-.096-.982-.074-.436-.169-.708-.222-.791L8.37 1.463c.286.45.429 1.072.507 1.528m-4.77 7.733"})]}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-globe-2_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]}),SvgIconGlobe=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.726 3.29A9.01 9.01 0 0 0 3.055 11H7.05a16.3 16.3 0 0 1 2.676-7.71m4.548 0A16.3 16.3 0 0 1 16.95 11h3.995a9.01 9.01 0 0 0-6.67-7.71m.668 7.71A14.3 14.3 0 0 0 12 3.55 14.3 14.3 0 0 0 9.058 11zm-5.884 2h5.884A14.3 14.3 0 0 1 12 20.45 14.3 14.3 0 0 1 9.058 13M7.05 13H3.055a9.01 9.01 0 0 0 6.67 7.71A16.3 16.3 0 0 1 7.05 13m7.224 7.71A16.3 16.3 0 0 0 16.95 13h3.995a9.01 9.01 0 0 1-6.67 7.71M12 23c6.075 0 11-4.925 11-11S18.075 1 12 1 1 5.925 1 12s4.925 11 11 11",clipRule:"evenodd"})]}),SvgIconRecordVideo=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M2 4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h13a2 2 0 0 0 2-2v-1.936l4.409 1.365A2 2 0 0 0 24 15.519V8.48a2 2 0 0 0-2.591-1.91l-4.41 1.364V6a2 2 0 0 0-2-2zm0 2h13v12H2zm15 7.97V10.03l5-1.548v7.037z",clipRule:"evenodd"})]}),SvgIconSmartphone=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7 3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1zM4 4a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v16a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11 18a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H12a1 1 0 0 1-1-1",clipRule:"evenodd"})]}),MediaLibraryContext=reactExports.createContext(null);function useMediaLibraryContext(){const e0=reactExports.useContext(MediaLibraryContext);if(!e0)throw new Error("Innertabs compound components cannot be rendered outside the MediaLibrary component");return e0}const Audio=()=>{const{setResult:e0,setPreSuccess:_e,visibility:i0}=useMediaLibraryContext(),r0=reactExports.useRef(null);return jsxRuntimeExports.jsx(AudioRecorder,{ref:r0,onRecordUpdated:t0=>{t0?(e0(t0),_e(()=>r0.current.save)):e0()},onSaveSuccess:t0=>{t0&&e0(t0)},hideSaveAction:!0,visibility:i0})};function useToggle(e0=!1){const[_e,i0]=reactExports.useState(e0),r0=reactExports.useCallback(()=>{i0(t0=>!t0)},[]);return[_e,r0]}const ExternalLinker=({link:e0,onChange:_e,multiNodeSelected:i0=!1})=>{const{t:r0}=useTranslation(),[t0,n0]=reactExports.useState((e0==null?void 0:e0.text)||""),[s0,o0]=reactExports.useState((e0==null?void 0:e0.url)||""),[a0,f0]=useToggle(e0?e0.target==="_blank":!0);return reactExports.useEffect(()=>{i0&&e0!=null&&e0.text&&n0(e0.text.slice(0,20)+"...")},[i0,e0]),reactExports.useEffect(()=>{if(!s0.length){_e==null||_e();return}const l0={url:s0,text:i0?e0==null?void 0:e0.text:t0||s0,target:a0?"_blank":void 0};!s$2.isLocalURL(s0)&&!s$2.startWithHttp(s0)&&(l0.url="http://"+s0),_e==null||_e(l0)},[t0,s0,a0]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column flex-fill gap-24",children:[jsxRuntimeExports.jsxs(FormControl,{id:"linkText",isOptional:!0,children:[jsxRuntimeExports.jsx(Label,{children:r0("bbm.linker.ext.text")}),jsxRuntimeExports.jsx(Input,{type:"text",placeholder:r0("bbm.linker.ext.text.placeholder"),size:"md",disabled:i0,value:t0,onChange:l0=>n0(l0.target.value)})]}),jsxRuntimeExports.jsxs(FormControl,{id:"linkUrl",isRequired:!0,children:[jsxRuntimeExports.jsx(Label,{children:r0("bbm.linker.ext.url")}),jsxRuntimeExports.jsx(Input,{type:"text",placeholder:r0("bbm.linker.ext.url.placeholder"),size:"md",value:s0,onChange:l0=>o0(l0.target.value)})]}),jsxRuntimeExports.jsx(Checkbox,{label:r0("bbm.linker.open.tab"),onChange:()=>f0(),checked:a0})]})})},ExternalLink=({link:e0,multiNodeSelected:_e=!1})=>{const{setResult:i0}=useMediaLibraryContext();return jsxRuntimeExports.jsx(ExternalLinker,{link:e0,onChange:r0=>{i0(r0)},multiNodeSelected:_e})},GoogleDrive=()=>{const{appCode:e0,visibility:_e,type:i0,setResultCounter:r0,setResult:t0,setPreSuccess:n0,multiple:s0}=useMediaLibraryContext(),{user:o0}=useUser(),{t:a0}=useTranslation(),f0=useToast();function l0(){switch(i0){case"image":return"img";case"audio":return"audio";case"video":return"video";default:return null}}async function u0(c0,k0){try{return await odeServices.googledrive().copyDocumentToWorkspace(c0,k0,void 0,{application:e0,visibility:_e})}catch(d0){if(d0 instanceof GoogleDriveCopyError&&d0.copied.length>0)return f0.warning(a0("google-drive.transfer.error")),d0.copied;throw d0}}function A0(c0){r0(c0.length),c0.length?(t0(c0),n0(()=>()=>o0!=null&&o0.userId?u0(o0.userId,c0.map(k0=>k0.id)):Promise.resolve([]))):(t0(),n0(void 0))}return jsxRuntimeExports.jsx(GoogleDrive$1,{roles:l0(),onSelect:A0,multiple:s0,className:"border rounded overflow-y-auto"})},Iframe=()=>{const{setResult:e0}=useMediaLibraryContext();return jsxRuntimeExports.jsx(Embed,{onSuccess:_e=>{_e=_e==null?void 0:_e.replace(/<p /g,"<div ").replace(/\/p>/g,"/div>"),e0(_e)}})},SvgIconUsers=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("g",{fill:"currentColor",fillRule:"evenodd",clipPath:"url(#icon-users_svg__a)",clipRule:"evenodd",children:jsxRuntimeExports.jsx("path",{d:"M19.055 12.803a1 1 0 0 1 1.272-.618c1.128.39 2.061 1.247 2.7 2.351.64 1.106.972 2.435.973 3.782V21a1 1 0 1 1-2 0v-2.681c0-1.03-.258-2.009-.704-2.782-.448-.773-1.034-1.258-1.623-1.462a1 1 0 0 1-.618-1.272M15.187 1.384a1 1 0 0 1 1.036-.962 5.129 5.129 0 0 1 2.11 9.71 1 1 0 1 1-.896-1.788 3.129 3.129 0 0 0-1.288-5.924 1 1 0 0 1-.962-1.036M1.505 15.694C2.481 14.622 3.825 14 5.25 14h8.5c1.424 0 2.769.622 3.744 1.694.974 1.068 1.506 2.498 1.506 3.973V22a1 1 0 1 1-2 0v-2.333c0-1.001-.363-1.945-.984-2.627-.618-.679-1.436-1.04-2.266-1.04h-8.5c-.83 0-1.648.361-2.266 1.04-.621.682-.984 1.626-.984 2.627V22a1 1 0 1 1-2 0v-2.333c0-1.475.533-2.905 1.505-3.974M9.5 3a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7M4 6.5a5.5 5.5 0 1 1 11 0 5.5 5.5 0 0 1-11 0"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-users_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]});var isSameOrAfter$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){return function(i0,r0){r0.prototype.isSameOrAfter=function(t0,n0){return this.isSame(t0,n0)||this.isAfter(t0,n0)}}})})(isSameOrAfter$1);var isSameOrAfterExports=isSameOrAfter$1.exports;const isSameOrAfter=getDefaultExportFromCjs(isSameOrAfterExports);var isToday$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){return function(i0,r0,t0){r0.prototype.isToday=function(){var n0="YYYY-MM-DD",s0=t0();return this.format(n0)===s0.format(n0)}}})})(isToday$1);var isTodayExports=isToday$1.exports;const isToday=getDefaultExportFromCjs(isTodayExports);var localizedFormat$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal$1,function(){var i0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r0,t0,n0){var s0=t0.prototype,o0=s0.format;n0.en.formats=i0,s0.format=function(a0){a0===void 0&&(a0="YYYY-MM-DDTHH:mm:ssZ");var f0=this.$locale().formats,l0=function(u0,A0){return u0.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(c0,k0,d0){var h0=d0&&d0.toUpperCase();return k0||A0[d0]||i0[d0]||A0[h0].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(b0,p0,m0){return p0||m0.slice(1)})})}(a0,f0===void 0?{}:f0);return o0.call(this,l0)}}})})(localizedFormat$1);var localizedFormatExports=localizedFormat$1.exports;const localizedFormat=getDefaultExportFromCjs$1(localizedFormatExports);var relativeTime$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal$1,function(){return function(i0,r0,t0){i0=i0||{};var n0=r0.prototype,s0={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function o0(f0,l0,u0,A0){return n0.fromToBase(f0,l0,u0,A0)}t0.en.relativeTime=s0,n0.fromToBase=function(f0,l0,u0,A0,c0){for(var k0,d0,h0,b0=u0.$locale().relativeTime||s0,p0=i0.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m0=p0.length,g0=0;g0<m0;g0+=1){var v0=p0[g0];v0.d&&(k0=A0?t0(f0).diff(u0,v0.d,!0):u0.diff(f0,v0.d,!0));var x0=(i0.rounding||Math.round)(Math.abs(k0));if(h0=k0>0,x0<=v0.r||!v0.r){x0<=1&&g0>0&&(v0=p0[g0-1]);var w0=b0[v0.l];c0&&(x0=c0(""+x0)),d0=typeof w0=="string"?w0.replace("%d",x0):w0(x0,l0,v0.l,h0);break}}if(l0)return d0;var _0=h0?b0.future:b0.past;return typeof _0=="function"?_0(d0):_0.replace("%s",d0)},n0.to=function(f0,l0){return o0(f0,l0,this,!0)},n0.from=function(f0,l0){return o0(f0,l0,this)};var a0=function(f0){return f0.$u?t0.utc():t0()};n0.toNow=function(f0){return this.to(a0(this),f0)},n0.fromNow=function(f0){return this.from(a0(this),f0)}}})})(relativeTime$1);var relativeTimeExports=relativeTime$1.exports;const relativeTime=getDefaultExportFromCjs$1(relativeTimeExports);dayjs.extend(relativeTime);dayjs.extend(customParseFormat);dayjs.extend(localizedFormat);dayjs.extend(isSameOrAfter);dayjs.extend(isToday);function useDate(){const{currentLanguage:e0}=useEdificeClient(),{t:_e}=useTranslation(),i0=reactExports.useCallback((l0,u0)=>{if(l0.length<11)return dayjs(l0,["YYYY-MM-DD"],u0);if(l0.split("").findIndex(A0=>"0">A0||A0>"9")<0)return dayjs(Number.parseInt(l0)).locale(e0);{let A0=dayjs(l0).locale(e0);return A0.isValid()||(A0=dayjs(l0,["YYYY-MM-DD HH:mm:ss.SSS"]).locale(e0)),A0}},[e0]),r0=reactExports.useCallback(l0=>{let u0=dayjs();try{return typeof l0>"u"?void 0:(typeof l0=="string"?u0=i0(l0):l0 instanceof Date||typeof l0=="number"?u0=dayjs(l0).locale(e0):typeof l0.$date=="number"?u0=dayjs(new Date(l0.$date)).locale(e0):typeof l0.$date=="string"&&(u0=i0(l0.$date)),u0)}catch(A0){console.error(A0)}return u0},[e0,i0]),t0=reactExports.useCallback(l0=>{const u0=r0(l0);if(!(u0!=null&&u0.isValid()))return"";const A0=dayjs();return u0.isSame(A0,"date")?u0.fromNow():u0.isSame(A0.subtract(1,"day"),"date")?_e("date.format.yesterday"):A0.diff(u0,"days")<=7?u0.format(_e("date.format.currentWeek")):u0.isSame(A0,"year")?u0.format(_e("date.format.currentYear")):u0.format(_e("date.format.previousYear"))},[e0,i0]),n0=reactExports.useCallback(l0=>{const u0=r0(l0);return u0!=null&&u0.isValid()?u0.fromNow():""},[e0,i0]),s0=reactExports.useCallback((l0,u0="short")=>{const A0=r0(l0);let c0="";switch(u0){case"short":c0="L";break;case"long":c0="LL";break;case"abbr":c0="ll";break;default:c0=u0}return A0!=null&&A0.isValid()?A0.locale(e0).format(c0):""},[e0,i0]),o0=reactExports.useCallback((l0,u0,A0="day")=>{const c0=r0(l0),k0=r0(u0);return(c0==null?void 0:c0.isSame(k0,A0))??!1},[e0,i0]),a0=reactExports.useCallback((l0,u0,A0="day")=>{const c0=r0(l0),k0=r0(u0);return(c0==null?void 0:c0.isSameOrAfter(k0,A0))??!1},[e0,i0]),f0=reactExports.useCallback(l0=>{const u0=r0(l0);return(u0==null?void 0:u0.isToday())??!1},[e0,i0]);return{fromNow:n0,formatDate:s0,formatTimeAgo:t0,dateIsSame:o0,dateIsSameOrAfter:a0,dateIsToday:f0}}const LinkerCard=({doc:e0,isClickable:_e=!0,isSelectable:i0=!1,isSelected:r0=!1,onClick:t0,className:n0})=>{const{fromNow:s0}=useDate(),o0=reactExports.useMemo(()=>e0.fromDate??s0(e0.modifiedAt),[e0.fromDate,e0.modifiedAt,s0]);return jsxRuntimeExports.jsx(Card,{className:clsx("card-linker shadow-none",n0),isClickable:_e,isSelectable:i0,isSelected:r0,onClick:t0,children:jsxRuntimeExports.jsxs(Card.Body,{space:"8",children:[jsxRuntimeExports.jsx("div",{className:"card-image ps-8 pe-4",children:e0.thumbnail&&e0.thumbnail.length>0?jsxRuntimeExports.jsx(Image$1,{alt:"",height:48,width:48,src:e0.thumbnail,objectFit:"cover",className:"rounded h-full",style:{aspectRatio:1/1}}):jsxRuntimeExports.jsx(AppIcon,{app:e0.application,iconFit:"ratio",size:"48",variant:"rounded"})}),jsxRuntimeExports.jsxs("div",{className:"w-75",children:[jsxRuntimeExports.jsx(Card.Text,{children:e0.name}),jsxRuntimeExports.jsx(Card.Text,{className:"text-black-50",children:e0==null?void 0:e0.creatorName})]}),jsxRuntimeExports.jsx("div",{className:"d-none d-md-block text-black-50 ps-4 pe-8",children:jsxRuntimeExports.jsx(Card.Text,{children:o0})}),e0.shared&&jsxRuntimeExports.jsx("div",{className:"ps-4 pe-8",children:jsxRuntimeExports.jsx(SvgIconUsers,{width:"20",height:"20"})})]})})},useResourceSearch=e0=>{const[_e,i0]=reactExports.useState([]);reactExports.useEffect(()=>{(async()=>(await SnipletsService.initialize(odeServices,e0),await SnipletsService.registerBehaviours(e0),i0(SnipletsService.resourceProducingApps)))()},[]);const r0=reactExports.useCallback(async t0=>{const[n0]=t0.types;return await odeServices.behaviour(e0,n0).loadResources(t0)},[e0]);return{resourceApplications:_e,loadResources:r0}},illuOneBlog="/assets/js/ode-explorer/illu-empty-search-blog2.svg",illuOneCollaborativeWall="/assets/js/ode-explorer/illu-empty-search-collaborativewall.svg",illuOneCommunity="data:image/svg+xml,%3csvg%20width='250'%20height='195'%20viewBox='0%200%20250%20195'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3597_149764)'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3cpath%20d='M167.746%20130.552C172.704%20130.552%20176.962%20132.327%20180.519%20135.877C184.076%20139.427%20185.855%20143.677%20185.854%20148.625C185.854%20153.574%20184.076%20157.823%20180.519%20161.373C176.962%20164.923%20172.758%20166.698%20167.908%20166.698C163.057%20166.698%20158.799%20164.923%20155.135%20161.373C151.47%20157.823%20149.692%20153.52%20149.799%20148.464C149.799%20146.528%20150.23%20144.43%20151.093%20142.171L123.768%20122.484C118.487%20127.863%20112.127%20130.552%20104.69%20130.552C97.2522%20130.552%2090.8927%20127.917%2085.6111%20122.646C80.3295%20117.374%2077.6348%20110.974%2077.5271%20103.443C77.5271%20102.475%2077.6887%20101.077%2078.012%2099.2476L56.3468%2092.1477C54.6221%2093.6538%2052.6819%2094.4069%2050.5261%2094.4069C47.9391%2094.4069%2045.7833%2093.5463%2044.0587%2091.825C42.334%2090.1037%2041.4717%2087.9522%2041.4717%2085.3703C41.4717%2082.7884%2042.334%2080.6906%2044.0587%2079.0771C45.7833%2077.4635%2047.9391%2076.6028%2050.5261%2076.4952C52.6819%2076.4952%2054.5143%2077.1944%2056.0234%2078.5928C57.5325%2079.9912%2058.5564%2081.6586%2059.0953%2083.595L80.9224%2090.8565C83.1858%2086.4458%2086.4734%2082.9496%2090.785%2080.3677C95.0966%2077.7858%2099.7315%2076.4948%20104.69%2076.4948C110.295%2076.4948%20115.468%2078.1623%20120.211%2081.4971L152.386%2049.3856C150.661%2046.1582%20149.799%2043.1998%20149.799%2040.5105C149.799%2035.562%20151.577%2031.3127%20155.134%2027.7625C158.691%2024.2123%20162.949%2022.4373%20167.907%2022.4375C172.866%2022.4377%20177.069%2024.2127%20180.518%2027.7625C183.968%2031.3123%20185.746%2035.5616%20185.854%2040.5105C185.962%2045.4593%20184.183%2049.6548%20180.518%2053.0969C176.854%2056.539%20172.596%2058.314%20167.745%2058.4219C164.943%2058.4219%20161.979%2057.5075%20158.853%2055.6788L126.678%2087.9518C130.02%2092.6851%20131.69%2097.8488%20131.69%20103.443C131.69%20107.423%20130.774%20111.35%20128.942%20115.223L156.266%20134.748C159.823%20131.951%20163.65%20130.552%20167.746%20130.552V130.552Z'%20fill='%23A348C0'/%3e%3cg%20filter='url(%23filter0_d_3597_149764)'%3e%3cellipse%20cx='169.708'%20cy='113.765'%20rx='44.2029'%20ry='44.2029'%20fill='white'%20fill-opacity='0.85'/%3e%3cpath%20d='M241.707%20177.101L215.012%20150.405C214.309%20149.703%20213.483%20149.21%20212.606%20148.92C220.41%20139.391%20225.099%20127.21%20225.099%20113.934C225.099%2095.9054%20216.454%2079.891%20203.091%2069.8112C198.323%2066.217%20192.946%2063.3837%20187.149%2061.4707C181.707%2059.6808%20175.903%2058.6953%20169.867%2058.6953C165.678%2058.6953%20161.599%2059.1808%20157.678%2060.0649C152.635%2061.2026%20147.852%2063.0142%20143.432%2065.4272C135.272%2069.8837%20128.374%2076.3402%20123.367%2084.1373C121.403%2087.1953%20119.736%2090.4489%20118.403%2093.8765C115.975%20100.094%20114.635%20106.855%20114.635%20113.934C114.635%20144.442%20139.359%20169.166%20169.867%20169.166C183.142%20169.166%20195.323%20164.485%20204.852%20156.674C205.142%20157.55%20205.642%20158.384%20206.338%20159.079L233.033%20185.775C235.432%20188.174%20239.316%20188.174%20241.715%20185.775C244.113%20183.376%20244.113%20179.492%20241.715%20177.094L241.707%20177.101ZM169.859%20156.891C146.135%20156.891%20126.903%20137.659%20126.903%20113.934C126.903%20109.203%20127.678%20104.652%20129.091%20100.391C130.265%2096.8475%20131.888%2093.5141%20133.896%2090.4489C136.483%2086.4924%20139.707%2082.9924%20143.425%2080.0866C147.62%2076.804%20152.432%2074.2895%20157.671%2072.746C161.533%2071.6011%20165.628%2070.9779%20169.859%2070.9779C193.584%2070.9779%20212.816%2090.2098%20212.816%20113.934C212.816%20137.659%20193.584%20156.891%20169.859%20156.891Z'%20fill='%23B9E3F8'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_3597_149764'%20x='108.635'%20y='54.6953'%20width='140.879'%20height='140.875'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='2'/%3e%3cfeGaussianBlur%20stdDeviation='3'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_3597_149764'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_3597_149764'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_3597_149764'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",illuOneExercizer="data:image/svg+xml,%3csvg%20width='250'%20height='195'%20viewBox='0%200%20250%20195'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3597_148725)'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3cpath%20d='M83.4104%20149.864L112.194%20135.472V111.738L83.4104%20124.138V149.864ZM78.5673%20115.516L108.965%20102.602L78.5673%2089.5493L48.3412%20102.773L78.5673%20115.516ZM160.349%20149.864L189.167%20135.472V111.738L160.384%20124.138L160.349%20149.864ZM155.506%20115.516L185.732%20102.773L155.472%2089.7211L125.074%20102.773L155.506%20115.516ZM121.88%2093.568L150.663%2081.2028V61.3498L121.88%2073.715V93.568ZM117.037%2065.2311L150.114%2051.1141L117.037%2036.8598L83.9256%2051.1141L117.037%2065.2311ZM198.682%20104.113V135.472C198.694%20137.212%20198.231%20138.923%20197.342%20140.418C196.429%20141.946%20195.059%20143.147%20193.426%20143.853L159.8%20160.684C158.476%20161.382%20157.003%20161.746%20155.506%20161.746C154.01%20161.746%20152.536%20161.382%20151.213%20160.684L117.586%20143.853C117.379%20143.822%20117.187%20143.726%20117.037%20143.578C116.881%20143.717%20116.692%20143.812%20116.487%20143.853L82.8608%20160.684C81.5508%20161.417%2080.068%20161.784%2078.5673%20161.748C77.0983%20161.794%2075.6461%20161.425%2074.3769%20160.684L40.7504%20143.853C39.1325%20143.137%2037.7764%20141.937%2036.8691%20140.418C35.9651%20138.922%2035.4568%20137.22%2035.3921%20135.472V104.113C35.3757%20102.237%2035.9395%20100.401%2037.0064%2098.8576C38.051%2097.299%2039.55%2096.0997%2041.2999%2095.4228L73.8617%2081.4433V51.3889C73.8545%2049.5056%2074.3966%2047.6611%2075.4214%2046.0811C76.4463%2044.5011%2077.9095%2043.2541%2079.6321%2042.4928L113.259%2028.1011C114.45%2027.581%20115.737%2027.3125%20117.037%2027.3125C118.337%2027.3125%20119.623%2027.581%20120.815%2028.1011L154.442%2042.4928C156.151%2043.2379%20157.633%2044.4231%20158.735%2045.9276C159.819%2047.5145%20160.383%2049.3988%20160.349%2051.3202V81.3059L192.911%2095.2854C194.661%2095.9623%20196.16%2097.1616%20197.205%2098.7202C198.26%20100.263%20198.779%20102.109%20198.682%20103.975V104.113Z'%20fill='%23A348C0'/%3e%3cg%20filter='url(%23filter0_d_3597_148725)'%3e%3cellipse%20cx='169.707'%20cy='113.765'%20rx='44.2029'%20ry='44.2029'%20fill='white'%20fill-opacity='0.85'/%3e%3cpath%20d='M241.707%20177.101L215.011%20150.405C214.308%20149.703%20213.482%20149.21%20212.605%20148.92C220.41%20139.391%20225.098%20127.21%20225.098%20113.934C225.098%2095.9054%20216.453%2079.891%20203.091%2069.8112C198.323%2066.217%20192.946%2063.3837%20187.149%2061.4707C181.707%2059.6808%20175.903%2058.6953%20169.866%2058.6953C165.678%2058.6953%20161.598%2059.1808%20157.678%2060.0649C152.634%2061.2026%20147.852%2063.0142%20143.432%2065.4272C135.272%2069.8837%20128.374%2076.3402%20123.366%2084.1373C121.403%2087.1953%20119.736%2090.4489%20118.403%2093.8765C115.975%20100.094%20114.634%20106.855%20114.634%20113.934C114.634%20144.442%20139.359%20169.166%20169.866%20169.166C183.142%20169.166%20195.323%20164.485%20204.852%20156.674C205.142%20157.55%20205.642%20158.384%20206.337%20159.079L233.033%20185.775C235.432%20188.174%20239.316%20188.174%20241.714%20185.775C244.113%20183.376%20244.113%20179.492%20241.714%20177.094L241.707%20177.101ZM169.859%20156.891C146.134%20156.891%20126.903%20137.659%20126.903%20113.934C126.903%20109.203%20127.678%20104.652%20129.091%20100.391C130.265%2096.8475%20131.888%2093.5141%20133.895%2090.4489C136.482%2086.4924%20139.707%2082.9924%20143.424%2080.0866C147.62%2076.804%20152.432%2074.2895%20157.671%2072.746C161.533%2071.6011%20165.627%2070.9779%20169.859%2070.9779C193.584%2070.9779%20212.816%2090.2098%20212.816%20113.934C212.816%20137.659%20193.584%20156.891%20169.859%20156.891Z'%20fill='%23B9E3F8'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_3597_148725'%20x='108.634'%20y='54.6953'%20width='140.879'%20height='140.875'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='2'/%3e%3cfeGaussianBlur%20stdDeviation='3'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_3597_148725'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_3597_148725'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_3597_148725'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",illuOneFormulaire="/assets/js/ode-explorer/illu-empty-search-formulaire.svg",illuOneForum="/assets/js/ode-explorer/illu-empty-search-forum.svg",illuOneHomeworks="/assets/js/ode-explorer/illu-empty-search-homeworks.svg",illuOneMagneto="data:image/svg+xml,%3csvg%20width='250'%20height='195'%20viewBox='0%200%20250%20195'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3597_149757)'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3cpath%20d='M127.341%20120.329V89.4164C127.341%2077.1185%20122.455%2065.3242%20113.759%2056.6282C105.063%2047.9322%2093.2691%2043.0469%2080.9711%2043.0469C68.6731%2043.0469%2056.8789%2047.9322%2048.1829%2056.6282C39.4869%2065.3242%2034.6016%2077.1185%2034.6016%2089.4164L34.6016%20120.329H55.2103V89.4164C55.2103%2082.5842%2057.9243%2076.0319%2062.7554%2071.2008C67.5865%2066.3696%2074.1389%2063.6556%2080.9711%2063.6556C84.3541%2063.6556%2087.7039%2064.3219%2090.8294%2065.6165C93.9548%2066.9111%2096.7947%2068.8086%2099.1868%2071.2007C101.579%2073.5929%20103.476%2076.4327%20104.771%2079.5582C106.066%2082.6836%20106.732%2086.0335%20106.732%2089.4164V120.329M55.2103%20130.634H34.6016V146.09H55.2103M127.341%20130.634H106.732V146.09H127.341'%20fill='%23F1CA00'/%3e%3cpath%20d='M199.472%20120.329V89.4164C199.472%2083.3271%20198.272%2077.2974%20195.942%2071.6716C193.612%2066.0457%20190.196%2060.934%20185.89%2056.6282C181.584%2052.3224%20176.473%2048.9068%20170.847%2046.5765C165.221%2044.2463%20159.191%2043.0469%20153.102%2043.0469C140.804%2043.0469%20129.01%2047.9322%20120.314%2056.6282C111.618%2065.3242%20106.732%2077.1185%20106.732%2089.4164V120.329H127.341V89.4164C127.341%2082.5842%20130.055%2076.0319%20134.886%2071.2008C139.717%2066.3696%20146.27%2063.6556%20153.102%2063.6556C156.485%2063.6556%20159.835%2064.3219%20162.96%2065.6165C166.086%2066.9111%20168.926%2068.8086%20171.318%2071.2007C173.71%2073.5929%20175.607%2076.4327%20176.902%2079.5582C178.197%2082.6836%20178.863%2086.0335%20178.863%2089.4164V120.329M127.341%20130.634H106.732V146.09H127.341M199.472%20130.634H178.863V146.09H199.472'%20fill='%23F1CA00'/%3e%3cg%20filter='url(%23filter0_d_3597_149757)'%3e%3cellipse%20cx='169.708'%20cy='113.765'%20rx='44.2029'%20ry='44.2029'%20fill='white'%20fill-opacity='0.85'/%3e%3cpath%20d='M241.707%20177.101L215.012%20150.405C214.309%20149.703%20213.483%20149.21%20212.606%20148.92C220.41%20139.391%20225.099%20127.21%20225.099%20113.934C225.099%2095.9054%20216.454%2079.891%20203.091%2069.8112C198.323%2066.217%20192.946%2063.3837%20187.149%2061.4707C181.707%2059.6808%20175.903%2058.6953%20169.867%2058.6953C165.678%2058.6953%20161.599%2059.1808%20157.678%2060.0649C152.635%2061.2026%20147.852%2063.0142%20143.432%2065.4272C135.272%2069.8837%20128.374%2076.3402%20123.367%2084.1373C121.403%2087.1953%20119.736%2090.4489%20118.403%2093.8765C115.975%20100.094%20114.635%20106.855%20114.635%20113.934C114.635%20144.442%20139.359%20169.166%20169.867%20169.166C183.142%20169.166%20195.323%20164.485%20204.852%20156.674C205.142%20157.55%20205.642%20158.384%20206.338%20159.079L233.033%20185.775C235.432%20188.174%20239.316%20188.174%20241.715%20185.775C244.113%20183.376%20244.113%20179.492%20241.715%20177.094L241.707%20177.101ZM169.859%20156.891C146.135%20156.891%20126.903%20137.659%20126.903%20113.934C126.903%20109.203%20127.678%20104.652%20129.091%20100.391C130.265%2096.8475%20131.888%2093.5141%20133.896%2090.4489C136.483%2086.4924%20139.707%2082.9924%20143.425%2080.0866C147.62%2076.804%20152.432%2074.2895%20157.671%2072.746C161.533%2071.6011%20165.628%2070.9779%20169.859%2070.9779C193.584%2070.9779%20212.816%2090.2098%20212.816%20113.934C212.816%20137.659%20193.584%20156.891%20169.859%20156.891Z'%20fill='%23B9E3F8'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_3597_149757'%20x='108.635'%20y='54.6953'%20width='140.879'%20height='140.875'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='2'/%3e%3cfeGaussianBlur%20stdDeviation='3'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_3597_149757'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_3597_149757'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_3597_149757'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",illuOneWiki="/assets/js/ode-explorer/illu-empty-search-wiki.svg",illuOneEmpty="/assets/js/ode-explorer/illu-empty-search.svg",illuNeoBlog="/assets/js/ode-explorer/illu-empty-search-blog.svg",illuNeoCollaborativeWall="/assets/js/ode-explorer/illu-empty-search-collaborativewall2.svg",illuNeoCommunity="data:image/svg+xml,%3csvg%20width='250'%20height='195'%20viewBox='0%200%20250%20195'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3597_141038)'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3cpath%20d='M167.746%20130.552C172.704%20130.552%20176.962%20132.327%20180.519%20135.877C184.076%20139.427%20185.855%20143.677%20185.854%20148.625C185.854%20153.574%20184.076%20157.823%20180.519%20161.373C176.962%20164.923%20172.758%20166.698%20167.908%20166.698C163.057%20166.698%20158.799%20164.923%20155.135%20161.373C151.47%20157.823%20149.692%20153.52%20149.799%20148.464C149.799%20146.528%20150.23%20144.43%20151.093%20142.171L123.768%20122.484C118.487%20127.863%20112.127%20130.552%20104.69%20130.552C97.2522%20130.552%2090.8927%20127.917%2085.6111%20122.646C80.3295%20117.374%2077.6348%20110.974%2077.5271%20103.443C77.5271%20102.475%2077.6887%20101.077%2078.012%2099.2476L56.3468%2092.1477C54.6221%2093.6538%2052.6819%2094.4069%2050.5261%2094.4069C47.9391%2094.4069%2045.7833%2093.5463%2044.0587%2091.825C42.334%2090.1037%2041.4717%2087.9522%2041.4717%2085.3703C41.4717%2082.7884%2042.334%2080.6906%2044.0587%2079.0771C45.7833%2077.4635%2047.9391%2076.6028%2050.5261%2076.4952C52.6819%2076.4952%2054.5143%2077.1944%2056.0234%2078.5928C57.5325%2079.9912%2058.5564%2081.6586%2059.0953%2083.595L80.9224%2090.8565C83.1858%2086.4458%2086.4734%2082.9496%2090.785%2080.3677C95.0966%2077.7858%2099.7315%2076.4948%20104.69%2076.4948C110.295%2076.4948%20115.468%2078.1623%20120.211%2081.4971L152.386%2049.3856C150.661%2046.1582%20149.799%2043.1998%20149.799%2040.5105C149.799%2035.562%20151.577%2031.3127%20155.134%2027.7625C158.691%2024.2123%20162.949%2022.4373%20167.907%2022.4375C172.866%2022.4377%20177.069%2024.2127%20180.518%2027.7625C183.968%2031.3123%20185.746%2035.5616%20185.854%2040.5105C185.962%2045.4593%20184.183%2049.6548%20180.518%2053.0969C176.854%2056.539%20172.596%2058.314%20167.745%2058.4219C164.943%2058.4219%20161.979%2057.5075%20158.853%2055.6788L126.678%2087.9518C130.02%2092.6851%20131.69%2097.8488%20131.69%20103.443C131.69%20107.423%20130.774%20111.35%20128.942%20115.223L156.266%20134.748C159.823%20131.951%20163.65%20130.552%20167.746%20130.552V130.552Z'%20fill='%23823AA1'/%3e%3cg%20filter='url(%23filter0_d_3597_141038)'%3e%3cellipse%20cx='169.708'%20cy='113.765'%20rx='44.2029'%20ry='44.2029'%20fill='white'%20fill-opacity='0.85'/%3e%3cpath%20d='M241.707%20177.101L215.012%20150.405C214.309%20149.703%20213.483%20149.21%20212.606%20148.92C220.41%20139.391%20225.099%20127.21%20225.099%20113.934C225.099%2095.9054%20216.454%2079.891%20203.091%2069.8112C198.323%2066.217%20192.946%2063.3837%20187.149%2061.4707C181.707%2059.6808%20175.903%2058.6953%20169.867%2058.6953C165.678%2058.6953%20161.599%2059.1808%20157.678%2060.0649C152.635%2061.2026%20147.852%2063.0142%20143.432%2065.4272C135.272%2069.8837%20128.374%2076.3402%20123.367%2084.1373C121.403%2087.1953%20119.736%2090.4489%20118.403%2093.8765C115.975%20100.094%20114.635%20106.855%20114.635%20113.934C114.635%20144.442%20139.359%20169.166%20169.867%20169.166C183.142%20169.166%20195.323%20164.485%20204.852%20156.674C205.142%20157.55%20205.642%20158.384%20206.338%20159.079L233.033%20185.775C235.432%20188.174%20239.316%20188.174%20241.715%20185.775C244.113%20183.376%20244.113%20179.492%20241.715%20177.094L241.707%20177.101ZM169.859%20156.891C146.135%20156.891%20126.903%20137.659%20126.903%20113.934C126.903%20109.203%20127.678%20104.652%20129.091%20100.391C130.265%2096.8475%20131.888%2093.5141%20133.896%2090.4489C136.483%2086.4924%20139.707%2082.9924%20143.425%2080.0866C147.62%2076.804%20152.432%2074.2895%20157.671%2072.746C161.533%2071.6011%20165.628%2070.9779%20169.859%2070.9779C193.584%2070.9779%20212.816%2090.2098%20212.816%20113.934C212.816%20137.659%20193.584%20156.891%20169.859%20156.891Z'%20fill='%23B9E3F8'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_3597_141038'%20x='108.635'%20y='54.6953'%20width='140.879'%20height='140.875'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='2'/%3e%3cfeGaussianBlur%20stdDeviation='3'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_3597_141038'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_3597_141038'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_3597_141038'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",illuNeoExercizer="data:image/svg+xml,%3csvg%20width='250'%20height='195'%20viewBox='0%200%20250%20195'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3597_148718)'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3cpath%20d='M83.4104%20149.864L112.194%20135.472V111.738L83.4104%20124.138V149.864ZM78.5673%20115.516L108.965%20102.602L78.5673%2089.5493L48.3412%20102.773L78.5673%20115.516ZM160.349%20149.864L189.167%20135.472V111.738L160.384%20124.138L160.349%20149.864ZM155.506%20115.516L185.732%20102.773L155.472%2089.7211L125.074%20102.773L155.506%20115.516ZM121.88%2093.568L150.663%2081.2028V61.3498L121.88%2073.715V93.568ZM117.037%2065.2311L150.114%2051.1141L117.037%2036.8598L83.9256%2051.1141L117.037%2065.2311ZM198.682%20104.113V135.472C198.694%20137.212%20198.231%20138.923%20197.342%20140.418C196.429%20141.946%20195.059%20143.147%20193.426%20143.853L159.8%20160.684C158.476%20161.382%20157.003%20161.746%20155.506%20161.746C154.01%20161.746%20152.536%20161.382%20151.213%20160.684L117.586%20143.853C117.379%20143.822%20117.187%20143.726%20117.037%20143.578C116.881%20143.717%20116.692%20143.812%20116.487%20143.853L82.8608%20160.684C81.5508%20161.417%2080.068%20161.784%2078.5673%20161.748C77.0983%20161.794%2075.6461%20161.425%2074.3769%20160.684L40.7504%20143.853C39.1325%20143.137%2037.7764%20141.937%2036.8691%20140.418C35.9651%20138.922%2035.4568%20137.22%2035.3921%20135.472V104.113C35.3757%20102.237%2035.9395%20100.401%2037.0064%2098.8576C38.051%2097.299%2039.55%2096.0997%2041.2999%2095.4228L73.8617%2081.4433V51.3889C73.8545%2049.5056%2074.3966%2047.6611%2075.4214%2046.0811C76.4463%2044.5011%2077.9095%2043.2541%2079.6321%2042.4928L113.259%2028.1011C114.45%2027.581%20115.737%2027.3125%20117.037%2027.3125C118.337%2027.3125%20119.623%2027.581%20120.815%2028.1011L154.442%2042.4928C156.151%2043.2379%20157.633%2044.4231%20158.735%2045.9276C159.819%2047.5145%20160.383%2049.3988%20160.349%2051.3202V81.3059L192.911%2095.2854C194.661%2095.9623%20196.16%2097.1616%20197.205%2098.7202C198.26%20100.263%20198.779%20102.109%20198.682%20103.975V104.113Z'%20fill='%23823AA1'/%3e%3cg%20filter='url(%23filter0_d_3597_148718)'%3e%3cellipse%20cx='169.707'%20cy='113.765'%20rx='44.2029'%20ry='44.2029'%20fill='white'%20fill-opacity='0.85'/%3e%3cpath%20d='M241.707%20177.101L215.011%20150.405C214.308%20149.703%20213.482%20149.21%20212.605%20148.92C220.41%20139.391%20225.098%20127.21%20225.098%20113.934C225.098%2095.9054%20216.453%2079.891%20203.091%2069.8112C198.323%2066.217%20192.946%2063.3837%20187.149%2061.4707C181.707%2059.6808%20175.903%2058.6953%20169.866%2058.6953C165.678%2058.6953%20161.598%2059.1808%20157.678%2060.0649C152.634%2061.2026%20147.852%2063.0142%20143.432%2065.4272C135.272%2069.8837%20128.374%2076.3402%20123.366%2084.1373C121.403%2087.1953%20119.736%2090.4489%20118.403%2093.8765C115.975%20100.094%20114.634%20106.855%20114.634%20113.934C114.634%20144.442%20139.359%20169.166%20169.866%20169.166C183.142%20169.166%20195.323%20164.485%20204.852%20156.674C205.142%20157.55%20205.642%20158.384%20206.337%20159.079L233.033%20185.775C235.432%20188.174%20239.316%20188.174%20241.714%20185.775C244.113%20183.376%20244.113%20179.492%20241.714%20177.094L241.707%20177.101ZM169.859%20156.891C146.134%20156.891%20126.903%20137.659%20126.903%20113.934C126.903%20109.203%20127.678%20104.652%20129.091%20100.391C130.265%2096.8475%20131.888%2093.5141%20133.895%2090.4489C136.482%2086.4924%20139.707%2082.9924%20143.424%2080.0866C147.62%2076.804%20152.432%2074.2895%20157.671%2072.746C161.533%2071.6011%20165.627%2070.9779%20169.859%2070.9779C193.584%2070.9779%20212.816%2090.2098%20212.816%20113.934C212.816%20137.659%20193.584%20156.891%20169.859%20156.891Z'%20fill='%23B9E3F8'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_3597_148718'%20x='108.634'%20y='54.6953'%20width='140.879'%20height='140.875'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='2'/%3e%3cfeGaussianBlur%20stdDeviation='3'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_3597_148718'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_3597_148718'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_3597_148718'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",illuNeoFormulaire="/assets/js/ode-explorer/illu-empty-search-formulaire2.svg",illuNeoForum="/assets/js/ode-explorer/illu-empty-search-forum2.svg",illuNeoHomeworks="/assets/js/ode-explorer/illu-empty-search-homeworks2.svg",illuNeoMagneto="data:image/svg+xml,%3csvg%20width='250'%20height='195'%20viewBox='0%200%20250%20195'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3597_141030)'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3cpath%20d='M127.341%20120.329V89.4164C127.341%2077.1185%20122.455%2065.3242%20113.759%2056.6282C105.063%2047.9322%2093.2691%2043.0469%2080.9711%2043.0469C68.6731%2043.0469%2056.8789%2047.9322%2048.1829%2056.6282C39.4869%2065.3242%2034.6016%2077.1185%2034.6016%2089.4164L34.6016%20120.329H55.2103V89.4164C55.2103%2082.5842%2057.9243%2076.0319%2062.7554%2071.2008C67.5865%2066.3696%2074.1389%2063.6556%2080.9711%2063.6556C84.3541%2063.6556%2087.7039%2064.3219%2090.8294%2065.6165C93.9548%2066.9111%2096.7947%2068.8086%2099.1868%2071.2007C101.579%2073.5929%20103.476%2076.4327%20104.771%2079.5582C106.066%2082.6836%20106.732%2086.0335%20106.732%2089.4164V120.329M55.2103%20130.634H34.6016V146.09H55.2103M127.341%20130.634H106.732V146.09H127.341'%20fill='%23ECBE30'/%3e%3cpath%20d='M199.472%20120.329V89.4164C199.472%2083.3271%20198.272%2077.2974%20195.942%2071.6716C193.612%2066.0457%20190.196%2060.934%20185.89%2056.6282C181.584%2052.3224%20176.473%2048.9068%20170.847%2046.5765C165.221%2044.2463%20159.191%2043.0469%20153.102%2043.0469C140.804%2043.0469%20129.01%2047.9322%20120.314%2056.6282C111.618%2065.3242%20106.732%2077.1185%20106.732%2089.4164V120.329H127.341V89.4164C127.341%2082.5842%20130.055%2076.0319%20134.886%2071.2008C139.717%2066.3696%20146.27%2063.6556%20153.102%2063.6556C156.485%2063.6556%20159.835%2064.3219%20162.96%2065.6165C166.086%2066.9111%20168.926%2068.8086%20171.318%2071.2007C173.71%2073.5929%20175.607%2076.4327%20176.902%2079.5582C178.197%2082.6836%20178.863%2086.0335%20178.863%2089.4164V120.329M127.341%20130.634H106.732V146.09H127.341M199.472%20130.634H178.863V146.09H199.472'%20fill='%23ECBE30'/%3e%3cg%20filter='url(%23filter0_d_3597_141030)'%3e%3cellipse%20cx='169.708'%20cy='113.765'%20rx='44.2029'%20ry='44.2029'%20fill='white'%20fill-opacity='0.85'/%3e%3cpath%20d='M241.707%20177.101L215.012%20150.405C214.309%20149.703%20213.483%20149.21%20212.606%20148.92C220.41%20139.391%20225.099%20127.21%20225.099%20113.934C225.099%2095.9054%20216.454%2079.891%20203.091%2069.8112C198.323%2066.217%20192.946%2063.3837%20187.149%2061.4707C181.707%2059.6808%20175.903%2058.6953%20169.867%2058.6953C165.678%2058.6953%20161.599%2059.1808%20157.678%2060.0649C152.635%2061.2026%20147.852%2063.0142%20143.432%2065.4272C135.272%2069.8837%20128.374%2076.3402%20123.367%2084.1373C121.403%2087.1953%20119.736%2090.4489%20118.403%2093.8765C115.975%20100.094%20114.635%20106.855%20114.635%20113.934C114.635%20144.442%20139.359%20169.166%20169.867%20169.166C183.142%20169.166%20195.323%20164.485%20204.852%20156.674C205.142%20157.55%20205.642%20158.384%20206.338%20159.079L233.033%20185.775C235.432%20188.174%20239.316%20188.174%20241.715%20185.775C244.113%20183.376%20244.113%20179.492%20241.715%20177.094L241.707%20177.101ZM169.859%20156.891C146.135%20156.891%20126.903%20137.659%20126.903%20113.934C126.903%20109.203%20127.678%20104.652%20129.091%20100.391C130.265%2096.8475%20131.888%2093.5141%20133.896%2090.4489C136.483%2086.4924%20139.707%2082.9924%20143.425%2080.0866C147.62%2076.804%20152.432%2074.2895%20157.671%2072.746C161.533%2071.6011%20165.628%2070.9779%20169.859%2070.9779C193.584%2070.9779%20212.816%2090.2098%20212.816%20113.934C212.816%20137.659%20193.584%20156.891%20169.859%20156.891Z'%20fill='%23B9E3F8'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_3597_141030'%20x='108.635'%20y='54.6953'%20width='140.879'%20height='140.875'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='2'/%3e%3cfeGaussianBlur%20stdDeviation='3'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_3597_141030'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_3597_141030'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_3597_141030'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",illuNeoWiki="/assets/js/ode-explorer/illu-empty-search-wiki2.svg",illuNeoEmpty="/assets/js/ode-explorer/illu-empty-search2.svg",emptyScreenMapping={one:{blog:illuOneBlog,wiki:illuOneWiki,empty:illuOneEmpty,"collaborative-wall":illuOneCollaborativeWall,community:illuOneCommunity,exercizer:illuOneExercizer,formulaire:illuOneFormulaire,forum:illuOneForum,homeworks:illuOneHomeworks,magneto:illuOneMagneto},neo:{blog:illuNeoBlog,wiki:illuNeoWiki,empty:illuNeoEmpty,"collaborative-wall":illuNeoCollaborativeWall,community:illuNeoCommunity,exercizer:illuNeoExercizer,formulaire:illuNeoFormulaire,forum:illuNeoForum,homeworks:illuNeoHomeworks,magneto:illuNeoMagneto}},InternalLinker=({appCode:e0,defaultAppCode:_e,defaultResourceId:i0,onChange:r0,onSelect:t0,multiple:n0=!0,resourceList:s0,applicationList:o0,showApplicationSelector:a0=!0,searchFilter:f0,disableApplicationSelector:l0=!1,resourceFilter:u0,onSearch:A0,hasMoreResources:c0,onLoadMore:k0,loadMoreLabel:d0})=>{const{t:h0}=useTranslation(),{theme:b0}=useEdificeTheme(),{resourceApplications:p0,loadResources:m0}=useResourceSearch(e0),[g0,v0]=reactExports.useState(),[x0,w0]=reactExports.useState(),[_0,y0]=reactExports.useState(),S0=useDebounce(_0||"",500),[B0,I0]=reactExports.useState([]),T0=reactExports.useCallback((Z0,N0)=>{var Q0,z0,K0;if(!N0)return!0;const H0=(N0==null?void 0:N0.toLowerCase())||"";return((Q0=Z0.name)==null?void 0:Q0.toLowerCase().includes(H0))||((z0=Z0.creatorName)==null?void 0:z0.toLowerCase().includes(H0))||((K0=Z0.description)==null?void 0:K0.toLowerCase().includes(H0))},[]),R0=reactExports.useCallback(Z0=>Z0.sort((N0,Q0)=>N0.modifiedAt<Q0.modifiedAt?1:-1),[]),E0=reactExports.useCallback(Z0=>{async function N0(){if(A0){try{I0(await A0(Z0||"",x0))}catch{I0([])}return}if(s0){let Q0=s0.filter(z0=>T0(z0,Z0));u0&&(Q0=Q0.filter(u0)),I0(R0(Q0));return}else if(x0)try{let Q0=(await m0({application:x0.application,search:Z0,types:[x0.application],filters:{},pagination:{startIdx:0,pageSize:300}})).filter(z0=>T0(z0,Z0));u0&&(Q0=Q0.filter(u0)),I0(R0(Q0));return}catch{}I0([])}N0()},[A0,m0,x0,T0,R0,s0,u0]),[C0,G0]=reactExports.useState([]),F0=Z0=>{r0==null||r0(Z0),w0(Z0)},M0=Z0=>{const N0=Z0.target.value;y0(N0.toString())},j0=reactExports.useCallback(Z0=>{E0(_0),Z0.stopPropagation(),Z0.preventDefault()},[E0,_0]),D0=reactExports.useCallback(Z0=>C0.findIndex(N0=>N0.assetId===Z0),[C0]),$0=reactExports.useCallback(Z0=>{G0(n0?N0=>[...N0,Z0]:[Z0])},[G0,n0]),X0=reactExports.useCallback(Z0=>{const N0=D0(Z0.assetId);N0<0?$0(Z0):G0(C0.filter((Q0,z0)=>z0!==N0))},[D0,$0,C0]);return reactExports.useEffect(()=>{(async()=>{if(o0){v0(o0.sort((z0,K0)=>z0.displayName.localeCompare(K0.displayName)));return}const Z0=p0.map(z0=>odeServices.session().getWebApp(z0)),N0=await Promise.all(Z0),Q0=p0.map((z0,K0)=>{var H0;let J0=((H0=N0[K0])==null?void 0:H0.displayName)??z0;return z0==="exercizer"?J0="bbm.linker.int.app.exercizer":z0==="formulaire"&&(J0="bbm.linker.int.app.forms"),{application:z0,displayName:h0(J0??z0),icon:jsxRuntimeExports.jsx(AppIcon,{app:N0[K0],size:"24"})}}).sort((z0,K0)=>z0.displayName.localeCompare(K0.displayName));v0(Q0)})()},[p0,h0,o0]),reactExports.useEffect(()=>{E0(S0)},[E0,S0]),reactExports.useEffect(()=>{t0==null||t0(C0)},[C0]),reactExports.useEffect(()=>{var Z0;const N0=_e??((o0==null?void 0:o0.length)===1&&((Z0=o0==null?void 0:o0[0])==null?void 0:Z0.application));if(N0){const Q0=g0==null?void 0:g0.find(z0=>N0===z0.application);w0(Q0),E0("")}},[g0,_e]),reactExports.useEffect(()=>{if(i0&&D0(i0)<0){const Z0=B0==null?void 0:B0.find(N0=>i0===N0.assetId);Z0&&$0(Z0)}},[B0]),jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column flex-fill overflow-hidden",children:[jsxRuntimeExports.jsxs("div",{className:"search d-flex bg-light rounded-top border border-bottom-0",children:[a0&&jsxRuntimeExports.jsx("div",{className:"flex-shrink-1 px-8 py-12 border-end",children:jsxRuntimeExports.jsxs(Dropdown,{overflow:!0,children:[jsxRuntimeExports.jsx(Dropdown.Trigger,{icon:jsxRuntimeExports.jsx("div",{className:"pe-8",children:(x0==null?void 0:x0.icon)||jsxRuntimeExports.jsx(SvgIconApplications,{})}),label:jsxRuntimeExports.jsxs("span",{className:"d-md-inline d-sm-none",children:[" ",h0((x0==null?void 0:x0.displayName)||"bbm.linker.int.choose")]}),variant:"ghost",size:"md",disabled:l0}),jsxRuntimeExports.jsx(Dropdown.Menu,{children:g0==null?void 0:g0.map(Z0=>jsxRuntimeExports.jsx(Dropdown.Item,{icon:Z0.icon,onClick:()=>F0(Z0),children:Z0.displayName},Z0.application))})]})}),!a0&&f0&&jsxRuntimeExports.jsx("div",{className:"flex-shrink-1 px-8 py-12 border-end align-self-center",children:f0}),jsxRuntimeExports.jsx("div",{className:"flex-grow-1 align-self-center",children:jsxRuntimeExports.jsx("form",{className:"gap-16 d-flex w-100 align-items-center px-16 py-8",onSubmit:j0,children:jsxRuntimeExports.jsx(SearchBar,{isVariant:!0,placeholder:h0("search"),size:"lg",className:"w-100",disabled:!x0,onChange:M0})})})]}),jsxRuntimeExports.jsxs("div",{className:"internal-linker flex-grow-1 w-100 rounded-bottom border gap-0 overflow-auto",children:[x0&&B0&&B0.length>0&&jsxRuntimeExports.jsxs("div",{children:[B0.map(Z0=>{const N0=C0.findIndex(Q0=>Q0.assetId===Z0.assetId)>=0;return jsxRuntimeExports.jsx(LinkerCard,{doc:Z0,isSelected:N0,onClick:()=>X0(Z0)},Z0.path)}),c0&&jsxRuntimeExports.jsx("div",{className:"d-grid gap-2 col-4 mx-auto my-24",children:jsxRuntimeExports.jsx(Button,{type:"button",color:"secondary",variant:"filled",onClick:k0,children:d0??h0("bbm.linker.see.more")})})]}),x0&&B0&&B0.length<=0&&jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-center mt-16",children:jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:emptyScreenMapping[(b0==null?void 0:b0.bootstrapVersion)??"one"][x0==null?void 0:x0.application],text:h0("bbm.linker.int.notfound"),className:"mt-16"})}),!x0&&jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-center mt-32",children:jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:emptyScreenMapping[(b0==null?void 0:b0.bootstrapVersion)??"one"].empty,text:h0("bbm.linker.int.empty"),className:"mt-32"})})]})]})},InternalLink=({target:e0,resourceId:_e,appPrefix:i0})=>{const{t:r0}=useTranslation(),{setResult:t0,setResultCounter:n0,appCode:s0,multiple:o0}=useMediaLibraryContext(),[a0,f0]=useToggle(e0==="_blank"),[l0,u0]=reactExports.useState([]),A0=c0=>{u0(c0)};return reactExports.useEffect(()=>{t0({target:a0?"_blank":void 0,resources:l0}),l0&&l0.length?n0(l0.length):n0(void 0)},[a0,l0]),jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column flex-fill gap-16 overflow-hidden",children:[jsxRuntimeExports.jsx(InternalLinker,{appCode:s0,defaultAppCode:i0,defaultResourceId:_e,onSelect:A0,multiple:o0}),jsxRuntimeExports.jsx(Checkbox,{className:"align-items-center",checked:a0,label:r0("bbm.linker.open.tab"),onChange:f0})]})},illuNoContentInFolder="/assets/js/ode-explorer/illu-no-content-in-folder.svg",illuNoContentInFolder$1=Object.freeze(Object.defineProperty({__proto__:null,default:illuNoContentInFolder},Symbol.toStringTag,{value:"Module"}));function useNextcloudSearch(e0,_e,i0){var r0;const[t0,n0]=reactExports.useState({id:e0,name:_e,section:!0}),s0=reactExports.useCallback((c0,k0,d0)=>{n0(h0=>{const b0=findNodeById$1(h0,c0);if(!b0)return h0;const p0=k0.map(m0=>{var g0;const v0=(g0=b0.children)==null?void 0:g0.find(x0=>x0.id===m0.path);return v0?{...v0,name:m0.name}:{id:m0.path,name:m0.name}});return modifyNode$1(h0,m0=>m0.id===b0.id?{...m0,children:p0,files:d0}:m0)})},[]),o0=useQueryClient(),a0=useQuery({queryKey:["nextcloud","oauth2-status",i0],queryFn:()=>odeServices.nextcloud().getOauth2Status(i0),enabled:!!i0}),f0=!((r0=a0.data)!=null&&r0.connected),[l0,u0]=reactExports.useState(null),A0=reactExports.useCallback(async c0=>{if(!i0)return;const k0=c0===e0?void 0:c0;try{const d0=await o0.fetchQuery({queryKey:["nextcloud","documents",i0,k0??"/"],queryFn:()=>odeServices.nextcloud().listDocuments(i0,k0),staleTime:6e4}),h0=[],b0=[],p0=k0??"/";d0.filter(m0=>m0.path!==p0).forEach(m0=>{m0.isFolder?h0.push(m0):b0.push(m0)}),u0(null),s0(c0,h0,b0)}catch(d0){u0(d0)}},[e0,i0,o0,s0]);return{root:t0,needsAuth:f0,isCheckingAuth:a0.isLoading,isAuthError:a0.isError,refetchAuthStatus:a0.refetch,loadContent:A0,loadError:l0}}const roleMappings={csv:{icon:".CSV",color:"bg-orange-200"},xls:{icon:".XLS",color:"bg-green-200"},doc:{icon:".DOC",color:"bg-blue-200"},txt:{icon:".TXT",color:"bg-blue-200"},pdf:{icon:".PDF",color:"bg-red-200"},audio:{icon:jsxRuntimeExports.jsx(SvgIconMic,{width:22,height:22}),color:"bg-red-200"},ppt:{icon:".PPT",color:"bg-red-200"},img:{icon:jsxRuntimeExports.jsx(SvgIconLandscape,{width:22,height:22}),color:"bg-green-200"},video:{icon:jsxRuntimeExports.jsx(SvgIconVideo,{width:22,height:22}),color:"bg-purple-200"},zip:{icon:".ZIP",color:"bg-gray-300"},md:{icon:".MD",color:"bg-blue-200"},unknown:{icon:jsxRuntimeExports.jsx(SvgIconTextPage,{width:22,height:22}),color:"bg-gray-300"}};function getRoleMap(e0,_e,i0){return _e!==void 0||i0!==void 0?{icon:_e||jsxRuntimeExports.jsx(SvgIconTextPage,{width:22,height:22}),color:i0||"bg-gray-300",hasShadow:!1}:roleMappings[e0]??roleMappings.unknown}const NextcloudFileCard=({doc:e0,userId:_e,isClickable:i0=!0,isSelectable:r0=!1,isSelected:t0=!1,onClick:n0,className:s0,onSelect:o0,isFocused:a0,app:f0,customIcon:l0,customColor:u0})=>{const A0=reactExports.useRef(null),c0=DocumentHelper.role(e0.contentType,!1),k0=getRoleMap(c0??"unknown",l0,u0),d0=clsx("file position-relative rounded",(k0==null?void 0:k0.color)??"bg-yellow-200"),h0=c0==="img"?odeServices.nextcloud().getFileUrl(_e,e0):null,b0=useThumbnail(h0,{ref:A0}),p0=b0&&{backgroundImage:`url(${h0})`,backgroundSize:"cover"};return jsxRuntimeExports.jsx(Card,{className:clsx("card-file",s0),isClickable:i0,isSelectable:r0,isSelected:t0,onClick:n0,app:f0,isFocused:a0,onSelect:o0,children:jsxRuntimeExports.jsxs(Card.Body,{space:"8",children:[jsxRuntimeExports.jsx("div",{ref:A0,className:d0,style:{aspectRatio:"16/10",...p0},children:c0!=="img"||!b0?jsxRuntimeExports.jsx(FileIcon,{type:c0,roleMap:k0}):null}),jsxRuntimeExports.jsxs("div",{className:"mt-4",children:[jsxRuntimeExports.jsx(Card.Text,{children:e0.name}),jsxRuntimeExports.jsx(Card.Text,{className:"text-black-50",children:e0==null?void 0:e0.ownerDisplayName})]})]})})},ROOT_ID="root";function compare(e0,_e){return e0===_e?0:e0===void 0?-1:_e===void 0?1:e0.localeCompare(_e)}const Nextcloud$1=({onSelect:e0,multiple:_e=!0,roles:i0,className:r0})=>{const{t:t0}=useTranslation(),{user:n0}=useUser(),s0=useToast(),{root:o0,needsAuth:a0,isCheckingAuth:f0,isAuthError:l0,refetchAuthStatus:u0,loadContent:A0,loadError:c0}=useNextcloudSearch(ROOT_ID,t0("nextcloud"),n0==null?void 0:n0.userId),k0=reactExports.useRef(null),[d0,h0]=reactExports.useState(ROOT_ID),b0=findNodeById$1(o0,d0)??o0,[p0,m0]=reactExports.useState(void 0),[g0,v0]=reactExports.useState(["modified","desc"]),[x0,w0]=reactExports.useState([]),_0=reactExports.useCallback(C0=>{h0(C0),A0(C0)},[A0]);reactExports.useEffect(()=>{a0||A0(ROOT_ID)},[A0,a0]);const y0=reactExports.useMemo(()=>{if(!b0.files)return;const C0=j0=>{if(!i0)return!0;const D0=DocumentHelper.role(j0.contentType,!1);return Array.isArray(i0)?i0.includes(D0):i0===D0},G0=p0==null?void 0:p0.toLowerCase(),F0=b0.files.filter(j0=>(!G0||j0.name.toLowerCase().includes(G0))&&C0(j0));let M0;return g0[0]==="name"?M0=g0[1]==="asc"?(j0,D0)=>compare(j0.name,D0.name):(j0,D0)=>compare(D0.name,j0.name):M0=(j0,D0)=>compare(D0.lastModified,j0.lastModified),F0.sort(M0)},[b0,p0,g0,i0]),S0=reactExports.useMemo(()=>new Set(x0.map(C0=>C0.path)),[x0]),B0=reactExports.useCallback(C0=>{m0(C0.target.value)},[m0]);function I0(){return g0[0]==="name"?g0[1]==="asc"?t0("sort.order.alpha.asc"):t0("sort.order.alpha.desc"):t0("sort.order.modify.desc")}function T0(C0){let G0=[...x0];_e?G0.some(F0=>F0.path===C0.path)?G0=G0.filter(F0=>F0.path!==C0.path):G0=[...G0,C0]:G0=[C0],w0(G0),e0(G0)}const R0=clsx("workspace flex-grow-1 gap-0",r0),E0=()=>{k0.current=window.open(`${window.location.origin}/nextcloud/user/oauth2/init`,"","popup, height=600, width=400"),k0.current||s0.error(t0("nextcloud.auth.popupBlocked"))};return reactExports.useEffect(()=>{function C0(G0){var F0;G0.origin!==window.location.origin||((F0=G0.data)==null?void 0:F0.type)!=="nextcloud-connected"||(k0.current&&!k0.current.closed&&k0.current.close(),u0())}return window.addEventListener("message",C0),()=>window.removeEventListener("message",C0)},[u0]),f0?jsxRuntimeExports.jsx(LoadingScreen,{}):l0?jsxRuntimeExports.jsxs(Flex,{direction:"column",gap:"12",className:"h-full w-100",justify:"center",align:"center",children:[jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuError,title:t0("nextcloud.error.title"),text:t0("nextcloud.error.description")}),jsxRuntimeExports.jsx(Button,{onClick:()=>u0(),children:t0("retry")})]}):a0?jsxRuntimeExports.jsxs(Flex,{direction:"column",gap:"12",className:"h-full w-100",justify:"center",align:"center",children:[jsxRuntimeExports.jsxs(Flex,{direction:"column",gap:"8",justify:"center",align:"center",children:[jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuNoContentInFolder}),jsxRuntimeExports.jsx("h2",{className:"h2 text-secondary mb-8",children:t0("nextcloud.auth.title")}),jsxRuntimeExports.jsx("div",{className:"text",children:t0("nextcloud.auth.description")})]}),jsxRuntimeExports.jsx(Button,{onClick:E0,children:t0("nextcloud.auth.connect")})]}):jsxRuntimeExports.jsxs(Grid,{className:R0,children:[jsxRuntimeExports.jsx(Grid.Col,{sm:"12",md:"3",xl:"4",className:"workspace-folders p-12 pt-0 gap-12",children:jsxRuntimeExports.jsx("div",{style:{position:"sticky",top:0,paddingTop:"1.2rem"},children:jsxRuntimeExports.jsx(Tree,{nodes:o0,selectedNodeId:d0,showIcon:!0,onTreeItemClick:_0,onTreeItemUnfold:_0})})}),jsxRuntimeExports.jsx(Grid.Col,{sm:"12",md:"5",xl:"8",children:jsxRuntimeExports.jsxs(Grid,{className:"flex-grow-1 gap-0",children:[jsxRuntimeExports.jsxs(Grid.Col,{sm:"4",md:"8",xl:"12",children:[jsxRuntimeExports.jsx("div",{className:"workspace-search px-16 py-8 ",children:jsxRuntimeExports.jsx(SearchBar,{isVariant:!0,className:"gap-16",onChange:B0})}),jsxRuntimeExports.jsxs(Flex,{className:"px-8 py-4",align:"center",justify:"end",children:[jsxRuntimeExports.jsx("small",{className:"text-muted",children:t0("workspace.search.order")}),jsxRuntimeExports.jsxs(Dropdown,{children:[jsxRuntimeExports.jsx(Dropdown.Trigger,{size:"sm",label:I0(),variant:"ghost"}),jsxRuntimeExports.jsxs(Dropdown.Menu,{children:[jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortTime,{}),onClick:()=>v0(["modified","desc"]),children:t0("sort.order.modify.desc")}),jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortAscendingLetters,{}),onClick:()=>v0(["name","asc"]),children:t0("sort.order.alpha.asc")}),jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortDescendingLetters,{}),onClick:()=>v0(["name","desc"]),children:t0("sort.order.alpha.desc")})]})]})]})]}),jsxRuntimeExports.jsx(Grid.Col,{sm:"4",md:"8",xl:"12",className:"p-8 gap-8",children:c0?jsxRuntimeExports.jsxs(Flex,{direction:"column",gap:"12",className:"h-full w-100",justify:"center",align:"center",children:[jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuError,title:t0("nextcloud.error.title"),text:t0("nextcloud.error.description")}),jsxRuntimeExports.jsx(Button,{onClick:()=>A0(d0),children:t0("retry")})]}):y0?y0.length!==0?jsxRuntimeExports.jsx("div",{className:"grid grid-workspace",children:y0.map(C0=>{const G0=S0.has(C0.path);return jsxRuntimeExports.jsx(NextcloudFileCard,{doc:C0,userId:n0.userId,isSelected:G0,onClick:()=>T0(C0)},C0.path)})}):jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuTrash,text:t0("workspace.empty.docSpace"),title:t0("explorer.emptyScreen.trash.title")}):jsxRuntimeExports.jsx(LoadingScreen,{})})]})})]})},Nextcloud=()=>{const{appCode:e0,visibility:_e,type:i0,setResultCounter:r0,setResult:t0,setPreSuccess:n0,multiple:s0}=useMediaLibraryContext(),{user:o0}=useUser();function a0(){switch(i0){case"image":return"img";case"audio":return"audio";case"video":return"video";default:return null}}function f0(l0){r0(l0.length),l0.length?(t0(l0),n0(()=>()=>o0!=null&&o0.userId?odeServices.nextcloud().copyDocumentToWorkspace(o0.userId,l0.map(u0=>u0.path),void 0,{application:e0,visibility:_e}):Promise.resolve([]))):(t0(),n0(void 0))}return jsxRuntimeExports.jsx(Nextcloud$1,{roles:a0(),onSelect:f0,multiple:s0,className:"border rounded overflow-y-auto"})};var uaParser={exports:{}};(function(e0,_e){(function(i0,r0){var t0="1.0.36",n0="",s0="?",o0="function",a0="undefined",f0="object",l0="string",u0="major",A0="model",c0="name",k0="type",d0="vendor",h0="version",b0="architecture",p0="console",m0="mobile",g0="tablet",v0="smarttv",x0="wearable",w0="embedded",_0=350,y0="Amazon",S0="Apple",B0="ASUS",I0="BlackBerry",T0="Browser",R0="Chrome",E0="Edge",C0="Firefox",G0="Google",F0="Huawei",M0="LG",j0="Microsoft",D0="Motorola",$0="Opera",X0="Samsung",Z0="Sharp",N0="Sony",Q0="Xiaomi",z0="Zebra",K0="Facebook",H0="Chromium OS",J0="Mac OS",Y0=function(U0,L0){var q0={};for(var r2 in U0)L0[r2]&&L0[r2].length%2===0?q0[r2]=L0[r2].concat(U0[r2]):q0[r2]=U0[r2];return q0},e2=function(U0){for(var L0={},q0=0;q0<U0.length;q0++)L0[U0[q0].toUpperCase()]=U0[q0];return L0},s2=function(U0,L0){return typeof U0===l0?u2(L0).indexOf(u2(U0))!==-1:!1},u2=function(U0){return U0.toLowerCase()},A2=function(U0){return typeof U0===l0?U0.replace(/[^\d\.]/g,n0).split(".")[0]:r0},k2=function(U0,L0){if(typeof U0===l0)return U0=U0.replace(/^\s\s*/,n0),typeof L0===a0?U0:U0.substring(0,_0)},b2=function(U0,L0){for(var q0=0,r2,f2,d2,a2,t2,E2;q0<L0.length&&!t2;){var O2=L0[q0],X2=L0[q0+1];for(r2=f2=0;r2<O2.length&&!t2&&O2[r2];)if(t2=O2[r2++].exec(U0),t2)for(d2=0;d2<X2.length;d2++)E2=t2[++f2],a2=X2[d2],typeof a2===f0&&a2.length>0?a2.length===2?typeof a2[1]==o0?this[a2[0]]=a2[1].call(this,E2):this[a2[0]]=a2[1]:a2.length===3?typeof a2[1]===o0&&!(a2[1].exec&&a2[1].test)?this[a2[0]]=E2?a2[1].call(this,E2,a2[2]):r0:this[a2[0]]=E2?E2.replace(a2[1],a2[2]):r0:a2.length===4&&(this[a2[0]]=E2?a2[3].call(this,E2.replace(a2[1],a2[2])):r0):this[a2]=E2||r0;q0+=2}},v2=function(U0,L0){for(var q0 in L0)if(typeof L0[q0]===f0&&L0[q0].length>0){for(var r2=0;r2<L0[q0].length;r2++)if(s2(L0[q0][r2],U0))return q0===s0?r0:q0}else if(s2(L0[q0],U0))return q0===s0?r0:q0;return U0},x2={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},p2={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},P0={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h0,[c0,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h0,[c0,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c0,h0],[/opios[\/ ]+([\w\.]+)/i],[h0,[c0,$0+" Mini"]],[/\bopr\/([\w\.]+)/i],[h0,[c0,$0]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c0,h0],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h0,[c0,"UC"+T0]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[h0,[c0,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h0,[c0,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h0,[c0,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h0,[c0,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h0,[c0,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c0,/(.+)/,"$1 Secure "+T0],h0],[/\bfocus\/([\w\.]+)/i],[h0,[c0,C0+" Focus"]],[/\bopt\/([\w\.]+)/i],[h0,[c0,$0+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h0,[c0,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h0,[c0,"Dolphin"]],[/coast\/([\w\.]+)/i],[h0,[c0,$0+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h0,[c0,"MIUI "+T0]],[/fxios\/([-\w\.]+)/i],[h0,[c0,C0]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c0,"360 "+T0]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[c0,/(.+)/,"$1 "+T0],h0],[/(comodo_dragon)\/([\w\.]+)/i],[[c0,/_/g," "],h0],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c0,h0],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[c0],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c0,K0],h0],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c0,h0],[/\bgsa\/([\w\.]+) .*safari\//i],[h0,[c0,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h0,[c0,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h0,[c0,R0+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c0,R0+" WebView"],h0],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h0,[c0,"Android "+T0]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c0,h0],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h0,[c0,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h0,c0],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c0,[h0,v2,x2]],[/(webkit|khtml)\/([\w\.]+)/i],[c0,h0],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c0,"Netscape"],h0],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h0,[c0,C0+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[c0,h0],[/(cobalt)\/([\w\.]+)/i],[c0,[h0,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[b0,"amd64"]],[/(ia32(?=;))/i],[[b0,u2]],[/((?:i[346]|x)86)[;\)]/i],[[b0,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[b0,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b0,"armhf"]],[/windows (ce|mobile); ppc;/i],[[b0,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[b0,/ower/,n0,u2]],[/(sun4\w)[;\)]/i],[[b0,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b0,u2]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[A0,[d0,X0],[k0,g0]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[A0,[d0,X0],[k0,m0]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[A0,[d0,S0],[k0,m0]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[A0,[d0,S0],[k0,g0]],[/(macintosh);/i],[A0,[d0,S0]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[A0,[d0,Z0],[k0,m0]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[A0,[d0,F0],[k0,g0]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[A0,[d0,F0],[k0,m0]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[A0,/_/g," "],[d0,Q0],[k0,m0]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[A0,/_/g," "],[d0,Q0],[k0,g0]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[A0,[d0,"OPPO"],[k0,m0]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[A0,[d0,"Vivo"],[k0,m0]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[A0,[d0,"Realme"],[k0,m0]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[A0,[d0,D0],[k0,m0]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[A0,[d0,D0],[k0,g0]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[A0,[d0,M0],[k0,g0]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[A0,[d0,M0],[k0,m0]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[A0,[d0,"Lenovo"],[k0,g0]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[A0,/_/g," "],[d0,"Nokia"],[k0,m0]],[/(pixel c)\b/i],[A0,[d0,G0],[k0,g0]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[A0,[d0,G0],[k0,m0]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[A0,[d0,N0],[k0,m0]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[A0,"Xperia Tablet"],[d0,N0],[k0,g0]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[A0,[d0,"OnePlus"],[k0,m0]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[A0,[d0,y0],[k0,g0]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[A0,/(.+)/g,"Fire Phone $1"],[d0,y0],[k0,m0]],[/(playbook);[-\w\),; ]+(rim)/i],[A0,d0,[k0,g0]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[A0,[d0,I0],[k0,m0]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[A0,[d0,B0],[k0,g0]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[A0,[d0,B0],[k0,m0]],[/(nexus 9)/i],[A0,[d0,"HTC"],[k0,g0]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d0,[A0,/_/g," "],[k0,m0]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[A0,[d0,"Acer"],[k0,g0]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[A0,[d0,"Meizu"],[k0,m0]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d0,A0,[k0,m0]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d0,A0,[k0,g0]],[/(surface duo)/i],[A0,[d0,j0],[k0,g0]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[A0,[d0,"Fairphone"],[k0,m0]],[/(u304aa)/i],[A0,[d0,"AT&T"],[k0,m0]],[/\bsie-(\w*)/i],[A0,[d0,"Siemens"],[k0,m0]],[/\b(rct\w+) b/i],[A0,[d0,"RCA"],[k0,g0]],[/\b(venue[\d ]{2,7}) b/i],[A0,[d0,"Dell"],[k0,g0]],[/\b(q(?:mv|ta)\w+) b/i],[A0,[d0,"Verizon"],[k0,g0]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[A0,[d0,"Barnes & Noble"],[k0,g0]],[/\b(tm\d{3}\w+) b/i],[A0,[d0,"NuVision"],[k0,g0]],[/\b(k88) b/i],[A0,[d0,"ZTE"],[k0,g0]],[/\b(nx\d{3}j) b/i],[A0,[d0,"ZTE"],[k0,m0]],[/\b(gen\d{3}) b.+49h/i],[A0,[d0,"Swiss"],[k0,m0]],[/\b(zur\d{3}) b/i],[A0,[d0,"Swiss"],[k0,g0]],[/\b((zeki)?tb.*\b) b/i],[A0,[d0,"Zeki"],[k0,g0]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d0,"Dragon Touch"],A0,[k0,g0]],[/\b(ns-?\w{0,9}) b/i],[A0,[d0,"Insignia"],[k0,g0]],[/\b((nxa|next)-?\w{0,9}) b/i],[A0,[d0,"NextBook"],[k0,g0]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d0,"Voice"],A0,[k0,m0]],[/\b(lvtel\-)?(v1[12]) b/i],[[d0,"LvTel"],A0,[k0,m0]],[/\b(ph-1) /i],[A0,[d0,"Essential"],[k0,m0]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[A0,[d0,"Envizen"],[k0,g0]],[/\b(trio[-\w\. ]+) b/i],[A0,[d0,"MachSpeed"],[k0,g0]],[/\btu_(1491) b/i],[A0,[d0,"Rotor"],[k0,g0]],[/(shield[\w ]+) b/i],[A0,[d0,"Nvidia"],[k0,g0]],[/(sprint) (\w+)/i],[d0,A0,[k0,m0]],[/(kin\.[onetw]{3})/i],[[A0,/\./g," "],[d0,j0],[k0,m0]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[A0,[d0,z0],[k0,g0]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[A0,[d0,z0],[k0,m0]],[/smart-tv.+(samsung)/i],[d0,[k0,v0]],[/hbbtv.+maple;(\d+)/i],[[A0,/^/,"SmartTV"],[d0,X0],[k0,v0]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d0,M0],[k0,v0]],[/(apple) ?tv/i],[d0,[A0,S0+" TV"],[k0,v0]],[/crkey/i],[[A0,R0+"cast"],[d0,G0],[k0,v0]],[/droid.+aft(\w+)( bui|\))/i],[A0,[d0,y0],[k0,v0]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[A0,[d0,Z0],[k0,v0]],[/(bravia[\w ]+)( bui|\))/i],[A0,[d0,N0],[k0,v0]],[/(mitv-\w{5}) bui/i],[A0,[d0,Q0],[k0,v0]],[/Hbbtv.*(technisat) (.*);/i],[d0,A0,[k0,v0]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d0,k2],[A0,k2],[k0,v0]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[k0,v0]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d0,A0,[k0,p0]],[/droid.+; (shield) bui/i],[A0,[d0,"Nvidia"],[k0,p0]],[/(playstation [345portablevi]+)/i],[A0,[d0,N0],[k0,p0]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[A0,[d0,j0],[k0,p0]],[/((pebble))app/i],[d0,A0,[k0,x0]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[A0,[d0,S0],[k0,x0]],[/droid.+; (glass) \d/i],[A0,[d0,G0],[k0,x0]],[/droid.+; (wt63?0{2,3})\)/i],[A0,[d0,z0],[k0,x0]],[/(quest( 2| pro)?)/i],[A0,[d0,K0],[k0,x0]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d0,[k0,w0]],[/(aeobc)\b/i],[A0,[d0,y0],[k0,w0]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[A0,[k0,m0]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[A0,[k0,g0]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[k0,g0]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[k0,m0]],[/(android[-\w\. ]{0,9});.+buil/i],[A0,[d0,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h0,[c0,E0+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h0,[c0,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c0,h0],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h0,c0]],os:[[/microsoft (windows) (vista|xp)/i],[c0,h0],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c0,[h0,v2,p2]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c0,"Windows"],[h0,v2,p2]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h0,/_/g,"."],[c0,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c0,J0],[h0,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h0,c0],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c0,h0],[/\(bb(10);/i],[h0,[c0,I0]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h0,[c0,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h0,[c0,C0+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h0,[c0,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h0,[c0,"watchOS"]],[/crkey\/([\d\.]+)/i],[h0,[c0,R0+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c0,H0],h0],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c0,h0],[/(sunos) ?([\w\.\d]*)/i],[[c0,"Solaris"],h0],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c0,h0]]},V0=function(U0,L0){if(typeof U0===f0&&(L0=U0,U0=r0),!(this instanceof V0))return new V0(U0,L0).getResult();var q0=typeof i0!==a0&&i0.navigator?i0.navigator:r0,r2=U0||(q0&&q0.userAgent?q0.userAgent:n0),f2=q0&&q0.userAgentData?q0.userAgentData:r0,d2=L0?Y0(P0,L0):P0,a2=q0&&q0.userAgent==r2;return this.getBrowser=function(){var t2={};return t2[c0]=r0,t2[h0]=r0,b2.call(t2,r2,d2.browser),t2[u0]=A2(t2[h0]),a2&&q0&&q0.brave&&typeof q0.brave.isBrave==o0&&(t2[c0]="Brave"),t2},this.getCPU=function(){var t2={};return t2[b0]=r0,b2.call(t2,r2,d2.cpu),t2},this.getDevice=function(){var t2={};return t2[d0]=r0,t2[A0]=r0,t2[k0]=r0,b2.call(t2,r2,d2.device),a2&&!t2[k0]&&f2&&f2.mobile&&(t2[k0]=m0),a2&&t2[A0]=="Macintosh"&&q0&&typeof q0.standalone!==a0&&q0.maxTouchPoints&&q0.maxTouchPoints>2&&(t2[A0]="iPad",t2[k0]=g0),t2},this.getEngine=function(){var t2={};return t2[c0]=r0,t2[h0]=r0,b2.call(t2,r2,d2.engine),t2},this.getOS=function(){var t2={};return t2[c0]=r0,t2[h0]=r0,b2.call(t2,r2,d2.os),a2&&!t2[c0]&&f2&&f2.platform!="Unknown"&&(t2[c0]=f2.platform.replace(/chrome os/i,H0).replace(/macos/i,J0)),t2},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r2},this.setUA=function(t2){return r2=typeof t2===l0&&t2.length>_0?k2(t2,_0):t2,this},this.setUA(r2),this};V0.VERSION=t0,V0.BROWSER=e2([c0,h0,u0]),V0.CPU=e2([b0]),V0.DEVICE=e2([A0,d0,k0,p0,m0,v0,g0,x0,w0]),V0.ENGINE=V0.OS=e2([c0,h0]),e0.exports&&(_e=e0.exports=V0),_e.UAParser=V0;var O0=typeof i0!==a0&&(i0.jQuery||i0.Zepto);if(O0&&!O0.ua){var _i=new V0;O0.ua=_i.getResult(),O0.ua.get=function(){return _i.getUA()},O0.ua.set=function(U0){_i.setUA(U0);var L0=_i.getResult();for(var q0 in L0)O0.ua[q0]=L0[q0]}}})(typeof window=="object"?window:commonjsGlobal$1)})(uaParser,uaParser.exports);var uaParserExports=uaParser.exports;function useBrowserInfo(e0){const _e=new uaParserExports.UAParser(e0),i0=_e.getOS(),r0=_e.getDevice(),t0=_e.getBrowser(),n0=r0.model??"",s0=n0.includes("iPhone"),o0=n0.includes("iPod"),a0=n0.includes("iPad");return{os:i0,device:r0,browser:t0,isIphone:s0,isIpod:o0,isIpad:a0}}const useUpload=(e0,_e="media-library")=>{const[i0,r0]=reactExports.useState({}),{browser:t0,device:n0}=useBrowserInfo(navigator.userAgent),{create:s0}=useWorkspaceFile(),{t:o0}=useTranslation(),a0=reactExports.useCallback(h0=>i0[s$1(h0)],[i0]),f0=(h0,b0)=>{r0(p0=>{const m0=s$1(h0);return{...p0,[m0]:b0}})},l0=h0=>{r0(b0=>{const p0=s$1(h0),{[p0]:m0,...g0}=b0;return g0})},u0=()=>{const h0=new Date;return`${h0.getFullYear()}-${String(h0.getMonth()+1).padStart(2,"0")}-${String(h0.getDate()).padStart(2,"0")} ${String(h0.getHours()).padStart(2,"0")}h${String(h0.getMinutes()).padStart(2,"0")} `+o0("bbm.video.recorder.defaultName")};async function A0(h0,b0){f0(h0,"loading");try{let p0;return _e==="media-library"&&h0.type.includes("video")?p0=await k0(h0,{filename:h0.name,...b0}):p0=await s0(h0,{application:_e,visibility:e0}),f0(h0,"success"),p0}catch(p0){return console.error(p0),f0(h0,"error"),null}}async function c0(h0,b0){f0(h0,"loading");try{let p0;if(h0.type.includes("video"))p0=await k0(h0,b0);else throw new Error(ERROR_CODE.NOT_SUPPORTED);return f0(h0,"success"),p0}catch(p0){return console.error(p0),f0(h0,"error"),null}}const k0=async(h0,b0)=>{const p0={data:{device:n0.type,browser:{name:t0.name,version:t0.version},url:window.location.hostname,file:h0,filename:u0()??"filename",weight:h0.size},appCode:_e,captation:!(h0 instanceof File),duration:(b0==null?void 0:b0.duration)??0},m0=await odeServices.video().upload(p0);if(m0.state==="succeed")return{_id:m0.videoworkspaceid,file:m0.videoid,name:p0.data.filename,eType:"file",eParent:"",children:[],created:new Date,_shared:[],isShared:!1,owner:""};throw m0.state==="error"?new Error(m0.code||"Error while uploading video"):new Error("Video encoding is still running")};function d0(h0,b0,p0){return s$1(b0,s$1(h0)),A0(b0,p0)}return{getUploadStatus:a0,setUploadStatus:f0,clearUploadStatus:l0,uploadFile:A0,uploadAlternateFile:d0,uploadBlob:c0}},useUploadFiles=({handleOnChange:e0,visibility:_e,application:i0})=>{const[r0,t0]=reactExports.useState([]),n0=reactExports.useRef({}),[s0,o0]=reactExports.useState(void 0),{files:a0,deleteFile:f0,replaceFileAt:l0,inputRef:u0}=useDropzoneContext(),{remove:A0,createOrUpdate:c0}=useWorkspaceFile(),{getUploadStatus:k0,setUploadStatus:d0,clearUploadStatus:h0,uploadFile:b0,uploadAlternateFile:p0}=useUpload(_e,i0),m0=reactExports.useCallback(()=>{u0.current&&(u0.current.value="")},[u0]),g0=reactExports.useCallback(y0=>{y0.forEach(async(S0,B0)=>{if(S0==null)return;let I0,T0;if(S0.type.startsWith("image"))try{T0=await p$5.resizeImageFile(S0),I0=await p0(S0,T0),l0(B0,T0)}catch(R0){console.error(R0)}!I0&&!T0&&(I0=await b0(S0)),I0?(I0._id&&(n0.current[I0._id]={name:S0.name,lastModified:S0.lastModified}),t0(R0=>[...R0,I0])):m0()})},[p0,b0,l0]);reactExports.useEffect(()=>{let y0=0;const S0=a0.map(B0=>{if(y0>=5)return null;const I0=k0(B0);return I0==="loading"&&y0++,I0?null:B0});S0.forEach(B0=>B0&&d0(B0,"idle")),g0(S0)},[a0,r0,k0,d0,g0]),reactExports.useEffect(()=>{const y0=v0(a0,r0);e0(y0,{...n0.current})},[r0]);const v0=(y0,S0)=>{const B0=y0.reduce((I0,T0,R0)=>(T0.name in I0||(I0[T0.name]=R0),I0),{});return[...S0].sort((I0,T0)=>(B0[I0.name]??Number.MAX_SAFE_INTEGER)-(B0[T0.name]??Number.MAX_SAFE_INTEGER))};async function x0(y0){const S0=r0.find(B0=>B0.name===y0.name);S0&&(await A0(S0),h0(y0),S0._id&&delete n0.current[S0._id],t0(B0=>B0.filter(I0=>I0.name!==(S0==null?void 0:S0.name)))),f0(y0),m0()}async function w0({blob:y0,legend:S0,altText:B0}){if(s0)try{const I0=await c0({blob:y0,legend:S0,alt:B0,uri:_0(s0)});I0&&typeof I0=="object"&&t0(T0=>T0.map(R0=>R0._id===I0.file._id?{...I0.file,title:S0,alt:B0}:R0))}finally{o0(void 0)}}const _0=(y0,S0)=>{const B0=`/workspace/${y0!=null&&y0.public?"pub/":""}document/${y0==null?void 0:y0._id}`;return y0?S0?m$5(B0):B0:""};return{files:a0,getUploadStatus:k0,clearUploadStatus:h0,uploadedFiles:r0,editingImage:s0,setEditingImage:o0,getUrl:_0,updateImage:w0,uploadFile:b0,removeFile:x0}},SvgIconWand=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 0a1 1 0 0 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 0 2 1 1 0 0 0-1 1 1 1 0 1 1-2 0 1 1 0 0 0-1-1 1 1 0 0 1 0-2 1 1 0 0 0 1-1 1 1 0 0 1 1-1m9.914 2a2 2 0 0 0-2.828 0L1 18.086a2 2 0 0 0 0 2.828L3.086 23a2 2 0 0 0 2.828 0L22 6.914a2 2 0 0 0 0-2.828zm-3.75 3.75L18.5 3.414 20.586 5.5 18.25 7.836zM14.75 7.164 2.414 19.5 4.5 21.586 16.836 9.25zM21 13a1 1 0 1 0-2 0 1 1 0 0 1-1 1 1 1 0 1 0 0 2 1 1 0 0 1 1 1 1 1 0 1 0 2 0 1 1 0 0 1 1-1 1 1 0 1 0 0-2 1 1 0 0 1-1-1",clipRule:"evenodd"})]}),UploadCard=({item:e0,status:_e="idle",isClickable:i0=!1,isSelectable:r0=!1,onDelete:t0,onEdit:n0,onRetry:s0})=>{const{t:o0}=useTranslation(),{src:a0,name:f0,info:l0}=e0,u0=_e==="idle",A0=_e==="loading",c0=_e==="success",k0=l0==null?void 0:l0.type.startsWith("image"),d0={text:"",context:null,image:jsxRuntimeExports.jsx("img",{src:commonPlaceholder,alt:"",width:"48",height:"48"})},h0={error:{text:jsxRuntimeExports.jsx("strong",{children:jsxRuntimeExports.jsx("small",{className:"text-danger caption",children:o0("tiptap.upload.error")})}),context:jsxRuntimeExports.jsx(Button,{leftIcon:jsxRuntimeExports.jsx(SvgIconReset,{}),variant:"ghost",color:"tertiary",onClick:s0,children:o0("tiptap.upload.retry")}),image:jsxRuntimeExports.jsx(Image$1,{alt:"",src:`${commonPlaceholder}/common/image-status-error.svg`,objectFit:"cover"})},idle:d0,loading:{text:"",context:jsxRuntimeExports.jsx(Tooltip,{message:o0("tiptap.tooltip.upload.loading"),placement:"top",children:jsxRuntimeExports.jsx(Loading,{isLoading:!0,loadingPosition:"left",className:"text-secondary"})}),image:d0.image},warning:d0,success:{text:jsxRuntimeExports.jsxs("em",{children:[l0==null?void 0:l0.type," ",(l0==null?void 0:l0.weight)&&`- ${l0.weight}`]}),context:jsxRuntimeExports.jsx(Tooltip,{message:o0("tiptap.tooltip.upload.loaded"),placement:"top",children:jsxRuntimeExports.jsx(SvgIconSuccessOutline,{className:"text-success"})}),image:jsxRuntimeExports.jsx(Image$1,{alt:"",src:a0??"",width:"48",objectFit:"cover",className:"rounded",style:{aspectRatio:1/1}})},unknown:d0},b0=()=>k0&&jsxRuntimeExports.jsx(Tooltip,{message:o0("tiptap.tooltip.upload.edit"),placement:"top",children:jsxRuntimeExports.jsx(IconButton,{icon:jsxRuntimeExports.jsx(SvgIconWand,{}),variant:"ghost","aria-label":o0("tiptap.tooltip.upload.loading"),disabled:A0||!c0,onClick:n0,color:"secondary"})});return jsxRuntimeExports.jsx(Card,{isClickable:i0,isSelectable:r0,className:"card-upload",children:jsxRuntimeExports.jsxs(Card.Body,{children:[jsxRuntimeExports.jsx("div",{className:"card-image",children:h0[_e].image}),jsxRuntimeExports.jsxs("div",{className:"text-truncate",children:[jsxRuntimeExports.jsx(Card.Text,{children:f0}),jsxRuntimeExports.jsx(Card.Text,{className:"caption",children:h0[_e].text})]}),!u0&&jsxRuntimeExports.jsx("div",{className:"ms-auto",children:jsxRuntimeExports.jsxs("div",{className:"d-flex align-items-center gap-12",children:[h0[_e].context,!u0&&jsxRuntimeExports.jsx("div",{className:"vr"}),b0(),jsxRuntimeExports.jsx(Tooltip,{message:o0("tiptap.tooltip.upload.delete"),placement:"top",children:jsxRuntimeExports.jsx(IconButton,{icon:jsxRuntimeExports.jsx(SvgIconClose,{}),variant:"ghost","aria-label":o0("tiptap.tooltip.upload.delete"),color:"tertiary",onClick:t0})})]})})]})})},ImageEditor=reactExports.lazy(async()=>await __vitePreload(()=>Promise.resolve().then(()=>ImageEditor$2),void 0)),UploadFiles=({onFilesChange:e0,visibility:_e="protected"})=>{const{files:i0,uploadedFiles:r0,getUploadStatus:t0,uploadFile:n0,removeFile:s0,updateImage:o0,editingImage:a0,setEditingImage:f0,getUrl:l0}=useUploadFiles({handleOnChange:e0,application:"media-library",visibility:_e}),u0=reactExports.useRef(new Map);reactExports.useEffect(()=>{const k0=u0.current;return()=>{k0.forEach(d0=>URL.revokeObjectURL(d0)),k0.clear()}},[]);const A0=k0=>{const d0=k0.type.startsWith("image")?u0.current.get(k0.name):"";return u0.current.has(k0.name)||u0.current.set(k0.name,URL.createObjectURL(k0)),{name:k0.name,info:{type:k0.type,weight:c$2(k0.size||0,1)},src:d0}},c0=k0=>{const d0=u0.current.get(k0.name);d0&&(URL.revokeObjectURL(d0),u0.current.delete(k0.name)),s0(k0)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[i0.map(k0=>{const d0=r0.find(h0=>h0.name===k0.name);return jsxRuntimeExports.jsx(UploadCard,{status:t0(k0),item:A0(k0),onEdit:()=>f0(d0),onRetry:()=>n0(k0),onDelete:()=>c0(k0)},k0.name)}),a0&&jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(LoadingScreen,{position:!1}),children:jsxRuntimeExports.jsx(ImageEditor,{altText:a0.alt,legend:a0.title,image:l0(a0,!0),isOpen:!!a0,onCancel:()=>f0(void 0),onSave:o0,onError:console.error})})]})},acceptedTypes=e0=>{const _e=[];switch(e0){case"audio":_e.push("audio/*");break;case"video":_e.push("video/*");break;case"image":_e.push("image/png"),_e.push("image/jpeg"),_e.push("image/webp"),_e.push("image/gif"),_e.push("image/avif"),_e.push("image/heic");break}return _e},orderUploadedFiles=(e0,_e,i0)=>{const r0=s0=>s0._id?_e[s0._id]:void 0,t0=s0=>{var o0;return((o0=r0(s0))==null?void 0:o0.name)??s0.name},n0=s0=>{var o0;return((o0=r0(s0))==null?void 0:o0.lastModified)??0};return i0?[...e0].sort((s0,o0)=>t0(s0).localeCompare(t0(o0),void 0,{numeric:!0})):[...e0].sort((s0,o0)=>n0(o0)-n0(s0)).reverse()},Upload=()=>{const{t:e0}=useTranslation(),{type:_e,visibility:i0,multiple:r0,setResult:t0,setResultCounter:n0,setCancellable:s0,setPreSuccess:o0}=useMediaLibraryContext(),[a0,f0]=reactExports.useState(!0),[l0,u0]=reactExports.useState([]),A0=reactExports.useRef({}),c0=(k0,d0)=>{A0.current=d0,u0(k0),k0.length?(s0(k0),n0(k0.length),t0(k0)):(s0([]),n0(void 0),t0(void 0))};return reactExports.useEffect(()=>{if(!r0||!l0.length){o0(void 0);return}o0(()=>()=>Promise.resolve(orderUploadedFiles(l0,A0.current,a0)))},[r0,l0,a0,o0]),jsxRuntimeExports.jsxs("div",{className:"flex-grow-1",children:[r0&&jsxRuntimeExports.jsxs(Flex,{className:"mb-16 ms-8",align:"start",direction:"column",gap:"8",children:[jsxRuntimeExports.jsxs("div",{children:[e0("bbm.upload.sort.title")," :"]}),jsxRuntimeExports.jsx(Radio,{label:e0("bbm.upload.sort.alpha"),name:"media-library-upload-sort",value:"alpha",model:a0?"alpha":"date",checked:a0,onChange:()=>f0(!0),"data-testid":"media-library-upload-sort-alpha"}),jsxRuntimeExports.jsx(Radio,{label:e0("bbm.upload.sort.date"),name:"media-library-upload-sort",value:"date",model:a0?"alpha":"date",checked:!a0,onChange:()=>f0(!1),"data-testid":"media-library-upload-sort-date"})]}),jsxRuntimeExports.jsx(Dropzone,{multiple:r0,accept:acceptedTypes(_e??"embedder"),children:jsxRuntimeExports.jsx(UploadFiles,{onFilesChange:c0,visibility:i0})})]})},VIDEO_HEIGHT=9,VIDEO_WIDTH=16;function useCameras(){const{device:e0}=useBrowserInfo(navigator.userAgent),{t:_e}=useTranslation(),[i0,r0]=reactExports.useState([]),[t0,n0]=reactExports.useState({audio:!0,video:!0}),[s0,o0]=reactExports.useState();async function a0(){return(await navigator.mediaDevices.enumerateDevices()).filter(A0=>A0.kind==="videoinput")}const f0=async A0=>{try{const c0=await navigator.mediaDevices.getUserMedia(A0);o0(c0)}catch(c0){console.error(c0)}},l0=()=>{s0==null||s0.getTracks().forEach(A0=>A0.stop()),f0(t0)},u0=A0=>{let c0={};A0!=null&&A0.deviceId?(A0.deviceId==="environment"||A0.deviceId==="user"?c0={audio:!0,video:{aspectRatio:VIDEO_WIDTH/VIDEO_HEIGHT,facingMode:A0==null?void 0:A0.deviceId}}:c0={audio:!0,video:{aspectRatio:VIDEO_WIDTH/VIDEO_HEIGHT,deviceId:{exact:A0.deviceId}}},n0(c0)):console.error("Selected input device id is null")};return reactExports.useEffect(()=>{l0()},[t0]),reactExports.useEffect(()=>{async function A0(){await f0(t0);const c0=await a0();switch(e0.type){case"mobile":case"tablet":{const k0={deviceId:"environment",label:_e("video.back.camera"),groupId:"",kind:"videoinput"},d0={deviceId:"user",label:_e("video.front.camera"),groupId:"",kind:"videoinput"};(c0==null?void 0:c0.length)>1?r0([k0,d0]):r0([k0]);break}default:r0(c0);break}}A0()},[]),{inputDevices:i0,setPreferedDevice:u0,stream:s0,restartStream:l0}}const SvgIconRecordStop=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M2 6a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4z"})]}),VideoRecorderToolbar=({playing:e0,recording:_e,recorded:i0,saving:r0,saved:t0,hideSaveAction:n0,handleRecord:s0,handleStop:o0,handlePlayPause:a0,handleReset:f0,handleSave:l0})=>{const{t:u0}=useTranslation(),A0=[{type:"icon",name:"record",props:{icon:jsxRuntimeExports.jsx(SvgIconRecord,{color:_e||i0?"":"red"}),color:"danger",disabled:_e||i0||r0,onClick:s0,"aria-label":u0("bbm.video.record.start")},tooltip:u0("bbm.video.record.start")},{type:"icon",name:"stop",props:{icon:jsxRuntimeExports.jsx(SvgIconRecordStop,{}),disabled:!_e||i0||r0,onClick:o0,"aria-label":u0("bbm.video.record.stop")},tooltip:u0("bbm.video.record.stop")},{type:"icon",name:"play",visibility:e0?"hide":"show",props:{icon:jsxRuntimeExports.jsx(SvgIconPlayFilled,{}),disabled:!i0||r0,onClick:a0,"aria-label":u0("bbm.video.play.start")},tooltip:u0("bbm.video.play.start")},{type:"icon",name:"pause",visibility:e0?"show":"hide",props:{icon:jsxRuntimeExports.jsx(SvgIconPause,{}),disabled:!i0||r0,onClick:a0,"aria-label":u0("bbm.video.play.pause")},tooltip:u0("bbm.video.play.pause")},{type:"divider"},{type:"icon",name:"reset",props:{icon:jsxRuntimeExports.jsx(SvgIconRefresh,{}),disabled:!i0||r0,onClick:f0,"aria-label":u0("bbm.video.record.reset")},tooltip:u0("bbm.video.record.reset")},{type:"icon",name:"save",visibility:n0?"hide":"show",props:{icon:jsxRuntimeExports.jsx(SvgIconSave,{}),disabled:!i0||r0||t0,onClick:l0,"aria-label":u0("bbm.video.record.save")},tooltip:u0("bbm.video.record.save")}];return jsxRuntimeExports.jsx(Toolbar,{items:A0,className:"position-absolute bottom-0 start-50 bg-white"})},SelectTrigger=e0=>jsxRuntimeExports.jsx(Dropdown.Trigger,{...e0,"aria-haspopup":"listbox",role:"combobox"}),Select=({selectedValue:e0,icon:_e,options:i0,overflow:r0,block:t0,variant:n0,size:s0,disabled:o0,placeholderOption:a0,onValueChange:f0,defaultValue:l0})=>{const[u0,A0]=reactExports.useState(),{t:c0}=useTranslation();reactExports.useEffect(()=>{e0!==void 0&&A0(e0)},[e0]),reactExports.useEffect(()=>{if(u0){const h0=typeof u0=="object"?u0.value:u0;f0==null||f0(h0)}},[u0]),reactExports.useEffect(()=>{if(l0){const h0=i0.find(b0=>(typeof b0=="object"?b0.value:b0)===l0);h0!==void 0&&A0(h0)}},[]);const k0=typeof u0=="object"?u0.label:u0,d0=typeof u0=="object"?u0.icon:void 0;return jsxRuntimeExports.jsxs(Dropdown,{overflow:r0,block:t0,children:[jsxRuntimeExports.jsx(SelectTrigger,{icon:d0||_e,label:jsxRuntimeExports.jsx("span",{className:"text-truncate",children:c0(k0||a0)}),variant:n0,size:s0,disabled:o0}),jsxRuntimeExports.jsx(Dropdown.Menu,{role:"listbox",children:i0==null?void 0:i0.map(h0=>{const b0=typeof h0=="object"?h0.value:h0,p0=typeof h0=="object"?h0.label:h0,m0=typeof h0=="object"?h0.icon:void 0;return jsxRuntimeExports.jsx(Dropdown.Item,{type:"action",onClick:()=>A0(h0),icon:m0,children:p0},b0)})})]})},VideoRecorder=reactExports.forwardRef(({appCode:e0,caption:_e,onSuccess:i0,onError:r0,onRecordUpdated:t0,hideSaveAction:n0=!1},s0)=>{const{inputDevices:o0,setPreferedDevice:a0,restartStream:f0,stream:l0}=useCameras(),[u0,A0]=reactExports.useState(18e4),[c0,k0]=reactExports.useState(!1),[d0,h0]=reactExports.useState(!1),[b0,p0]=reactExports.useState(!1),[m0,g0]=reactExports.useState(!1),[v0,x0]=reactExports.useState(!1),[w0,_0]=reactExports.useState(""),[y0,S0]=reactExports.useState([]),[B0,I0]=reactExports.useState(),[T0,R0]=reactExports.useState(0),[E0,C0]=reactExports.useState(0),G0=reactExports.useRef(null),F0=reactExports.useRef(null),{uploadBlob:M0}=useUpload(void 0,e0);reactExports.useImperativeHandle(s0,()=>({save:Q0}));const{t:j0}=useTranslation();reactExports.useEffect(()=>{D0()},[]);async function D0(){try{const H0=await odeServices.video().getVideoConf();A0(H0.maxDuration*60*1e3)}catch{A0(3*60*1e3)}}reactExports.useEffect(()=>{try{G0.current&&(G0.current.src&&(window.URL.revokeObjectURL(G0.current.src),G0.current.src=""),G0.current.srcObject instanceof MediaStream&&(G0.current.srcObject=null),l0&&(G0.current.srcObject=l0,G0.current.autoplay=!0,G0.current.volume=1,G0.current.muted=!0,G0.current.load()))}catch(H0){console.error(H0)}},[l0]),reactExports.useEffect(()=>{if(y0.length&&!c0&&G0.current){const H0=new Blob(y0,{type:w0});if(I0(H0),t0){const J0=window.URL.createObjectURL(H0);t0(J0)}G0.current.autoplay=!1,G0.current.srcObject=null,G0.current.src=window.URL.createObjectURL(H0)}},[c0,y0]),reactExports.useEffect(()=>{if(c0){const H0=Date.now(),J0=window.setInterval(()=>R0(Date.now()-H0),500);return()=>{window.clearInterval(J0)}}},[c0]),reactExports.useEffect(()=>{if(b0){const H0=window.setInterval(()=>C0(J0=>J0+500),500);return()=>{window.clearInterval(H0)}}},[b0]);const $0=reactExports.useCallback(()=>{k0(!0),G0&&G0.current&&(G0.current.muted=!0);const H0=o$1();_0(H0),l0&&(F0.current=new MediaRecorder(l0,{mimeType:H0}),F0.current.ondataavailable=({data:J0})=>{J0.size>0&&S0(Y0=>[...Y0,J0])},F0.current.onerror=J0=>console.error(J0),F0.current.start(1e3))},[l0]),X0=reactExports.useCallback(()=>{var H0;k0(!1),h0(!0),((H0=F0.current)==null?void 0:H0.state)==="recording"&&(F0.current.requestData(),F0.current.stop())},[F0]),Z0=reactExports.useCallback(()=>{var H0,J0;G0&&G0.current&&(G0.current.muted=!1),b0?((J0=G0==null?void 0:G0.current)==null||J0.pause(),p0(!1)):((H0=G0==null?void 0:G0.current)==null||H0.play(),p0(!0))},[b0]),N0=()=>{h0(!1),k0(!1),p0(!1),x0(!1),R0(0),S0([]),I0(void 0),f0(),t0&&t0()},Q0=async()=>{var H0;if((H0=G0==null?void 0:G0.current)==null||H0.pause(),g0(!0),!B0){console.error("Error while saving video: recorded video is undefined.");return}const J0=await M0(B0,{duration:T0});if(J0!=null)return i0==null||i0([J0]),g0(!1),x0(!0),[J0];r0("Error while uploading video"),g0(!1),x0(!0)},z0=()=>{p0(!1),C0(0),G0.current&&(G0.current.currentTime=0)},K0=H0=>{var J0;const Y0=o0.find(e2=>e2.label===H0);((J0=F0.current)==null?void 0:J0.state)==="recording"&&(F0.current.requestData(),F0.current.stop()),a0(Y0)};return reactExports.useEffect(()=>{T0>=u0&&X0()},[T0,X0]),jsxRuntimeExports.jsxs("div",{className:"video-recorder d-flex flex-fill flex-column align-items-center pb-8",children:[jsxRuntimeExports.jsx("div",{className:"video-recorder-caption d-none d-md-block",children:_e}),o0.length>1&&jsxRuntimeExports.jsx("div",{className:"video-recorder-devices mb-12",children:jsxRuntimeExports.jsxs(FormControl,{id:"selectInputDevice",children:[jsxRuntimeExports.jsx(Label,{className:"d-none d-md-block",children:j0("bbm.video.record.select.devices.label")}),jsxRuntimeExports.jsx(Select,{placeholderOption:j0("bbm.video.record.select.devices.placeholder"),options:o0.map(H0=>H0.label),onValueChange:K0})]})}),jsxRuntimeExports.jsxs("div",{className:"video-recorder-video-container position-relative align-self-stretch",children:[jsxRuntimeExports.jsx("video",{ref:G0,playsInline:!0,autoPlay:!0,controls:!1,muted:!0,onEnded:z0,className:"rounded",children:jsxRuntimeExports.jsx("track",{default:!0,kind:"captions",srcLang:"fr",src:""})}),(c0||d0)&&jsxRuntimeExports.jsxs("div",{className:"video-recorder-time d-flex align-items-center font-monospace fs-6 text-bg-dark rounded",children:[c0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SvgIconRecord,{width:12,height:12,color:"red",className:"me-4"}),jsxRuntimeExports.jsxs("span",{children:[n$4(T0),"/",n$4(u0)]})]}),d0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SvgIconRecordVideo,{width:14,height:14,className:"me-4"}),jsxRuntimeExports.jsxs("span",{children:[n$4(E0),"/",n$4(T0)]})]})]}),l0&&jsxRuntimeExports.jsx(VideoRecorderToolbar,{playing:b0,recording:c0,recorded:d0,saving:m0,saved:v0,hideSaveAction:n0,handleRecord:$0,handleStop:X0,handlePlayPause:Z0,handleReset:N0,handleSave:Q0})]}),m0&&jsxRuntimeExports.jsx(LoadingScreen,{position:!1,caption:j0("bbm.video.save.loader.caption")})]})}),Video=()=>{const{appCode:e0,setResult:_e,setPreSuccess:i0}=useMediaLibraryContext(),{t:r0}=useTranslation(),t0=reactExports.useRef(null),n0=o0=>{o0?(_e(o0),i0(()=>t0.current.save)):_e()},s0=o0=>{console.error(o0)};return jsxRuntimeExports.jsx(VideoRecorder,{ref:t0,appCode:e0,caption:r0("bbm.video.caption"),onRecordUpdated:n0,onError:s0,hideSaveAction:!0})},SvgIconArrowRight=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 12a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L17.586 12l-6.293-6.293a1 1 0 0 1 0-1.414",clipRule:"evenodd"})]}),VideoEmbed=({switchType:e0,onSuccess:_e})=>{const{t:i0}=useTranslation(),[r0,t0]=reactExports.useState(),[n0,s0]=reactExports.useState(),[o0,a0]=reactExports.useState(void 0),[f0,l0]=reactExports.useState(),u0=useDebounce(r0||"",300),A0=reactExports.useId();reactExports.useEffect(()=>{c0()},[]),reactExports.useEffect(()=>{if(f0&&u0){const b0=odeServices.embedder().getProviderFromUrl(f0,u0);if(b0){a0(b0);const p0=odeServices.embedder().getEmbedCodeForProvider(b0,u0);s0(p0),_e(p0)}else a0(void 0),_e()}},[u0,f0]);const c0=async()=>{const b0=await Promise.all([odeServices.embedder().getDefault(),odeServices.embedder().getCustom()]).then(p0=>p0.flat());l0(b0)};function k0(b0){const p0=b0.currentTarget.value;t0(p0),_e(p0!=null&&p0.length?p0:void 0)}function d0(){e0==null||e0("embedder")}const h0=()=>u0?o0?jsxRuntimeExports.jsxs("div",{className:"mx-auto mt-16",children:[jsxRuntimeExports.jsxs("div",{className:"video-embed-provider d-flex align-items-center",children:[jsxRuntimeExports.jsx(Image$1,{src:o0.logo,alt:"Logo "+o0.displayName,className:"video-embed-provider-logo"}),o0.displayName]}),n0&&jsxRuntimeExports.jsx("div",{className:"video-embed-preview mt-12",dangerouslySetInnerHTML:{__html:n0}})]}):jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column align-items-center m-16",children:[jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuError,title:i0("bbm.video.previewError.title"),text:i0("bbm.video.previewError.text")}),e0&&jsxRuntimeExports.jsxs(Button,{variant:"ghost",color:"primary",onClick:d0,className:"align-items-start mt-16",children:[i0("bbm.video.useEmbedCode")," ",jsxRuntimeExports.jsx(SvgIconArrowRight,{})]})]}):e0&&jsxRuntimeExports.jsx("div",{className:"d-flex my-16 align-items-start",children:jsxRuntimeExports.jsxs(Button,{variant:"ghost",color:"primary",onClick:d0,className:"align-items-start",children:[i0("bbm.video.useEmbedCode")," ",jsxRuntimeExports.jsx(SvgIconArrowRight,{})]})});return jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column flex-fill video-embed",children:[jsxRuntimeExports.jsxs("div",{className:"mb-8 d-flex",children:[jsxRuntimeExports.jsx(SvgIconGlobe,{className:"me-8"}),i0("bbm.video.url.title")]}),jsxRuntimeExports.jsx(FormControl,{id:A0,children:jsxRuntimeExports.jsx(Input,{size:"md",type:"text",placeholder:i0("bbm.video.url.placeholder"),onChange:k0})}),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:h0()})]})},VideoEmbedder=()=>{const{switchType:e0,setResult:_e}=useMediaLibraryContext();return jsxRuntimeExports.jsx(VideoEmbed,{switchType:e0,onSuccess:i0=>{_e(i0)}})};function useHasWorkflow(e0){const[_e,i0]=reactExports.useState();return reactExports.useEffect(()=>{(async()=>{let r0;typeof e0=="string"?r0=await odeServices.rights().sessionHasWorkflowRight(e0):r0=await odeServices.rights().sessionHasWorkflowRights(e0),i0(r0)})()},[e0]),_e}var __defProp=Object.defineProperty,__defNormalProp=(e0,_e,i0)=>_e in e0?__defProp(e0,_e,{enumerable:!0,configurable:!0,writable:!0,value:i0}):e0[_e]=i0,__publicField=(e0,_e,i0)=>__defNormalProp(e0,typeof _e!="symbol"?_e+"":_e,i0);function findTreeNode(e0,_e){if(_e(e0))return e0;if(Array.isArray(e0.children))for(const i0 of e0.children){const r0=findTreeNode(i0,_e);if(r0)return r0}}function findNodeById(e0,_e){if(Array.isArray(e0))for(const i0 of e0){const r0=findNodeById(i0,_e);if(r0)return r0}else{if(e0.id===_e)return e0;if(e0.children)for(const i0 of e0.children){const r0=findNodeById(i0,_e);if(r0)return r0}}}function addNode(e0,{parentId:_e,newFolder:i0}){return modifyNode(e0,r0=>{var t0;if(r0.id===_e){const n0=[...((t0=r0.folder)==null?void 0:t0.ancestors)||[]],s0=arrayUnique([...n0,r0.id]);return{...r0,children:[...r0.children||[],new TreeNodeFolderWrapper({...i0,ancestors:s0})]}}else return r0})}function arrayUnique(e0){return e0.filter((_e,i0)=>e0.indexOf(_e)===i0)}function deleteNode(e0,{folders:_e}){return modifyNode(e0,i0=>{if(!_e.includes(i0.id))return i0})}const findParentNode=(e0,_e)=>{if(e0.children)for(const i0 of e0.children){if(i0.id===_e)return e0;const r0=findParentNode(i0,_e);if(r0)return r0}};function getAncestors(e0,_e){var i0;const r0=findNodeById(e0,_e);return(i0=r0==null?void 0:r0.folder)!=null&&i0.ancestors?[...(r0==null?void 0:r0.folder.ancestors)||[],_e]:_e===FOLDER.BIN?[FOLDER.BIN]:[FOLDER.DEFAULT]}function modifyNode(e0,_e){return doModify(e0,_e)||e0}function doModify(e0,_e,i0){var r0;const t0=_e(e0,i0);if((r0=t0==null?void 0:t0.children)!=null&&r0.length){const n0=[];for(const s0 of(t0==null?void 0:t0.children)||[]){const o0=doModify(s0,_e,t0);o0&&n0.push(o0)}return{...t0,children:n0}}return t0}function moveNode(e0,{destinationId:_e,folders:i0}){return modifyNode(e0,(r0,t0)=>{var n0,s0;if(_e===r0.id){const o0=[...((n0=r0.folder)==null?void 0:n0.ancestors)||[]],a0=arrayUnique([...o0,r0.id]),f0=[...r0.children||[]],l0=((s0=r0.children)==null?void 0:s0.map(u0=>u0.id))||[];for(const u0 of i0)if(!l0.includes(u0)){const A0=findNodeById(r0,u0);A0&&f0.push({...A0,folder:{...A0==null?void 0:A0.folder,ancestors:a0}})}return{...r0,children:f0}}else return i0.includes(r0.id)&&_e!==(t0==null?void 0:t0.id)?void 0:r0})}const wrapTreeNode=(e0,_e,i0)=>modifyNode(e0,r0=>(r0.id===i0&&(r0.children=_e==null?void 0:_e.map(t0=>new TreeNodeFolderWrapper(t0))),r0));function updateNode(e0,{folderId:_e,newFolder:i0}){return modifyNode(e0,r0=>r0.id===_e?new TreeNodeFolderWrapper(i0):r0)}function findPathById(e0,_e){let i0=[];function r0(n0,s0){if(n0.id===_e)return i0=s0.concat(n0.id),!0;if(n0.children){for(const o0 of n0.children)if(r0(o0,s0.concat(n0.id)))return!0}return!1}function t0(n0){if(Array.isArray(n0)){for(const s0 of n0)if(r0(s0,[]))break}else r0(n0,[])}return t0(e0),i0}class TreeNodeFolderWrapper{constructor(_e){__publicField(this,"id"),__publicField(this,"name"),__publicField(this,"childNumber"),__publicField(this,"section",!1),__publicField(this,"children",[]),this.folder=_e,this.id=_e.id,this.name=_e.name,this.childNumber=_e.childNumber}}function useWorkspaceSearch(e0,_e,i0,r0){const t0=useHasWorkflow("org.entcore.workspace.controllers.WorkspaceController|listDocuments"),n0=useHasWorkflow("org.entcore.workspace.controllers.WorkspaceController|listFolders");function s0(l0,u0){switch(u0.type){case"update":{const A0=findNodeById(l0,u0.folderId);return A0&&(A0.children=u0.subfolders.map(c0=>({id:c0._id||"",name:c0.name})),A0.files=u0.files),{...l0}}default:throw Error("[useWorkspaceSearch] Unknown action type: "+u0.type)}}const[o0,a0]=reactExports.useReducer(s0,{id:e0,name:_e,section:!0}),f0=reactExports.useCallback(async l0=>{if(t0&&n0){const u0=l0===e0?"":l0,A0=await odeServices.workspace().listDocuments(i0,u0),c0=[],k0=[];A0.filter(d0=>{if(!r0||d0.eType==="folder")return!0;const h0=DocumentHelper.getRole(d0);return typeof r0=="string"?r0===h0:Array.isArray(r0)?r0.findIndex(b0=>b0===h0)>=0:!1}).forEach(d0=>{d0.eType==="folder"?c0.push(d0):k0.push(d0)}),a0({folderId:l0,subfolders:c0,files:k0,type:"update"})}},[t0,n0,e0,i0,r0]);return{root:o0,loadContent:f0}}const SvgIconRafterDown=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.012 7.871a1.5 1.5 0 0 1 2.117.141L12 14.722l5.871-6.71a1.5 1.5 0 1 1 2.258 1.976l-7 8a1.5 1.5 0 0 1-2.258 0l-7-8a1.5 1.5 0 0 1 .141-2.117",clipRule:"evenodd"})]}),TreeNode=({node:e0,showIcon:_e,selectedNodeId:i0,expandedNodes:r0,siblingsNodes:t0,draggedNodeId:n0,handleItemClick:s0,handleToggleNode:o0,handleItemAction:a0})=>{const f0=r0.has(e0.id),l0=t0==null?void 0:t0.current.has(e0.id),u0=i0===e0.id,A0=n0===e0.id,c0={action:clsx("action-container d-flex align-items-center gap-8 px-2",{"drag-focus":A0,"py-4":!e0.section}),arrow:clsx({"py-4":!e0.section,"py-8":e0.section,invisible:!Array.isArray(e0.children)||e0.children.length===0}),button:clsx("flex-fill d-flex align-items-center text-truncate gap-8",{"py-8":e0.section})},k0=e0.section?16:12,{t:d0}=useTranslation(),{setNodeRef:h0}=useDroppable$1({id:reactExports.useId(),data:{id:e0.id,name:e0.name,isTreeview:!0,accepts:["folder","resource"]}}),b0=_0=>s0==null?void 0:s0(_0),p0=_0=>o0==null?void 0:o0(_0),m0=_0=>a0==null?void 0:a0(_0),g0=_0=>{(_0.code==="Enter"||_0.code==="Space")&&(_0.preventDefault(),_0.stopPropagation(),s0==null||s0(e0.id))},v0=_0=>{(_0.code==="Enter"||_0.code==="Space")&&(_0.preventDefault(),_0.stopPropagation(),o0==null||o0(e0.id))},x0=_0=>jsxRuntimeExports.jsx(_0?SvgIconRafterDown:SvgIconRafterRight,{title:d0("foldUnfold"),width:k0,height:k0}),w0=()=>{var _0;const y0=!((_0=t0==null?void 0:t0.current)!=null&&_0.has(e0.id)),S0=Array.isArray(e0.children)&&e0.children.length>0;return l0||y0&&S0};return jsxRuntimeExports.jsx("li",{ref:h0,id:`treeitem-${e0.id}`,role:"treeitem","aria-selected":u0&&u0,"aria-expanded":f0&&f0,children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:c0.action,children:[jsxRuntimeExports.jsx("div",{className:c0.arrow,tabIndex:0,role:"button",onClick:()=>p0(e0.id),onKeyDown:v0,"aria-label":d0("foldUnfold"),children:w0()&&x0(f0)}),jsxRuntimeExports.jsxs("div",{tabIndex:0,role:"button",className:c0.button,onClick:()=>b0(e0.id),onKeyDown:g0,children:[e0.section&&_e&&jsxRuntimeExports.jsx(SvgIconFolder,{title:d0("folder"),width:20,height:20}),jsxRuntimeExports.jsx("span",{className:"text-truncate",children:e0.name})]}),e0.section&&a0&&jsxRuntimeExports.jsx("button",{className:"tree-btn mx-8",onClick:()=>m0(e0.id),children:jsxRuntimeExports.jsx(SvgIconPlus,{height:16,width:16})})]}),Array.isArray(e0.children)&&!!e0.children.length&&f0&&jsxRuntimeExports.jsx("ul",{role:"group",children:e0.children.map(_0=>jsxRuntimeExports.jsx(TreeNode,{node:_0,selectedNodeId:i0,expandedNodes:r0,siblingsNodes:t0,draggedNodeId:n0,handleItemClick:s0,handleToggleNode:o0},_0.id))})]})},e0.id)},useTreeView=({data:e0,ref:_e,externalSelectedNodeId:i0,draggedNode:r0,allExpandedNodes:t0,onTreeItemUnfold:n0,onTreeItemFold:s0,onTreeItemClick:o0})=>{const[a0,f0]=reactExports.useState(void 0),[l0,u0]=reactExports.useState(new Set),A0=reactExports.useRef(new Set),[c0,k0]=reactExports.useState(void 0),d0=a0??i0;function h0(B0){var I0;Array.isArray(B0)?B0.forEach(T0=>{const R0=new Set(A0.current);B0.filter(({id:E0})=>E0!==T0.id).some(E0=>E0.children&&E0.children.length>0)&&R0.add(T0.id),T0.children&&T0.children.length>0&&T0.children.forEach(E0=>{var C0;const G0=(C0=T0.children)==null?void 0:C0.filter(({id:F0})=>F0!==E0.id);G0!=null&&G0.some(F0=>F0.children&&F0.children.length>0)&&R0.add(E0.id),h0(E0)})}):(I0=B0.children)==null||I0.forEach(T0=>{var R0;const E0=new Set(A0.current),C0=(R0=B0.children)==null?void 0:R0.filter(G0=>G0.id!==T0.id);C0!=null&&C0.some(G0=>G0.children&&G0.children.length>0)&&(E0.add(T0.id),A0.current=E0),h0(T0)})}const b0=B0=>{const I0=new Set("");e0&&Array.isArray(e0)&&B0&&(e0.forEach(T0=>{I0.add(T0.id)}),u0(I0))};reactExports.useEffect(()=>{e0&&h0(e0)},[e0]),reactExports.useEffect(()=>{r0!=null&&r0.isOver&&r0.isTreeview?(r0.overId&&S0(r0.overId),k0(r0.overId)):k0(void 0)},[r0]);const p0=reactExports.useMemo(()=>({unselectAll(){f0(void 0)},select(B0){_0(B0)},allExpandedNodes(){b0(t0)}}),[]);reactExports.useImperativeHandle(_e,()=>p0,[p0]),reactExports.useEffect(()=>{b0(t0)},[]),reactExports.useEffect(()=>{i0&&!t0?(m0(i0),f0(i0)):f0(void 0)},[i0]);const m0=B0=>{if(!findNodeById(e0,d0)){f0(void 0);return}if(i0==="default"){l0.forEach(I0=>n0==null?void 0:n0(I0));return}g0(B0)},g0=B0=>{const I0=new Set(l0),T0=findPathById(e0,B0),R0=Array.from(I0);T0.forEach(E0=>{const C0=R0.indexOf(E0);C0>-1&&R0.splice(C0,1),R0.push(E0)}),I0.clear(),R0.forEach(E0=>I0.add(E0)),I0.forEach(E0=>n0==null?void 0:n0(E0)),u0(I0)},v0=B0=>{const I0=new Set(l0);I0.delete(B0),I0.forEach(T0=>s0==null?void 0:s0(T0)),u0(I0)},x0=B0=>{l0.has(B0)?v0(B0):g0(B0)},w0=B0=>{d0!==B0&&f0(B0)},_0=B0=>{w0(B0),g0(B0),o0==null||o0(B0)},y0=B0=>{x0(B0)},S0=B0=>{findNodeById(e0,i0)&&g0(B0)};return{selectedNodeId:d0,expandedNodes:l0,siblingsNodes:A0,draggedNodeId:c0,handleItemClick:_0,handleFoldUnfold:y0}},TreeView=reactExports.forwardRef((e0,_e)=>{const{data:i0,onTreeItemClick:r0,onTreeItemUnfold:t0,onTreeItemFold:n0,onTreeItemAction:s0,draggedNode:o0,showIcon:a0=!0,allExpandedNodes:f0=!1,selectedNodeId:l0}=e0,{selectedNodeId:u0,expandedNodes:A0,siblingsNodes:c0,draggedNodeId:k0,handleItemClick:d0,handleFoldUnfold:h0}=useTreeView({data:i0,ref:_e,externalSelectedNodeId:l0,draggedNode:o0,allExpandedNodes:f0,onTreeItemClick:r0,onTreeItemFold:n0,onTreeItemUnfold:t0});return jsxRuntimeExports.jsx("div",{className:"treeview",children:jsxRuntimeExports.jsx("ul",{role:"tree",className:"m-0 p-0",children:Array.isArray(i0)?i0.map(b0=>jsxRuntimeExports.jsx(TreeNode,{node:b0,showIcon:a0,selectedNodeId:u0,expandedNodes:A0,siblingsNodes:c0,draggedNodeId:k0,handleItemClick:d0,handleToggleNode:h0,handleItemAction:s0},b0.id)):jsxRuntimeExports.jsx(TreeNode,{node:i0,selectedNodeId:u0,expandedNodes:A0,siblingsNodes:c0,showIcon:a0,draggedNodeId:k0,handleItemClick:d0,handleToggleNode:h0})})})}),WORKSPACE_VIEW_WORKFLOW="org.entcore.workspace.controllers.WorkspaceController|view",Workspace$1=({roles:e0,onSelect:_e,multiple:i0=!0,className:r0,defaultFolder:t0,showPublicFolder:n0})=>{const{t:s0}=useTranslation(),o0=useHasWorkflow(WORKSPACE_VIEW_WORKFLOW),a0=!!o0,{root:f0,loadContent:l0}=useWorkspaceSearch("root",s0("workspace.tree.owner"),"owner",e0),{root:u0,loadContent:A0}=useWorkspaceSearch("root",s0("workspace.tree.shared"),"shared",e0),{root:c0,loadContent:k0}=useWorkspaceSearch("root",s0("workspace.tree.protected"),"protected",e0),{root:d0,loadContent:h0}=useWorkspaceSearch("root",s0("workspace.tree.public"),"public",e0),b0=reactExports.useRef(null),p0=reactExports.useRef(null),m0=reactExports.useRef(null),g0=reactExports.useRef(null),[v0,x0]=reactExports.useState(()=>t0==="public"?n0?t0:"protected":t0==="protected"||t0==="shared"?t0:"owner"),[w0,_0]=reactExports.useState(()=>t0==="public"?n0?d0:c0:t0==="protected"?c0:t0==="shared"?u0:f0),[y0,S0]=reactExports.useState(),[B0,I0]=reactExports.useState(null),[T0,R0]=reactExports.useState(["modified","desc"]),[E0,C0]=reactExports.useState([]),G0=reactExports.useCallback(N0=>{switch(N0){case"owner":return{root:f0,othersRef:[p0,m0,g0]};case"shared":return{root:u0,othersRef:[b0,m0,g0]};case"protected":return{root:c0,othersRef:[b0,p0,g0]};case"public":return{root:d0,othersRef:[b0,p0,m0]};default:throw"no.root.node"}},[f0,u0,c0,d0]),F0=reactExports.useCallback(()=>{switch(v0){case"owner":l0(w0.id);break;case"shared":A0(w0.id);break;case"protected":k0(w0.id);break;case"public":h0(w0.id);break;default:throw"no.way"}},[v0,w0.id,l0,k0,h0,A0]);function M0(N0,Q0){x0(N0);const{root:z0,othersRef:K0}=G0(N0),H0=findTreeNode(z0,J0=>J0.id===Q0);H0&&(_0(H0),K0.forEach(J0=>{var Y0;return(Y0=J0.current)==null?void 0:Y0.unselectAll()}))}reactExports.useEffect(()=>{var N0;let Q0;switch(v0){case"owner":Q0=b0;break;case"shared":Q0=p0;break;case"protected":Q0=m0;break;case"public":Q0=g0;break;default:return}(N0=Q0==null?void 0:Q0.current)==null||N0.select("root")},[v0]),reactExports.useEffect(()=>{o0===!1&&(v0==="owner"||v0==="shared")&&M0("protected","root")},[o0]),reactExports.useEffect(F0,[F0]),reactExports.useEffect(()=>{if(w0.files){let N0=[].concat(w0.files);B0&&(N0=N0.filter(z0=>z0.name.indexOf(B0)>=0));const Q0=T0[0]==="name"?T0[1]==="asc"?(z0,K0)=>D0(z0.name,K0.name):(z0,K0)=>D0(K0.name,z0.name):(z0,K0)=>D0(K0.modified,z0.modified);S0(()=>N0.sort(Q0))}else S0(void 0)},[w0,f0,c0,u0,d0,B0,T0]);const j0=reactExports.useCallback(N0=>{I0(N0.target.value)},[I0]);function D0(N0,Q0){return N0?Q0?N0.localeCompare(Q0):1:-1}function $0(){return T0[0]==="name"?T0[1]==="asc"?s0("sort.order.alpha.asc"):s0("sort.order.alpha.desc"):s0("sort.order.modify.desc")}function X0(N0){let Q0=[...E0];i0?Q0.includes(N0)?Q0=Q0.filter(z0=>z0._id!==N0._id):Q0=[...Q0,N0]:Q0=[N0],C0(Q0),_e(Q0)}const Z0=clsx("workspace flex-grow-1 gap-0",r0);return jsxRuntimeExports.jsxs(Grid,{className:Z0,children:[jsxRuntimeExports.jsx(Grid.Col,{sm:"12",md:"3",xl:"4",className:"workspace-folders p-12 pt-0 gap-12",children:jsxRuntimeExports.jsxs("div",{style:{position:"sticky",top:0,paddingTop:"1.2rem"},children:[a0&&jsxRuntimeExports.jsx(TreeView,{ref:b0,data:f0,onTreeItemClick:N0=>M0("owner",N0),onTreeItemUnfold:N0=>M0("owner",N0)}),a0&&jsxRuntimeExports.jsx(TreeView,{ref:p0,data:u0,onTreeItemClick:N0=>M0("shared",N0),onTreeItemUnfold:N0=>M0("shared",N0)}),jsxRuntimeExports.jsx(TreeView,{ref:m0,data:c0,onTreeItemClick:N0=>M0("protected",N0),onTreeItemUnfold:N0=>M0("protected",N0)}),n0&&jsxRuntimeExports.jsx(TreeView,{ref:g0,data:d0,onTreeItemClick:N0=>M0("public",N0),onTreeItemUnfold:N0=>M0("public",N0)})]})}),jsxRuntimeExports.jsx(Grid.Col,{sm:"12",md:"5",xl:"8",children:jsxRuntimeExports.jsxs(Grid,{className:"flex-grow-1 gap-0",children:[jsxRuntimeExports.jsxs(Grid.Col,{sm:"4",md:"8",xl:"12",children:[jsxRuntimeExports.jsx("div",{className:"workspace-search px-16 py-8 ",children:jsxRuntimeExports.jsx(SearchBar,{isVariant:!0,className:"gap-16",onChange:j0})}),jsxRuntimeExports.jsxs("div",{className:"d-flex align-items-center justify-content-end px-8 py-4",children:[jsxRuntimeExports.jsx("small",{className:"text-muted",children:s0("workspace.search.order")}),jsxRuntimeExports.jsxs(Dropdown,{children:[jsxRuntimeExports.jsx(Dropdown.Trigger,{size:"sm",label:$0(),variant:"ghost"}),jsxRuntimeExports.jsxs(Dropdown.Menu,{children:[jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortTime,{}),onClick:()=>R0(["modified","desc"]),children:s0("sort.order.modify.desc")}),jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortAscendingLetters,{}),onClick:()=>R0(["name","asc"]),children:s0("sort.order.alpha.asc")}),jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortDescendingLetters,{}),onClick:()=>R0(["name","desc"]),children:s0("sort.order.alpha.desc")})]})]})]})]}),jsxRuntimeExports.jsx(Grid.Col,{sm:"4",md:"8",xl:"12",className:"p-8 gap-8",children:y0?y0.length!==0?jsxRuntimeExports.jsx("div",{className:"grid grid-workspace",children:y0.map(N0=>{const Q0=E0.includes(N0);return jsxRuntimeExports.jsx(FileCard,{doc:N0,isSelected:Q0,onClick:()=>X0(N0)},N0._id)})}):jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuTrash,text:s0("workspace.empty.docSpace"),title:s0("explorer.emptyScreen.trash.title")}):jsxRuntimeExports.jsx(LoadingScreen,{})})]})})]})},Workspace=()=>{const{type:e0,setResultCounter:_e,setResult:i0,multiple:r0,visibility:t0}=useMediaLibraryContext();function n0(){switch(e0){case"image":return"img";case"audio":return"audio";case"video":return"video";default:return null}}function s0(o0){_e(o0.length),o0.length?i0(o0):i0()}return jsxRuntimeExports.jsx(Workspace$1,{roles:n0(),onSelect:s0,multiple:r0,className:"border rounded overflow-y-auto",defaultFolder:t0,showPublicFolder:t0==="public"})},InnerTabs={Audio,Video,Upload,ExternalLink,Workspace,Nextcloud,GoogleDrive,InternalLink,Iframe,VideoEmbedder};function usePublicConf(e0){return useQuery({queryKey:["publicConf",e0],queryFn:()=>odeServices.conf().getPublicConf(e0),staleTime:1/0})}const useHttpErrorToast=({active:e0=!0,..._e})=>{const i0=reactExports.useRef(),r0=useToast(),{t:t0}=useTranslation();return reactExports.useEffect(()=>{if(e0){const n0=odeServices.notify().events().subscribe(LAYER_NAME.TRANSPORT,s0=>{var o0;if(!(s0!=null&&s0.data))return;const{response:a0}=s0.data,f0=((o0=s0.data.payload)==null?void 0:o0.error)||([400,401,403,404,408,413,500,504].includes(a0==null?void 0:a0.status)?`e${s0.data.response.status}`:void 0)||(a0==null?void 0:a0.statusText);typeof f0=="string"&&(i0.current=t0(f0),r0.error(React$4.createElement("div",{children:[i0.current]}),_e))});return()=>n0.revoke()}},[t0,r0,e0]),i0.current},TabsContext=reactExports.createContext(null);function useTabsContext(){const e0=reactExports.useContext(TabsContext);if(!e0)throw new Error("Tabs compound components cannot be rendered outside the Tabs component");return e0}const useTabs=({defaultId:e0,items:_e,onChange:i0})=>{const[r0,t0]=reactExports.useState(e0||""),[n0,s0]=reactExports.useState(0),[o0,a0]=reactExports.useState(0),f0=reactExports.useRef([]),l0=reactExports.useCallback(k0=>{t0(k0)},[]);reactExports.useEffect(()=>{const k0=_e.find(d0=>d0.id===r0);k0&&(i0==null||i0(k0))},[r0]),reactExports.useEffect(()=>{function k0(){const d0=document.activeElement;if(!((d0==null?void 0:d0.tagName)==="INPUT"||(d0==null?void 0:d0.tagName)==="TEXTAREA"||d0!=null&&d0.isContentEditable)){const h0=_e.findIndex(p0=>p0.id===r0);h0===-1&&e0&&t0(e0);const b0=f0.current[h0];b0&&(b0.focus(),a0((b0==null?void 0:b0.offsetLeft)??0),s0((b0==null?void 0:b0.clientWidth)??0))}}return k0(),window.addEventListener("resize",k0),()=>window.removeEventListener("resize",k0)},[r0,_e,e0]);const u0=reactExports.useCallback(k0=>{var d0,h0,b0;const p0=_e.findIndex(m0=>m0.id===k0);k0===((d0=_e[0])==null?void 0:d0.id)?t0((h0=_e[_e.length-1])==null?void 0:h0.id):t0((b0=_e[p0-1])==null?void 0:b0.id)},[_e]),A0=reactExports.useCallback(k0=>{var d0,h0,b0;const p0=_e.findIndex(m0=>m0.id===k0);k0===((d0=_e[_e.length-1])==null?void 0:d0.id)?t0((h0=_e[0])==null?void 0:h0.id):t0((b0=_e[p0+1])==null?void 0:b0.id)},[_e]),c0=reactExports.useCallback(k0=>{var d0,h0;switch(k0.code){case"ArrowLeft":u0(r0);break;case"ArrowRight":A0(r0);break;case"Home":t0((d0=_e[0])==null?void 0:d0.id);break;case"End":t0((h0=_e[_e.length-1])==null?void 0:h0.id);break}},[r0,_e,A0,u0]);return{activeTab:r0,setSelectedTab:l0,tabsRef:f0,tabUnderlineLeft:o0,tabUnderlineWidth:n0,onKeyDown:c0}},TabsItem=({icon:e0,badge:_e,label:i0,id:r0,order:t0})=>{const{activeTab:n0,setSelectedTab:s0,onKeyDown:o0,tabsRef:a0}=useTabsContext(),{t:f0}=useTranslation(),l0=clsx("nav-link d-inline-flex gap-8 border-0",n0===r0?"selected":"");return jsxRuntimeExports.jsx("li",{className:"nav-item flex-shrink-0",role:"presentation",children:jsxRuntimeExports.jsxs("button",{ref:u0=>a0.current[t0]=u0,type:"button",id:`tab-${r0}`,className:l0,onClick:()=>s0(r0),onKeyDown:u0=>o0(u0),role:"tab","aria-controls":`tabpanel-${r0}`,"aria-selected":n0===r0,tabIndex:n0===r0?0:-1,children:[e0,jsxRuntimeExports.jsxs("small",{children:[f0(i0)," ",_e]})]})})},TabsList=e0=>{const{items:_e,tabUnderlineLeft:i0,tabUnderlineWidth:r0}=useTabsContext(),{className:t0,fullWidth:n0,isSticky:s0,stickyTop:o0,...a0}=e0,f0=clsx("nav nav-tabs flex-nowrap",{"w-100":n0}),l0=clsx(" flex-shrink-0 overflow-x-auto",{"position-sticky z-1":s0,"position-relative":!s0},t0);return jsxRuntimeExports.jsx("div",{className:l0,...a0,style:s0?{top:o0}:void 0,children:jsxRuntimeExports.jsxs("ul",{className:f0,role:"tablist",children:[_e.map((u0,A0)=>jsxRuntimeExports.jsx(Tabs.Item,{order:A0,...u0},u0.id)),jsxRuntimeExports.jsx("span",{className:"nav-slide",style:{left:i0,width:r0}})]})})},TabsPanel=({children:e0,currentItem:_e,fullHeight:i0,className:r0})=>{const{activeTab:t0}=useTabsContext(),n0=clsx("tab-content d-flex flex-fill w-100",{"position-relative h-100":i0},r0);return jsxRuntimeExports.jsx("div",{className:n0,children:jsxRuntimeExports.jsx("div",{className:`tab-pane flex-fill w-100 fade ${t0===(_e==null?void 0:_e.id)?"show active":""}`,id:`tabpanel-${_e==null?void 0:_e.id}`,role:"tabpanel","aria-labelledby":`tab-${_e==null?void 0:_e.id}`,tabIndex:0,children:e0})})},Tabs=({defaultId:e0,items:_e,fullWidth:i0=!1,fullHeight:r0=!1,onChange:t0,children:n0,isSticky:s0=!1,stickyTop:o0=0,headerClassName:a0,contentClassName:f0})=>{const{activeTab:l0,setSelectedTab:u0,tabsRef:A0,tabUnderlineLeft:c0,tabUnderlineWidth:k0,onKeyDown:d0}=useTabs({defaultId:e0,items:_e,onChange:t0}),h0=reactExports.useMemo(()=>({activeTab:l0,items:_e,setSelectedTab:u0,tabsRef:A0,tabUnderlineLeft:c0,tabUnderlineWidth:k0,onKeyDown:d0}),[l0,_e,d0,u0,c0,k0,A0]),b0=_e.find(p0=>p0.id===l0);return jsxRuntimeExports.jsx(TabsContext.Provider,{value:h0,children:typeof n0=="function"?n0(b0):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tabs.List,{fullWidth:i0,isSticky:s0,stickyTop:o0,className:a0}),jsxRuntimeExports.jsx(Tabs.Panel,{currentItem:b0,fullHeight:r0,className:f0,children:b0==null?void 0:b0.content})]})})};Tabs.Item=TabsItem;Tabs.Panel=TabsPanel;Tabs.List=TabsList;const orderedTabs=["audio-capture","video-capture","internal-link","external-link","iframe","upload","workspace","nextcloud","google-drive","video-embedder"],GOOGLE_DRIVE_VIEW_WORKFLOW="io.edifice.google.drive.controller.GoogleDriveController|view",mediaLibraryTypes={none:null,audio:{title:"bbm.audio.modal.title",defaultTab:"audio-capture"},video:{title:"bbm.video.modal.title",defaultTab:"video-capture"},image:{title:"bbm.image.modal.title",defaultTab:"workspace"},attachment:{title:"bbm.attachment.modal.title",defaultTab:"workspace"},hyperlink:{title:"bbm.link.modal.title",defaultTab:"linker"},embedder:{title:"bbm.embed.modal.title",defaultTab:"iframe"},studio:{title:"bbm.studio.modal.title",defaultTab:"audio-capture"}},MediaLibrary=reactExports.forwardRef(({appCode:e0,visibility:_e,multiple:i0,onSuccess:r0,onCancel:t0,onTabChange:n0},s0)=>{var o0,a0,f0;const l0=reactExports.useRef(),u0=reactExports.useRef(null);reactExports.useImperativeHandle(s0,()=>({show:X0,hide:Z0,showLink:N0,type:g0,...u0.current}));const{t:A0}=useTranslation(),c0=useHasWorkflow("org.entcore.workspace.controllers.WorkspaceController|addDocument"),k0=useHasWorkflow("com.opendigitaleducation.video.controllers.VideoController|capture"),d0=useHasWorkflow("fr.openent.nextcloud.controller.NextcloudController|view"),h0=useHasWorkflow(GOOGLE_DRIVE_VIEW_WORKFLOW),{data:b0}=usePublicConf("workspace"),p0=((o0=b0==null?void 0:b0["folder-service"])==null?void 0:o0.includes("nextcloud"))&&d0,m0=((a0=b0==null?void 0:b0["folder-service"])==null?void 0:a0.includes("google-drive"))&&h0,[g0,v0]=reactExports.useState(null);useHttpErrorToast({active:!!g0,isDismissible:!0,duration:1/0});const x0={workspace:{id:"workspace",icon:jsxRuntimeExports.jsx(SvgIconFolder,{}),label:A0("bbm.workspace"),content:jsxRuntimeExports.jsx(InnerTabs.Workspace,{}),availableFor:["audio","video","image","attachment"],isEnable:null},nextcloud:{id:"nextcloud",icon:jsxRuntimeExports.jsx(SvgIconGlobe2,{}),label:A0("bbm.nextcloud"),content:jsxRuntimeExports.jsx(InnerTabs.Nextcloud,{}),availableFor:["audio","video","image","attachment"],isEnable:()=>!!p0},"google-drive":{id:"google-drive",icon:jsxRuntimeExports.jsx(SvgIconGlobe2,{}),label:A0("bbm.google-drive"),content:jsxRuntimeExports.jsx(InnerTabs.GoogleDrive,{}),availableFor:["audio","video","image","attachment"],isEnable:()=>!!m0},upload:{id:"upload",icon:jsxRuntimeExports.jsx(SvgIconSmartphone,{}),label:A0("bbm.device"),content:jsxRuntimeExports.jsx(InnerTabs.Upload,{}),availableFor:["audio","video","image","attachment"],isEnable:()=>!!c0},"video-capture":{id:"video-capture",icon:jsxRuntimeExports.jsx(SvgIconRecordVideo,{}),label:A0("bbm.video"),content:jsxRuntimeExports.jsx(InnerTabs.Video,{}),availableFor:["video","studio"],isEnable:()=>!!k0},"audio-capture":{id:"audio-capture",icon:jsxRuntimeExports.jsx(SvgIconMic,{}),label:A0("bbm.audio"),content:jsxRuntimeExports.jsx(InnerTabs.Audio,{}),availableFor:["audio","studio"],isEnable:()=>!!c0},"external-link":{id:"external-link",icon:jsxRuntimeExports.jsx(SvgIconGlobe,{}),label:A0("bbm.linker.ext"),content:jsxRuntimeExports.jsx(InnerTabs.ExternalLink,{...l0.current}),availableFor:["hyperlink"],isEnable:null},"internal-link":{id:"internal-link",icon:jsxRuntimeExports.jsx(SvgIconApplications,{}),label:A0("bbm.linker.int"),content:jsxRuntimeExports.jsx(InnerTabs.InternalLink,{...l0.current}),availableFor:["hyperlink"],isEnable:null},iframe:{id:"iframe",icon:jsxRuntimeExports.jsx(SvgIconCode,{}),label:A0("bbm.embed"),content:jsxRuntimeExports.jsx(InnerTabs.Iframe,{}),availableFor:["embedder"],isEnable:null},"video-embedder":{id:"iframe",icon:jsxRuntimeExports.jsx(SvgIconCode,{}),label:A0("bbm.embed"),content:jsxRuntimeExports.jsx(InnerTabs.VideoEmbedder,{}),availableFor:["video"],isEnable:null}},w0=reactExports.useMemo(()=>orderedTabs.map(Y0=>x0[Y0]).filter(Y0=>{var e2;return((e2=Y0.isEnable)==null?void 0:e2.call(Y0))!==!1&&(Y0.availableFor.length===0||Y0.availableFor.includes(g0))}),[g0]),[_0,y0]=reactExports.useState(),S0=reactExports.useMemo(()=>{const Y0=w0.findIndex(e2=>e2.id===_0);return 0>Y0||Y0>=w0.length?0:Y0},[w0,_0]),[B0,I0]=reactExports.useState(),[T0,R0]=reactExports.useState(),[E0,C0]=reactExports.useState([]),[G0,F0]=reactExports.useState(),[M0,j0]=reactExports.useState(!1);function D0(Y0){throw w0.findIndex(e2=>e2.id===Y0)<0?"tab.not.visible":"not.implemented.yet"}function $0(Y0){l0.current=void 0,y0(void 0),v0(Y0)}const X0=Y0=>{v0(Y0)},Z0=()=>{v0(null)},N0=Y0=>{l0.current=Y0,"resourceId"in Y0||"appPrefix"in Y0||y0("external-link"),v0("hyperlink")};reactExports.useEffect(()=>{var Y0,e2;const s2=g0||"none";!_0&&typeof((Y0=mediaLibraryTypes[s2])==null?void 0:Y0.defaultTab)=="string"&&y0((e2=mediaLibraryTypes[s2])==null?void 0:e2.defaultTab)},[_0,g0]);const Q0=A0(((f0=mediaLibraryTypes[g0??"none"])==null?void 0:f0.title)??"bbm"),z0=()=>{l0.current=void 0,R0(void 0),I0(void 0),y0(void 0),F0(void 0),C0([])},K0=Y0=>{n0==null||n0(Y0,E0),z0()},H0=reactExports.useCallback(()=>{if(M0)return;const Y0=async e2=>{e2 instanceof Array&&["protected","public"].findIndex(s2=>s2===_e)>=0&&(e2=await odeServices.workspace().transferDocuments(e2,e0??"media-library",_e)),r0(e2)};(async()=>{j0(!0);try{if(G0){const e2=await G0();await Y0(e2)}else T0&&await Y0(T0);z0()}catch{}finally{j0(!1)}})()},[M0,G0,T0,r0,_e,e0]),J0=()=>{t0(E0),z0()};return g0&&jsxRuntimeExports.jsx(MediaLibraryContext.Provider,{value:{appCode:e0,visibility:_e,multiple:i0,type:g0,setResultCounter:I0,setResult:R0,setCancellable:Y0=>C0([...Y0]),setVisibleTab:D0,switchType:$0,setPreSuccess:F0},children:jsxRuntimeExports.jsxs(Modal,{id:"media-library",isOpen:g0!==null,onModalClose:J0,size:"lg",viewport:!0,scrollable:!0,children:[jsxRuntimeExports.jsx(Modal.Header,{onModalClose:J0,children:Q0}),jsxRuntimeExports.jsx(Tabs,{items:w0,defaultId:w0[S0].id,onChange:K0,children:Y0=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[w0.length>1&&jsxRuntimeExports.jsx(Tabs.List,{className:"mt-16"}),jsxRuntimeExports.jsx(Modal.Body,{className:"d-flex",children:jsxRuntimeExports.jsx(Tabs.Panel,{currentItem:Y0,children:Y0==null?void 0:Y0.content})})]})}),jsxRuntimeExports.jsxs(Modal.Footer,{children:[jsxRuntimeExports.jsx(Button,{type:"button",color:"tertiary",variant:"ghost",onClick:J0,children:A0("cancel")}),jsxRuntimeExports.jsx(Button,{type:"button",color:"primary",variant:"filled",disabled:typeof T0>"u"||M0,onClick:H0,children:B0&&B0>1?A0("addMultiple",{number:B0}):A0("add")})]})]})})});Object.assign(MediaLibrary,InnerTabs);function isObject$3(e0){return e0!==null&&typeof e0=="object"&&"constructor"in e0&&e0.constructor===Object}function extend$2(e0,_e){e0===void 0&&(e0={}),_e===void 0&&(_e={}),Object.keys(_e).forEach(i0=>{typeof e0[i0]>"u"?e0[i0]=_e[i0]:isObject$3(_e[i0])&&isObject$3(e0[i0])&&Object.keys(_e[i0]).length>0&&extend$2(e0[i0],_e[i0])})}const ssrDocument={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function getDocument(){const e0=typeof document<"u"?document:{};return extend$2(e0,ssrDocument),e0}const ssrWindow={document:ssrDocument,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function e0(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e0){return typeof setTimeout>"u"?(e0(),null):setTimeout(e0,0)},cancelAnimationFrame(e0){typeof setTimeout>"u"||clearTimeout(e0)}};function getWindow(){const e0=typeof window<"u"?window:{};return extend$2(e0,ssrWindow),e0}function deleteProps(e0){const _e=e0;Object.keys(_e).forEach(i0=>{try{_e[i0]=null}catch{}try{delete _e[i0]}catch{}})}function nextTick(e0,_e){return _e===void 0&&(_e=0),setTimeout(e0,_e)}function now(){return Date.now()}function getComputedStyle$1(e0){const _e=getWindow();let i0;return _e.getComputedStyle&&(i0=_e.getComputedStyle(e0,null)),!i0&&e0.currentStyle&&(i0=e0.currentStyle),i0||(i0=e0.style),i0}function getTranslate(e0,_e){_e===void 0&&(_e="x");const i0=getWindow();let r0,t0,n0;const s0=getComputedStyle$1(e0);return i0.WebKitCSSMatrix?(t0=s0.transform||s0.webkitTransform,t0.split(",").length>6&&(t0=t0.split(", ").map(o0=>o0.replace(",",".")).join(", ")),n0=new i0.WebKitCSSMatrix(t0==="none"?"":t0)):(n0=s0.MozTransform||s0.OTransform||s0.MsTransform||s0.msTransform||s0.transform||s0.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r0=n0.toString().split(",")),_e==="x"&&(i0.WebKitCSSMatrix?t0=n0.m41:r0.length===16?t0=parseFloat(r0[12]):t0=parseFloat(r0[4])),_e==="y"&&(i0.WebKitCSSMatrix?t0=n0.m42:r0.length===16?t0=parseFloat(r0[13]):t0=parseFloat(r0[5])),t0||0}function isObject$2(e0){return typeof e0=="object"&&e0!==null&&e0.constructor&&Object.prototype.toString.call(e0).slice(8,-1)==="Object"}function isNode(e0){return typeof window<"u"&&typeof window.HTMLElement<"u"?e0 instanceof HTMLElement:e0&&(e0.nodeType===1||e0.nodeType===11)}function extend$1(){const e0=Object(arguments.length<=0?void 0:arguments[0]),_e=["__proto__","constructor","prototype"];for(let i0=1;i0<arguments.length;i0+=1){const r0=i0<0||arguments.length<=i0?void 0:arguments[i0];if(r0!=null&&!isNode(r0)){const t0=Object.keys(Object(r0)).filter(n0=>_e.indexOf(n0)<0);for(let n0=0,s0=t0.length;n0<s0;n0+=1){const o0=t0[n0],a0=Object.getOwnPropertyDescriptor(r0,o0);a0!==void 0&&a0.enumerable&&(isObject$2(e0[o0])&&isObject$2(r0[o0])?r0[o0].__swiper__?e0[o0]=r0[o0]:extend$1(e0[o0],r0[o0]):!isObject$2(e0[o0])&&isObject$2(r0[o0])?(e0[o0]={},r0[o0].__swiper__?e0[o0]=r0[o0]:extend$1(e0[o0],r0[o0])):e0[o0]=r0[o0])}}}return e0}function setCSSProperty(e0,_e,i0){e0.style.setProperty(_e,i0)}function animateCSSModeScroll(e0){let{swiper:_e,targetPosition:i0,side:r0}=e0;const t0=getWindow(),n0=-_e.translate;let s0=null,o0;const a0=_e.params.speed;_e.wrapperEl.style.scrollSnapType="none",t0.cancelAnimationFrame(_e.cssModeFrameID);const f0=i0>n0?"next":"prev",l0=(A0,c0)=>f0==="next"&&A0>=c0||f0==="prev"&&A0<=c0,u0=()=>{o0=new Date().getTime(),s0===null&&(s0=o0);const A0=Math.max(Math.min((o0-s0)/a0,1),0),c0=.5-Math.cos(A0*Math.PI)/2;let k0=n0+c0*(i0-n0);if(l0(k0,i0)&&(k0=i0),_e.wrapperEl.scrollTo({[r0]:k0}),l0(k0,i0)){_e.wrapperEl.style.overflow="hidden",_e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{_e.wrapperEl.style.overflow="",_e.wrapperEl.scrollTo({[r0]:k0})}),t0.cancelAnimationFrame(_e.cssModeFrameID);return}_e.cssModeFrameID=t0.requestAnimationFrame(u0)};u0()}function elementChildren(e0,_e){return _e===void 0&&(_e=""),[...e0.children].filter(i0=>i0.matches(_e))}function createElement(e0,_e){_e===void 0&&(_e=[]);const i0=document.createElement(e0);return i0.classList.add(...Array.isArray(_e)?_e:[_e]),i0}function elementPrevAll(e0,_e){const i0=[];for(;e0.previousElementSibling;){const r0=e0.previousElementSibling;_e?r0.matches(_e)&&i0.push(r0):i0.push(r0),e0=r0}return i0}function elementNextAll(e0,_e){const i0=[];for(;e0.nextElementSibling;){const r0=e0.nextElementSibling;_e?r0.matches(_e)&&i0.push(r0):i0.push(r0),e0=r0}return i0}function elementStyle(e0,_e){return getWindow().getComputedStyle(e0,null).getPropertyValue(_e)}function elementIndex(e0){let _e=e0,i0;if(_e){for(i0=0;(_e=_e.previousSibling)!==null;)_e.nodeType===1&&(i0+=1);return i0}}function elementParents(e0,_e){const i0=[];let r0=e0.parentElement;for(;r0;)_e?r0.matches(_e)&&i0.push(r0):i0.push(r0),r0=r0.parentElement;return i0}function elementOuterSize(e0,_e,i0){const r0=getWindow();return e0[_e==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r0.getComputedStyle(e0,null).getPropertyValue(_e==="width"?"margin-right":"margin-top"))+parseFloat(r0.getComputedStyle(e0,null).getPropertyValue(_e==="width"?"margin-left":"margin-bottom"))}function createElementIfNotDefined(e0,_e,i0,r0){return e0.params.createElements&&Object.keys(r0).forEach(t0=>{if(!i0[t0]&&i0.auto===!0){let n0=elementChildren(e0.el,`.${r0[t0]}`)[0];n0||(n0=createElement("div",r0[t0]),n0.className=r0[t0],e0.el.append(n0)),i0[t0]=n0,_e[t0]=n0}}),i0}function classesToSelector(e0){return e0===void 0&&(e0=""),`.${e0.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function Pagination(e0){let{swiper:_e,extendParams:i0,on:r0,emit:t0}=e0;const n0="swiper-pagination";i0({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:p0=>p0,formatFractionTotal:p0=>p0,bulletClass:`${n0}-bullet`,bulletActiveClass:`${n0}-bullet-active`,modifierClass:`${n0}-`,currentClass:`${n0}-current`,totalClass:`${n0}-total`,hiddenClass:`${n0}-hidden`,progressbarFillClass:`${n0}-progressbar-fill`,progressbarOppositeClass:`${n0}-progressbar-opposite`,clickableClass:`${n0}-clickable`,lockClass:`${n0}-lock`,horizontalClass:`${n0}-horizontal`,verticalClass:`${n0}-vertical`,paginationDisabledClass:`${n0}-disabled`}}),_e.pagination={el:null,bullets:[]};let s0,o0=0;const a0=p0=>(Array.isArray(p0)?p0:[p0]).filter(m0=>!!m0);function f0(){return!_e.params.pagination.el||!_e.pagination.el||Array.isArray(_e.pagination.el)&&_e.pagination.el.length===0}function l0(p0,m0){const{bulletActiveClass:g0}=_e.params.pagination;p0&&(p0=p0[`${m0==="prev"?"previous":"next"}ElementSibling`],p0&&(p0.classList.add(`${g0}-${m0}`),p0=p0[`${m0==="prev"?"previous":"next"}ElementSibling`],p0&&p0.classList.add(`${g0}-${m0}-${m0}`)))}function u0(p0){const m0=p0.target.closest(classesToSelector(_e.params.pagination.bulletClass));if(!m0)return;p0.preventDefault();const g0=elementIndex(m0)*_e.params.slidesPerGroup;if(_e.params.loop){if(_e.realIndex===g0)return;const v0=_e.getSlideIndexByData(g0),x0=_e.getSlideIndexByData(_e.realIndex);v0>_e.slides.length-_e.loopedSlides&&_e.loopFix({direction:v0>x0?"next":"prev",activeSlideIndex:v0,slideTo:!1}),_e.slideToLoop(g0)}else _e.slideTo(g0)}function A0(){const p0=_e.rtl,m0=_e.params.pagination;if(f0())return;let g0=_e.pagination.el;g0=a0(g0);let v0,x0;const w0=_e.virtual&&_e.params.virtual.enabled?_e.virtual.slides.length:_e.slides.length,_0=_e.params.loop?Math.ceil(w0/_e.params.slidesPerGroup):_e.snapGrid.length;if(_e.params.loop?(x0=_e.previousRealIndex||0,v0=_e.params.slidesPerGroup>1?Math.floor(_e.realIndex/_e.params.slidesPerGroup):_e.realIndex):typeof _e.snapIndex<"u"?(v0=_e.snapIndex,x0=_e.previousSnapIndex):(x0=_e.previousIndex||0,v0=_e.activeIndex||0),m0.type==="bullets"&&_e.pagination.bullets&&_e.pagination.bullets.length>0){const y0=_e.pagination.bullets;let S0,B0,I0;if(m0.dynamicBullets&&(s0=elementOuterSize(y0[0],_e.isHorizontal()?"width":"height"),g0.forEach(T0=>{T0.style[_e.isHorizontal()?"width":"height"]=`${s0*(m0.dynamicMainBullets+4)}px`}),m0.dynamicMainBullets>1&&x0!==void 0&&(o0+=v0-(x0||0),o0>m0.dynamicMainBullets-1?o0=m0.dynamicMainBullets-1:o0<0&&(o0=0)),S0=Math.max(v0-o0,0),B0=S0+(Math.min(y0.length,m0.dynamicMainBullets)-1),I0=(B0+S0)/2),y0.forEach(T0=>{const R0=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(E0=>`${m0.bulletActiveClass}${E0}`)].map(E0=>typeof E0=="string"&&E0.includes(" ")?E0.split(" "):E0).flat();T0.classList.remove(...R0)}),g0.length>1)y0.forEach(T0=>{const R0=elementIndex(T0);R0===v0?T0.classList.add(...m0.bulletActiveClass.split(" ")):_e.isElement&&T0.setAttribute("part","bullet"),m0.dynamicBullets&&(R0>=S0&&R0<=B0&&T0.classList.add(...`${m0.bulletActiveClass}-main`.split(" ")),R0===S0&&l0(T0,"prev"),R0===B0&&l0(T0,"next"))});else{const T0=y0[v0];if(T0&&T0.classList.add(...m0.bulletActiveClass.split(" ")),_e.isElement&&y0.forEach((R0,E0)=>{R0.setAttribute("part",E0===v0?"bullet-active":"bullet")}),m0.dynamicBullets){const R0=y0[S0],E0=y0[B0];for(let C0=S0;C0<=B0;C0+=1)y0[C0]&&y0[C0].classList.add(...`${m0.bulletActiveClass}-main`.split(" "));l0(R0,"prev"),l0(E0,"next")}}if(m0.dynamicBullets){const T0=Math.min(y0.length,m0.dynamicMainBullets+4),R0=(s0*T0-s0)/2-I0*s0,E0=p0?"right":"left";y0.forEach(C0=>{C0.style[_e.isHorizontal()?E0:"top"]=`${R0}px`})}}g0.forEach((y0,S0)=>{if(m0.type==="fraction"&&(y0.querySelectorAll(classesToSelector(m0.currentClass)).forEach(B0=>{B0.textContent=m0.formatFractionCurrent(v0+1)}),y0.querySelectorAll(classesToSelector(m0.totalClass)).forEach(B0=>{B0.textContent=m0.formatFractionTotal(_0)})),m0.type==="progressbar"){let B0;m0.progressbarOpposite?B0=_e.isHorizontal()?"vertical":"horizontal":B0=_e.isHorizontal()?"horizontal":"vertical";const I0=(v0+1)/_0;let T0=1,R0=1;B0==="horizontal"?T0=I0:R0=I0,y0.querySelectorAll(classesToSelector(m0.progressbarFillClass)).forEach(E0=>{E0.style.transform=`translate3d(0,0,0) scaleX(${T0}) scaleY(${R0})`,E0.style.transitionDuration=`${_e.params.speed}ms`})}m0.type==="custom"&&m0.renderCustom?(y0.innerHTML=m0.renderCustom(_e,v0+1,_0),S0===0&&t0("paginationRender",y0)):(S0===0&&t0("paginationRender",y0),t0("paginationUpdate",y0)),_e.params.watchOverflow&&_e.enabled&&y0.classList[_e.isLocked?"add":"remove"](m0.lockClass)})}function c0(){const p0=_e.params.pagination;if(f0())return;const m0=_e.virtual&&_e.params.virtual.enabled?_e.virtual.slides.length:_e.slides.length;let g0=_e.pagination.el;g0=a0(g0);let v0="";if(p0.type==="bullets"){let x0=_e.params.loop?Math.ceil(m0/_e.params.slidesPerGroup):_e.snapGrid.length;_e.params.freeMode&&_e.params.freeMode.enabled&&x0>m0&&(x0=m0);for(let w0=0;w0<x0;w0+=1)p0.renderBullet?v0+=p0.renderBullet.call(_e,w0,p0.bulletClass):v0+=`<${p0.bulletElement} ${_e.isElement?'part="bullet"':""} class="${p0.bulletClass}"></${p0.bulletElement}>`}p0.type==="fraction"&&(p0.renderFraction?v0=p0.renderFraction.call(_e,p0.currentClass,p0.totalClass):v0=`<span class="${p0.currentClass}"></span> / <span class="${p0.totalClass}"></span>`),p0.type==="progressbar"&&(p0.renderProgressbar?v0=p0.renderProgressbar.call(_e,p0.progressbarFillClass):v0=`<span class="${p0.progressbarFillClass}"></span>`),_e.pagination.bullets=[],g0.forEach(x0=>{p0.type!=="custom"&&(x0.innerHTML=v0||""),p0.type==="bullets"&&_e.pagination.bullets.push(...x0.querySelectorAll(classesToSelector(p0.bulletClass)))}),p0.type!=="custom"&&t0("paginationRender",g0[0])}function k0(){_e.params.pagination=createElementIfNotDefined(_e,_e.originalParams.pagination,_e.params.pagination,{el:"swiper-pagination"});const p0=_e.params.pagination;if(!p0.el)return;let m0;typeof p0.el=="string"&&_e.isElement&&(m0=_e.el.querySelector(p0.el)),!m0&&typeof p0.el=="string"&&(m0=[...document.querySelectorAll(p0.el)]),m0||(m0=p0.el),!(!m0||m0.length===0)&&(_e.params.uniqueNavElements&&typeof p0.el=="string"&&Array.isArray(m0)&&m0.length>1&&(m0=[..._e.el.querySelectorAll(p0.el)],m0.length>1&&(m0=m0.filter(g0=>elementParents(g0,".swiper")[0]===_e.el)[0])),Array.isArray(m0)&&m0.length===1&&(m0=m0[0]),Object.assign(_e.pagination,{el:m0}),m0=a0(m0),m0.forEach(g0=>{p0.type==="bullets"&&p0.clickable&&g0.classList.add(p0.clickableClass),g0.classList.add(p0.modifierClass+p0.type),g0.classList.add(_e.isHorizontal()?p0.horizontalClass:p0.verticalClass),p0.type==="bullets"&&p0.dynamicBullets&&(g0.classList.add(`${p0.modifierClass}${p0.type}-dynamic`),o0=0,p0.dynamicMainBullets<1&&(p0.dynamicMainBullets=1)),p0.type==="progressbar"&&p0.progressbarOpposite&&g0.classList.add(p0.progressbarOppositeClass),p0.clickable&&g0.addEventListener("click",u0),_e.enabled||g0.classList.add(p0.lockClass)}))}function d0(){const p0=_e.params.pagination;if(f0())return;let m0=_e.pagination.el;m0&&(m0=a0(m0),m0.forEach(g0=>{g0.classList.remove(p0.hiddenClass),g0.classList.remove(p0.modifierClass+p0.type),g0.classList.remove(_e.isHorizontal()?p0.horizontalClass:p0.verticalClass),p0.clickable&&g0.removeEventListener("click",u0)})),_e.pagination.bullets&&_e.pagination.bullets.forEach(g0=>g0.classList.remove(...p0.bulletActiveClass.split(" ")))}r0("changeDirection",()=>{if(!_e.pagination||!_e.pagination.el)return;const p0=_e.params.pagination;let{el:m0}=_e.pagination;m0=a0(m0),m0.forEach(g0=>{g0.classList.remove(p0.horizontalClass,p0.verticalClass),g0.classList.add(_e.isHorizontal()?p0.horizontalClass:p0.verticalClass)})}),r0("init",()=>{_e.params.pagination.enabled===!1?b0():(k0(),c0(),A0())}),r0("activeIndexChange",()=>{typeof _e.snapIndex>"u"&&A0()}),r0("snapIndexChange",()=>{A0()}),r0("snapGridLengthChange",()=>{c0(),A0()}),r0("destroy",()=>{d0()}),r0("enable disable",()=>{let{el:p0}=_e.pagination;p0&&(p0=a0(p0),p0.forEach(m0=>m0.classList[_e.enabled?"remove":"add"](_e.params.pagination.lockClass)))}),r0("lock unlock",()=>{A0()}),r0("click",(p0,m0)=>{const g0=m0.target,v0=a0(_e.pagination.el);if(_e.params.pagination.el&&_e.params.pagination.hideOnClick&&v0&&v0.length>0&&!g0.classList.contains(_e.params.pagination.bulletClass)){if(_e.navigation&&(_e.navigation.nextEl&&g0===_e.navigation.nextEl||_e.navigation.prevEl&&g0===_e.navigation.prevEl))return;const x0=v0[0].classList.contains(_e.params.pagination.hiddenClass);t0(x0===!0?"paginationShow":"paginationHide"),v0.forEach(w0=>w0.classList.toggle(_e.params.pagination.hiddenClass))}});const h0=()=>{_e.el.classList.remove(_e.params.pagination.paginationDisabledClass);let{el:p0}=_e.pagination;p0&&(p0=a0(p0),p0.forEach(m0=>m0.classList.remove(_e.params.pagination.paginationDisabledClass))),k0(),c0(),A0()},b0=()=>{_e.el.classList.add(_e.params.pagination.paginationDisabledClass);let{el:p0}=_e.pagination;p0&&(p0=a0(p0),p0.forEach(m0=>m0.classList.add(_e.params.pagination.paginationDisabledClass))),d0()};Object.assign(_e.pagination,{enable:h0,disable:b0,render:c0,update:A0,init:k0,destroy:d0})}let support;function calcSupport(){const e0=getWindow(),_e=getDocument();return{smoothScroll:_e.documentElement&&_e.documentElement.style&&"scrollBehavior"in _e.documentElement.style,touch:!!("ontouchstart"in e0||e0.DocumentTouch&&_e instanceof e0.DocumentTouch)}}function getSupport(){return support||(support=calcSupport()),support}let deviceCached;function calcDevice(e0){let{userAgent:_e}=e0===void 0?{}:e0;const i0=getSupport(),r0=getWindow(),t0=r0.navigator.platform,n0=_e||r0.navigator.userAgent,s0={ios:!1,android:!1},o0=r0.screen.width,a0=r0.screen.height,f0=n0.match(/(Android);?[\s\/]+([\d.]+)?/);let l0=n0.match(/(iPad).*OS\s([\d_]+)/);const u0=n0.match(/(iPod)(.*OS\s([\d_]+))?/),A0=!l0&&n0.match(/(iPhone\sOS|iOS)\s([\d_]+)/),c0=t0==="Win32";let k0=t0==="MacIntel";const d0=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!l0&&k0&&i0.touch&&d0.indexOf(`${o0}x${a0}`)>=0&&(l0=n0.match(/(Version)\/([\d.]+)/),l0||(l0=[0,1,"13_0_0"]),k0=!1),f0&&!c0&&(s0.os="android",s0.android=!0),(l0||A0||u0)&&(s0.os="ios",s0.ios=!0),s0}function getDevice(e0){return e0===void 0&&(e0={}),deviceCached||(deviceCached=calcDevice(e0)),deviceCached}let browser;function calcBrowser(){const e0=getWindow();let _e=!1;function i0(){const r0=e0.navigator.userAgent.toLowerCase();return r0.indexOf("safari")>=0&&r0.indexOf("chrome")<0&&r0.indexOf("android")<0}if(i0()){const r0=String(e0.navigator.userAgent);if(r0.includes("Version/")){const[t0,n0]=r0.split("Version/")[1].split(" ")[0].split(".").map(s0=>Number(s0));_e=t0<16||t0===16&&n0<2}}return{isSafari:_e||i0(),needPerspectiveFix:_e,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e0.navigator.userAgent)}}function getBrowser(){return browser||(browser=calcBrowser()),browser}function Resize(e0){let{swiper:_e,on:i0,emit:r0}=e0;const t0=getWindow();let n0=null,s0=null;const o0=()=>{!_e||_e.destroyed||!_e.initialized||(r0("beforeResize"),r0("resize"))},a0=()=>{!_e||_e.destroyed||!_e.initialized||(n0=new ResizeObserver(u0=>{s0=t0.requestAnimationFrame(()=>{const{width:A0,height:c0}=_e;let k0=A0,d0=c0;u0.forEach(h0=>{let{contentBoxSize:b0,contentRect:p0,target:m0}=h0;m0&&m0!==_e.el||(k0=p0?p0.width:(b0[0]||b0).inlineSize,d0=p0?p0.height:(b0[0]||b0).blockSize)}),(k0!==A0||d0!==c0)&&o0()})}),n0.observe(_e.el))},f0=()=>{s0&&t0.cancelAnimationFrame(s0),n0&&n0.unobserve&&_e.el&&(n0.unobserve(_e.el),n0=null)},l0=()=>{!_e||_e.destroyed||!_e.initialized||r0("orientationchange")};i0("init",()=>{if(_e.params.resizeObserver&&typeof t0.ResizeObserver<"u"){a0();return}t0.addEventListener("resize",o0),t0.addEventListener("orientationchange",l0)}),i0("destroy",()=>{f0(),t0.removeEventListener("resize",o0),t0.removeEventListener("orientationchange",l0)})}function Observer(e0){let{swiper:_e,extendParams:i0,on:r0,emit:t0}=e0;const n0=[],s0=getWindow(),o0=function(l0,u0){u0===void 0&&(u0={});const A0=s0.MutationObserver||s0.WebkitMutationObserver,c0=new A0(k0=>{if(_e.__preventObserver__)return;if(k0.length===1){t0("observerUpdate",k0[0]);return}const d0=function(){t0("observerUpdate",k0[0])};s0.requestAnimationFrame?s0.requestAnimationFrame(d0):s0.setTimeout(d0,0)});c0.observe(l0,{attributes:typeof u0.attributes>"u"?!0:u0.attributes,childList:typeof u0.childList>"u"?!0:u0.childList,characterData:typeof u0.characterData>"u"?!0:u0.characterData}),n0.push(c0)},a0=()=>{if(_e.params.observer){if(_e.params.observeParents){const l0=elementParents(_e.hostEl);for(let u0=0;u0<l0.length;u0+=1)o0(l0[u0])}o0(_e.hostEl,{childList:_e.params.observeSlideChildren}),o0(_e.wrapperEl,{attributes:!1})}},f0=()=>{n0.forEach(l0=>{l0.disconnect()}),n0.splice(0,n0.length)};i0({observer:!1,observeParents:!1,observeSlideChildren:!1}),r0("init",a0),r0("destroy",f0)}var eventsEmitter={on(e0,_e,i0){const r0=this;if(!r0.eventsListeners||r0.destroyed||typeof _e!="function")return r0;const t0=i0?"unshift":"push";return e0.split(" ").forEach(n0=>{r0.eventsListeners[n0]||(r0.eventsListeners[n0]=[]),r0.eventsListeners[n0][t0](_e)}),r0},once(e0,_e,i0){const r0=this;if(!r0.eventsListeners||r0.destroyed||typeof _e!="function")return r0;function t0(){r0.off(e0,t0),t0.__emitterProxy&&delete t0.__emitterProxy;for(var n0=arguments.length,s0=new Array(n0),o0=0;o0<n0;o0++)s0[o0]=arguments[o0];_e.apply(r0,s0)}return t0.__emitterProxy=_e,r0.on(e0,t0,i0)},onAny(e0,_e){const i0=this;if(!i0.eventsListeners||i0.destroyed||typeof e0!="function")return i0;const r0=_e?"unshift":"push";return i0.eventsAnyListeners.indexOf(e0)<0&&i0.eventsAnyListeners[r0](e0),i0},offAny(e0){const _e=this;if(!_e.eventsListeners||_e.destroyed||!_e.eventsAnyListeners)return _e;const i0=_e.eventsAnyListeners.indexOf(e0);return i0>=0&&_e.eventsAnyListeners.splice(i0,1),_e},off(e0,_e){const i0=this;return!i0.eventsListeners||i0.destroyed||!i0.eventsListeners||e0.split(" ").forEach(r0=>{typeof _e>"u"?i0.eventsListeners[r0]=[]:i0.eventsListeners[r0]&&i0.eventsListeners[r0].forEach((t0,n0)=>{(t0===_e||t0.__emitterProxy&&t0.__emitterProxy===_e)&&i0.eventsListeners[r0].splice(n0,1)})}),i0},emit(){const e0=this;if(!e0.eventsListeners||e0.destroyed||!e0.eventsListeners)return e0;let _e,i0,r0;for(var t0=arguments.length,n0=new Array(t0),s0=0;s0<t0;s0++)n0[s0]=arguments[s0];return typeof n0[0]=="string"||Array.isArray(n0[0])?(_e=n0[0],i0=n0.slice(1,n0.length),r0=e0):(_e=n0[0].events,i0=n0[0].data,r0=n0[0].context||e0),i0.unshift(r0),(Array.isArray(_e)?_e:_e.split(" ")).forEach(a0=>{e0.eventsAnyListeners&&e0.eventsAnyListeners.length&&e0.eventsAnyListeners.forEach(f0=>{f0.apply(r0,[a0,...i0])}),e0.eventsListeners&&e0.eventsListeners[a0]&&e0.eventsListeners[a0].forEach(f0=>{f0.apply(r0,i0)})}),e0}};function updateSize(){const e0=this;let _e,i0;const r0=e0.el;typeof e0.params.width<"u"&&e0.params.width!==null?_e=e0.params.width:_e=r0.clientWidth,typeof e0.params.height<"u"&&e0.params.height!==null?i0=e0.params.height:i0=r0.clientHeight,!(_e===0&&e0.isHorizontal()||i0===0&&e0.isVertical())&&(_e=_e-parseInt(elementStyle(r0,"padding-left")||0,10)-parseInt(elementStyle(r0,"padding-right")||0,10),i0=i0-parseInt(elementStyle(r0,"padding-top")||0,10)-parseInt(elementStyle(r0,"padding-bottom")||0,10),Number.isNaN(_e)&&(_e=0),Number.isNaN(i0)&&(i0=0),Object.assign(e0,{width:_e,height:i0,size:e0.isHorizontal()?_e:i0}))}function updateSlides(){const e0=this;function _e(B0){return e0.isHorizontal()?B0:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[B0]}function i0(B0,I0){return parseFloat(B0.getPropertyValue(_e(I0))||0)}const r0=e0.params,{wrapperEl:t0,slidesEl:n0,size:s0,rtlTranslate:o0,wrongRTL:a0}=e0,f0=e0.virtual&&r0.virtual.enabled,l0=f0?e0.virtual.slides.length:e0.slides.length,u0=elementChildren(n0,`.${e0.params.slideClass}, swiper-slide`),A0=f0?e0.virtual.slides.length:u0.length;let c0=[];const k0=[],d0=[];let h0=r0.slidesOffsetBefore;typeof h0=="function"&&(h0=r0.slidesOffsetBefore.call(e0));let b0=r0.slidesOffsetAfter;typeof b0=="function"&&(b0=r0.slidesOffsetAfter.call(e0));const p0=e0.snapGrid.length,m0=e0.slidesGrid.length;let g0=r0.spaceBetween,v0=-h0,x0=0,w0=0;if(typeof s0>"u")return;typeof g0=="string"&&g0.indexOf("%")>=0?g0=parseFloat(g0.replace("%",""))/100*s0:typeof g0=="string"&&(g0=parseFloat(g0)),e0.virtualSize=-g0,u0.forEach(B0=>{o0?B0.style.marginLeft="":B0.style.marginRight="",B0.style.marginBottom="",B0.style.marginTop=""}),r0.centeredSlides&&r0.cssMode&&(setCSSProperty(t0,"--swiper-centered-offset-before",""),setCSSProperty(t0,"--swiper-centered-offset-after",""));const _0=r0.grid&&r0.grid.rows>1&&e0.grid;_0&&e0.grid.initSlides(A0);let y0;const S0=r0.slidesPerView==="auto"&&r0.breakpoints&&Object.keys(r0.breakpoints).filter(B0=>typeof r0.breakpoints[B0].slidesPerView<"u").length>0;for(let B0=0;B0<A0;B0+=1){y0=0;let I0;if(u0[B0]&&(I0=u0[B0]),_0&&e0.grid.updateSlide(B0,I0,A0,_e),!(u0[B0]&&elementStyle(I0,"display")==="none")){if(r0.slidesPerView==="auto"){S0&&(u0[B0].style[_e("width")]="");const T0=getComputedStyle(I0),R0=I0.style.transform,E0=I0.style.webkitTransform;if(R0&&(I0.style.transform="none"),E0&&(I0.style.webkitTransform="none"),r0.roundLengths)y0=e0.isHorizontal()?elementOuterSize(I0,"width"):elementOuterSize(I0,"height");else{const C0=i0(T0,"width"),G0=i0(T0,"padding-left"),F0=i0(T0,"padding-right"),M0=i0(T0,"margin-left"),j0=i0(T0,"margin-right"),D0=T0.getPropertyValue("box-sizing");if(D0&&D0==="border-box")y0=C0+M0+j0;else{const{clientWidth:$0,offsetWidth:X0}=I0;y0=C0+G0+F0+M0+j0+(X0-$0)}}R0&&(I0.style.transform=R0),E0&&(I0.style.webkitTransform=E0),r0.roundLengths&&(y0=Math.floor(y0))}else y0=(s0-(r0.slidesPerView-1)*g0)/r0.slidesPerView,r0.roundLengths&&(y0=Math.floor(y0)),u0[B0]&&(u0[B0].style[_e("width")]=`${y0}px`);u0[B0]&&(u0[B0].swiperSlideSize=y0),d0.push(y0),r0.centeredSlides?(v0=v0+y0/2+x0/2+g0,x0===0&&B0!==0&&(v0=v0-s0/2-g0),B0===0&&(v0=v0-s0/2-g0),Math.abs(v0)<1/1e3&&(v0=0),r0.roundLengths&&(v0=Math.floor(v0)),w0%r0.slidesPerGroup===0&&c0.push(v0),k0.push(v0)):(r0.roundLengths&&(v0=Math.floor(v0)),(w0-Math.min(e0.params.slidesPerGroupSkip,w0))%e0.params.slidesPerGroup===0&&c0.push(v0),k0.push(v0),v0=v0+y0+g0),e0.virtualSize+=y0+g0,x0=y0,w0+=1}}if(e0.virtualSize=Math.max(e0.virtualSize,s0)+b0,o0&&a0&&(r0.effect==="slide"||r0.effect==="coverflow")&&(t0.style.width=`${e0.virtualSize+g0}px`),r0.setWrapperSize&&(t0.style[_e("width")]=`${e0.virtualSize+g0}px`),_0&&e0.grid.updateWrapperSize(y0,c0,_e),!r0.centeredSlides){const B0=[];for(let I0=0;I0<c0.length;I0+=1){let T0=c0[I0];r0.roundLengths&&(T0=Math.floor(T0)),c0[I0]<=e0.virtualSize-s0&&B0.push(T0)}c0=B0,Math.floor(e0.virtualSize-s0)-Math.floor(c0[c0.length-1])>1&&c0.push(e0.virtualSize-s0)}if(f0&&r0.loop){const B0=d0[0]+g0;if(r0.slidesPerGroup>1){const I0=Math.ceil((e0.virtual.slidesBefore+e0.virtual.slidesAfter)/r0.slidesPerGroup),T0=B0*r0.slidesPerGroup;for(let R0=0;R0<I0;R0+=1)c0.push(c0[c0.length-1]+T0)}for(let I0=0;I0<e0.virtual.slidesBefore+e0.virtual.slidesAfter;I0+=1)r0.slidesPerGroup===1&&c0.push(c0[c0.length-1]+B0),k0.push(k0[k0.length-1]+B0),e0.virtualSize+=B0}if(c0.length===0&&(c0=[0]),g0!==0){const B0=e0.isHorizontal()&&o0?"marginLeft":_e("marginRight");u0.filter((I0,T0)=>!r0.cssMode||r0.loop?!0:T0!==u0.length-1).forEach(I0=>{I0.style[B0]=`${g0}px`})}if(r0.centeredSlides&&r0.centeredSlidesBounds){let B0=0;d0.forEach(T0=>{B0+=T0+(g0||0)}),B0-=g0;const I0=B0-s0;c0=c0.map(T0=>T0<=0?-h0:T0>I0?I0+b0:T0)}if(r0.centerInsufficientSlides){let B0=0;if(d0.forEach(I0=>{B0+=I0+(g0||0)}),B0-=g0,B0<s0){const I0=(s0-B0)/2;c0.forEach((T0,R0)=>{c0[R0]=T0-I0}),k0.forEach((T0,R0)=>{k0[R0]=T0+I0})}}if(Object.assign(e0,{slides:u0,snapGrid:c0,slidesGrid:k0,slidesSizesGrid:d0}),r0.centeredSlides&&r0.cssMode&&!r0.centeredSlidesBounds){setCSSProperty(t0,"--swiper-centered-offset-before",`${-c0[0]}px`),setCSSProperty(t0,"--swiper-centered-offset-after",`${e0.size/2-d0[d0.length-1]/2}px`);const B0=-e0.snapGrid[0],I0=-e0.slidesGrid[0];e0.snapGrid=e0.snapGrid.map(T0=>T0+B0),e0.slidesGrid=e0.slidesGrid.map(T0=>T0+I0)}if(A0!==l0&&e0.emit("slidesLengthChange"),c0.length!==p0&&(e0.params.watchOverflow&&e0.checkOverflow(),e0.emit("snapGridLengthChange")),k0.length!==m0&&e0.emit("slidesGridLengthChange"),r0.watchSlidesProgress&&e0.updateSlidesOffset(),!f0&&!r0.cssMode&&(r0.effect==="slide"||r0.effect==="fade")){const B0=`${r0.containerModifierClass}backface-hidden`,I0=e0.el.classList.contains(B0);A0<=r0.maxBackfaceHiddenSlides?I0||e0.el.classList.add(B0):I0&&e0.el.classList.remove(B0)}}function updateAutoHeight(e0){const _e=this,i0=[],r0=_e.virtual&&_e.params.virtual.enabled;let t0=0,n0;typeof e0=="number"?_e.setTransition(e0):e0===!0&&_e.setTransition(_e.params.speed);const s0=o0=>r0?_e.slides[_e.getSlideIndexByData(o0)]:_e.slides[o0];if(_e.params.slidesPerView!=="auto"&&_e.params.slidesPerView>1)if(_e.params.centeredSlides)(_e.visibleSlides||[]).forEach(o0=>{i0.push(o0)});else for(n0=0;n0<Math.ceil(_e.params.slidesPerView);n0+=1){const o0=_e.activeIndex+n0;if(o0>_e.slides.length&&!r0)break;i0.push(s0(o0))}else i0.push(s0(_e.activeIndex));for(n0=0;n0<i0.length;n0+=1)if(typeof i0[n0]<"u"){const o0=i0[n0].offsetHeight;t0=o0>t0?o0:t0}(t0||t0===0)&&(_e.wrapperEl.style.height=`${t0}px`)}function updateSlidesOffset(){const e0=this,_e=e0.slides,i0=e0.isElement?e0.isHorizontal()?e0.wrapperEl.offsetLeft:e0.wrapperEl.offsetTop:0;for(let r0=0;r0<_e.length;r0+=1)_e[r0].swiperSlideOffset=(e0.isHorizontal()?_e[r0].offsetLeft:_e[r0].offsetTop)-i0-e0.cssOverflowAdjustment()}function updateSlidesProgress(e0){e0===void 0&&(e0=this&&this.translate||0);const _e=this,i0=_e.params,{slides:r0,rtlTranslate:t0,snapGrid:n0}=_e;if(r0.length===0)return;typeof r0[0].swiperSlideOffset>"u"&&_e.updateSlidesOffset();let s0=-e0;t0&&(s0=e0),r0.forEach(a0=>{a0.classList.remove(i0.slideVisibleClass)}),_e.visibleSlidesIndexes=[],_e.visibleSlides=[];let o0=i0.spaceBetween;typeof o0=="string"&&o0.indexOf("%")>=0?o0=parseFloat(o0.replace("%",""))/100*_e.size:typeof o0=="string"&&(o0=parseFloat(o0));for(let a0=0;a0<r0.length;a0+=1){const f0=r0[a0];let l0=f0.swiperSlideOffset;i0.cssMode&&i0.centeredSlides&&(l0-=r0[0].swiperSlideOffset);const u0=(s0+(i0.centeredSlides?_e.minTranslate():0)-l0)/(f0.swiperSlideSize+o0),A0=(s0-n0[0]+(i0.centeredSlides?_e.minTranslate():0)-l0)/(f0.swiperSlideSize+o0),c0=-(s0-l0),k0=c0+_e.slidesSizesGrid[a0];(c0>=0&&c0<_e.size-1||k0>1&&k0<=_e.size||c0<=0&&k0>=_e.size)&&(_e.visibleSlides.push(f0),_e.visibleSlidesIndexes.push(a0),r0[a0].classList.add(i0.slideVisibleClass)),f0.progress=t0?-u0:u0,f0.originalProgress=t0?-A0:A0}}function updateProgress(e0){const _e=this;if(typeof e0>"u"){const l0=_e.rtlTranslate?-1:1;e0=_e&&_e.translate&&_e.translate*l0||0}const i0=_e.params,r0=_e.maxTranslate()-_e.minTranslate();let{progress:t0,isBeginning:n0,isEnd:s0,progressLoop:o0}=_e;const a0=n0,f0=s0;if(r0===0)t0=0,n0=!0,s0=!0;else{t0=(e0-_e.minTranslate())/r0;const l0=Math.abs(e0-_e.minTranslate())<1,u0=Math.abs(e0-_e.maxTranslate())<1;n0=l0||t0<=0,s0=u0||t0>=1,l0&&(t0=0),u0&&(t0=1)}if(i0.loop){const l0=_e.getSlideIndexByData(0),u0=_e.getSlideIndexByData(_e.slides.length-1),A0=_e.slidesGrid[l0],c0=_e.slidesGrid[u0],k0=_e.slidesGrid[_e.slidesGrid.length-1],d0=Math.abs(e0);d0>=A0?o0=(d0-A0)/k0:o0=(d0+k0-c0)/k0,o0>1&&(o0-=1)}Object.assign(_e,{progress:t0,progressLoop:o0,isBeginning:n0,isEnd:s0}),(i0.watchSlidesProgress||i0.centeredSlides&&i0.autoHeight)&&_e.updateSlidesProgress(e0),n0&&!a0&&_e.emit("reachBeginning toEdge"),s0&&!f0&&_e.emit("reachEnd toEdge"),(a0&&!n0||f0&&!s0)&&_e.emit("fromEdge"),_e.emit("progress",t0)}function updateSlidesClasses(){const e0=this,{slides:_e,params:i0,slidesEl:r0,activeIndex:t0}=e0,n0=e0.virtual&&i0.virtual.enabled,s0=a0=>elementChildren(r0,`.${i0.slideClass}${a0}, swiper-slide${a0}`)[0];_e.forEach(a0=>{a0.classList.remove(i0.slideActiveClass,i0.slideNextClass,i0.slidePrevClass)});let o0;if(n0)if(i0.loop){let a0=t0-e0.virtual.slidesBefore;a0<0&&(a0=e0.virtual.slides.length+a0),a0>=e0.virtual.slides.length&&(a0-=e0.virtual.slides.length),o0=s0(`[data-swiper-slide-index="${a0}"]`)}else o0=s0(`[data-swiper-slide-index="${t0}"]`);else o0=_e[t0];if(o0){o0.classList.add(i0.slideActiveClass);let a0=elementNextAll(o0,`.${i0.slideClass}, swiper-slide`)[0];i0.loop&&!a0&&(a0=_e[0]),a0&&a0.classList.add(i0.slideNextClass);let f0=elementPrevAll(o0,`.${i0.slideClass}, swiper-slide`)[0];i0.loop&&!f0===0&&(f0=_e[_e.length-1]),f0&&f0.classList.add(i0.slidePrevClass)}e0.emitSlidesClasses()}const processLazyPreloader=(e0,_e)=>{if(!e0||e0.destroyed||!e0.params)return;const i0=()=>e0.isElement?"swiper-slide":`.${e0.params.slideClass}`,r0=_e.closest(i0());if(r0){const t0=r0.querySelector(`.${e0.params.lazyPreloaderClass}`);t0&&t0.remove()}},unlazy=(e0,_e)=>{if(!e0.slides[_e])return;const i0=e0.slides[_e].querySelector('[loading="lazy"]');i0&&i0.removeAttribute("loading")},preload=e0=>{if(!e0||e0.destroyed||!e0.params)return;let _e=e0.params.lazyPreloadPrevNext;const i0=e0.slides.length;if(!i0||!_e||_e<0)return;_e=Math.min(_e,i0);const r0=e0.params.slidesPerView==="auto"?e0.slidesPerViewDynamic():Math.ceil(e0.params.slidesPerView),t0=e0.activeIndex;if(e0.params.grid&&e0.params.grid.rows>1){const s0=t0,o0=[s0-_e];o0.push(...Array.from({length:_e}).map((a0,f0)=>s0+r0+f0)),e0.slides.forEach((a0,f0)=>{o0.includes(a0.column)&&unlazy(e0,f0)});return}const n0=t0+r0-1;if(e0.params.rewind||e0.params.loop)for(let s0=t0-_e;s0<=n0+_e;s0+=1){const o0=(s0%i0+i0)%i0;(o0<t0||o0>n0)&&unlazy(e0,o0)}else for(let s0=Math.max(t0-_e,0);s0<=Math.min(n0+_e,i0-1);s0+=1)s0!==t0&&(s0>n0||s0<t0)&&unlazy(e0,s0)};function getActiveIndexByTranslate(e0){const{slidesGrid:_e,params:i0}=e0,r0=e0.rtlTranslate?e0.translate:-e0.translate;let t0;for(let n0=0;n0<_e.length;n0+=1)typeof _e[n0+1]<"u"?r0>=_e[n0]&&r0<_e[n0+1]-(_e[n0+1]-_e[n0])/2?t0=n0:r0>=_e[n0]&&r0<_e[n0+1]&&(t0=n0+1):r0>=_e[n0]&&(t0=n0);return i0.normalizeSlideIndex&&(t0<0||typeof t0>"u")&&(t0=0),t0}function updateActiveIndex(e0){const _e=this,i0=_e.rtlTranslate?_e.translate:-_e.translate,{snapGrid:r0,params:t0,activeIndex:n0,realIndex:s0,snapIndex:o0}=_e;let a0=e0,f0;const l0=A0=>{let c0=A0-_e.virtual.slidesBefore;return c0<0&&(c0=_e.virtual.slides.length+c0),c0>=_e.virtual.slides.length&&(c0-=_e.virtual.slides.length),c0};if(typeof a0>"u"&&(a0=getActiveIndexByTranslate(_e)),r0.indexOf(i0)>=0)f0=r0.indexOf(i0);else{const A0=Math.min(t0.slidesPerGroupSkip,a0);f0=A0+Math.floor((a0-A0)/t0.slidesPerGroup)}if(f0>=r0.length&&(f0=r0.length-1),a0===n0){f0!==o0&&(_e.snapIndex=f0,_e.emit("snapIndexChange")),_e.params.loop&&_e.virtual&&_e.params.virtual.enabled&&(_e.realIndex=l0(a0));return}let u0;_e.virtual&&t0.virtual.enabled&&t0.loop?u0=l0(a0):_e.slides[a0]?u0=parseInt(_e.slides[a0].getAttribute("data-swiper-slide-index")||a0,10):u0=a0,Object.assign(_e,{previousSnapIndex:o0,snapIndex:f0,previousRealIndex:s0,realIndex:u0,previousIndex:n0,activeIndex:a0}),_e.initialized&&preload(_e),_e.emit("activeIndexChange"),_e.emit("snapIndexChange"),s0!==u0&&_e.emit("realIndexChange"),(_e.initialized||_e.params.runCallbacksOnInit)&&_e.emit("slideChange")}function updateClickedSlide(e0){const _e=this,i0=_e.params,r0=e0.closest(`.${i0.slideClass}, swiper-slide`);let t0=!1,n0;if(r0){for(let s0=0;s0<_e.slides.length;s0+=1)if(_e.slides[s0]===r0){t0=!0,n0=s0;break}}if(r0&&t0)_e.clickedSlide=r0,_e.virtual&&_e.params.virtual.enabled?_e.clickedIndex=parseInt(r0.getAttribute("data-swiper-slide-index"),10):_e.clickedIndex=n0;else{_e.clickedSlide=void 0,_e.clickedIndex=void 0;return}i0.slideToClickedSlide&&_e.clickedIndex!==void 0&&_e.clickedIndex!==_e.activeIndex&&_e.slideToClickedSlide()}var update={updateSize,updateSlides,updateAutoHeight,updateSlidesOffset,updateSlidesProgress,updateProgress,updateSlidesClasses,updateActiveIndex,updateClickedSlide};function getSwiperTranslate(e0){e0===void 0&&(e0=this.isHorizontal()?"x":"y");const _e=this,{params:i0,rtlTranslate:r0,translate:t0,wrapperEl:n0}=_e;if(i0.virtualTranslate)return r0?-t0:t0;if(i0.cssMode)return t0;let s0=getTranslate(n0,e0);return s0+=_e.cssOverflowAdjustment(),r0&&(s0=-s0),s0||0}function setTranslate(e0,_e){const i0=this,{rtlTranslate:r0,params:t0,wrapperEl:n0,progress:s0}=i0;let o0=0,a0=0;const f0=0;i0.isHorizontal()?o0=r0?-e0:e0:a0=e0,t0.roundLengths&&(o0=Math.floor(o0),a0=Math.floor(a0)),i0.previousTranslate=i0.translate,i0.translate=i0.isHorizontal()?o0:a0,t0.cssMode?n0[i0.isHorizontal()?"scrollLeft":"scrollTop"]=i0.isHorizontal()?-o0:-a0:t0.virtualTranslate||(i0.isHorizontal()?o0-=i0.cssOverflowAdjustment():a0-=i0.cssOverflowAdjustment(),n0.style.transform=`translate3d(${o0}px, ${a0}px, ${f0}px)`);let l0;const u0=i0.maxTranslate()-i0.minTranslate();u0===0?l0=0:l0=(e0-i0.minTranslate())/u0,l0!==s0&&i0.updateProgress(e0),i0.emit("setTranslate",i0.translate,_e)}function minTranslate(){return-this.snapGrid[0]}function maxTranslate(){return-this.snapGrid[this.snapGrid.length-1]}function translateTo(e0,_e,i0,r0,t0){e0===void 0&&(e0=0),_e===void 0&&(_e=this.params.speed),i0===void 0&&(i0=!0),r0===void 0&&(r0=!0);const n0=this,{params:s0,wrapperEl:o0}=n0;if(n0.animating&&s0.preventInteractionOnTransition)return!1;const a0=n0.minTranslate(),f0=n0.maxTranslate();let l0;if(r0&&e0>a0?l0=a0:r0&&e0<f0?l0=f0:l0=e0,n0.updateProgress(l0),s0.cssMode){const u0=n0.isHorizontal();if(_e===0)o0[u0?"scrollLeft":"scrollTop"]=-l0;else{if(!n0.support.smoothScroll)return animateCSSModeScroll({swiper:n0,targetPosition:-l0,side:u0?"left":"top"}),!0;o0.scrollTo({[u0?"left":"top"]:-l0,behavior:"smooth"})}return!0}return _e===0?(n0.setTransition(0),n0.setTranslate(l0),i0&&(n0.emit("beforeTransitionStart",_e,t0),n0.emit("transitionEnd"))):(n0.setTransition(_e),n0.setTranslate(l0),i0&&(n0.emit("beforeTransitionStart",_e,t0),n0.emit("transitionStart")),n0.animating||(n0.animating=!0,n0.onTranslateToWrapperTransitionEnd||(n0.onTranslateToWrapperTransitionEnd=function(A0){!n0||n0.destroyed||A0.target===this&&(n0.wrapperEl.removeEventListener("transitionend",n0.onTranslateToWrapperTransitionEnd),n0.onTranslateToWrapperTransitionEnd=null,delete n0.onTranslateToWrapperTransitionEnd,i0&&n0.emit("transitionEnd"))}),n0.wrapperEl.addEventListener("transitionend",n0.onTranslateToWrapperTransitionEnd))),!0}var translate={getTranslate:getSwiperTranslate,setTranslate,minTranslate,maxTranslate,translateTo};function setTransition(e0,_e){const i0=this;i0.params.cssMode||(i0.wrapperEl.style.transitionDuration=`${e0}ms`),i0.emit("setTransition",e0,_e)}function transitionEmit(e0){let{swiper:_e,runCallbacks:i0,direction:r0,step:t0}=e0;const{activeIndex:n0,previousIndex:s0}=_e;let o0=r0;if(o0||(n0>s0?o0="next":n0<s0?o0="prev":o0="reset"),_e.emit(`transition${t0}`),i0&&n0!==s0){if(o0==="reset"){_e.emit(`slideResetTransition${t0}`);return}_e.emit(`slideChangeTransition${t0}`),o0==="next"?_e.emit(`slideNextTransition${t0}`):_e.emit(`slidePrevTransition${t0}`)}}function transitionStart(e0,_e){e0===void 0&&(e0=!0);const i0=this,{params:r0}=i0;r0.cssMode||(r0.autoHeight&&i0.updateAutoHeight(),transitionEmit({swiper:i0,runCallbacks:e0,direction:_e,step:"Start"}))}function transitionEnd(e0,_e){e0===void 0&&(e0=!0);const i0=this,{params:r0}=i0;i0.animating=!1,!r0.cssMode&&(i0.setTransition(0),transitionEmit({swiper:i0,runCallbacks:e0,direction:_e,step:"End"}))}var transition={setTransition,transitionStart,transitionEnd};function slideTo(e0,_e,i0,r0,t0){e0===void 0&&(e0=0),_e===void 0&&(_e=this.params.speed),i0===void 0&&(i0=!0),typeof e0=="string"&&(e0=parseInt(e0,10));const n0=this;let s0=e0;s0<0&&(s0=0);const{params:o0,snapGrid:a0,slidesGrid:f0,previousIndex:l0,activeIndex:u0,rtlTranslate:A0,wrapperEl:c0,enabled:k0}=n0;if(n0.animating&&o0.preventInteractionOnTransition||!k0&&!r0&&!t0)return!1;const d0=Math.min(n0.params.slidesPerGroupSkip,s0);let h0=d0+Math.floor((s0-d0)/n0.params.slidesPerGroup);h0>=a0.length&&(h0=a0.length-1);const b0=-a0[h0];if(o0.normalizeSlideIndex)for(let m0=0;m0<f0.length;m0+=1){const g0=-Math.floor(b0*100),v0=Math.floor(f0[m0]*100),x0=Math.floor(f0[m0+1]*100);typeof f0[m0+1]<"u"?g0>=v0&&g0<x0-(x0-v0)/2?s0=m0:g0>=v0&&g0<x0&&(s0=m0+1):g0>=v0&&(s0=m0)}if(n0.initialized&&s0!==u0&&(!n0.allowSlideNext&&(A0?b0>n0.translate&&b0>n0.minTranslate():b0<n0.translate&&b0<n0.minTranslate())||!n0.allowSlidePrev&&b0>n0.translate&&b0>n0.maxTranslate()&&(u0||0)!==s0))return!1;s0!==(l0||0)&&i0&&n0.emit("beforeSlideChangeStart"),n0.updateProgress(b0);let p0;if(s0>u0?p0="next":s0<u0?p0="prev":p0="reset",A0&&-b0===n0.translate||!A0&&b0===n0.translate)return n0.updateActiveIndex(s0),o0.autoHeight&&n0.updateAutoHeight(),n0.updateSlidesClasses(),o0.effect!=="slide"&&n0.setTranslate(b0),p0!=="reset"&&(n0.transitionStart(i0,p0),n0.transitionEnd(i0,p0)),!1;if(o0.cssMode){const m0=n0.isHorizontal(),g0=A0?b0:-b0;if(_e===0){const v0=n0.virtual&&n0.params.virtual.enabled;v0&&(n0.wrapperEl.style.scrollSnapType="none",n0._immediateVirtual=!0),v0&&!n0._cssModeVirtualInitialSet&&n0.params.initialSlide>0?(n0._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{c0[m0?"scrollLeft":"scrollTop"]=g0})):c0[m0?"scrollLeft":"scrollTop"]=g0,v0&&requestAnimationFrame(()=>{n0.wrapperEl.style.scrollSnapType="",n0._immediateVirtual=!1})}else{if(!n0.support.smoothScroll)return animateCSSModeScroll({swiper:n0,targetPosition:g0,side:m0?"left":"top"}),!0;c0.scrollTo({[m0?"left":"top"]:g0,behavior:"smooth"})}return!0}return n0.setTransition(_e),n0.setTranslate(b0),n0.updateActiveIndex(s0),n0.updateSlidesClasses(),n0.emit("beforeTransitionStart",_e,r0),n0.transitionStart(i0,p0),_e===0?n0.transitionEnd(i0,p0):n0.animating||(n0.animating=!0,n0.onSlideToWrapperTransitionEnd||(n0.onSlideToWrapperTransitionEnd=function(g0){!n0||n0.destroyed||g0.target===this&&(n0.wrapperEl.removeEventListener("transitionend",n0.onSlideToWrapperTransitionEnd),n0.onSlideToWrapperTransitionEnd=null,delete n0.onSlideToWrapperTransitionEnd,n0.transitionEnd(i0,p0))}),n0.wrapperEl.addEventListener("transitionend",n0.onSlideToWrapperTransitionEnd)),!0}function slideToLoop(e0,_e,i0,r0){e0===void 0&&(e0=0),_e===void 0&&(_e=this.params.speed),i0===void 0&&(i0=!0),typeof e0=="string"&&(e0=parseInt(e0,10));const t0=this;let n0=e0;return t0.params.loop&&(t0.virtual&&t0.params.virtual.enabled?n0=n0+t0.virtual.slidesBefore:n0=t0.getSlideIndexByData(n0)),t0.slideTo(n0,_e,i0,r0)}function slideNext(e0,_e,i0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0);const r0=this,{enabled:t0,params:n0,animating:s0}=r0;if(!t0)return r0;let o0=n0.slidesPerGroup;n0.slidesPerView==="auto"&&n0.slidesPerGroup===1&&n0.slidesPerGroupAuto&&(o0=Math.max(r0.slidesPerViewDynamic("current",!0),1));const a0=r0.activeIndex<n0.slidesPerGroupSkip?1:o0,f0=r0.virtual&&n0.virtual.enabled;if(n0.loop){if(s0&&!f0&&n0.loopPreventsSliding)return!1;r0.loopFix({direction:"next"}),r0._clientLeft=r0.wrapperEl.clientLeft}return n0.rewind&&r0.isEnd?r0.slideTo(0,e0,_e,i0):r0.slideTo(r0.activeIndex+a0,e0,_e,i0)}function slidePrev(e0,_e,i0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0);const r0=this,{params:t0,snapGrid:n0,slidesGrid:s0,rtlTranslate:o0,enabled:a0,animating:f0}=r0;if(!a0)return r0;const l0=r0.virtual&&t0.virtual.enabled;if(t0.loop){if(f0&&!l0&&t0.loopPreventsSliding)return!1;r0.loopFix({direction:"prev"}),r0._clientLeft=r0.wrapperEl.clientLeft}const u0=o0?r0.translate:-r0.translate;function A0(b0){return b0<0?-Math.floor(Math.abs(b0)):Math.floor(b0)}const c0=A0(u0),k0=n0.map(b0=>A0(b0));let d0=n0[k0.indexOf(c0)-1];if(typeof d0>"u"&&t0.cssMode){let b0;n0.forEach((p0,m0)=>{c0>=p0&&(b0=m0)}),typeof b0<"u"&&(d0=n0[b0>0?b0-1:b0])}let h0=0;if(typeof d0<"u"&&(h0=s0.indexOf(d0),h0<0&&(h0=r0.activeIndex-1),t0.slidesPerView==="auto"&&t0.slidesPerGroup===1&&t0.slidesPerGroupAuto&&(h0=h0-r0.slidesPerViewDynamic("previous",!0)+1,h0=Math.max(h0,0))),t0.rewind&&r0.isBeginning){const b0=r0.params.virtual&&r0.params.virtual.enabled&&r0.virtual?r0.virtual.slides.length-1:r0.slides.length-1;return r0.slideTo(b0,e0,_e,i0)}return r0.slideTo(h0,e0,_e,i0)}function slideReset(e0,_e,i0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0);const r0=this;return r0.slideTo(r0.activeIndex,e0,_e,i0)}function slideToClosest(e0,_e,i0,r0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0),r0===void 0&&(r0=.5);const t0=this;let n0=t0.activeIndex;const s0=Math.min(t0.params.slidesPerGroupSkip,n0),o0=s0+Math.floor((n0-s0)/t0.params.slidesPerGroup),a0=t0.rtlTranslate?t0.translate:-t0.translate;if(a0>=t0.snapGrid[o0]){const f0=t0.snapGrid[o0],l0=t0.snapGrid[o0+1];a0-f0>(l0-f0)*r0&&(n0+=t0.params.slidesPerGroup)}else{const f0=t0.snapGrid[o0-1],l0=t0.snapGrid[o0];a0-f0<=(l0-f0)*r0&&(n0-=t0.params.slidesPerGroup)}return n0=Math.max(n0,0),n0=Math.min(n0,t0.slidesGrid.length-1),t0.slideTo(n0,e0,_e,i0)}function slideToClickedSlide(){const e0=this,{params:_e,slidesEl:i0}=e0,r0=_e.slidesPerView==="auto"?e0.slidesPerViewDynamic():_e.slidesPerView;let t0=e0.clickedIndex,n0;const s0=e0.isElement?"swiper-slide":`.${_e.slideClass}`;if(_e.loop){if(e0.animating)return;n0=parseInt(e0.clickedSlide.getAttribute("data-swiper-slide-index"),10),_e.centeredSlides?t0<e0.loopedSlides-r0/2||t0>e0.slides.length-e0.loopedSlides+r0/2?(e0.loopFix(),t0=e0.getSlideIndex(elementChildren(i0,`${s0}[data-swiper-slide-index="${n0}"]`)[0]),nextTick(()=>{e0.slideTo(t0)})):e0.slideTo(t0):t0>e0.slides.length-r0?(e0.loopFix(),t0=e0.getSlideIndex(elementChildren(i0,`${s0}[data-swiper-slide-index="${n0}"]`)[0]),nextTick(()=>{e0.slideTo(t0)})):e0.slideTo(t0)}else e0.slideTo(t0)}var slide={slideTo,slideToLoop,slideNext,slidePrev,slideReset,slideToClosest,slideToClickedSlide};function loopCreate(e0){const _e=this,{params:i0,slidesEl:r0}=_e;if(!i0.loop||_e.virtual&&_e.params.virtual.enabled)return;elementChildren(r0,`.${i0.slideClass}, swiper-slide`).forEach((n0,s0)=>{n0.setAttribute("data-swiper-slide-index",s0)}),_e.loopFix({slideRealIndex:e0,direction:i0.centeredSlides?void 0:"next"})}function loopFix(e0){let{slideRealIndex:_e,slideTo:i0=!0,direction:r0,setTranslate:t0,activeSlideIndex:n0,byController:s0,byMousewheel:o0}=e0===void 0?{}:e0;const a0=this;if(!a0.params.loop)return;a0.emit("beforeLoopFix");const{slides:f0,allowSlidePrev:l0,allowSlideNext:u0,slidesEl:A0,params:c0}=a0;if(a0.allowSlidePrev=!0,a0.allowSlideNext=!0,a0.virtual&&c0.virtual.enabled){i0&&(!c0.centeredSlides&&a0.snapIndex===0?a0.slideTo(a0.virtual.slides.length,0,!1,!0):c0.centeredSlides&&a0.snapIndex<c0.slidesPerView?a0.slideTo(a0.virtual.slides.length+a0.snapIndex,0,!1,!0):a0.snapIndex===a0.snapGrid.length-1&&a0.slideTo(a0.virtual.slidesBefore,0,!1,!0)),a0.allowSlidePrev=l0,a0.allowSlideNext=u0,a0.emit("loopFix");return}const k0=c0.slidesPerView==="auto"?a0.slidesPerViewDynamic():Math.ceil(parseFloat(c0.slidesPerView,10));let d0=c0.loopedSlides||k0;d0%c0.slidesPerGroup!==0&&(d0+=c0.slidesPerGroup-d0%c0.slidesPerGroup),a0.loopedSlides=d0;const h0=[],b0=[];let p0=a0.activeIndex;typeof n0>"u"?n0=a0.getSlideIndex(a0.slides.filter(w0=>w0.classList.contains(c0.slideActiveClass))[0]):p0=n0;const m0=r0==="next"||!r0,g0=r0==="prev"||!r0;let v0=0,x0=0;if(n0<d0){v0=Math.max(d0-n0,c0.slidesPerGroup);for(let w0=0;w0<d0-n0;w0+=1){const _0=w0-Math.floor(w0/f0.length)*f0.length;h0.push(f0.length-_0-1)}}else if(n0>a0.slides.length-d0*2){x0=Math.max(n0-(a0.slides.length-d0*2),c0.slidesPerGroup);for(let w0=0;w0<x0;w0+=1){const _0=w0-Math.floor(w0/f0.length)*f0.length;b0.push(_0)}}if(g0&&h0.forEach(w0=>{a0.slides[w0].swiperLoopMoveDOM=!0,A0.prepend(a0.slides[w0]),a0.slides[w0].swiperLoopMoveDOM=!1}),m0&&b0.forEach(w0=>{a0.slides[w0].swiperLoopMoveDOM=!0,A0.append(a0.slides[w0]),a0.slides[w0].swiperLoopMoveDOM=!1}),a0.recalcSlides(),c0.slidesPerView==="auto"&&a0.updateSlides(),c0.watchSlidesProgress&&a0.updateSlidesOffset(),i0){if(h0.length>0&&g0)if(typeof _e>"u"){const w0=a0.slidesGrid[p0],y0=a0.slidesGrid[p0+v0]-w0;o0?a0.setTranslate(a0.translate-y0):(a0.slideTo(p0+v0,0,!1,!0),t0&&(a0.touches[a0.isHorizontal()?"startX":"startY"]+=y0,a0.touchEventsData.currentTranslate=a0.translate))}else t0&&(a0.slideToLoop(_e,0,!1,!0),a0.touchEventsData.currentTranslate=a0.translate);else if(b0.length>0&&m0)if(typeof _e>"u"){const w0=a0.slidesGrid[p0],y0=a0.slidesGrid[p0-x0]-w0;o0?a0.setTranslate(a0.translate-y0):(a0.slideTo(p0-x0,0,!1,!0),t0&&(a0.touches[a0.isHorizontal()?"startX":"startY"]+=y0,a0.touchEventsData.currentTranslate=a0.translate))}else a0.slideToLoop(_e,0,!1,!0)}if(a0.allowSlidePrev=l0,a0.allowSlideNext=u0,a0.controller&&a0.controller.control&&!s0){const w0={slideRealIndex:_e,slideTo:!1,direction:r0,setTranslate:t0,activeSlideIndex:n0,byController:!0};Array.isArray(a0.controller.control)?a0.controller.control.forEach(_0=>{!_0.destroyed&&_0.params.loop&&_0.loopFix(w0)}):a0.controller.control instanceof a0.constructor&&a0.controller.control.params.loop&&a0.controller.control.loopFix(w0)}a0.emit("loopFix")}function loopDestroy(){const e0=this,{params:_e,slidesEl:i0}=e0;if(!_e.loop||e0.virtual&&e0.params.virtual.enabled)return;e0.recalcSlides();const r0=[];e0.slides.forEach(t0=>{const n0=typeof t0.swiperSlideIndex>"u"?t0.getAttribute("data-swiper-slide-index")*1:t0.swiperSlideIndex;r0[n0]=t0}),e0.slides.forEach(t0=>{t0.removeAttribute("data-swiper-slide-index")}),r0.forEach(t0=>{i0.append(t0)}),e0.recalcSlides(),e0.slideTo(e0.realIndex,0)}var loop={loopCreate,loopFix,loopDestroy};function setGrabCursor(e0){const _e=this;if(!_e.params.simulateTouch||_e.params.watchOverflow&&_e.isLocked||_e.params.cssMode)return;const i0=_e.params.touchEventsTarget==="container"?_e.el:_e.wrapperEl;_e.isElement&&(_e.__preventObserver__=!0),i0.style.cursor="move",i0.style.cursor=e0?"grabbing":"grab",_e.isElement&&requestAnimationFrame(()=>{_e.__preventObserver__=!1})}function unsetGrabCursor(){const e0=this;e0.params.watchOverflow&&e0.isLocked||e0.params.cssMode||(e0.isElement&&(e0.__preventObserver__=!0),e0[e0.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e0.isElement&&requestAnimationFrame(()=>{e0.__preventObserver__=!1}))}var grabCursor={setGrabCursor,unsetGrabCursor};function closestElement(e0,_e){_e===void 0&&(_e=this);function i0(r0){if(!r0||r0===getDocument()||r0===getWindow())return null;r0.assignedSlot&&(r0=r0.assignedSlot);const t0=r0.closest(e0);return!t0&&!r0.getRootNode?null:t0||i0(r0.getRootNode().host)}return i0(_e)}function onTouchStart(e0){const _e=this,i0=getDocument(),r0=getWindow(),t0=_e.touchEventsData;t0.evCache.push(e0);const{params:n0,touches:s0,enabled:o0}=_e;if(!o0||!n0.simulateTouch&&e0.pointerType==="mouse"||_e.animating&&n0.preventInteractionOnTransition)return;!_e.animating&&n0.cssMode&&n0.loop&&_e.loopFix();let a0=e0;a0.originalEvent&&(a0=a0.originalEvent);let f0=a0.target;if(n0.touchEventsTarget==="wrapper"&&!_e.wrapperEl.contains(f0)||"which"in a0&&a0.which===3||"button"in a0&&a0.button>0||t0.isTouched&&t0.isMoved)return;const l0=!!n0.noSwipingClass&&n0.noSwipingClass!=="",u0=e0.composedPath?e0.composedPath():e0.path;l0&&a0.target&&a0.target.shadowRoot&&u0&&(f0=u0[0]);const A0=n0.noSwipingSelector?n0.noSwipingSelector:`.${n0.noSwipingClass}`,c0=!!(a0.target&&a0.target.shadowRoot);if(n0.noSwiping&&(c0?closestElement(A0,f0):f0.closest(A0))){_e.allowClick=!0;return}if(n0.swipeHandler&&!f0.closest(n0.swipeHandler))return;s0.currentX=a0.pageX,s0.currentY=a0.pageY;const k0=s0.currentX,d0=s0.currentY,h0=n0.edgeSwipeDetection||n0.iOSEdgeSwipeDetection,b0=n0.edgeSwipeThreshold||n0.iOSEdgeSwipeThreshold;if(h0&&(k0<=b0||k0>=r0.innerWidth-b0))if(h0==="prevent")e0.preventDefault();else return;Object.assign(t0,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s0.startX=k0,s0.startY=d0,t0.touchStartTime=now(),_e.allowClick=!0,_e.updateSize(),_e.swipeDirection=void 0,n0.threshold>0&&(t0.allowThresholdMove=!1);let p0=!0;f0.matches(t0.focusableElements)&&(p0=!1,f0.nodeName==="SELECT"&&(t0.isTouched=!1)),i0.activeElement&&i0.activeElement.matches(t0.focusableElements)&&i0.activeElement!==f0&&i0.activeElement.blur();const m0=p0&&_e.allowTouchMove&&n0.touchStartPreventDefault;(n0.touchStartForcePreventDefault||m0)&&!f0.isContentEditable&&a0.preventDefault(),n0.freeMode&&n0.freeMode.enabled&&_e.freeMode&&_e.animating&&!n0.cssMode&&_e.freeMode.onTouchStart(),_e.emit("touchStart",a0)}function onTouchMove(e0){const _e=getDocument(),i0=this,r0=i0.touchEventsData,{params:t0,touches:n0,rtlTranslate:s0,enabled:o0}=i0;if(!o0||!t0.simulateTouch&&e0.pointerType==="mouse")return;let a0=e0;if(a0.originalEvent&&(a0=a0.originalEvent),!r0.isTouched){r0.startMoving&&r0.isScrolling&&i0.emit("touchMoveOpposite",a0);return}const f0=r0.evCache.findIndex(x0=>x0.pointerId===a0.pointerId);f0>=0&&(r0.evCache[f0]=a0);const l0=r0.evCache.length>1?r0.evCache[0]:a0,u0=l0.pageX,A0=l0.pageY;if(a0.preventedByNestedSwiper){n0.startX=u0,n0.startY=A0;return}if(!i0.allowTouchMove){a0.target.matches(r0.focusableElements)||(i0.allowClick=!1),r0.isTouched&&(Object.assign(n0,{startX:u0,startY:A0,prevX:i0.touches.currentX,prevY:i0.touches.currentY,currentX:u0,currentY:A0}),r0.touchStartTime=now());return}if(t0.touchReleaseOnEdges&&!t0.loop){if(i0.isVertical()){if(A0<n0.startY&&i0.translate<=i0.maxTranslate()||A0>n0.startY&&i0.translate>=i0.minTranslate()){r0.isTouched=!1,r0.isMoved=!1;return}}else if(u0<n0.startX&&i0.translate<=i0.maxTranslate()||u0>n0.startX&&i0.translate>=i0.minTranslate())return}if(_e.activeElement&&a0.target===_e.activeElement&&a0.target.matches(r0.focusableElements)){r0.isMoved=!0,i0.allowClick=!1;return}if(r0.allowTouchCallbacks&&i0.emit("touchMove",a0),a0.targetTouches&&a0.targetTouches.length>1)return;n0.currentX=u0,n0.currentY=A0;const c0=n0.currentX-n0.startX,k0=n0.currentY-n0.startY;if(i0.params.threshold&&Math.sqrt(c0**2+k0**2)<i0.params.threshold)return;if(typeof r0.isScrolling>"u"){let x0;i0.isHorizontal()&&n0.currentY===n0.startY||i0.isVertical()&&n0.currentX===n0.startX?r0.isScrolling=!1:c0*c0+k0*k0>=25&&(x0=Math.atan2(Math.abs(k0),Math.abs(c0))*180/Math.PI,r0.isScrolling=i0.isHorizontal()?x0>t0.touchAngle:90-x0>t0.touchAngle)}if(r0.isScrolling&&i0.emit("touchMoveOpposite",a0),typeof r0.startMoving>"u"&&(n0.currentX!==n0.startX||n0.currentY!==n0.startY)&&(r0.startMoving=!0),r0.isScrolling||i0.zoom&&i0.params.zoom&&i0.params.zoom.enabled&&r0.evCache.length>1){r0.isTouched=!1;return}if(!r0.startMoving)return;i0.allowClick=!1,!t0.cssMode&&a0.cancelable&&a0.preventDefault(),t0.touchMoveStopPropagation&&!t0.nested&&a0.stopPropagation();let d0=i0.isHorizontal()?c0:k0,h0=i0.isHorizontal()?n0.currentX-n0.previousX:n0.currentY-n0.previousY;t0.oneWayMovement&&(d0=Math.abs(d0)*(s0?1:-1),h0=Math.abs(h0)*(s0?1:-1)),n0.diff=d0,d0*=t0.touchRatio,s0&&(d0=-d0,h0=-h0);const b0=i0.touchesDirection;i0.swipeDirection=d0>0?"prev":"next",i0.touchesDirection=h0>0?"prev":"next";const p0=i0.params.loop&&!t0.cssMode;if(!r0.isMoved){if(p0&&i0.loopFix({direction:i0.swipeDirection}),r0.startTranslate=i0.getTranslate(),i0.setTransition(0),i0.animating){const x0=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});i0.wrapperEl.dispatchEvent(x0)}r0.allowMomentumBounce=!1,t0.grabCursor&&(i0.allowSlideNext===!0||i0.allowSlidePrev===!0)&&i0.setGrabCursor(!0),i0.emit("sliderFirstMove",a0)}let m0;r0.isMoved&&b0!==i0.touchesDirection&&p0&&Math.abs(d0)>=1&&(i0.loopFix({direction:i0.swipeDirection,setTranslate:!0}),m0=!0),i0.emit("sliderMove",a0),r0.isMoved=!0,r0.currentTranslate=d0+r0.startTranslate;let g0=!0,v0=t0.resistanceRatio;if(t0.touchReleaseOnEdges&&(v0=0),d0>0?(p0&&!m0&&r0.currentTranslate>(t0.centeredSlides?i0.minTranslate()-i0.size/2:i0.minTranslate())&&i0.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r0.currentTranslate>i0.minTranslate()&&(g0=!1,t0.resistance&&(r0.currentTranslate=i0.minTranslate()-1+(-i0.minTranslate()+r0.startTranslate+d0)**v0))):d0<0&&(p0&&!m0&&r0.currentTranslate<(t0.centeredSlides?i0.maxTranslate()+i0.size/2:i0.maxTranslate())&&i0.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:i0.slides.length-(t0.slidesPerView==="auto"?i0.slidesPerViewDynamic():Math.ceil(parseFloat(t0.slidesPerView,10)))}),r0.currentTranslate<i0.maxTranslate()&&(g0=!1,t0.resistance&&(r0.currentTranslate=i0.maxTranslate()+1-(i0.maxTranslate()-r0.startTranslate-d0)**v0))),g0&&(a0.preventedByNestedSwiper=!0),!i0.allowSlideNext&&i0.swipeDirection==="next"&&r0.currentTranslate<r0.startTranslate&&(r0.currentTranslate=r0.startTranslate),!i0.allowSlidePrev&&i0.swipeDirection==="prev"&&r0.currentTranslate>r0.startTranslate&&(r0.currentTranslate=r0.startTranslate),!i0.allowSlidePrev&&!i0.allowSlideNext&&(r0.currentTranslate=r0.startTranslate),t0.threshold>0)if(Math.abs(d0)>t0.threshold||r0.allowThresholdMove){if(!r0.allowThresholdMove){r0.allowThresholdMove=!0,n0.startX=n0.currentX,n0.startY=n0.currentY,r0.currentTranslate=r0.startTranslate,n0.diff=i0.isHorizontal()?n0.currentX-n0.startX:n0.currentY-n0.startY;return}}else{r0.currentTranslate=r0.startTranslate;return}!t0.followFinger||t0.cssMode||((t0.freeMode&&t0.freeMode.enabled&&i0.freeMode||t0.watchSlidesProgress)&&(i0.updateActiveIndex(),i0.updateSlidesClasses()),t0.freeMode&&t0.freeMode.enabled&&i0.freeMode&&i0.freeMode.onTouchMove(),i0.updateProgress(r0.currentTranslate),i0.setTranslate(r0.currentTranslate))}function onTouchEnd(e0){const _e=this,i0=_e.touchEventsData,r0=i0.evCache.findIndex(m0=>m0.pointerId===e0.pointerId);if(r0>=0&&i0.evCache.splice(r0,1),["pointercancel","pointerout","pointerleave"].includes(e0.type)&&!(e0.type==="pointercancel"&&(_e.browser.isSafari||_e.browser.isWebView)))return;const{params:t0,touches:n0,rtlTranslate:s0,slidesGrid:o0,enabled:a0}=_e;if(!a0||!t0.simulateTouch&&e0.pointerType==="mouse")return;let f0=e0;if(f0.originalEvent&&(f0=f0.originalEvent),i0.allowTouchCallbacks&&_e.emit("touchEnd",f0),i0.allowTouchCallbacks=!1,!i0.isTouched){i0.isMoved&&t0.grabCursor&&_e.setGrabCursor(!1),i0.isMoved=!1,i0.startMoving=!1;return}t0.grabCursor&&i0.isMoved&&i0.isTouched&&(_e.allowSlideNext===!0||_e.allowSlidePrev===!0)&&_e.setGrabCursor(!1);const l0=now(),u0=l0-i0.touchStartTime;if(_e.allowClick){const m0=f0.path||f0.composedPath&&f0.composedPath();_e.updateClickedSlide(m0&&m0[0]||f0.target),_e.emit("tap click",f0),u0<300&&l0-i0.lastClickTime<300&&_e.emit("doubleTap doubleClick",f0)}if(i0.lastClickTime=now(),nextTick(()=>{_e.destroyed||(_e.allowClick=!0)}),!i0.isTouched||!i0.isMoved||!_e.swipeDirection||n0.diff===0||i0.currentTranslate===i0.startTranslate){i0.isTouched=!1,i0.isMoved=!1,i0.startMoving=!1;return}i0.isTouched=!1,i0.isMoved=!1,i0.startMoving=!1;let A0;if(t0.followFinger?A0=s0?_e.translate:-_e.translate:A0=-i0.currentTranslate,t0.cssMode)return;if(t0.freeMode&&t0.freeMode.enabled){_e.freeMode.onTouchEnd({currentPos:A0});return}let c0=0,k0=_e.slidesSizesGrid[0];for(let m0=0;m0<o0.length;m0+=m0<t0.slidesPerGroupSkip?1:t0.slidesPerGroup){const g0=m0<t0.slidesPerGroupSkip-1?1:t0.slidesPerGroup;typeof o0[m0+g0]<"u"?A0>=o0[m0]&&A0<o0[m0+g0]&&(c0=m0,k0=o0[m0+g0]-o0[m0]):A0>=o0[m0]&&(c0=m0,k0=o0[o0.length-1]-o0[o0.length-2])}let d0=null,h0=null;t0.rewind&&(_e.isBeginning?h0=t0.virtual&&t0.virtual.enabled&&_e.virtual?_e.virtual.slides.length-1:_e.slides.length-1:_e.isEnd&&(d0=0));const b0=(A0-o0[c0])/k0,p0=c0<t0.slidesPerGroupSkip-1?1:t0.slidesPerGroup;if(u0>t0.longSwipesMs){if(!t0.longSwipes){_e.slideTo(_e.activeIndex);return}_e.swipeDirection==="next"&&(b0>=t0.longSwipesRatio?_e.slideTo(t0.rewind&&_e.isEnd?d0:c0+p0):_e.slideTo(c0)),_e.swipeDirection==="prev"&&(b0>1-t0.longSwipesRatio?_e.slideTo(c0+p0):h0!==null&&b0<0&&Math.abs(b0)>t0.longSwipesRatio?_e.slideTo(h0):_e.slideTo(c0))}else{if(!t0.shortSwipes){_e.slideTo(_e.activeIndex);return}_e.navigation&&(f0.target===_e.navigation.nextEl||f0.target===_e.navigation.prevEl)?f0.target===_e.navigation.nextEl?_e.slideTo(c0+p0):_e.slideTo(c0):(_e.swipeDirection==="next"&&_e.slideTo(d0!==null?d0:c0+p0),_e.swipeDirection==="prev"&&_e.slideTo(h0!==null?h0:c0))}}function onResize(){const e0=this,{params:_e,el:i0}=e0;if(i0&&i0.offsetWidth===0)return;_e.breakpoints&&e0.setBreakpoint();const{allowSlideNext:r0,allowSlidePrev:t0,snapGrid:n0}=e0,s0=e0.virtual&&e0.params.virtual.enabled;e0.allowSlideNext=!0,e0.allowSlidePrev=!0,e0.updateSize(),e0.updateSlides(),e0.updateSlidesClasses();const o0=s0&&_e.loop;(_e.slidesPerView==="auto"||_e.slidesPerView>1)&&e0.isEnd&&!e0.isBeginning&&!e0.params.centeredSlides&&!o0?e0.slideTo(e0.slides.length-1,0,!1,!0):e0.params.loop&&!s0?e0.slideToLoop(e0.realIndex,0,!1,!0):e0.slideTo(e0.activeIndex,0,!1,!0),e0.autoplay&&e0.autoplay.running&&e0.autoplay.paused&&(clearTimeout(e0.autoplay.resizeTimeout),e0.autoplay.resizeTimeout=setTimeout(()=>{e0.autoplay&&e0.autoplay.running&&e0.autoplay.paused&&e0.autoplay.resume()},500)),e0.allowSlidePrev=t0,e0.allowSlideNext=r0,e0.params.watchOverflow&&n0!==e0.snapGrid&&e0.checkOverflow()}function onClick(e0){const _e=this;_e.enabled&&(_e.allowClick||(_e.params.preventClicks&&e0.preventDefault(),_e.params.preventClicksPropagation&&_e.animating&&(e0.stopPropagation(),e0.stopImmediatePropagation())))}function onScroll(){const e0=this,{wrapperEl:_e,rtlTranslate:i0,enabled:r0}=e0;if(!r0)return;e0.previousTranslate=e0.translate,e0.isHorizontal()?e0.translate=-_e.scrollLeft:e0.translate=-_e.scrollTop,e0.translate===0&&(e0.translate=0),e0.updateActiveIndex(),e0.updateSlidesClasses();let t0;const n0=e0.maxTranslate()-e0.minTranslate();n0===0?t0=0:t0=(e0.translate-e0.minTranslate())/n0,t0!==e0.progress&&e0.updateProgress(i0?-e0.translate:e0.translate),e0.emit("setTranslate",e0.translate,!1)}function onLoad(e0){const _e=this;processLazyPreloader(_e,e0.target),!(_e.params.cssMode||_e.params.slidesPerView!=="auto"&&!_e.params.autoHeight)&&_e.update()}let dummyEventAttached=!1;function dummyEventListener(){}const events$3=(e0,_e)=>{const i0=getDocument(),{params:r0,el:t0,wrapperEl:n0,device:s0}=e0,o0=!!r0.nested,a0=_e==="on"?"addEventListener":"removeEventListener",f0=_e;t0[a0]("pointerdown",e0.onTouchStart,{passive:!1}),i0[a0]("pointermove",e0.onTouchMove,{passive:!1,capture:o0}),i0[a0]("pointerup",e0.onTouchEnd,{passive:!0}),i0[a0]("pointercancel",e0.onTouchEnd,{passive:!0}),i0[a0]("pointerout",e0.onTouchEnd,{passive:!0}),i0[a0]("pointerleave",e0.onTouchEnd,{passive:!0}),(r0.preventClicks||r0.preventClicksPropagation)&&t0[a0]("click",e0.onClick,!0),r0.cssMode&&n0[a0]("scroll",e0.onScroll),r0.updateOnWindowResize?e0[f0](s0.ios||s0.android?"resize orientationchange observerUpdate":"resize observerUpdate",onResize,!0):e0[f0]("observerUpdate",onResize,!0),t0[a0]("load",e0.onLoad,{capture:!0})};function attachEvents(){const e0=this,_e=getDocument(),{params:i0}=e0;e0.onTouchStart=onTouchStart.bind(e0),e0.onTouchMove=onTouchMove.bind(e0),e0.onTouchEnd=onTouchEnd.bind(e0),i0.cssMode&&(e0.onScroll=onScroll.bind(e0)),e0.onClick=onClick.bind(e0),e0.onLoad=onLoad.bind(e0),dummyEventAttached||(_e.addEventListener("touchstart",dummyEventListener),dummyEventAttached=!0),events$3(e0,"on")}function detachEvents(){events$3(this,"off")}var events$1$1={attachEvents,detachEvents};const isGridEnabled=(e0,_e)=>e0.grid&&_e.grid&&_e.grid.rows>1;function setBreakpoint(){const e0=this,{realIndex:_e,initialized:i0,params:r0,el:t0}=e0,n0=r0.breakpoints;if(!n0||n0&&Object.keys(n0).length===0)return;const s0=e0.getBreakpoint(n0,e0.params.breakpointsBase,e0.el);if(!s0||e0.currentBreakpoint===s0)return;const a0=(s0 in n0?n0[s0]:void 0)||e0.originalParams,f0=isGridEnabled(e0,r0),l0=isGridEnabled(e0,a0),u0=r0.enabled;f0&&!l0?(t0.classList.remove(`${r0.containerModifierClass}grid`,`${r0.containerModifierClass}grid-column`),e0.emitContainerClasses()):!f0&&l0&&(t0.classList.add(`${r0.containerModifierClass}grid`),(a0.grid.fill&&a0.grid.fill==="column"||!a0.grid.fill&&r0.grid.fill==="column")&&t0.classList.add(`${r0.containerModifierClass}grid-column`),e0.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach(d0=>{if(typeof a0[d0]>"u")return;const h0=r0[d0]&&r0[d0].enabled,b0=a0[d0]&&a0[d0].enabled;h0&&!b0&&e0[d0].disable(),!h0&&b0&&e0[d0].enable()});const A0=a0.direction&&a0.direction!==r0.direction,c0=r0.loop&&(a0.slidesPerView!==r0.slidesPerView||A0);A0&&i0&&e0.changeDirection(),extend$1(e0.params,a0);const k0=e0.params.enabled;Object.assign(e0,{allowTouchMove:e0.params.allowTouchMove,allowSlideNext:e0.params.allowSlideNext,allowSlidePrev:e0.params.allowSlidePrev}),u0&&!k0?e0.disable():!u0&&k0&&e0.enable(),e0.currentBreakpoint=s0,e0.emit("_beforeBreakpoint",a0),c0&&i0&&(e0.loopDestroy(),e0.loopCreate(_e),e0.updateSlides()),e0.emit("breakpoint",a0)}function getBreakpoint(e0,_e,i0){if(_e===void 0&&(_e="window"),!e0||_e==="container"&&!i0)return;let r0=!1;const t0=getWindow(),n0=_e==="window"?t0.innerHeight:i0.clientHeight,s0=Object.keys(e0).map(o0=>{if(typeof o0=="string"&&o0.indexOf("@")===0){const a0=parseFloat(o0.substr(1));return{value:n0*a0,point:o0}}return{value:o0,point:o0}});s0.sort((o0,a0)=>parseInt(o0.value,10)-parseInt(a0.value,10));for(let o0=0;o0<s0.length;o0+=1){const{point:a0,value:f0}=s0[o0];_e==="window"?t0.matchMedia(`(min-width: ${f0}px)`).matches&&(r0=a0):f0<=i0.clientWidth&&(r0=a0)}return r0||"max"}var breakpoints={setBreakpoint,getBreakpoint};function prepareClasses(e0,_e){const i0=[];return e0.forEach(r0=>{typeof r0=="object"?Object.keys(r0).forEach(t0=>{r0[t0]&&i0.push(_e+t0)}):typeof r0=="string"&&i0.push(_e+r0)}),i0}function addClasses(){const e0=this,{classNames:_e,params:i0,rtl:r0,el:t0,device:n0}=e0,s0=prepareClasses(["initialized",i0.direction,{"free-mode":e0.params.freeMode&&i0.freeMode.enabled},{autoheight:i0.autoHeight},{rtl:r0},{grid:i0.grid&&i0.grid.rows>1},{"grid-column":i0.grid&&i0.grid.rows>1&&i0.grid.fill==="column"},{android:n0.android},{ios:n0.ios},{"css-mode":i0.cssMode},{centered:i0.cssMode&&i0.centeredSlides},{"watch-progress":i0.watchSlidesProgress}],i0.containerModifierClass);_e.push(...s0),t0.classList.add(..._e),e0.emitContainerClasses()}function removeClasses(){const e0=this,{el:_e,classNames:i0}=e0;_e.classList.remove(...i0),e0.emitContainerClasses()}var classes={addClasses,removeClasses};function checkOverflow(){const e0=this,{isLocked:_e,params:i0}=e0,{slidesOffsetBefore:r0}=i0;if(r0){const t0=e0.slides.length-1,n0=e0.slidesGrid[t0]+e0.slidesSizesGrid[t0]+r0*2;e0.isLocked=e0.size>n0}else e0.isLocked=e0.snapGrid.length===1;i0.allowSlideNext===!0&&(e0.allowSlideNext=!e0.isLocked),i0.allowSlidePrev===!0&&(e0.allowSlidePrev=!e0.isLocked),_e&&_e!==e0.isLocked&&(e0.isEnd=!1),_e!==e0.isLocked&&e0.emit(e0.isLocked?"lock":"unlock")}var checkOverflow$1={checkOverflow},defaults={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function moduleExtendParams(e0,_e){return function(r0){r0===void 0&&(r0={});const t0=Object.keys(r0)[0],n0=r0[t0];if(typeof n0!="object"||n0===null){extend$1(_e,r0);return}if(["navigation","pagination","scrollbar"].indexOf(t0)>=0&&e0[t0]===!0&&(e0[t0]={auto:!0}),!(t0 in e0&&"enabled"in n0)){extend$1(_e,r0);return}e0[t0]===!0&&(e0[t0]={enabled:!0}),typeof e0[t0]=="object"&&!("enabled"in e0[t0])&&(e0[t0].enabled=!0),e0[t0]||(e0[t0]={enabled:!1}),extend$1(_e,r0)}}const prototypes={eventsEmitter,update,translate,transition,slide,loop,grabCursor,events:events$1$1,breakpoints,checkOverflow:checkOverflow$1,classes},extendedDefaults={};let Swiper$1=class rr{constructor(){let _e,i0;for(var r0=arguments.length,t0=new Array(r0),n0=0;n0<r0;n0++)t0[n0]=arguments[n0];t0.length===1&&t0[0].constructor&&Object.prototype.toString.call(t0[0]).slice(8,-1)==="Object"?i0=t0[0]:[_e,i0]=t0,i0||(i0={}),i0=extend$1({},i0),_e&&!i0.el&&(i0.el=_e);const s0=getDocument();if(i0.el&&typeof i0.el=="string"&&s0.querySelectorAll(i0.el).length>1){const l0=[];return s0.querySelectorAll(i0.el).forEach(u0=>{const A0=extend$1({},i0,{el:u0});l0.push(new rr(A0))}),l0}const o0=this;o0.__swiper__=!0,o0.support=getSupport(),o0.device=getDevice({userAgent:i0.userAgent}),o0.browser=getBrowser(),o0.eventsListeners={},o0.eventsAnyListeners=[],o0.modules=[...o0.__modules__],i0.modules&&Array.isArray(i0.modules)&&o0.modules.push(...i0.modules);const a0={};o0.modules.forEach(l0=>{l0({params:i0,swiper:o0,extendParams:moduleExtendParams(i0,a0),on:o0.on.bind(o0),once:o0.once.bind(o0),off:o0.off.bind(o0),emit:o0.emit.bind(o0)})});const f0=extend$1({},defaults,a0);return o0.params=extend$1({},f0,extendedDefaults,i0),o0.originalParams=extend$1({},o0.params),o0.passedParams=extend$1({},i0),o0.params&&o0.params.on&&Object.keys(o0.params.on).forEach(l0=>{o0.on(l0,o0.params.on[l0])}),o0.params&&o0.params.onAny&&o0.onAny(o0.params.onAny),Object.assign(o0,{enabled:o0.params.enabled,el:_e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return o0.params.direction==="horizontal"},isVertical(){return o0.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:o0.params.allowSlideNext,allowSlidePrev:o0.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:o0.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:o0.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),o0.emit("_swiper"),o0.params.init&&o0.init(),o0}getSlideIndex(_e){const{slidesEl:i0,params:r0}=this,t0=elementChildren(i0,`.${r0.slideClass}, swiper-slide`),n0=elementIndex(t0[0]);return elementIndex(_e)-n0}getSlideIndexByData(_e){return this.getSlideIndex(this.slides.filter(i0=>i0.getAttribute("data-swiper-slide-index")*1===_e)[0])}recalcSlides(){const _e=this,{slidesEl:i0,params:r0}=_e;_e.slides=elementChildren(i0,`.${r0.slideClass}, swiper-slide`)}enable(){const _e=this;_e.enabled||(_e.enabled=!0,_e.params.grabCursor&&_e.setGrabCursor(),_e.emit("enable"))}disable(){const _e=this;_e.enabled&&(_e.enabled=!1,_e.params.grabCursor&&_e.unsetGrabCursor(),_e.emit("disable"))}setProgress(_e,i0){const r0=this;_e=Math.min(Math.max(_e,0),1);const t0=r0.minTranslate(),s0=(r0.maxTranslate()-t0)*_e+t0;r0.translateTo(s0,typeof i0>"u"?0:i0),r0.updateActiveIndex(),r0.updateSlidesClasses()}emitContainerClasses(){const _e=this;if(!_e.params._emitClasses||!_e.el)return;const i0=_e.el.className.split(" ").filter(r0=>r0.indexOf("swiper")===0||r0.indexOf(_e.params.containerModifierClass)===0);_e.emit("_containerClasses",i0.join(" "))}getSlideClasses(_e){const i0=this;return i0.destroyed?"":_e.className.split(" ").filter(r0=>r0.indexOf("swiper-slide")===0||r0.indexOf(i0.params.slideClass)===0).join(" ")}emitSlidesClasses(){const _e=this;if(!_e.params._emitClasses||!_e.el)return;const i0=[];_e.slides.forEach(r0=>{const t0=_e.getSlideClasses(r0);i0.push({slideEl:r0,classNames:t0}),_e.emit("_slideClass",r0,t0)}),_e.emit("_slideClasses",i0)}slidesPerViewDynamic(_e,i0){_e===void 0&&(_e="current"),i0===void 0&&(i0=!1);const r0=this,{params:t0,slides:n0,slidesGrid:s0,slidesSizesGrid:o0,size:a0,activeIndex:f0}=r0;let l0=1;if(t0.centeredSlides){let u0=n0[f0]?n0[f0].swiperSlideSize:0,A0;for(let c0=f0+1;c0<n0.length;c0+=1)n0[c0]&&!A0&&(u0+=n0[c0].swiperSlideSize,l0+=1,u0>a0&&(A0=!0));for(let c0=f0-1;c0>=0;c0-=1)n0[c0]&&!A0&&(u0+=n0[c0].swiperSlideSize,l0+=1,u0>a0&&(A0=!0))}else if(_e==="current")for(let u0=f0+1;u0<n0.length;u0+=1)(i0?s0[u0]+o0[u0]-s0[f0]<a0:s0[u0]-s0[f0]<a0)&&(l0+=1);else for(let u0=f0-1;u0>=0;u0-=1)s0[f0]-s0[u0]<a0&&(l0+=1);return l0}update(){const _e=this;if(!_e||_e.destroyed)return;const{snapGrid:i0,params:r0}=_e;r0.breakpoints&&_e.setBreakpoint(),[..._e.el.querySelectorAll('[loading="lazy"]')].forEach(s0=>{s0.complete&&processLazyPreloader(_e,s0)}),_e.updateSize(),_e.updateSlides(),_e.updateProgress(),_e.updateSlidesClasses();function t0(){const s0=_e.rtlTranslate?_e.translate*-1:_e.translate,o0=Math.min(Math.max(s0,_e.maxTranslate()),_e.minTranslate());_e.setTranslate(o0),_e.updateActiveIndex(),_e.updateSlidesClasses()}let n0;if(r0.freeMode&&r0.freeMode.enabled&&!r0.cssMode)t0(),r0.autoHeight&&_e.updateAutoHeight();else{if((r0.slidesPerView==="auto"||r0.slidesPerView>1)&&_e.isEnd&&!r0.centeredSlides){const s0=_e.virtual&&r0.virtual.enabled?_e.virtual.slides:_e.slides;n0=_e.slideTo(s0.length-1,0,!1,!0)}else n0=_e.slideTo(_e.activeIndex,0,!1,!0);n0||t0()}r0.watchOverflow&&i0!==_e.snapGrid&&_e.checkOverflow(),_e.emit("update")}changeDirection(_e,i0){i0===void 0&&(i0=!0);const r0=this,t0=r0.params.direction;return _e||(_e=t0==="horizontal"?"vertical":"horizontal"),_e===t0||_e!=="horizontal"&&_e!=="vertical"||(r0.el.classList.remove(`${r0.params.containerModifierClass}${t0}`),r0.el.classList.add(`${r0.params.containerModifierClass}${_e}`),r0.emitContainerClasses(),r0.params.direction=_e,r0.slides.forEach(n0=>{_e==="vertical"?n0.style.width="":n0.style.height=""}),r0.emit("changeDirection"),i0&&r0.update()),r0}changeLanguageDirection(_e){const i0=this;i0.rtl&&_e==="rtl"||!i0.rtl&&_e==="ltr"||(i0.rtl=_e==="rtl",i0.rtlTranslate=i0.params.direction==="horizontal"&&i0.rtl,i0.rtl?(i0.el.classList.add(`${i0.params.containerModifierClass}rtl`),i0.el.dir="rtl"):(i0.el.classList.remove(`${i0.params.containerModifierClass}rtl`),i0.el.dir="ltr"),i0.update())}mount(_e){const i0=this;if(i0.mounted)return!0;let r0=_e||i0.params.el;if(typeof r0=="string"&&(r0=document.querySelector(r0)),!r0)return!1;r0.swiper=i0,r0.parentNode&&r0.parentNode.host&&r0.parentNode.host.nodeName==="SWIPER-CONTAINER"&&(i0.isElement=!0);const t0=()=>`.${(i0.params.wrapperClass||"").trim().split(" ").join(".")}`;let s0=r0&&r0.shadowRoot&&r0.shadowRoot.querySelector?r0.shadowRoot.querySelector(t0()):elementChildren(r0,t0())[0];return!s0&&i0.params.createElements&&(s0=createElement("div",i0.params.wrapperClass),r0.append(s0),elementChildren(r0,`.${i0.params.slideClass}`).forEach(o0=>{s0.append(o0)})),Object.assign(i0,{el:r0,wrapperEl:s0,slidesEl:i0.isElement&&!r0.parentNode.host.slideSlots?r0.parentNode.host:s0,hostEl:i0.isElement?r0.parentNode.host:r0,mounted:!0,rtl:r0.dir.toLowerCase()==="rtl"||elementStyle(r0,"direction")==="rtl",rtlTranslate:i0.params.direction==="horizontal"&&(r0.dir.toLowerCase()==="rtl"||elementStyle(r0,"direction")==="rtl"),wrongRTL:elementStyle(s0,"display")==="-webkit-box"}),!0}init(_e){const i0=this;return i0.initialized||i0.mount(_e)===!1||(i0.emit("beforeInit"),i0.params.breakpoints&&i0.setBreakpoint(),i0.addClasses(),i0.updateSize(),i0.updateSlides(),i0.params.watchOverflow&&i0.checkOverflow(),i0.params.grabCursor&&i0.enabled&&i0.setGrabCursor(),i0.params.loop&&i0.virtual&&i0.params.virtual.enabled?i0.slideTo(i0.params.initialSlide+i0.virtual.slidesBefore,0,i0.params.runCallbacksOnInit,!1,!0):i0.slideTo(i0.params.initialSlide,0,i0.params.runCallbacksOnInit,!1,!0),i0.params.loop&&i0.loopCreate(),i0.attachEvents(),[...i0.el.querySelectorAll('[loading="lazy"]')].forEach(t0=>{t0.complete?processLazyPreloader(i0,t0):t0.addEventListener("load",n0=>{processLazyPreloader(i0,n0.target)})}),preload(i0),i0.initialized=!0,preload(i0),i0.emit("init"),i0.emit("afterInit")),i0}destroy(_e,i0){_e===void 0&&(_e=!0),i0===void 0&&(i0=!0);const r0=this,{params:t0,el:n0,wrapperEl:s0,slides:o0}=r0;return typeof r0.params>"u"||r0.destroyed||(r0.emit("beforeDestroy"),r0.initialized=!1,r0.detachEvents(),t0.loop&&r0.loopDestroy(),i0&&(r0.removeClasses(),n0.removeAttribute("style"),s0.removeAttribute("style"),o0&&o0.length&&o0.forEach(a0=>{a0.classList.remove(t0.slideVisibleClass,t0.slideActiveClass,t0.slideNextClass,t0.slidePrevClass),a0.removeAttribute("style"),a0.removeAttribute("data-swiper-slide-index")})),r0.emit("destroy"),Object.keys(r0.eventsListeners).forEach(a0=>{r0.off(a0)}),_e!==!1&&(r0.el.swiper=null,deleteProps(r0)),r0.destroyed=!0),null}static extendDefaults(_e){extend$1(extendedDefaults,_e)}static get extendedDefaults(){return extendedDefaults}static get defaults(){return defaults}static installModule(_e){rr.prototype.__modules__||(rr.prototype.__modules__=[]);const i0=rr.prototype.__modules__;typeof _e=="function"&&i0.indexOf(_e)<0&&i0.push(_e)}static use(_e){return Array.isArray(_e)?(_e.forEach(i0=>rr.installModule(i0)),rr):(rr.installModule(_e),rr)}};Object.keys(prototypes).forEach(e0=>{Object.keys(prototypes[e0]).forEach(_e=>{Swiper$1.prototype[_e]=prototypes[e0][_e]})});Swiper$1.use([Resize,Observer]);const paramsList=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopedSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideNextClass","slidePrevClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function isObject$1(e0){return typeof e0=="object"&&e0!==null&&e0.constructor&&Object.prototype.toString.call(e0).slice(8,-1)==="Object"}function extend(e0,_e){const i0=["__proto__","constructor","prototype"];Object.keys(_e).filter(r0=>i0.indexOf(r0)<0).forEach(r0=>{typeof e0[r0]>"u"?e0[r0]=_e[r0]:isObject$1(_e[r0])&&isObject$1(e0[r0])&&Object.keys(_e[r0]).length>0?_e[r0].__swiper__?e0[r0]=_e[r0]:extend(e0[r0],_e[r0]):e0[r0]=_e[r0]})}function needsNavigation(e0){return e0===void 0&&(e0={}),e0.navigation&&typeof e0.navigation.nextEl>"u"&&typeof e0.navigation.prevEl>"u"}function needsPagination(e0){return e0===void 0&&(e0={}),e0.pagination&&typeof e0.pagination.el>"u"}function needsScrollbar(e0){return e0===void 0&&(e0={}),e0.scrollbar&&typeof e0.scrollbar.el>"u"}function uniqueClasses(e0){e0===void 0&&(e0="");const _e=e0.split(" ").map(r0=>r0.trim()).filter(r0=>!!r0),i0=[];return _e.forEach(r0=>{i0.indexOf(r0)<0&&i0.push(r0)}),i0.join(" ")}function wrapperClass(e0){return e0===void 0&&(e0=""),e0?e0.includes("swiper-wrapper")?e0:`swiper-wrapper ${e0}`:"swiper-wrapper"}function updateSwiper(e0){let{swiper:_e,slides:i0,passedParams:r0,changedParams:t0,nextEl:n0,prevEl:s0,scrollbarEl:o0,paginationEl:a0}=e0;const f0=t0.filter(y0=>y0!=="children"&&y0!=="direction"&&y0!=="wrapperClass"),{params:l0,pagination:u0,navigation:A0,scrollbar:c0,virtual:k0,thumbs:d0}=_e;let h0,b0,p0,m0,g0,v0,x0,w0;t0.includes("thumbs")&&r0.thumbs&&r0.thumbs.swiper&&l0.thumbs&&!l0.thumbs.swiper&&(h0=!0),t0.includes("controller")&&r0.controller&&r0.controller.control&&l0.controller&&!l0.controller.control&&(b0=!0),t0.includes("pagination")&&r0.pagination&&(r0.pagination.el||a0)&&(l0.pagination||l0.pagination===!1)&&u0&&!u0.el&&(p0=!0),t0.includes("scrollbar")&&r0.scrollbar&&(r0.scrollbar.el||o0)&&(l0.scrollbar||l0.scrollbar===!1)&&c0&&!c0.el&&(m0=!0),t0.includes("navigation")&&r0.navigation&&(r0.navigation.prevEl||s0)&&(r0.navigation.nextEl||n0)&&(l0.navigation||l0.navigation===!1)&&A0&&!A0.prevEl&&!A0.nextEl&&(g0=!0);const _0=y0=>{_e[y0]&&(_e[y0].destroy(),y0==="navigation"?(_e.isElement&&(_e[y0].prevEl.remove(),_e[y0].nextEl.remove()),l0[y0].prevEl=void 0,l0[y0].nextEl=void 0,_e[y0].prevEl=void 0,_e[y0].nextEl=void 0):(_e.isElement&&_e[y0].el.remove(),l0[y0].el=void 0,_e[y0].el=void 0))};t0.includes("loop")&&_e.isElement&&(l0.loop&&!r0.loop?v0=!0:!l0.loop&&r0.loop?x0=!0:w0=!0),f0.forEach(y0=>{if(isObject$1(l0[y0])&&isObject$1(r0[y0]))extend(l0[y0],r0[y0]),(y0==="navigation"||y0==="pagination"||y0==="scrollbar")&&"enabled"in r0[y0]&&!r0[y0].enabled&&_0(y0);else{const S0=r0[y0];(S0===!0||S0===!1)&&(y0==="navigation"||y0==="pagination"||y0==="scrollbar")?S0===!1&&_0(y0):l0[y0]=r0[y0]}}),f0.includes("controller")&&!b0&&_e.controller&&_e.controller.control&&l0.controller&&l0.controller.control&&(_e.controller.control=l0.controller.control),t0.includes("children")&&i0&&k0&&l0.virtual.enabled&&(k0.slides=i0,k0.update(!0)),t0.includes("children")&&i0&&l0.loop&&(w0=!0),h0&&d0.init()&&d0.update(!0),b0&&(_e.controller.control=l0.controller.control),p0&&(_e.isElement&&(!a0||typeof a0=="string")&&(a0=document.createElement("div"),a0.classList.add("swiper-pagination"),_e.el.appendChild(a0)),a0&&(l0.pagination.el=a0),u0.init(),u0.render(),u0.update()),m0&&(_e.isElement&&(!o0||typeof o0=="string")&&(o0=document.createElement("div"),o0.classList.add("swiper-scrollbar"),_e.el.appendChild(o0)),o0&&(l0.scrollbar.el=o0),c0.init(),c0.updateSize(),c0.setTranslate()),g0&&(_e.isElement&&((!n0||typeof n0=="string")&&(n0=document.createElement("div"),n0.classList.add("swiper-button-next"),n0.innerHTML=_e.hostEl.nextButtonSvg,_e.el.appendChild(n0)),(!s0||typeof s0=="string")&&(s0=document.createElement("div"),s0.classList.add("swiper-button-prev"),n0.innerHTML=_e.hostEl.prevButtonSvg,_e.el.appendChild(s0))),n0&&(l0.navigation.nextEl=n0),s0&&(l0.navigation.prevEl=s0),A0.init(),A0.update()),t0.includes("allowSlideNext")&&(_e.allowSlideNext=r0.allowSlideNext),t0.includes("allowSlidePrev")&&(_e.allowSlidePrev=r0.allowSlidePrev),t0.includes("direction")&&_e.changeDirection(r0.direction,!1),(v0||w0)&&_e.loopDestroy(),(x0||w0)&&_e.loopCreate(),_e.update()}function getParams(e0,_e){e0===void 0&&(e0={}),_e===void 0&&(_e=!0);const i0={on:{}},r0={},t0={};extend(i0,defaults),i0._emitClasses=!0,i0.init=!1;const n0={},s0=paramsList.map(a0=>a0.replace(/_/,"")),o0=Object.assign({},e0);return Object.keys(o0).forEach(a0=>{typeof e0[a0]>"u"||(s0.indexOf(a0)>=0?isObject$1(e0[a0])?(i0[a0]={},t0[a0]={},extend(i0[a0],e0[a0]),extend(t0[a0],e0[a0])):(i0[a0]=e0[a0],t0[a0]=e0[a0]):a0.search(/on[A-Z]/)===0&&typeof e0[a0]=="function"?_e?r0[`${a0[2].toLowerCase()}${a0.substr(3)}`]=e0[a0]:i0.on[`${a0[2].toLowerCase()}${a0.substr(3)}`]=e0[a0]:n0[a0]=e0[a0])}),["navigation","pagination","scrollbar"].forEach(a0=>{i0[a0]===!0&&(i0[a0]={}),i0[a0]===!1&&delete i0[a0]}),{params:i0,passedParams:t0,rest:n0,events:r0}}function mountSwiper(e0,_e){let{el:i0,nextEl:r0,prevEl:t0,paginationEl:n0,scrollbarEl:s0,swiper:o0}=e0;needsNavigation(_e)&&r0&&t0&&(o0.params.navigation.nextEl=r0,o0.originalParams.navigation.nextEl=r0,o0.params.navigation.prevEl=t0,o0.originalParams.navigation.prevEl=t0),needsPagination(_e)&&n0&&(o0.params.pagination.el=n0,o0.originalParams.pagination.el=n0),needsScrollbar(_e)&&s0&&(o0.params.scrollbar.el=s0,o0.originalParams.scrollbar.el=s0),o0.init(i0)}function getChangedParams(e0,_e,i0,r0,t0){const n0=[];if(!_e)return n0;const s0=a0=>{n0.indexOf(a0)<0&&n0.push(a0)};if(i0&&r0){const a0=r0.map(t0),f0=i0.map(t0);a0.join("")!==f0.join("")&&s0("children"),r0.length!==i0.length&&s0("children")}return paramsList.filter(a0=>a0[0]==="_").map(a0=>a0.replace(/_/,"")).forEach(a0=>{if(a0 in e0&&a0 in _e)if(isObject$1(e0[a0])&&isObject$1(_e[a0])){const f0=Object.keys(e0[a0]),l0=Object.keys(_e[a0]);f0.length!==l0.length?s0(a0):(f0.forEach(u0=>{e0[a0][u0]!==_e[a0][u0]&&s0(a0)}),l0.forEach(u0=>{e0[a0][u0]!==_e[a0][u0]&&s0(a0)}))}else e0[a0]!==_e[a0]&&s0(a0)}),n0}const updateOnVirtualData=e0=>{!e0||e0.destroyed||!e0.params.virtual||e0.params.virtual&&!e0.params.virtual.enabled||(e0.updateSlides(),e0.updateProgress(),e0.updateSlidesClasses(),e0.parallax&&e0.params.parallax&&e0.params.parallax.enabled&&e0.parallax.setTranslate())};function _extends(){return _extends=Object.assign?Object.assign.bind():function(e0){for(var _e=1;_e<arguments.length;_e++){var i0=arguments[_e];for(var r0 in i0)Object.prototype.hasOwnProperty.call(i0,r0)&&(e0[r0]=i0[r0])}return e0},_extends.apply(this,arguments)}function isChildSwiperSlide(e0){return e0.type&&e0.type.displayName&&e0.type.displayName.includes("SwiperSlide")}function processChildren(e0){const _e=[];return React$4.Children.toArray(e0).forEach(i0=>{isChildSwiperSlide(i0)?_e.push(i0):i0.props&&i0.props.children&&processChildren(i0.props.children).forEach(r0=>_e.push(r0))}),_e}function getChildren(e0){const _e=[],i0={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return React$4.Children.toArray(e0).forEach(r0=>{if(isChildSwiperSlide(r0))_e.push(r0);else if(r0.props&&r0.props.slot&&i0[r0.props.slot])i0[r0.props.slot].push(r0);else if(r0.props&&r0.props.children){const t0=processChildren(r0.props.children);t0.length>0?t0.forEach(n0=>_e.push(n0)):i0["container-end"].push(r0)}else i0["container-end"].push(r0)}),{slides:_e,slots:i0}}function renderVirtual(e0,_e,i0){if(!i0)return null;const r0=l0=>{let u0=l0;return l0<0?u0=_e.length+l0:u0>=_e.length&&(u0=u0-_e.length),u0},t0=e0.isHorizontal()?{[e0.rtlTranslate?"right":"left"]:`${i0.offset}px`}:{top:`${i0.offset}px`},{from:n0,to:s0}=i0,o0=e0.params.loop?-_e.length:0,a0=e0.params.loop?_e.length*2:_e.length,f0=[];for(let l0=o0;l0<a0;l0+=1)l0>=n0&&l0<=s0&&f0.push(_e[r0(l0)]);return f0.map((l0,u0)=>React$4.cloneElement(l0,{swiper:e0,style:t0,key:`slide-${u0}`}))}function useIsomorphicLayoutEffect$1(e0,_e){return typeof window>"u"?reactExports.useEffect(e0,_e):reactExports.useLayoutEffect(e0,_e)}const SwiperSlideContext=reactExports.createContext(null),SwiperContext=reactExports.createContext(null),Swiper=reactExports.forwardRef(function(e0,_e){let{className:i0,tag:r0="div",wrapperTag:t0="div",children:n0,onSwiper:s0,...o0}=e0===void 0?{}:e0,a0=!1;const[f0,l0]=reactExports.useState("swiper"),[u0,A0]=reactExports.useState(null),[c0,k0]=reactExports.useState(!1),d0=reactExports.useRef(!1),h0=reactExports.useRef(null),b0=reactExports.useRef(null),p0=reactExports.useRef(null),m0=reactExports.useRef(null),g0=reactExports.useRef(null),v0=reactExports.useRef(null),x0=reactExports.useRef(null),w0=reactExports.useRef(null),{params:_0,passedParams:y0,rest:S0,events:B0}=getParams(o0),{slides:I0,slots:T0}=getChildren(n0),R0=()=>{k0(!c0)};Object.assign(_0.on,{_containerClasses(M0,j0){l0(j0)}});const E0=()=>{Object.assign(_0.on,B0),a0=!0;const M0={..._0};if(delete M0.wrapperClass,b0.current=new Swiper$1(M0),b0.current.virtual&&b0.current.params.virtual.enabled){b0.current.virtual.slides=I0;const j0={cache:!1,slides:I0,renderExternal:A0,renderExternalUpdate:!1};extend(b0.current.params.virtual,j0),extend(b0.current.originalParams.virtual,j0)}};h0.current||E0(),b0.current&&b0.current.on("_beforeBreakpoint",R0);const C0=()=>{a0||!B0||!b0.current||Object.keys(B0).forEach(M0=>{b0.current.on(M0,B0[M0])})},G0=()=>{!B0||!b0.current||Object.keys(B0).forEach(M0=>{b0.current.off(M0,B0[M0])})};reactExports.useEffect(()=>()=>{b0.current&&b0.current.off("_beforeBreakpoint",R0)}),reactExports.useEffect(()=>{!d0.current&&b0.current&&(b0.current.emitSlidesClasses(),d0.current=!0)}),useIsomorphicLayoutEffect$1(()=>{if(_e&&(_e.current=h0.current),!!h0.current)return b0.current.destroyed&&E0(),mountSwiper({el:h0.current,nextEl:g0.current,prevEl:v0.current,paginationEl:x0.current,scrollbarEl:w0.current,swiper:b0.current},_0),s0&&s0(b0.current),()=>{b0.current&&!b0.current.destroyed&&b0.current.destroy(!0,!1)}},[]),useIsomorphicLayoutEffect$1(()=>{C0();const M0=getChangedParams(y0,p0.current,I0,m0.current,j0=>j0.key);return p0.current=y0,m0.current=I0,M0.length&&b0.current&&!b0.current.destroyed&&updateSwiper({swiper:b0.current,slides:I0,passedParams:y0,changedParams:M0,nextEl:g0.current,prevEl:v0.current,scrollbarEl:w0.current,paginationEl:x0.current}),()=>{G0()}}),useIsomorphicLayoutEffect$1(()=>{updateOnVirtualData(b0.current)},[u0]);function F0(){return _0.virtual?renderVirtual(b0.current,I0,u0):I0.map((M0,j0)=>React$4.cloneElement(M0,{swiper:b0.current,swiperSlideIndex:j0}))}return React$4.createElement(r0,_extends({ref:h0,className:uniqueClasses(`${f0}${i0?` ${i0}`:""}`)},S0),React$4.createElement(SwiperContext.Provider,{value:b0.current},T0["container-start"],React$4.createElement(t0,{className:wrapperClass(_0.wrapperClass)},T0["wrapper-start"],F0(),T0["wrapper-end"]),needsNavigation(_0)&&React$4.createElement(React$4.Fragment,null,React$4.createElement("div",{ref:v0,className:"swiper-button-prev"}),React$4.createElement("div",{ref:g0,className:"swiper-button-next"})),needsScrollbar(_0)&&React$4.createElement("div",{ref:w0,className:"swiper-scrollbar"}),needsPagination(_0)&&React$4.createElement("div",{ref:x0,className:"swiper-pagination"}),T0["container-end"]))});Swiper.displayName="Swiper";const SwiperSlide=reactExports.forwardRef(function(e0,_e){let{tag:i0="div",children:r0,className:t0="",swiper:n0,zoom:s0,lazy:o0,virtualIndex:a0,swiperSlideIndex:f0,...l0}=e0===void 0?{}:e0;const u0=reactExports.useRef(null),[A0,c0]=reactExports.useState("swiper-slide"),[k0,d0]=reactExports.useState(!1);function h0(g0,v0,x0){v0===u0.current&&c0(x0)}useIsomorphicLayoutEffect$1(()=>{if(typeof f0<"u"&&(u0.current.swiperSlideIndex=f0),_e&&(_e.current=u0.current),!(!u0.current||!n0)){if(n0.destroyed){A0!=="swiper-slide"&&c0("swiper-slide");return}return n0.on("_slideClass",h0),()=>{n0&&n0.off("_slideClass",h0)}}}),useIsomorphicLayoutEffect$1(()=>{n0&&u0.current&&!n0.destroyed&&c0(n0.getSlideClasses(u0.current))},[n0]);const b0={isActive:A0.indexOf("swiper-slide-active")>=0,isVisible:A0.indexOf("swiper-slide-visible")>=0,isPrev:A0.indexOf("swiper-slide-prev")>=0,isNext:A0.indexOf("swiper-slide-next")>=0},p0=()=>typeof r0=="function"?r0(b0):r0,m0=()=>{d0(!0)};return React$4.createElement(i0,_extends({ref:u0,className:uniqueClasses(`${A0}${t0?` ${t0}`:""}`),"data-swiper-slide-index":a0,onLoad:m0},l0),s0&&React$4.createElement(SwiperSlideContext.Provider,{value:b0},React$4.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s0=="number"?s0:void 0},p0(),o0&&!k0&&React$4.createElement("div",{className:"swiper-lazy-preloader"}))),!s0&&React$4.createElement(SwiperSlideContext.Provider,{value:b0},p0(),o0&&!k0&&React$4.createElement("div",{className:"swiper-lazy-preloader"})))});SwiperSlide.displayName="SwiperSlide";function usePreferences(e0){return{getPreference:async()=>await odeServices.conf().getPreference(e0),savePreference:async _e=>await odeServices.conf().savePreference(e0,JSON.stringify(_e))}}const useOnboardingModal=(e0,_e)=>{const i0=reactExports.useRef(),[r0,t0]=reactExports.useState(!1),[n0,s0]=reactExports.useState(!1),{getPreference:o0,savePreference:a0}=usePreferences(e0);reactExports.useEffect(()=>{(async()=>{const l0=await o0();if(l0)if(_e){const{display:u0,nextState:A0}=_e(l0.key);t0(u0),s0(u0),i0.current=A0}else l0.key===!0&&t0(!0),s0(!!l0.key),i0.current=void 0;else t0(!0),s0(!0),i0.current=void 0})()},[]);const f0=reactExports.useCallback(async()=>{await a0({key:i0.current}),t0(!1),s0(!1)},[a0,t0,s0]);return{isOpen:r0,setIsOpen:t0,isOnboarding:n0,handleSavePreference:f0}},OnboardingModalInner=({id:e0,items:_e,modalOptions:i0={},isOnboardingChange:r0,onDisplayRuleCheck:t0=s0=>({display:s0===!0,nextState:!1})},n0)=>{var s0;const[o0,a0]=reactExports.useState(),[f0,l0]=reactExports.useState(0),{isOpen:u0,isOnboarding:A0,setIsOpen:c0,handleSavePreference:k0}=useOnboardingModal(e0,t0);reactExports.useImperativeHandle(n0,()=>({setIsOpen:c0,handleSavePreference:k0})),reactExports.useEffect(()=>{r0==null||r0(A0)},[A0,r0]),reactExports.useEffect(()=>{const w0=document.createElement("link");return w0.href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",w0.rel="stylesheet",w0.type="text/css",document.head.appendChild(w0),()=>{document.head.removeChild(w0)}},[]);const{t:d0}=useTranslation(),{title:h0,prevText:b0,closeText:p0,nextText:m0}=i0,g0=(o0==null?void 0:o0.activeIndex)!=null&&(s0=_e[o0==null?void 0:o0.activeIndex])!=null&&s0.title?_e[o0.activeIndex].title:h0,v0=()=>{k0(),l0(0)},x0=()=>{c0(!1),l0(0)};return u0?reactDomExports.createPortal(jsxRuntimeExports.jsxs(Modal,{id:"onboarding-modal","data-testid":"modal-onboarding",size:"md",isOpen:u0,focusId:"nextButtonId",onModalClose:x0,children:[jsxRuntimeExports.jsx(Modal.Header,{onModalClose:x0,centered:!0,children:d0(g0||"explorer.modal.onboarding.trash.title")}),jsxRuntimeExports.jsx(Modal.Body,{children:jsxRuntimeExports.jsx(Swiper,{modules:[Pagination],onSwiper:w0=>{a0(w0)},onSlideChange:w0=>{l0(w0.progress)},pagination:{clickable:!0},children:_e.map((w0,_0)=>jsxRuntimeExports.jsxs(SwiperSlide,{children:[jsxRuntimeExports.jsx(Image$1,{width:"270",height:"140",className:"mx-auto my-12 onboarding-modal-image",loading:"lazy",src:w0.src,alt:d0(w0.alt)}),jsxRuntimeExports.jsx("p",{className:"text-center",dangerouslySetInnerHTML:{__html:d0(w0.text)}})]},_0))})}),jsxRuntimeExports.jsxs(Modal.Footer,{children:[jsxRuntimeExports.jsx(Button,{"data-testid":"modal-onboarding-later",type:"button",color:"tertiary",variant:"ghost",onClick:x0,children:d0("explorer.modal.onboarding.trash.later")}),f0>0&&jsxRuntimeExports.jsx(Button,{"data-testid":"modal-onboarding-previous",type:"button",color:"primary",variant:"outline",onClick:()=>o0.slidePrev(),children:d0(b0||"explorer.modal.onboarding.trash.prev")}),_e.length>1&&f0<1&&jsxRuntimeExports.jsx(Button,{id:"nextButtonId","data-testid":"modal-onboarding-next",type:"button",color:"primary",variant:"filled",onClick:()=>o0.slideNext(),children:d0(m0||"explorer.modal.onboarding.trash.next")}),(_e.length===1||f0===1)&&jsxRuntimeExports.jsx(Button,{"data-testid":"modal-onboarding-close",type:"button",color:"primary",variant:"filled",onClick:()=>{A0?v0():x0()},children:d0(p0||"explorer.modal.onboarding.trash.close")})]})]}),document.getElementById("portal")||document.body):null},OnboardingModal$2=reactExports.forwardRef(OnboardingModalInner);function Navbar({children:e0,className:_e,...i0}){const r0=clsx("navbar",_e);return jsxRuntimeExports.jsx("nav",{className:r0,...i0,children:e0})}const NavItem=reactExports.forwardRef(({children:e0,className:_e,...i0},r0)=>{const t0=clsx("nav-item",_e);return jsxRuntimeExports.jsx("li",{ref:r0,className:t0,...i0,children:e0})}),VisuallyHidden=reactExports.forwardRef(({children:e0},_e)=>jsxRuntimeExports.jsx("span",{className:"visually-hidden",ref:_e,children:e0}));function NavLink({link:e0,className:_e,children:i0,translate:r0,button:t0,...n0}){const s0=clsx("nav-link",_e);return jsxRuntimeExports.jsxs("a",{href:e0,className:s0,...n0,children:[i0,r0&&jsxRuntimeExports.jsx(VisuallyHidden,{children:jsxRuntimeExports.jsx("span",{className:"nav-text",children:r0})})]})}function useBookmark(){var e0;const{sessionQuery:_e}=useEdificeClient(),i0=new Set;return(e0=_e==null?void 0:_e.data)==null?void 0:e0.bookmarkedApps.filter(r0=>{const t0=i0.has(r0.displayName);return i0.add(r0.displayName),!t0})}function useHeader({user:e0,avatar:_e}){const{appCode:i0}=useEdificeClient(),{t:r0}=useTranslation(),t0=r0(i0),[n0,s0]=reactExports.useState(!0),[o0,a0]=useHover$2(),f0=reactExports.useId(),l0=reactExports.useId(),u0=_e,A0=e0==null?void 0:e0.username,c0=r0("welcome",{username:e0==null?void 0:e0.firstName}),k0=useBookmark(),d0=useHasWorkflow("community.access"),h0=useHasWorkflow("org.entcore.conversation.controllers.ConversationController|view"),b0=useHasWorkflow("fr.openent.searchengine.controllers.SearchEngineController|view"),p0=reactExports.useCallback(()=>{s0(!n0)},[n0]);return reactExports.useMemo(()=>({title:t0,bookmarkedApps:k0,appsRef:o0,isAppsHovered:a0,popoverAppsId:f0,popoverSearchId:l0,userAvatar:u0,userName:A0,welcomeUser:c0,communitiesWorkflow:d0,conversationWorflow:h0,searchWorkflow:b0,isCollapsed:n0,toggleCollapsedNav:p0}),[o0,k0,d0,h0,a0,n0,f0,l0,b0,t0,p0,u0,A0,c0])}const SvgIconCommunitiesBeta=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 32 32","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsxs("g",{strokeMiterlimit:10,strokeWidth:2.667,clipPath:"url(#icon-communities-beta_svg__a)",children:[jsxRuntimeExports.jsx("path",{fill:"#FEECFE",stroke:"#E26AE2",d:"M19.96 5.803a3.803 3.803 0 1 0-7.605 0 3.803 3.803 0 0 0 7.606 0Z"}),jsxRuntimeExports.jsx("path",{stroke:"#E26AE2",d:"M9.668 11.861a3.803 3.803 0 1 0-7.606 0 3.803 3.803 0 0 0 7.606 0ZM30.254 11.861a3.803 3.803 0 1 0-7.606 0 3.803 3.803 0 0 0 7.606 0Z"}),jsxRuntimeExports.jsx("path",{stroke:"#FC94FF",d:"M6.389 18.847a5.25 5.25 0 0 1 5.248 5.248v6.837H1.14v-6.837a5.25 5.25 0 0 1 5.248-5.248ZM25.637 18.847a5.25 5.25 0 0 1 5.248 5.248v6.837H20.389v-6.837a5.25 5.25 0 0 1 5.248-5.248Z"}),jsxRuntimeExports.jsx("path",{fill:"#FEECFE",stroke:"#E26AE2",d:"M16.158 12.955a5.25 5.25 0 0 1 5.248 5.248v12.73H10.91v-12.73a5.25 5.25 0 0 1 5.248-5.248Z"})]}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-communities-beta_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h32v32H0z"})})})]}),SvgIconDisconnect=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M22.996 13.153q0 2.09-.873 3.987a10.6 10.6 0 0 1-2.336 3.292q-1.462 1.393-3.516 2.21t-4.26.817-4.287-.817-3.49-2.21a12.3 12.3 0 0 1-2.362-3.291A8.1 8.1 0 0 1 1 13.153q0-2.451 1.155-4.589t3.234-3.627q.616-.433 1.386-.337t1.181.673q.462.553.36 1.273-.104.72-.72 1.13a7 7 0 0 0-2.155 2.426 6.38 6.38 0 0 0-.18 5.717 7 7 0 0 0 1.566 2.186q.975.913 2.335 1.466a7.5 7.5 0 0 0 2.85.552 7.3 7.3 0 0 0 2.823-.552 8.3 8.3 0 0 0 2.36-1.466 6.04 6.04 0 0 0 1.567-2.186q.538-1.274.564-2.666 0-1.635-.77-3.051T16.4 7.675a1.75 1.75 0 0 1-.719-1.129q-.128-.697.36-1.273.436-.577 1.206-.673t1.36.337q2.079 1.466 3.234 3.627a9.6 9.6 0 0 1 1.155 4.589M13.833 2.846v8.6q0 .698-.54 1.202-.538.505-1.283.505t-1.309-.505q-.564-.505-.539-1.201v-8.6q0-.697.54-1.202.538-.504 1.308-.504t1.284.504.539 1.201"})]}),SvgIconHomeBeta=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 32 32","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("g",{clipPath:"url(#icon-home-beta_svg__a)",children:jsxRuntimeExports.jsx("path",{fill:"#383838",d:"M15.183.28a1.334 1.334 0 0 1 1.636 0l12 9.335c.325.252.515.64.515 1.052v14.666a4 4 0 0 1-4 4H6.668a4 4 0 0 1-4-4V10.667c0-.411.19-.8.515-1.052zM5.334 11.32v14.014a1.335 1.335 0 0 0 1.334 1.334h4v-12c0-.736.597-1.334 1.333-1.334h8c.736 0 1.333.598 1.333 1.334v12h4a1.335 1.335 0 0 0 1.334-1.334V11.32L16.001 3.023zm8 15.348h5.334V16h-5.334z"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-home-beta_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h32v32H0z"})})})]}),SvgIconMessagesBeta=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 32 32","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsxs("g",{clipPath:"url(#icon-messages-beta_svg__a)",children:[jsxRuntimeExports.jsx("path",{stroke:"#E5A800",strokeMiterlimit:10,strokeWidth:2.667,d:"m5.93 10.246-4.8 3.088v12.267a5.335 5.335 0 0 0 5.334 5.333h24.534v-17.6l-4.689-3.013"}),jsxRuntimeExports.jsx("path",{fill:"#FCF3CF",d:"M26.196 15.468v-14.4H5.93v14.4"}),jsxRuntimeExports.jsx("path",{stroke:"#FFC403",strokeMiterlimit:10,strokeWidth:2.667,d:"M26.196 15.468v-14.4H5.93v14.4"}),jsxRuntimeExports.jsx("path",{stroke:"#E5A800",strokeMiterlimit:10,strokeWidth:2.667,d:"M9.13 5.334h13.867M10.197 9.6h11.734M1.13 13.334l14.934 8.533 14.933-8.533"})]}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-messages-beta_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h32v32H0z"})})})]}),SvgIconMyAppsBeta=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 32 32","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("g",{stroke:"#1C1C73",strokeMiterlimit:10,strokeWidth:2.667,clipPath:"url(#icon-my-apps-beta_svg__a)",children:jsxRuntimeExports.jsx("path",{d:"M31.117 1H19v12.117h12.117zM13.207 18.884H1.09V31h12.117zM1 1.084c6.688 0 12.117 5.43 12.117 12.117H1zM30.934 18.884H18.816V31h12.118z"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-my-apps-beta_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h32v32H0z"})})})]}),SvgIconNotificationBeta=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 32 32","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{stroke:"#1C1C73",strokeMiterlimit:10,strokeWidth:2.667,d:"M13.363 5.348a2.726 2.726 0 1 1 5.383-.622q0 .423-.12.808M19.886 25.184a3.919 3.919 0 1 1-7.559-.26"}),jsxRuntimeExports.jsx("path",{stroke:"#1C1C73",strokeMiterlimit:10,strokeWidth:2.667,d:"M28.62 18.901H4.058v6.682h24.56z"}),jsxRuntimeExports.jsx("path",{stroke:"#1C1C73",strokeMiterlimit:10,strokeWidth:2.667,d:"M16.189 4.889c5.639 0 10.22 4.581 10.22 10.22v3.794H5.97V15.11c0-5.639 4.581-10.22 10.22-10.22Z"})]}),createNotificationService=e0=>({getNotifications(_e,i0){const r0=new URLSearchParams({page:i0.toString()});return _e.forEach(t0=>{r0.append("type",t0)}),odeServices.http().get(`${e0}/timeline/lastNotifications?${r0.toString()}`).then(t0=>t0.status!=="ok"?[]:t0.number&&t0.results?t0.results:[])},getNotificationTypes(){return odeServices.http().get(`${e0}/timeline/types`)},reportNotification(_e){return odeServices.http().put(`${e0}/timeline/${_e}/report`)},deleteNotification(_e){return odeServices.http().put(`${e0}/timeline/${_e}`)}}),notificationService=createNotificationService(""),notificationQueryKeys={all:()=>["notifications"],notifications:(e0=[])=>[...notificationQueryKeys.all(),"list",e0],types:()=>[...notificationQueryKeys.all(),"types"],preference:()=>[...notificationQueryKeys.all(),"preference"]},notificationQueryOptions={getNotifications(e0,_e){return{queryKey:notificationQueryKeys.notifications(e0),queryFn:({pageParam:i0=0})=>notificationService.getNotifications(e0,i0),staleTime:5*60*1e3,initialPageParam:0,select(i0){const r0=new Set;return i0.pages.flat().filter(t0=>r0.has(t0._id)?!1:(r0.add(t0._id),!0))},getNextPageParam:(i0,r0,t0)=>{if((i0==null?void 0:i0.length)!==0)return t0+1},enabled:_e}},getNotificationTypes(){return{queryKey:notificationQueryKeys.types(),queryFn:async()=>notificationService.getNotificationTypes()}}},useNotifications=(e0=[],_e=!0)=>useInfiniteQuery(notificationQueryOptions.getNotifications(e0,_e)),useNotificationTypes=()=>useQuery(notificationQueryOptions.getNotificationTypes()),useTimelinePreference=()=>useQuery({queryKey:notificationQueryKeys.preference(),queryFn:()=>odeServices.conf().getPreference("timeline")}),useSaveTimelinePreference=()=>{const e0=useQueryClient();return useMutation({mutationFn:_e=>odeServices.conf().savePreference("timeline",_e),onSuccess:(_e,i0)=>{e0.setQueryData(notificationQueryKeys.preference(),i0)},onError:()=>{e0.invalidateQueries({queryKey:notificationQueryKeys.preference()})}})},useReportNotification=()=>useMutation({mutationFn:e0=>notificationService.reportNotification(e0)}),useDeleteNotification=()=>{const e0=useQueryClient();return useMutation({mutationFn:_e=>notificationService.deleteNotification(_e),onSuccess:(_e,i0)=>{e0.setQueriesData({queryKey:[...notificationQueryKeys.all(),"list"]},r0=>r0&&{...r0,pages:r0.pages.map(t0=>t0.filter(n0=>n0._id!==i0))})}})},useNotificationListContainer=()=>{const{data:e0,isLoading:_e,isFetched:i0,error:r0}=useNotificationTypes(),{data:t0,isFetched:n0}=useTimelinePreference(),{mutate:s0}=useSaveTimelinePreference(),[o0,a0]=reactExports.useState();reactExports.useEffect(()=>{if(o0===void 0&&i0&&n0){const d0=t0==null?void 0:t0.type;a0(d0&&d0.length>0?d0:e0??[])}},[o0,i0,n0,t0,e0]);const f0=d0=>{a0(d0),s0({...t0,type:d0})},{data:l0,hasNextPage:u0,isLoading:A0,error:c0,fetchNextPage:k0}=useNotifications(o0??[],i0&&!!o0);return{notifications:l0,notificationTypes:e0,selectedTypes:o0,setSelectedTypes:f0,hasNextPage:u0,loadNextPage:()=>k0(),isLoading:_e||A0,error:r0||c0}},useHasNotificationToday=()=>{const{dateIsToday:e0}=useDate(),{data:_e,isFetched:i0}=useNotificationTypes(),{data:r0}=useNotifications(_e??[],i0);return(r0==null?void 0:r0.some(t0=>e0(t0.date)))??!1},useConversation=()=>{const e0=useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|view"),_e=useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|preauth"),[i0,r0]=reactExports.useState(""),t0={unread:!0,_:new Date().getTime()},{data:n0}=useQuery({queryKey:["folder","count","inbox"],queryFn:async()=>await odeServices.http().get(e0?"/zimbra/count/INBOX":"/conversation/api/count/inbox",{queryParams:t0}),staleTime:5*60*1e3}),s0=async()=>{const o0="/zimbra/zimbra";try{const{preference:a0}=await odeServices.http().get("/userbook/preference/zimbra"),f0=a0?JSON.parse(a0).modeExpert:!1;r0(f0&&_e?"/zimbra/preauth":window.location.origin+o0)}catch(a0){console.error(a0),r0(window.location.origin+o0)}};return reactExports.useEffect(()=>{s0()},[]),{messages:n0?n0.count:0,msgLink:i0,zimbraWorkflow:e0}};function useHover(){const[e0,_e]=reactExports.useState(!1),i0=reactExports.useRef(null),r0=()=>{_e(!0)},t0=()=>{_e(!1)};return reactExports.useEffect(()=>{const n0=i0.current;if(n0)return n0.addEventListener("mouseover",r0),n0.addEventListener("mouseout",t0),()=>{n0.removeEventListener("mouseover",r0),n0.removeEventListener("mouseout",t0)}},[i0]),[i0,e0]}const PopoverBody=({children:e0,className:_e})=>{const i0=clsx("popover-body",_e);return jsxRuntimeExports.jsx("div",{className:i0,children:e0})},PopoverFooter=({children:e0,className:_e})=>{const i0=clsx("popover-footer p-8",_e);return jsxRuntimeExports.jsx("div",{className:i0,children:e0})},Popover=reactExports.forwardRef(({align:e0="center",children:_e,className:i0,id:r0,isVisible:t0,...n0},s0)=>{const o0=clsx("popover d-block position-absolute top-100",e0==="end"?"end-0 popover-align-end":"start-50 translate-middle-x",i0);return useTransition(t0,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0},config:{duration:0}})((a0,f0)=>f0&&jsxRuntimeExports.jsx(animated.div,{ref:s0,"aria-labelledby":r0,className:o0,role:"tooltip",style:a0,...n0,children:_e}))}),Header$1=({src:e0="",onNotificationsClick:_e,dataProduct:i0})=>{const{t:r0}=useTranslation(),{messages:t0}=useConversation(),{user:n0,avatar:s0}=useUser(),o0=useHasWorkflow("org.entcore.auth.controllers.CarbonioPreauthController|preauth")||!1,a0=clsx("header-beta d-print-none no-2d no-1d"),{userAvatar:f0,userName:l0,communitiesWorkflow:u0,conversationWorflow:A0}=useHeader({user:n0,avatar:s0}),{theme:c0}=useEdificeTheme(),k0=t0>0,d0=useHasNotificationToday(),[h0,b0]=useHover(),p0=reactExports.useId(),m0=()=>{_e==null||_e()};return jsxRuntimeExports.jsx("header",{className:a0,"data-product":i0,children:jsxRuntimeExports.jsxs(Navbar,{className:"px-24",children:[jsxRuntimeExports.jsx(LogoBeta,{src:`${e0}/img/illustrations/logo.png`}),jsxRuntimeExports.jsxs("ul",{className:"navbar-nav",children:[jsxRuntimeExports.jsx(NavItem,{children:jsxRuntimeExports.jsx(NavLink,{link:"/timeline/timeline",translate:r0("navbar.home"),"data-testid":"header-home-button",children:jsxRuntimeExports.jsx(SvgIconHomeBeta,{})})}),u0&&jsxRuntimeExports.jsx(NavItem,{children:jsxRuntimeExports.jsx(NavLink,{link:"/communities",translate:r0("navbar.community"),"data-testid":"header-community-button",children:jsxRuntimeExports.jsx(SvgIconCommunitiesBeta,{className:"icon community"})})}),A0&&jsxRuntimeExports.jsx(NavItem,{children:jsxRuntimeExports.jsxs(NavLink,{className:"position-relative",link:"/conversation/conversation",translate:r0("conversation"),"data-testid":"header-messagerie-button",children:[jsxRuntimeExports.jsx(SvgIconMessagesBeta,{}),k0&&jsxRuntimeExports.jsx(Badge,{variant:{type:"notification",level:"danger"},className:"position-absolute",children:t0})]})}),o0&&jsxRuntimeExports.jsx(NavItem,{children:jsxRuntimeExports.jsxs("a",{className:"nav-link position-relative",href:"/auth/carbonio/preauth",target:"_blank","data-testid":"header-messagerie-button",children:[jsxRuntimeExports.jsx(SvgIconMessagesBeta,{}),jsxRuntimeExports.jsx(VisuallyHidden,{children:r0("conversation")})]})}),jsxRuntimeExports.jsx(NavItem,{children:jsxRuntimeExports.jsx(NavLink,{link:"/welcome",translate:r0("navbar.applications"),"data-testid":"header-my-apps-button",children:jsxRuntimeExports.jsx(SvgIconMyAppsBeta,{})})}),jsxRuntimeExports.jsxs(NavItem,{className:"position-relative",children:[jsxRuntimeExports.jsx(ButtonBeta,{leftIcon:jsxRuntimeExports.jsx(SvgIconNotificationBeta,{}),variant:"ghost",onClick:m0}),d0&&jsxRuntimeExports.jsx("span",{style:{position:"absolute",top:0,right:0,width:15,height:15,background:"red",borderRadius:"50%",border:"2px solid white",pointerEvents:"none",zIndex:1,display:"block"},"aria-label":r0("homepage.notifications.new-badge",{defaultValue:"Nouvelle notification"})})]}),jsxRuntimeExports.jsxs(NavItem,{className:"position-relative",ref:h0,id:p0,"aria-haspopup":"true","aria-expanded":b0,"data-testid":"header-user-menu-button",children:[jsxRuntimeExports.jsx(NavLink,{link:"/userbook/mon-compte",translate:r0("navbar.myaccount"),"data-testid":"header-user-profile-button",children:jsxRuntimeExports.jsx(Avatar,{alt:l0,size:"sm",src:f0,variant:"circle",className:"bg-white",width:"32",height:"32"})}),jsxRuntimeExports.jsx(Popover,{align:"end",className:"widget",id:p0,isVisible:b0,children:jsxRuntimeExports.jsx(PopoverBody,{children:jsxRuntimeExports.jsxs("a",{href:"/auth/logout?callback="+((c0==null?void 0:c0.logoutCallback)??""),className:"nav-link logout d-flex align-items-center gap-8","data-testid":"header-logout-button",children:[jsxRuntimeExports.jsx(SvgIconDisconnect,{className:"icon logout"}),jsxRuntimeExports.jsx("span",{id:"logout-label",className:"nav-text",children:r0("navbar.disconnect")})]})})})]})]})]})})},Header$2=Object.freeze(Object.defineProperty({__proto__:null,default:Header$1},Symbol.toStringTag,{value:"Module"})),__vite_import_meta_env__$2={},createStoreImpl$1=e0=>{let _e;const i0=new Set,r0=(l0,u0)=>{const A0=typeof l0=="function"?l0(_e):l0;if(!Object.is(A0,_e)){const c0=_e;_e=u0??(typeof A0!="object"||A0===null)?A0:Object.assign({},_e,A0),i0.forEach(k0=>k0(_e,c0))}},t0=()=>_e,a0={setState:r0,getState:t0,getInitialState:()=>f0,subscribe:l0=>(i0.add(l0),()=>i0.delete(l0)),destroy:()=>{(__vite_import_meta_env__$2?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),i0.clear()}},f0=_e=e0(r0,t0,a0);return a0},createStore$1=e0=>e0?createStoreImpl$1(e0):createStoreImpl$1;var withSelector$1={exports:{}},withSelector_production={},shim$3={exports:{}},useSyncExternalStoreShim_production={};/**
|
|
1584
|
+
`)}function getSVGUrl(e0,_e,i0,r0,t0){const{domElement:n0,styleElement:s0,svgRoot:o0}=t0;n0.innerHTML=`<style>${_e.cssStyle}</style><div style='padding:0;'>${e0}</div>`,n0.setAttribute("style",`transform: scale(${i0});transform-origin: top left; display: inline-block`),s0.textContent=r0;const{width:a0,height:f0}=t0.image;return o0.setAttribute("width",a0.toString()),o0.setAttribute("height",f0.toString()),new XMLSerializer().serializeToString(o0)}function getTemporaryCanvasFromImage(e0,_e){const i0=CanvasPool.getOptimalCanvasAndContext(e0.width,e0.height,_e),{context:r0}=i0;return r0.clearRect(0,0,e0.width,e0.height),r0.drawImage(e0,0,0),i0}function loadSVGImage(e0,_e,i0){return new Promise(async r0=>{i0&&await new Promise(t0=>setTimeout(t0,100)),e0.onload=()=>{r0()},e0.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(_e)}`,e0.crossOrigin="anonymous"})}class HTMLTextSystem{constructor(_e){this._activeTextures={},this._renderer=_e,this._createCanvas=_e.type===RendererType.WEBGPU}getTexture(_e){return this.getTexturePromise(_e)}getManagedTexture(_e){const i0=_e.styleKey;if(this._activeTextures[i0])return this._increaseReferenceCount(i0),this._activeTextures[i0].promise;const r0=this._buildTexturePromise(_e).then(t0=>(this._activeTextures[i0].texture=t0,t0));return this._activeTextures[i0]={texture:null,promise:r0,usageCount:1},r0}getReferenceCount(_e){var i0;return((i0=this._activeTextures[_e])==null?void 0:i0.usageCount)??null}_increaseReferenceCount(_e){this._activeTextures[_e].usageCount++}decreaseReferenceCount(_e){const i0=this._activeTextures[_e];i0&&(i0.usageCount--,i0.usageCount===0&&(i0.texture?this._cleanUp(i0.texture):i0.promise.then(r0=>{i0.texture=r0,this._cleanUp(i0.texture)}).catch(()=>{warn("HTMLTextSystem: Failed to clean texture")}),this._activeTextures[_e]=null))}getTexturePromise(_e){return this._buildTexturePromise(_e)}async _buildTexturePromise(_e){const{text:i0,style:r0,resolution:t0,textureStyle:n0}=_e,s0=BigPool.get(HTMLTextRenderData),o0=extractFontFamilies(i0,r0),a0=await getFontCss(o0),f0=measureHtmlText(i0,r0,a0,s0),l0=Math.ceil(Math.ceil(Math.max(1,f0.width)+r0.padding*2)*t0),u0=Math.ceil(Math.ceil(Math.max(1,f0.height)+r0.padding*2)*t0),A0=s0.image,c0=2;A0.width=(l0|0)+c0,A0.height=(u0|0)+c0;const k0=getSVGUrl(i0,r0,t0,a0,s0);await loadSVGImage(A0,k0,isSafari()&&o0.length>0);const d0=A0;let h0;this._createCanvas&&(h0=getTemporaryCanvasFromImage(A0,t0));const b0=getPo2TextureFromSource(h0?h0.canvas:d0,A0.width-c0,A0.height-c0,t0);return n0&&(b0.source.style=n0),this._createCanvas&&(this._renderer.texture.initSource(b0.source),CanvasPool.returnCanvasAndContext(h0)),BigPool.return(s0),b0}returnTexturePromise(_e){_e.then(i0=>{this._cleanUp(i0)}).catch(()=>{warn("HTMLTextSystem: Failed to clean texture")})}_cleanUp(_e){TexturePool.returnTexture(_e,!0),_e.source.resource=null,_e.source.uploadMethodId="unknown"}destroy(){this._renderer=null;for(const _e in this._activeTextures)this._activeTextures[_e]&&this.returnTexturePromise(this._activeTextures[_e].promise);this._activeTextures=null}}HTMLTextSystem.extension={type:[ExtensionType.WebGLSystem,ExtensionType.WebGPUSystem,ExtensionType.CanvasSystem],name:"htmlText"};class BatchableText extends BatchableSprite{}class CanvasTextPipe{constructor(_e){this._renderer=_e,_e.runners.resolutionChange.add(this),this._managedTexts=new GCManagedHash({renderer:_e,type:"renderable",onUnload:this.onTextUnload.bind(this),name:"canvasText"})}resolutionChange(){for(const _e in this._managedTexts.items){const i0=this._managedTexts.items[_e];i0!=null&&i0._autoResolution&&i0.onViewUpdate()}}validateRenderable(_e){const i0=this._getGpuText(_e),r0=_e.styleKey;return i0.currentKey!==r0?!0:_e._didTextUpdate}addRenderable(_e,i0){const r0=this._getGpuText(_e);if(_e._didTextUpdate){const t0=_e._autoResolution?this._renderer.resolution:_e.resolution;(r0.currentKey!==_e.styleKey||_e.resolution!==t0)&&this._updateGpuText(_e),_e._didTextUpdate=!1,updateTextBounds(r0,_e)}this._renderer.renderPipes.batch.addToBatch(r0,i0)}updateRenderable(_e){const i0=this._getGpuText(_e);i0._batcher.updateElement(i0)}_updateGpuText(_e){const i0=this._getGpuText(_e);i0.texture&&this._renderer.canvasText.decreaseReferenceCount(i0.currentKey),_e._resolution=_e._autoResolution?this._renderer.resolution:_e.resolution,i0.texture=this._renderer.canvasText.getManagedTexture(_e),i0.currentKey=_e.styleKey}_getGpuText(_e){return _e._gpuData[this._renderer.uid]||this.initGpuText(_e)}initGpuText(_e){const i0=new BatchableText;return i0.currentKey="--",i0.renderable=_e,i0.transform=_e.groupTransform,i0.bounds={minX:0,maxX:1,minY:0,maxY:0},i0.roundPixels=this._renderer._roundPixels|_e._roundPixels,_e._gpuData[this._renderer.uid]=i0,this._managedTexts.add(_e),i0}onTextUnload(_e){const i0=_e._gpuData[this._renderer.uid];if(!i0)return;const{canvasText:r0}=this._renderer;r0.getReferenceCount(i0.currentKey)>0?r0.decreaseReferenceCount(i0.currentKey):i0.texture&&r0.returnTexture(i0.texture)}destroy(){this._managedTexts.destroy(),this._renderer=null}}CanvasTextPipe.extension={type:[ExtensionType.WebGLPipes,ExtensionType.WebGPUPipes,ExtensionType.CanvasPipes],name:"text"};class CanvasTextSystem{constructor(_e){this._activeTextures={},this._renderer=_e}getTexture(_e,i0,r0,t0){typeof _e=="string"&&(deprecation("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),_e={text:_e,style:r0,resolution:i0}),_e.style instanceof TextStyle||(_e.style=new TextStyle(_e.style)),_e.textureStyle instanceof TextureStyle||(_e.textureStyle=new TextureStyle(_e.textureStyle)),typeof _e.text!="string"&&(_e.text=_e.text.toString());const{text:n0,style:s0,textureStyle:o0}=_e,a0=_e.resolution??this._renderer.resolution,{frame:f0,canvasAndContext:l0}=CanvasTextGenerator.getCanvasAndContext({text:n0,style:s0,resolution:a0}),u0=getPo2TextureFromSource(l0.canvas,f0.width,f0.height,a0);if(o0&&(u0.source.style=o0),s0.trim&&(f0.pad(s0.padding),u0.frame.copyFrom(f0),u0.frame.scale(1/a0),u0.updateUvs()),s0.filters){const A0=this._applyFilters(u0,s0.filters);return this.returnTexture(u0),CanvasTextGenerator.returnCanvasAndContext(l0),A0}return this._renderer.texture.initSource(u0._source),CanvasTextGenerator.returnCanvasAndContext(l0),u0}returnTexture(_e){const i0=_e.source;i0.resource=null,i0.uploadMethodId="unknown",i0.alphaMode="no-premultiply-alpha",TexturePool.returnTexture(_e,!0)}renderTextToCanvas(){deprecation("8.10.0","CanvasTextSystem.renderTextToCanvas: no longer supported, use CanvasTextSystem.getTexture instead")}getManagedTexture(_e){_e._resolution=_e._autoResolution?this._renderer.resolution:_e.resolution;const i0=_e.styleKey;if(this._activeTextures[i0])return this._increaseReferenceCount(i0),this._activeTextures[i0].texture;const r0=this.getTexture({text:_e.text,style:_e.style,resolution:_e._resolution,textureStyle:_e.textureStyle});return this._activeTextures[i0]={texture:r0,usageCount:1},r0}decreaseReferenceCount(_e){const i0=this._activeTextures[_e];i0.usageCount--,i0.usageCount===0&&(this.returnTexture(i0.texture),this._activeTextures[_e]=null)}getReferenceCount(_e){var i0;return((i0=this._activeTextures[_e])==null?void 0:i0.usageCount)??0}_increaseReferenceCount(_e){this._activeTextures[_e].usageCount++}_applyFilters(_e,i0){const r0=this._renderer.renderTarget.renderTarget,t0=this._renderer.filter.generateFilteredTexture({texture:_e,filters:i0});return this._renderer.renderTarget.bind(r0,!1),t0}destroy(){this._renderer=null;for(const _e in this._activeTextures)this._activeTextures[_e]&&this.returnTexture(this._activeTextures[_e].texture);this._activeTextures=null}}CanvasTextSystem.extension={type:[ExtensionType.WebGLSystem,ExtensionType.WebGPUSystem,ExtensionType.CanvasSystem],name:"canvasText"};extensions.add(browserExt,webworkerExt);const BLUR_LAYER_NAME="BLUR_LAYER",MIN_HEIGHT=100,MIN_WIDTH=100,MODAL_VERTICAL_PADDING=450,MODAL_HORIZONTAL_PADDING=64,DEFAULT_QUALITY=.5,DEFAULT_SPRITE_NAME="image";function updateImageFromBlob(e0,{spriteName:_e,imgDatasource:i0,settings:r0}){const t0=URL.createObjectURL(i0),n0=new Image;return n0.src=t0,new Promise((s0,o0)=>{n0.onload=async()=>{URL.revokeObjectURL(t0),await updateImage(e0,{spriteName:_e,imgDatasource:n0,settings:r0});const a0=e0==null?void 0:e0.stage.getChildByLabel(_e,!0);s0(a0)},n0.onerror=()=>{URL.revokeObjectURL(t0),o0(new Error("Failed to load image from Blob"))}})}async function updateImage(e0,{spriteName:_e,imgDatasource:i0,settings:r0}){if(e0===void 0||e0.stage===null)return;const t0=e0.stage.getChildByLabel(_e,!0);t0==null||t0.removeFromParent();const n0=e0.stage.getChildByLabel(BLUR_LAYER_NAME);n0==null||n0.removeFromParent();let s0;if(i0 instanceof Sprite)s0=i0;else if(i0 instanceof HTMLImageElement)s0=new Sprite(Texture.from(i0));else{const o0=new Image;o0.crossOrigin="anonymous",o0.src=i0,await new Promise((a0,f0)=>{o0.complete?a0():(o0.onload=()=>a0(),o0.onerror=f0)}),s0=new Sprite(Texture.from(o0))}if(s0.interactive=!0,s0.label=_e,r0){const{sprite:{anchor:o0,position:a0,scale:f0,size:l0,rotation:u0},stage:{size:A0}}=r0,c0=u0%Math.PI!==0;s0.anchor.x=o0.x,s0.anchor.y=o0.y,s0.position.x=a0.x,s0.position.y=a0.y,s0.scale.x=f0.x,s0.scale.y=f0.y,s0.width=c0?l0.height:l0.width,s0.height=c0?l0.width:l0.height,e0.stage.height=A0.height,e0.stage.width=A0.width,e0.renderer.resize(A0.width,A0.height),e0.stage.addChild(s0)}else e0.stage.addChild(s0),e0.renderer.resize(s0.width,s0.height);autoResize(e0,s0)}function autoResize(e0,_e){var i0;const r0=e0.canvas.parentNode,t0=window.innerWidth-MODAL_HORIZONTAL_PADDING,n0=Math.max((r0==null?void 0:r0.offsetWidth)??0,MIN_WIDTH),s0=constraintSize({width:_e.width,height:_e.height},{width:{max:Math.min(n0,t0),min:MIN_WIDTH},height:{min:MIN_HEIGHT,max:window.innerHeight-MODAL_VERTICAL_PADDING}}),{height:o0,width:a0}=s0;(i0=e0.canvas)!=null&&i0.style&&(e0.canvas.style.width=`${a0}px`,e0.canvas.style.height=`${o0}px`)}function constraintSize(e0,_e){const{height:i0,width:r0}=e0,t0=r0/i0,{height:n0,width:s0}=_e;let o0=s0.max,a0=s0.max/t0;return r0>s0.max&&(o0=s0.max,a0=o0/t0),a0>n0.max&&(a0=n0.max,o0=a0*t0),o0<s0.min&&(o0=s0.min,a0=o0/t0),a0<n0.min&&(a0=n0.min,o0=a0*t0),{width:o0,height:a0}}function saveAsBlob(e0){return new Promise((_e,i0)=>{var r0;(r0=e0==null?void 0:e0.canvas)!=null&&r0.toBlob?e0.canvas.toBlob(t0=>{t0?_e(t0):i0("EXTRACT_FAILED")},"image/jpeg",DEFAULT_QUALITY):i0("EXTRACT_FAILED")})}function saveAsDataURL(e0){var _e,i0;return(i0=(_e=e0.canvas).toDataURL)==null?void 0:i0.call(_e)}function getApplicationScale(e0){return e0.canvas.getBoundingClientRect?e0.canvas.getBoundingClientRect().width/e0.canvas.width:1}function toBlob(e0){return new Promise((_e,i0)=>{var r0,t0;(t0=(r0=e0.canvas).toBlob)==null||t0.call(r0,n0=>{n0?_e(n0):i0("EXTRACT_FAIL")},"image/png",1)})}function createImageSettings({application:e0,sprite:_e}){return{sprite:{rotation:_e.rotation,size:{width:_e.width,height:_e.height},position:{x:_e.position.x,y:_e.position.y},scale:{x:_e.scale.x,y:_e.scale.y},anchor:{x:_e.anchor.x,y:_e.anchor.y}},stage:{size:{width:e0.stage.width,height:e0.stage.height},scale:{x:e0.stage.scale.x,y:e0.stage.scale.y}}}}function resizeStage({application:e0,sprite:_e,newHeight:i0,newWidth:r0}){_e.anchor.x=.5,_e.anchor.y=.5,_e.position=new Point(r0/2,i0/2),e0.stage.height=i0,e0.stage.width=r0,e0.renderer.resize(r0,i0)}const DEFAULT_MAX_HISTORY=20,useHistoryTool=({maxSize:e0=DEFAULT_MAX_HISTORY,application:_e,spriteName:i0,onRestore:r0})=>{const[t0,n0]=reactExports.useState([]);reactExports.useEffect(()=>{n0([])},[_e]);const s0=async()=>{if(t0.length===0)return;const f0=t0[t0.length-1];r0(await f0.backup,f0),n0(t0.slice(0,-1))},o0=f0=>f0.length>e0?f0.slice(f0.length-e0):f0,a0=async f0=>{if(!_e)return;const l0=_e.stage.getChildByLabel(i0,!0);if(!l0)return;const u0=toBlob(_e),A0={backup:u0,sprite:{rotation:l0.rotation,size:{width:l0.width,height:l0.height},position:{x:l0.position.x,y:l0.position.y},scale:{x:l0.scale.x,y:l0.scale.y},anchor:{x:l0.anchor.x,y:l0.anchor.y}},stage:{size:{width:_e.stage.width,height:_e.stage.height},scale:{x:_e.stage.scale.x,y:_e.stage.scale.y}}};return n0(o0([...t0,A0])),await u0,f0.call(f0)};return{historyCount:t0.length,restore:s0,historize:a0}};function aggregate(e0,_e,i0){let r0;const t0=[];return function(n0){t0.push(_e(n0)),!r0&&(r0=setTimeout(()=>{const s0=[...t0];t0.splice(0,t0.length),i0(s0),r0=void 0},e0))}}const BRUSH_SIZE=20,DEBOUNCE=50,CURSOR_NAME="BRUSH_CURSOR";function getOrCreateBlurLayer(e0){let _e=e0.stage.getChildByLabel(BLUR_LAYER_NAME);return _e||(_e=new Container,_e.label=BLUR_LAYER_NAME,e0.stage.addChild(_e)),_e}function drawBrush(e0,_e){const i0=new Graphics;for(const r0 of e0)r0&&(i0.circle(r0.x,r0.y,BRUSH_SIZE/_e),i0.fill({color:16777215,alpha:1}));return i0}function drawBlurListener(e0,{spriteName:_e}){return aggregate(DEBOUNCE,i0=>e0.stage.toLocal(i0.global),i0=>{const r0=e0.stage.getChildByLabel(_e),t0=getApplicationScale(e0);if(!r0)return;const n0=r0,s0=new Sprite(n0.texture);s0.filters=[new BlurFilter({strength:8,quality:Math.min(Math.round(4*t0),4),resolution:Math.min(t0,1)})],s0.width=n0.width,s0.height=n0.height,s0.scale=new Point(1,1),s0.anchor=n0.anchor;const o0=getOrCreateBlurLayer(e0),a0=drawBrush(i0,t0);o0.addChild(a0),s0.mask=a0,o0.addChild(s0)})}function drawCursor(e0){removeCursor(e0);const _e=getApplicationScale(e0),i0=new Graphics;return i0.circle(0,0,BRUSH_SIZE/_e),i0.stroke({width:Math.max(1,1/_e),color:16711680}),i0.label=CURSOR_NAME,e0.stage.addChild(i0),i0}function removeCursor(e0){const _e=e0.stage.getChildByLabel(CURSOR_NAME);_e&&_e.removeFromParent()}function moveCursorListener(e0){return _e=>{if(!e0)return;const i0=e0.stage.toLocal(_e.global),r0=e0.stage.getChildByLabel(CURSOR_NAME,!0);r0&&(r0.position.x=i0.x,r0.position.y=i0.y)}}function start$2(e0,{spriteName:_e}){e0.stage.interactive=!0;const i0=drawCursor(e0),r0=moveCursorListener(e0);e0.stage.on("pointermove",r0);const t0=drawBlurListener(e0,{spriteName:_e});e0.stage.on("pointerdown",()=>{e0.stage.off("pointermove",t0),e0.stage.on("pointermove",t0)});const n0=()=>{var s0;(s0=e0==null?void 0:e0.stage)==null||s0.off("pointermove",t0)};globalThis.addEventListener("pointerup",n0),i0.once("destroyed",()=>{globalThis.removeEventListener("pointerup",n0)})}function stop$2(e0){removeCursor(e0),e0.stage.off("pointerdown"),e0.stage.off("pointermove")}const CORNERS=["TOP_LEFT","TOP_RIGHT","BOTTOM_LEFT","BOTTOM_RIGHT"],PADDING=0,POINT_RADIUS$1=20,CROP_BACKGROUND_NAME="CROP_BACKGROUND_NAME",CROP_MASK_NAME="CROP_MASK_NAME";function getCornerName$1(e0){return"CROP_CORNER_"+e0}function drawBackground(e0,{spriteName:_e}){removeBackground(e0);const i0=e0.stage.getChildByLabel(_e);if(!i0)return;const r0=i0.getBounds(),t0=e0.renderer.generateTexture(e0.stage),n0=new Sprite(t0);n0.height=r0.height,n0.width=r0.width,n0.position=new Point(0,0);const s0=new Container;s0.label=CROP_BACKGROUND_NAME,s0.position=new Point(r0.x,r0.y);const o0=new Graphics;o0.rect(0,0,r0.width,r0.height),o0.fill({color:16777215,alpha:.5});const a0=new Graphics;a0.rect(0,0,r0.width-2*PADDING,r0.height-2*PADDING),a0.fill({color:0,alpha:1}),a0.position=new Point(PADDING,PADDING),a0.label=CROP_MASK_NAME,n0.mask=a0,e0.stage.addChild(s0),s0.addChild(o0),s0.addChild(a0),s0.addChild(n0)}function removeBackground(e0){const _e=e0.stage.getChildByLabel(CROP_BACKGROUND_NAME,!0);_e==null||_e.removeFromParent()}function computeCornerPosition$1(e0,_e){switch(e0){case"TOP_LEFT":return{x:_e.x,y:_e.y,start:0,end:Math.PI/2};case"TOP_RIGHT":return{x:_e.x+_e.width,y:_e.y,start:Math.PI/2,end:Math.PI};case"BOTTOM_LEFT":return{x:_e.x,y:_e.y+_e.height,start:3*Math.PI/2,end:2*Math.PI};case"BOTTOM_RIGHT":return{x:_e.x+_e.width,y:_e.y+_e.height,start:Math.PI,end:3*Math.PI/2}}}function refreshCorners(e0){const _e=e0.stage.getChildByLabel(CROP_MASK_NAME,!0);_e&&CORNERS.forEach(i0=>{const r0=e0.stage.getChildByLabel(getCornerName$1(i0),!0);if(!r0)return;const t0=computeCornerPosition$1(i0,{height:_e.height,width:_e.width,x:_e.x,y:_e.y});r0.position=new Point(t0.x,t0.y)})}function drawCorner$1(e0,_e,{spriteName:i0}){const r0=e0.stage.getChildByLabel(getCornerName$1(_e),!0),t0=getApplicationScale(e0);r0==null||r0.removeFromParent();const n0=e0.stage.getChildByLabel(CROP_BACKGROUND_NAME,!0),s0=e0.stage.getChildByLabel(CROP_MASK_NAME,!0);if(!e0.stage.getChildByLabel(i0)||!n0||!s0)return;const o0=computeCornerPosition$1(_e,{height:s0.height,width:s0.width,x:s0.x,y:s0.y}),a0=new Graphics;a0.arc(0,0,POINT_RADIUS$1/t0,o0.start,o0.end),a0.lineTo(0,0),a0.fill({color:4960213,alpha:1}),a0.position=new Point(o0.x,o0.y),a0.label=getCornerName$1(_e),a0.interactive=!0;let f0=!1;const l0=c0=>{if(!f0)return;const k0=n0.toLocal(c0.global);a0.position.x=k0.x,a0.position.y=k0.y,moveMask(e0,_e,k0)};e0.stage.on("pointermove",l0);const u0=()=>{f0=!0};a0.on("pointerdown",u0);const A0=()=>{f0=!1};globalThis.addEventListener("pointerup",A0),a0.once("destroyed",()=>{a0.off("pointerdown"),e0.stage.off("pointermove",l0),globalThis.removeEventListener("pointerup",A0)}),n0.addChild(a0)}function moveMask(e0,_e,i0){const r0=e0.stage.getChildByLabel(CROP_MASK_NAME,!0);if(!r0)return;const t0=r0.position.x+r0.width,n0=r0.position.y+r0.height;switch(_e){case"TOP_LEFT":{r0.position.x=i0.x,r0.position.y=i0.y,r0.width=t0-i0.x,r0.height=n0-i0.y;break}case"TOP_RIGHT":{r0.position.y=i0.y,r0.width=i0.x-r0.position.x,r0.height=n0-i0.y;break}case"BOTTOM_LEFT":{r0.position.x=i0.x,r0.width=t0-i0.x,r0.height=i0.y-r0.position.y;break}case"BOTTOM_RIGHT":{r0.width=i0.x-r0.position.x,r0.height=i0.y-r0.position.y;break}}refreshCorners(e0)}function start$1(e0,{spriteName:_e}){stop$1(e0),e0.stage.interactive=!0,e0.stage.interactiveChildren=!0,drawBackground(e0,{spriteName:_e}),drawCorner$1(e0,"BOTTOM_LEFT",{spriteName:_e}),drawCorner$1(e0,"BOTTOM_RIGHT",{spriteName:_e}),drawCorner$1(e0,"TOP_LEFT",{spriteName:_e}),drawCorner$1(e0,"TOP_RIGHT",{spriteName:_e})}function stop$1(e0){removeBackground(e0),e0.stage.off("pointermove"),e0.render()}function save$1(e0){const _e=e0.stage.getChildByLabel(CROP_MASK_NAME,!0);if(!_e)return;const i0=e0.stage.getChildByLabel(CROP_BACKGROUND_NAME,!0),r0=(i0==null?void 0:i0.x)??0,t0=(i0==null?void 0:i0.y)??0,n0=new Rectangle(Math.floor(r0+_e.x),Math.floor(t0+_e.y),Math.floor(_e.width),Math.floor(_e.height));i0&&(i0.visible=!1);const s0=e0.renderer.generateTexture({target:e0.stage,frame:n0});return removeBackground(e0),e0.stage.off("pointermove"),new Sprite(s0)}const POINT_RADIUS=20,CONTROL_NAME="CONTROL_NAME";function getCornerName(e0){return"RESIZE_CORNER_"+e0}function computeCornerPosition(e0,_e){const i0=_e.x,r0=_e.y;switch(e0){case"TOP_LEFT":return{x:i0,y:r0,start:0,end:Math.PI/2};case"TOP_RIGHT":return{x:i0+_e.width,y:r0,start:Math.PI/2,end:Math.PI};case"BOTTOM_LEFT":return{x:i0,y:r0+_e.height,start:3*Math.PI/2,end:2*Math.PI};case"BOTTOM_RIGHT":return{x:i0+_e.width,y:r0+_e.height,start:Math.PI,end:3*Math.PI/2}}}function resizeContainer(e0,{container:_e,cornerType:i0,position:r0,spriteName:t0}){const n0=e0.stage.getChildByLabel(t0,!0);if(!n0)return;const s0=n0.rotation%Math.PI!==0,o0=s0?n0.height:n0.width,a0=s0?n0.width:n0.height;switch(i0){case"TOP_LEFT":{_e.position=new Point(r0.x,r0.y),_e.width=o0-2*r0.x,_e.height=a0-2*r0.y;break}case"TOP_RIGHT":{const f0=o0-r0.x;_e.position=new Point(f0,r0.y),_e.width=o0-2*f0,_e.height=a0-2*r0.y;break}case"BOTTOM_LEFT":{const f0=a0-r0.y;_e.position=new Point(r0.x,f0),_e.width=o0-2*r0.x,_e.height=a0-2*f0;break}case"BOTTOM_RIGHT":{const f0=a0-r0.y,l0=o0-r0.x;_e.position=new Point(l0,f0),_e.width=o0-2*l0,_e.height=a0-2*f0;break}}}function removeCorner(e0,_e){const i0=e0.stage.getChildByLabel(getCornerName(_e),!0);i0==null||i0.removeFromParent()}function drawCorner(e0,_e,{spriteName:i0}){removeCorner(e0,_e);const r0=e0.stage.getChildByLabel(i0,!0),t0=e0.stage.getChildByLabel(CONTROL_NAME,!0);if(!r0||!t0)return;const n0=computeCornerPosition(_e,t0),s0=new Graphics;s0.arc(0,0,POINT_RADIUS,n0.start,n0.end),s0.lineTo(0,0),s0.fill({color:4960213,alpha:1}),s0.position=new Point(n0.x,n0.y),s0.label=getCornerName(_e),s0.interactive=!0;let o0=!1;const a0=u0=>{if(!o0)return;const A0=e0.stage.toLocal(u0.global);resizeContainer(e0,{cornerType:_e,position:A0,container:t0,spriteName:i0})};e0.stage.on("pointermove",a0);const f0=()=>{o0=!0};s0.on("pointerdown",f0);const l0=()=>{o0=!1};globalThis.addEventListener("pointerup",l0),s0.once("destroyed",()=>{s0.off("pointerdown"),e0.stage.off("pointermove",a0),globalThis.removeEventListener("pointerup",l0)}),t0.addChild(s0)}function drawContainer(e0,_e){removeContainer(e0);const i0=e0.stage.getChildByLabel(_e,!0);if(!i0)return;const r0=e0.renderer.generateTexture(e0.stage),t0=new Sprite(r0);e0.stage.children.forEach(o0=>{o0.alpha=0});const n0=new Container;n0.label=CONTROL_NAME,n0.interactive=!0,n0.interactiveChildren=!0;const s0=new Graphics;s0.rect(0,0,i0.width,i0.height),s0.fill({color:0,alpha:0}),e0.stage.interactive=!0,e0.stage.interactiveChildren=!0,e0.stage.addChild(n0),n0.addChild(s0),n0.addChild(t0)}function removeContainer(e0){const _e=e0.stage.getChildByLabel(CONTROL_NAME,!0);_e==null||_e.removeFromParent(),e0.stage.children.forEach(i0=>{i0.alpha=1})}function drawControl(e0,_e){drawContainer(e0,_e),drawCorner(e0,"BOTTOM_LEFT",{spriteName:_e}),drawCorner(e0,"BOTTOM_RIGHT",{spriteName:_e}),drawCorner(e0,"TOP_LEFT",{spriteName:_e}),drawCorner(e0,"TOP_RIGHT",{spriteName:_e})}function removeControl(e0){removeContainer(e0),removeCorner(e0,"BOTTOM_LEFT"),removeCorner(e0,"BOTTOM_RIGHT"),removeCorner(e0,"TOP_LEFT"),removeCorner(e0,"TOP_RIGHT"),e0.stage.off("pointermove")}function start(e0,_e){drawControl(e0,_e)}function stop(e0){removeControl(e0),e0.stage.off("pointermove"),e0.render()}function save(e0){var _e;const i0=(_e=e0==null?void 0:e0.stage)==null?void 0:_e.getChildByLabel(CONTROL_NAME,!0),r0=i0?{height:i0.height,width:i0.width}:void 0;if(removeControl(e0),r0){const t0=e0.renderer.generateTexture(e0.stage),n0=new Sprite(t0);return n0.width=r0.width,n0.height=r0.height,n0}else return}async function rotate(e0,_e){const i0=e0==null?void 0:e0.stage.getChildByLabel(_e,!0);if(e0&&i0){const r0=await toBlob(e0),t0=await updateImageFromBlob(e0,{imgDatasource:r0,spriteName:_e,settings:createImageSettings({application:e0,sprite:i0})});if(!t0)return;let n0,s0;const o0=e0.canvas;o0.style&&(n0=o0.style.maxHeight??"",s0=o0.style.visibility??"",o0.style.maxHeight=`${o0.clientHeight}px`,o0.style.visibility="hidden"),t0.rotation+=Math.PI/2,resizeStage({application:e0,sprite:t0,newHeight:t0.width,newWidth:t0.height}),e0.render();const a0=await toBlob(e0);n0!==void 0&&(o0.style.maxHeight=n0),s0!==void 0&&(o0.style.visibility=s0),await updateImageFromBlob(e0,{imgDatasource:a0,spriteName:_e})}}function useImageEffects({application:e0,spriteName:_e,onSave:i0}){return{rotate:async()=>{e0&&await rotate(e0,_e)},startCrop:()=>{e0&&start$1(e0,{spriteName:_e})},stopCrop:r0=>{if(e0){if(r0){const t0=save$1(e0);if(t0){i0(t0);return}}stop$1(e0)}},startBlur:()=>{e0&&start$2(e0,{spriteName:_e})},stopBlur:()=>{e0&&stop$2(e0)},startResize:()=>{e0&&start(e0,_e)},stopResize:r0=>{if(e0){if(r0){const t0=save(e0);t0&&i0(t0)}stop(e0)}}}}function useImageEditor({imageSrc:e0,spriteName:_e=DEFAULT_SPRITE_NAME}){const[i0,r0]=reactExports.useState(void 0),[t0,n0]=reactExports.useState(!0),{rotate:s0,startBlur:o0,startCrop:a0,startResize:f0,stopBlur:l0,stopCrop:u0,stopResize:A0}=useImageEffects({spriteName:_e,application:i0,onSave(p0){i0&&updateImage(i0,{imgDatasource:p0,spriteName:_e})}}),c0=()=>i0?saveAsBlob(i0):Promise.resolve(void 0),k0=()=>{if(i0)return saveAsDataURL(i0)},{restore:d0,historize:h0,historyCount:b0}=useHistoryTool({application:i0,spriteName:_e,onRestore(p0,m0){i0&&updateImageFromBlob(i0,{imgDatasource:p0,spriteName:_e,settings:m0})}});return reactExports.useEffect(()=>{i0&&(n0(!0),updateImage(i0,{spriteName:_e,imgDatasource:e0}).finally(()=>n0(!1)))},[i0,e0,_e]),reactExports.useEffect(()=>{if(!i0)return;const p0=()=>{const m0=i0.stage.getChildByLabel(_e,!0);m0&&autoResize(i0,m0)};return window.addEventListener("resize",p0),()=>window.removeEventListener("resize",p0)},[i0,_e]),{historyCount:b0,setApplication:r0,restore:d0,stopCrop:u0,stopBlur:l0,stopResize:A0,startResize:async()=>{n0(!0),await h0(f0),n0(!1)},startCrop:async()=>{n0(!0),await h0(a0),n0(!1)},startBlur:async()=>{n0(!0),await h0(o0),n0(!1)},rotate:async()=>{n0(!0),await h0(s0),n0(!1)},toBlob:c0,toDataURL:k0,loading:t0}}const SvgIconBlur=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("g",{fill:"currentColor",fillRule:"evenodd",clipPath:"url(#icon-blur_svg__a)",clipRule:"evenodd",children:jsxRuntimeExports.jsx("path",{d:"M17.504 1.673a1 1 0 0 1 .932.491c.37.63.9 1.935 1.404 3.18l.08.197c.502 1.24.994 2.457 1.369 3.205l-.895.447.895-.447c.561 1.122 1.962 4.049 2.136 6.753.087 1.364-.125 2.839-1.094 3.978-.987 1.16-2.573 1.76-4.757 1.76-2.186 0-3.777-.6-4.777-1.752-.983-1.134-1.221-2.604-1.152-3.973.138-2.711 1.514-5.636 2.13-6.79.86-1.611 2.414-5.32 2.874-6.433a1 1 0 0 1 .855-.616m.104 3.492c-.657 1.533-1.496 3.425-2.07 4.5-.59 1.106-1.781 3.703-1.895 5.949-.057 1.11.158 1.976.665 2.56.49.565 1.427 1.063 3.266 1.063 1.84 0 2.76-.498 3.233-1.055.492-.579.694-1.44.622-2.555-.145-2.253-1.36-4.848-1.929-5.986-.412-.823-.932-2.108-1.417-3.308l-.097-.238q-.196-.487-.378-.93M12.843 22.535a1 1 0 0 1-1.034.964l-.259-.009a1 1 0 0 1-.257-.042q-.125.029-.26.024l-.257-.009a11 11 0 0 1-2.102-.279 1 1 0 0 1 .457-1.947 9 9 0 0 0 1.715.228l.258.009q.134.004.257.042.125-.028.26-.024l.257.009a1 1 0 0 1 .965 1.034m-6.615-1.329a1 1 0 0 1-1.396.226 10.9 10.9 0 0 1-2.877-3.086 1 1 0 1 1 1.7-1.054 8.9 8.9 0 0 0 2.347 2.518 1 1 0 0 1 .226 1.396M1.622 15.22a1 1 0 0 1-1.147-.827 10.9 10.9 0 0 1 .148-4.218 1 1 0 0 1 1.947.457 8.9 8.9 0 0 0-.12 3.441 1 1 0 0 1-.828 1.147m.978-7.49a1 1 0 0 1-.226-1.397A10.9 10.9 0 0 1 5.46 3.455a1 1 0 0 1 1.054 1.7 8.9 8.9 0 0 0-2.518 2.347 1 1 0 0 1-1.396.226m5.988-4.607a1 1 0 0 1 .827-1.147 11 11 0 0 1 2.116-.132l.258.01q.135.004.257.042.125-.03.26-.025l.258.01a1 1 0 0 1-.07 1.998l-.258-.009a1 1 0 0 1-.258-.043q-.125.03-.259.025l-.258-.009a9 9 0 0 0-1.727.108 1 1 0 0 1-1.146-.828"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-blur_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]}),SvgIconCrop=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("g",{clipPath:"url(#icon-crop_svg__a)",children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.13 1.009a1 1 0 1 0-2-.018l-.036 4.103-4.103.036a1 1 0 1 0 .018 2l4.068-.035L5 15.99V16a3 3 0 0 0 3 3h9v4a1 1 0 1 0 2 0v-4h4a1 1 0 1 0 0-2h-4V8a3 3 0 0 0-3-3l-8.905.077zm-.053 6.068L7 16.004A1 1 0 0 0 8 17h9V8a1 1 0 0 0-.996-1z",clipRule:"evenodd"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-crop_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]}),SvgIconReset=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.583 7.313 3.976 3.87a.996.996 0 1 0-1.96.346l1.012 5.747a.996.996 0 0 0 1.153.809l5.743-1.014a.997.997 0 0 0-.346-1.962l-3.3.582a7.754 7.754 0 0 1 8.399-4.254 7.76 7.76 0 0 1 .78 15.064 7.745 7.745 0 0 1-8.912-3.56.995.995 0 1 0-1.724.997 9.744 9.744 0 0 0 11.201 4.474 9.74 9.74 0 0 0 5.19-3.718 9.756 9.756 0 0 0-.625-12.055A9.74 9.74 0 0 0 8.73 3.117a9.75 9.75 0 0 0-4.147 4.196",clipRule:"evenodd"})]}),SvgIconUndo=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.707 13.707a1 1 0 0 0 0-1.414L5.414 8l4.293-4.293a1 1 0 0 0-1.414-1.414l-5 5a1 1 0 0 0 0 1.414l5 5a1 1 0 0 0 1.414 0",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20 20a1 1 0 0 0 1-1v-7a5 5 0 0 0-5-5H4a1 1 0 1 0 0 2h12a3 3 0 0 1 3 3v7a1 1 0 0 0 1 1",clipRule:"evenodd"})]}),ImageEditorToolbar=({historyCount:e0,handle:_e})=>{const{t:i0}=useTranslation(),[r0,t0]=reactExports.useState(void 0),n0=o0=>{t0(o0),_e(o0)},s0=[{type:"button",name:"undo",props:{color:"tertiary",leftIcon:jsxRuntimeExports.jsx(SvgIconUndo,{}),"aria-label":i0("cancel"),children:i0("cancel"),onClick:()=>n0("UNDO"),disabled:e0===0},tooltip:i0("cancel")},{type:"divider",name:"div-1"},{type:"button",name:"reset",props:{color:"tertiary",leftIcon:jsxRuntimeExports.jsx(SvgIconReset,{}),"aria-label":i0("rotate"),children:i0("rotate"),onClick:()=>n0("ROTATE")},tooltip:i0("rotate")},{type:"button",name:"crop",props:{color:"tertiary",leftIcon:jsxRuntimeExports.jsx(SvgIconCrop,{}),"aria-label":i0("crop"),children:i0("crop"),className:r0==="CROP"?"is-selected":"",onClick:()=>n0("CROP")},tooltip:i0("crop")},{type:"button",name:"blur",props:{color:"tertiary",leftIcon:jsxRuntimeExports.jsx(SvgIconBlur,{}),"aria-label":i0("blur"),children:i0("blur"),className:r0==="BLUR"?"is-selected":"",onClick:()=>n0("BLUR")},tooltip:i0("blur")}];return jsxRuntimeExports.jsx(Toolbar,{variant:"no-shadow",align:"left",isBlock:!0,items:s0})},ImageEditor$1=({altText:e0,legend:_e,image:i0,isOpen:r0,onCancel:t0,onError:n0,onSave:s0})=>{const{t:o0}=useTranslation(),[a0,f0]=reactExports.useState(void 0),[l0,u0]=reactExports.useState(!1),[A0,c0]=reactExports.useState(e0??""),[k0,d0]=reactExports.useState(_e??""),[h0,b0]=reactExports.useState(!1);reactExports.useEffect(()=>{c0(e0??""),d0(_e??""),b0(!1)},[e0,_e]);const{toBlob:p0,setApplication:m0,startBlur:g0,stopBlur:v0,restore:x0,rotate:w0,startCrop:_0,stopCrop:y0,startResize:S0,stopResize:B0,historyCount:I0,loading:T0}=useImageEditor({imageSrc:i0}),R0=reactExports.useRef(null),E0=reactExports.useCallback(j0=>{if(j0&&!R0.current){const D0=new Application;R0.current=D0,D0.init({backgroundAlpha:0,resolution:1,preserveDrawingBuffer:!0}).then(()=>{R0.current===D0&&(j0.appendChild(D0.canvas),m0(D0))}).catch(()=>{R0.current===D0&&(R0.current=null)})}!j0&&R0.current&&(R0.current.destroy(!0),R0.current=null)},[m0]),C0=()=>{v0(),y0(a0==="CROP"),B0(a0==="RESIZE")},G0=async()=>{try{u0(!0),C0();const j0=await p0();j0&&await s0({blob:j0,legend:k0,altText:A0})}catch(j0){n0==null||n0(`${j0}`)}finally{u0(!1)}},F0=()=>{t0()},M0=async j0=>{switch(C0(),f0(j0),b0(!0),j0){case"ROTATE":{await w0();break}case"UNDO":{await x0();break}case"CROP":{_0();break}case"RESIZE":{await S0();break}case"BLUR":{await g0();break}}};return jsxRuntimeExports.jsxs(Modal,{id:"image-editor",isOpen:r0,onModalClose:F0,size:"lg",children:[jsxRuntimeExports.jsx(Modal.Header,{onModalClose:F0,children:jsxRuntimeExports.jsx("span",{className:"h2",children:o0("imageeditor.title")})}),jsxRuntimeExports.jsx(Modal.Body,{className:"d-flex flex-column align-items-center",children:jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column gap-12 w-100 flex-grow-1",children:[jsxRuntimeExports.jsx(ImageEditorToolbar,{handle:M0,historyCount:I0}),jsxRuntimeExports.jsxs("div",{className:"position-relative d-flex flex-column align-items-center justify-content-center flex-grow-1 w-100 image-editor",children:[jsxRuntimeExports.jsx("div",{ref:E0,className:"d-flex justify-content-center w-100"}),T0&&jsxRuntimeExports.jsx("div",{className:"position-absolute top-0 start-0 bottom-0 end-0 m-10 d-flex align-items-center justify-content-center bg-black opacity-25",children:jsxRuntimeExports.jsx(LoadingScreen,{})})]}),jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column flex-md-row m-10 gap-12 w-100",children:[jsxRuntimeExports.jsxs(FormControl,{id:"alt",className:"flex-grow-1",children:[jsxRuntimeExports.jsx(Label,{children:o0("alttext")}),jsxRuntimeExports.jsx(Input,{value:A0,onChange:j0=>{b0(!0),c0(j0.target.value)},placeholder:o0("alttext.help"),size:"md",type:"text"})]}),jsxRuntimeExports.jsxs(FormControl,{id:"legend",className:"flex-grow-1",children:[jsxRuntimeExports.jsx(Label,{children:o0("legend")}),jsxRuntimeExports.jsx(Input,{value:k0,onChange:j0=>{b0(!0),d0(j0.target.value)},placeholder:o0("legend.help"),size:"md",type:"text"})]})]})]})}),jsxRuntimeExports.jsxs(Modal.Footer,{children:[jsxRuntimeExports.jsx(Button,{color:"tertiary",onClick:F0,type:"button",variant:"ghost",children:o0("imageeditor.cancel")}),jsxRuntimeExports.jsx(Button,{color:"primary",onClick:G0,type:"button",variant:"filled",isLoading:l0,disabled:l0||!h0,children:o0("imageeditor.save")})]})]})},ImageEditor$2=Object.freeze(Object.defineProperty({__proto__:null,default:ImageEditor$1},Symbol.toStringTag,{value:"Module"})),SvgIconEdit=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M1.879 3.879A3 3 0 0 1 4 3h7a1 1 0 1 1 0 2H4a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7a1 1 0 1 1 2 0v7a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3V6a3 3 0 0 1 .879-2.121",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M20 2.879c-.297 0-.583.118-.793.328l-9.304 9.304-.529 2.115 2.115-.529 9.304-9.304A1.121 1.121 0 0 0 20 2.879m-2.207-1.086a3.121 3.121 0 0 1 4.414 4.414l-9.5 9.5a1 1 0 0 1-.464.263l-4 1a1 1 0 0 1-1.213-1.212l1-4a1 1 0 0 1 .263-.465z",clipRule:"evenodd"})]}),ImagePicker=({addButtonLabel:e0="Add image",deleteButtonLabel:_e="Delete image",src:i0,className:r0,mediaLibraryRef:t0,libraryMedia:n0,app:s0,onUploadImage:o0,onDeleteImage:a0})=>{const[f0,l0]=reactExports.useState(i0||"");reactExports.useEffect(()=>{n0&&(l0(n0),o0(n0))},[n0]);const u0=()=>{var k0;(k0=t0.current)==null||k0.show("image")},A0=()=>{l0(""),a0()},c0=clsx("image-input",r0);return jsxRuntimeExports.jsxs("div",{id:"image-input",className:c0,children:[jsxRuntimeExports.jsxs("div",{className:"image-input-actions gap-8",children:[jsxRuntimeExports.jsx(IconButton,{"aria-label":e0,color:"tertiary",icon:jsxRuntimeExports.jsx(SvgIconEdit,{}),onClick:u0,type:"button",variant:"ghost"}),jsxRuntimeExports.jsx(IconButton,{"aria-label":_e,color:"danger",disabled:!f0,icon:jsxRuntimeExports.jsx(SvgIconDelete,{}),onClick:A0,type:"button",variant:"ghost"})]}),f0?jsxRuntimeExports.jsx(Avatar,{alt:"",src:f0,size:"xl"}):jsxRuntimeExports.jsx(AppIcon,{app:s0,iconFit:"ratio",size:"160",variant:"rounded"})]})},Logo=reactExports.forwardRef(({src:e0,is1d:_e,translate:i0="Retour accueil"},r0)=>{const t0=clsx("navbar-brand d-none d-md-block");return jsxRuntimeExports.jsx("a",{ref:r0,className:t0,href:"/timeline/timeline","aria-label":i0,children:jsxRuntimeExports.jsx("img",{className:"logo",src:e0,alt:`logo ${_e?"ONE":"NEO"}`,width:"300",height:"52"})})}),LogoBeta=reactExports.forwardRef(({src:e0,is1d:_e,translate:i0="Retour accueil"},r0)=>{const t0=clsx("navbar-brand");return jsxRuntimeExports.jsx("a",{ref:r0,className:t0,href:"/timeline/timeline","aria-label":i0,children:jsxRuntimeExports.jsx("img",{className:"logo",src:e0,alt:`logo ${_e?"ONE":"NEO"}`,width:"300",height:"52"})})}),SvgIconApplications=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M1 3c0-1.1.9-2 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2zm8 0H3v6h6zm4 0c0-1.1.9-2 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2zm8 0h-6v6h6zm-8 12c0-1.1.9-2 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2zm8 0h-6v6h6zM1 15c0-1.1.9-2 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2zm8 0H3v6h6z",clipRule:"evenodd"})]}),SvgIconGlobe2=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsxs("g",{fill:"currentColor",fillRule:"evenodd",clipPath:"url(#icon-globe-2_svg__a)",clipRule:"evenodd",children:[jsxRuntimeExports.jsx("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10m0 2c6.627 0 12-5.373 12-12S18.627 0 12 0C5.372 0 0 5.373 0 12s5.372 12 12 12"}),jsxRuntimeExports.jsx("path",{d:"M16.944 2.761V2.76a.67.67 0 0 0 .09-.683l-.416.182-.057.129-.078.611a.63.63 0 0 0 .46-.238m-.571.224-.065-.025.096-.216zm.01.003.03-.267.146-.328-.08.606h-.052zm.235-.73.416-.18a7.3 7.3 0 0 1 .504 1.754c.047.324.07.701.007 1.064-.061.355-.234.847-.714 1.16l-.09.059-1.215.464a1.26 1.26 0 0 0-.82 1.012l-.002.008-.009.069c-.136.95-1.001 1.151-1.134 1.177-.414.082-1.113.007-1.519-.64l-.006-.011-.224-.377c-.35.728-.718 1.572-.809 2.32v.002a.44.44 0 0 0 .041.247l.023.043.478 1.161c.097.17.245.324.437.44.36.218 1.13.713 1.654 1.323.04.047.264.221.9.398.633.177 1.133.73 1.181 1.432.058.849.193 1.37.335 1.649a.6.6 0 0 0 .103.157l.033.001.05.007.02.001.056.002c.14 0 .375-.03.603-.19.318-.223.634-.703.755-1.68v-.001c.051-.404.12-.913.239-1.429l.064-.34a297 297 0 0 1 .31-1.625l.084-.403.015-.058a1.012 1.012 0 0 1 1.04-.758c.26.015.443.128.488.156h.001c.124.077.216.17.249.203.09.091.183.203.25.287.075.092.145.184.196.251l.062.084.018.024.005.007.002.003-.384.28.384-.28.013.018.012.018a.34.34 0 0 0 .221.138.39.39 0 0 0 .292-.06l1.04-.745a.66.66 0 0 0-.273.536h2c0 .443-.219.843-.562 1.09m0 0-1.04.744a2.38 2.38 0 0 1-2.411.21l-.047.248-.067.359-.004.022-.005.022c-.097.416-.157.848-.207 1.246-.159 1.279-.633 2.398-1.592 3.071a3.06 3.06 0 0 1-2.032.538c-.847-.043-1.428-.586-1.764-1.248-.29-.571-.449-1.306-.525-2.136-.634-.2-1.235-.49-1.626-.946-.3-.35-.829-.707-1.17-.913a3.23 3.23 0 0 1-1.193-1.259l-.021-.04-.483-1.171a2.44 2.44 0 0 1-.233-1.378l.993.122-.993-.121c.15-1.234.775-2.507 1.135-3.242l.025-.05a1.79 1.79 0 0 1 1.527-.994h.008c.516-.02 1.031.175 1.396.56a3.3 3.3 0 0 1 1.703-1.46l.771-.294q0-.115-.024-.301a5.3 5.3 0 0 0-.358-1.236c-.2-.459-.126-.985.183-1.37l.78.626-.78-.625v-.002c.31-.385.786-.551 1.232-.498h.01l.115.016q.192.024.376.105l-.499 1.128m3.692 9.553-.096.07zM6.045 14.091a1.84 1.84 0 0 1 1.507.163c.575.348.805.94.805 1.502v.747c0 .338.081.546.191.694.116.156.329.33.73.48l1.751.655c.534.2 1.02.485 1.443.854l.344.3c1.015.887 1.445 2.241 1.024 3.528l-.098.298-1.9-.624.097-.296c.152-.464.021-.998-.439-1.4l-.344-.3a2.7 2.7 0 0 0-.827-.486l-1.75-.655c-.656-.245-1.23-.615-1.635-1.16-.411-.552-.587-1.201-.587-1.888v-.382l-3.93 1.605-.755-1.852 4.338-1.772zM8.876 2.991c.084.494.124.996.124 1.32m0 .84v-.84zm0 0c0 .847-.41 1.658-1.001 2.268L6.196 9.276a.82.82 0 0 0-.187.831 1.825 1.825 0 0 1-1.017 2.245L1.4 13.917l-.798-1.834 3.462-1.508a2.82 2.82 0 0 1 .698-2.692l1.803-1.857C6.885 5.695 7 5.36 7 5.15v-.84c0-.196-.028-.584-.096-.982-.074-.436-.169-.708-.222-.791L8.37 1.463c.286.45.429 1.072.507 1.528m-4.77 7.733"})]}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-globe-2_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]}),SvgIconGlobe=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M9.726 3.29A9.01 9.01 0 0 0 3.055 11H7.05a16.3 16.3 0 0 1 2.676-7.71m4.548 0A16.3 16.3 0 0 1 16.95 11h3.995a9.01 9.01 0 0 0-6.67-7.71m.668 7.71A14.3 14.3 0 0 0 12 3.55 14.3 14.3 0 0 0 9.058 11zm-5.884 2h5.884A14.3 14.3 0 0 1 12 20.45 14.3 14.3 0 0 1 9.058 13M7.05 13H3.055a9.01 9.01 0 0 0 6.67 7.71A16.3 16.3 0 0 1 7.05 13m7.224 7.71A16.3 16.3 0 0 0 16.95 13h3.995a9.01 9.01 0 0 1-6.67 7.71M12 23c6.075 0 11-4.925 11-11S18.075 1 12 1 1 5.925 1 12s4.925 11 11 11",clipRule:"evenodd"})]}),SvgIconRecordVideo=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M2 4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h13a2 2 0 0 0 2-2v-1.936l4.409 1.365A2 2 0 0 0 24 15.519V8.48a2 2 0 0 0-2.591-1.91l-4.41 1.364V6a2 2 0 0 0-2-2zm0 2h13v12H2zm15 7.97V10.03l5-1.548v7.037z",clipRule:"evenodd"})]}),SvgIconSmartphone=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M7 3a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1zM4 4a3 3 0 0 1 3-3h10a3 3 0 0 1 3 3v16a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3z",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11 18a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H12a1 1 0 0 1-1-1",clipRule:"evenodd"})]}),MediaLibraryContext=reactExports.createContext(null);function useMediaLibraryContext(){const e0=reactExports.useContext(MediaLibraryContext);if(!e0)throw new Error("Innertabs compound components cannot be rendered outside the MediaLibrary component");return e0}const Audio=()=>{const{setResult:e0,setPreSuccess:_e,visibility:i0}=useMediaLibraryContext(),r0=reactExports.useRef(null);return jsxRuntimeExports.jsx(AudioRecorder,{ref:r0,onRecordUpdated:t0=>{t0?(e0(t0),_e(()=>r0.current.save)):e0()},onSaveSuccess:t0=>{t0&&e0(t0)},hideSaveAction:!0,visibility:i0})};function useToggle(e0=!1){const[_e,i0]=reactExports.useState(e0),r0=reactExports.useCallback(()=>{i0(t0=>!t0)},[]);return[_e,r0]}const ExternalLinker=({link:e0,onChange:_e,multiNodeSelected:i0=!1})=>{const{t:r0}=useTranslation(),[t0,n0]=reactExports.useState((e0==null?void 0:e0.text)||""),[s0,o0]=reactExports.useState((e0==null?void 0:e0.url)||""),[a0,f0]=useToggle(e0?e0.target==="_blank":!0);return reactExports.useEffect(()=>{i0&&e0!=null&&e0.text&&n0(e0.text.slice(0,20)+"...")},[i0,e0]),reactExports.useEffect(()=>{if(!s0.length){_e==null||_e();return}const l0={url:s0,text:i0?e0==null?void 0:e0.text:t0||s0,target:a0?"_blank":void 0};!s$2.isLocalURL(s0)&&!s$2.startWithHttp(s0)&&(l0.url="http://"+s0),_e==null||_e(l0)},[t0,s0,a0]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column flex-fill gap-24",children:[jsxRuntimeExports.jsxs(FormControl,{id:"linkText",isOptional:!0,children:[jsxRuntimeExports.jsx(Label,{children:r0("bbm.linker.ext.text")}),jsxRuntimeExports.jsx(Input,{type:"text",placeholder:r0("bbm.linker.ext.text.placeholder"),size:"md",disabled:i0,value:t0,onChange:l0=>n0(l0.target.value)})]}),jsxRuntimeExports.jsxs(FormControl,{id:"linkUrl",isRequired:!0,children:[jsxRuntimeExports.jsx(Label,{children:r0("bbm.linker.ext.url")}),jsxRuntimeExports.jsx(Input,{type:"text",placeholder:r0("bbm.linker.ext.url.placeholder"),size:"md",value:s0,onChange:l0=>o0(l0.target.value)})]}),jsxRuntimeExports.jsx(Checkbox,{label:r0("bbm.linker.open.tab"),onChange:()=>f0(),checked:a0})]})})},ExternalLink=({link:e0,multiNodeSelected:_e=!1})=>{const{setResult:i0}=useMediaLibraryContext();return jsxRuntimeExports.jsx(ExternalLinker,{link:e0,onChange:r0=>{i0(r0)},multiNodeSelected:_e})},GoogleDrive=()=>{const{appCode:e0,visibility:_e,type:i0,setResultCounter:r0,setResult:t0,setPreSuccess:n0,multiple:s0}=useMediaLibraryContext(),{user:o0}=useUser(),{t:a0}=useTranslation(),f0=useToast();function l0(){switch(i0){case"image":return"img";case"audio":return"audio";case"video":return"video";default:return null}}async function u0(c0,k0){try{return await odeServices.googledrive().copyDocumentToWorkspace(c0,k0,void 0,{application:e0,visibility:_e})}catch(d0){if(d0 instanceof GoogleDriveCopyError&&d0.copied.length>0)return f0.warning(a0("google-drive.transfer.error")),d0.copied;throw d0}}function A0(c0){r0(c0.length),c0.length?(t0(c0),n0(()=>()=>o0!=null&&o0.userId?u0(o0.userId,c0.map(k0=>k0.id)):Promise.resolve([]))):(t0(),n0(void 0))}return jsxRuntimeExports.jsx(GoogleDrive$1,{roles:l0(),onSelect:A0,multiple:s0,className:"border rounded overflow-y-auto"})},Iframe=()=>{const{setResult:e0}=useMediaLibraryContext();return jsxRuntimeExports.jsx(Embed,{onSuccess:_e=>{_e=_e==null?void 0:_e.replace(/<p /g,"<div ").replace(/\/p>/g,"/div>"),e0(_e)}})},SvgIconUsers=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("g",{fill:"currentColor",fillRule:"evenodd",clipPath:"url(#icon-users_svg__a)",clipRule:"evenodd",children:jsxRuntimeExports.jsx("path",{d:"M19.055 12.803a1 1 0 0 1 1.272-.618c1.128.39 2.061 1.247 2.7 2.351.64 1.106.972 2.435.973 3.782V21a1 1 0 1 1-2 0v-2.681c0-1.03-.258-2.009-.704-2.782-.448-.773-1.034-1.258-1.623-1.462a1 1 0 0 1-.618-1.272M15.187 1.384a1 1 0 0 1 1.036-.962 5.129 5.129 0 0 1 2.11 9.71 1 1 0 1 1-.896-1.788 3.129 3.129 0 0 0-1.288-5.924 1 1 0 0 1-.962-1.036M1.505 15.694C2.481 14.622 3.825 14 5.25 14h8.5c1.424 0 2.769.622 3.744 1.694.974 1.068 1.506 2.498 1.506 3.973V22a1 1 0 1 1-2 0v-2.333c0-1.001-.363-1.945-.984-2.627-.618-.679-1.436-1.04-2.266-1.04h-8.5c-.83 0-1.648.361-2.266 1.04-.621.682-.984 1.626-.984 2.627V22a1 1 0 1 1-2 0v-2.333c0-1.475.533-2.905 1.505-3.974M9.5 3a3.5 3.5 0 1 0 0 7 3.5 3.5 0 0 0 0-7M4 6.5a5.5 5.5 0 1 1 11 0 5.5 5.5 0 0 1-11 0"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-users_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]});var isSameOrAfter$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){return function(i0,r0){r0.prototype.isSameOrAfter=function(t0,n0){return this.isSame(t0,n0)||this.isAfter(t0,n0)}}})})(isSameOrAfter$1);var isSameOrAfterExports=isSameOrAfter$1.exports;const isSameOrAfter=getDefaultExportFromCjs(isSameOrAfterExports);var isToday$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){return function(i0,r0,t0){r0.prototype.isToday=function(){var n0="YYYY-MM-DD",s0=t0();return this.format(n0)===s0.format(n0)}}})})(isToday$1);var isTodayExports=isToday$1.exports;const isToday=getDefaultExportFromCjs(isTodayExports);var localizedFormat$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal$1,function(){var i0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r0,t0,n0){var s0=t0.prototype,o0=s0.format;n0.en.formats=i0,s0.format=function(a0){a0===void 0&&(a0="YYYY-MM-DDTHH:mm:ssZ");var f0=this.$locale().formats,l0=function(u0,A0){return u0.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(c0,k0,d0){var h0=d0&&d0.toUpperCase();return k0||A0[d0]||i0[d0]||A0[h0].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(b0,p0,m0){return p0||m0.slice(1)})})}(a0,f0===void 0?{}:f0);return o0.call(this,l0)}}})})(localizedFormat$1);var localizedFormatExports=localizedFormat$1.exports;const localizedFormat=getDefaultExportFromCjs$1(localizedFormatExports);var relativeTime$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal$1,function(){return function(i0,r0,t0){i0=i0||{};var n0=r0.prototype,s0={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function o0(f0,l0,u0,A0){return n0.fromToBase(f0,l0,u0,A0)}t0.en.relativeTime=s0,n0.fromToBase=function(f0,l0,u0,A0,c0){for(var k0,d0,h0,b0=u0.$locale().relativeTime||s0,p0=i0.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m0=p0.length,g0=0;g0<m0;g0+=1){var v0=p0[g0];v0.d&&(k0=A0?t0(f0).diff(u0,v0.d,!0):u0.diff(f0,v0.d,!0));var x0=(i0.rounding||Math.round)(Math.abs(k0));if(h0=k0>0,x0<=v0.r||!v0.r){x0<=1&&g0>0&&(v0=p0[g0-1]);var w0=b0[v0.l];c0&&(x0=c0(""+x0)),d0=typeof w0=="string"?w0.replace("%d",x0):w0(x0,l0,v0.l,h0);break}}if(l0)return d0;var _0=h0?b0.future:b0.past;return typeof _0=="function"?_0(d0):_0.replace("%s",d0)},n0.to=function(f0,l0){return o0(f0,l0,this,!0)},n0.from=function(f0,l0){return o0(f0,l0,this)};var a0=function(f0){return f0.$u?t0.utc():t0()};n0.toNow=function(f0){return this.to(a0(this),f0)},n0.fromNow=function(f0){return this.from(a0(this),f0)}}})})(relativeTime$1);var relativeTimeExports=relativeTime$1.exports;const relativeTime=getDefaultExportFromCjs$1(relativeTimeExports);dayjs.extend(relativeTime);dayjs.extend(customParseFormat);dayjs.extend(localizedFormat);dayjs.extend(isSameOrAfter);dayjs.extend(isToday);function useDate(){const{currentLanguage:e0}=useEdificeClient(),{t:_e}=useTranslation(),i0=reactExports.useCallback((l0,u0)=>{if(l0.length<11)return dayjs(l0,["YYYY-MM-DD"],u0);if(l0.split("").findIndex(A0=>"0">A0||A0>"9")<0)return dayjs(Number.parseInt(l0)).locale(e0);{let A0=dayjs(l0).locale(e0);return A0.isValid()||(A0=dayjs(l0,["YYYY-MM-DD HH:mm:ss.SSS"]).locale(e0)),A0}},[e0]),r0=reactExports.useCallback(l0=>{let u0=dayjs();try{return typeof l0>"u"?void 0:(typeof l0=="string"?u0=i0(l0):l0 instanceof Date||typeof l0=="number"?u0=dayjs(l0).locale(e0):typeof l0.$date=="number"?u0=dayjs(new Date(l0.$date)).locale(e0):typeof l0.$date=="string"&&(u0=i0(l0.$date)),u0)}catch(A0){console.error(A0)}return u0},[e0,i0]),t0=reactExports.useCallback(l0=>{const u0=r0(l0);if(!(u0!=null&&u0.isValid()))return"";const A0=dayjs();return u0.isSame(A0,"date")?u0.fromNow():u0.isSame(A0.subtract(1,"day"),"date")?_e("date.format.yesterday"):A0.diff(u0,"days")<=7?u0.format(_e("date.format.currentWeek")):u0.isSame(A0,"year")?u0.format(_e("date.format.currentYear")):u0.format(_e("date.format.previousYear"))},[e0,i0]),n0=reactExports.useCallback(l0=>{const u0=r0(l0);return u0!=null&&u0.isValid()?u0.fromNow():""},[e0,i0]),s0=reactExports.useCallback((l0,u0="short")=>{const A0=r0(l0);let c0="";switch(u0){case"short":c0="L";break;case"long":c0="LL";break;case"abbr":c0="ll";break;default:c0=u0}return A0!=null&&A0.isValid()?A0.locale(e0).format(c0):""},[e0,i0]),o0=reactExports.useCallback((l0,u0,A0="day")=>{const c0=r0(l0),k0=r0(u0);return(c0==null?void 0:c0.isSame(k0,A0))??!1},[e0,i0]),a0=reactExports.useCallback((l0,u0,A0="day")=>{const c0=r0(l0),k0=r0(u0);return(c0==null?void 0:c0.isSameOrAfter(k0,A0))??!1},[e0,i0]),f0=reactExports.useCallback(l0=>{const u0=r0(l0);return(u0==null?void 0:u0.isToday())??!1},[e0,i0]);return{fromNow:n0,formatDate:s0,formatTimeAgo:t0,dateIsSame:o0,dateIsSameOrAfter:a0,dateIsToday:f0}}const LinkerCard=({doc:e0,isClickable:_e=!0,isSelectable:i0=!1,isSelected:r0=!1,onClick:t0,className:n0})=>{const{fromNow:s0}=useDate(),o0=reactExports.useMemo(()=>e0.fromDate??s0(e0.modifiedAt),[e0.fromDate,e0.modifiedAt,s0]);return jsxRuntimeExports.jsx(Card,{className:clsx("card-linker shadow-none",n0),isClickable:_e,isSelectable:i0,isSelected:r0,onClick:t0,children:jsxRuntimeExports.jsxs(Card.Body,{space:"8",children:[jsxRuntimeExports.jsx("div",{className:"card-image ps-8 pe-4",children:e0.thumbnail&&e0.thumbnail.length>0?jsxRuntimeExports.jsx(Image$1,{alt:"",height:48,width:48,src:e0.thumbnail,objectFit:"cover",className:"rounded h-full",style:{aspectRatio:1/1}}):jsxRuntimeExports.jsx(AppIcon,{app:e0.application,iconFit:"ratio",size:"48",variant:"rounded"})}),jsxRuntimeExports.jsxs("div",{className:"w-75",children:[jsxRuntimeExports.jsx(Card.Text,{children:e0.name}),jsxRuntimeExports.jsx(Card.Text,{className:"text-black-50",children:e0==null?void 0:e0.creatorName})]}),jsxRuntimeExports.jsx("div",{className:"d-none d-md-block text-black-50 ps-4 pe-8",children:jsxRuntimeExports.jsx(Card.Text,{children:o0})}),e0.shared&&jsxRuntimeExports.jsx("div",{className:"ps-4 pe-8",children:jsxRuntimeExports.jsx(SvgIconUsers,{width:"20",height:"20"})})]})})},useResourceSearch=e0=>{const[_e,i0]=reactExports.useState([]);reactExports.useEffect(()=>{(async()=>(await SnipletsService.initialize(odeServices,e0),await SnipletsService.registerBehaviours(e0),i0(SnipletsService.resourceProducingApps)))()},[]);const r0=reactExports.useCallback(async t0=>{const[n0]=t0.types;return await odeServices.behaviour(e0,n0).loadResources(t0)},[e0]);return{resourceApplications:_e,loadResources:r0}},illuOneBlog="/assets/js/ode-explorer/illu-empty-search-blog.svg",illuOneCollaborativeWall="/assets/js/ode-explorer/illu-empty-search-collaborativewall.svg",illuOneCommunity="data:image/svg+xml,%3csvg%20width='250'%20height='195'%20viewBox='0%200%20250%20195'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3597_149764)'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3cpath%20d='M167.746%20130.552C172.704%20130.552%20176.962%20132.327%20180.519%20135.877C184.076%20139.427%20185.855%20143.677%20185.854%20148.625C185.854%20153.574%20184.076%20157.823%20180.519%20161.373C176.962%20164.923%20172.758%20166.698%20167.908%20166.698C163.057%20166.698%20158.799%20164.923%20155.135%20161.373C151.47%20157.823%20149.692%20153.52%20149.799%20148.464C149.799%20146.528%20150.23%20144.43%20151.093%20142.171L123.768%20122.484C118.487%20127.863%20112.127%20130.552%20104.69%20130.552C97.2522%20130.552%2090.8927%20127.917%2085.6111%20122.646C80.3295%20117.374%2077.6348%20110.974%2077.5271%20103.443C77.5271%20102.475%2077.6887%20101.077%2078.012%2099.2476L56.3468%2092.1477C54.6221%2093.6538%2052.6819%2094.4069%2050.5261%2094.4069C47.9391%2094.4069%2045.7833%2093.5463%2044.0587%2091.825C42.334%2090.1037%2041.4717%2087.9522%2041.4717%2085.3703C41.4717%2082.7884%2042.334%2080.6906%2044.0587%2079.0771C45.7833%2077.4635%2047.9391%2076.6028%2050.5261%2076.4952C52.6819%2076.4952%2054.5143%2077.1944%2056.0234%2078.5928C57.5325%2079.9912%2058.5564%2081.6586%2059.0953%2083.595L80.9224%2090.8565C83.1858%2086.4458%2086.4734%2082.9496%2090.785%2080.3677C95.0966%2077.7858%2099.7315%2076.4948%20104.69%2076.4948C110.295%2076.4948%20115.468%2078.1623%20120.211%2081.4971L152.386%2049.3856C150.661%2046.1582%20149.799%2043.1998%20149.799%2040.5105C149.799%2035.562%20151.577%2031.3127%20155.134%2027.7625C158.691%2024.2123%20162.949%2022.4373%20167.907%2022.4375C172.866%2022.4377%20177.069%2024.2127%20180.518%2027.7625C183.968%2031.3123%20185.746%2035.5616%20185.854%2040.5105C185.962%2045.4593%20184.183%2049.6548%20180.518%2053.0969C176.854%2056.539%20172.596%2058.314%20167.745%2058.4219C164.943%2058.4219%20161.979%2057.5075%20158.853%2055.6788L126.678%2087.9518C130.02%2092.6851%20131.69%2097.8488%20131.69%20103.443C131.69%20107.423%20130.774%20111.35%20128.942%20115.223L156.266%20134.748C159.823%20131.951%20163.65%20130.552%20167.746%20130.552V130.552Z'%20fill='%23A348C0'/%3e%3cg%20filter='url(%23filter0_d_3597_149764)'%3e%3cellipse%20cx='169.708'%20cy='113.765'%20rx='44.2029'%20ry='44.2029'%20fill='white'%20fill-opacity='0.85'/%3e%3cpath%20d='M241.707%20177.101L215.012%20150.405C214.309%20149.703%20213.483%20149.21%20212.606%20148.92C220.41%20139.391%20225.099%20127.21%20225.099%20113.934C225.099%2095.9054%20216.454%2079.891%20203.091%2069.8112C198.323%2066.217%20192.946%2063.3837%20187.149%2061.4707C181.707%2059.6808%20175.903%2058.6953%20169.867%2058.6953C165.678%2058.6953%20161.599%2059.1808%20157.678%2060.0649C152.635%2061.2026%20147.852%2063.0142%20143.432%2065.4272C135.272%2069.8837%20128.374%2076.3402%20123.367%2084.1373C121.403%2087.1953%20119.736%2090.4489%20118.403%2093.8765C115.975%20100.094%20114.635%20106.855%20114.635%20113.934C114.635%20144.442%20139.359%20169.166%20169.867%20169.166C183.142%20169.166%20195.323%20164.485%20204.852%20156.674C205.142%20157.55%20205.642%20158.384%20206.338%20159.079L233.033%20185.775C235.432%20188.174%20239.316%20188.174%20241.715%20185.775C244.113%20183.376%20244.113%20179.492%20241.715%20177.094L241.707%20177.101ZM169.859%20156.891C146.135%20156.891%20126.903%20137.659%20126.903%20113.934C126.903%20109.203%20127.678%20104.652%20129.091%20100.391C130.265%2096.8475%20131.888%2093.5141%20133.896%2090.4489C136.483%2086.4924%20139.707%2082.9924%20143.425%2080.0866C147.62%2076.804%20152.432%2074.2895%20157.671%2072.746C161.533%2071.6011%20165.628%2070.9779%20169.859%2070.9779C193.584%2070.9779%20212.816%2090.2098%20212.816%20113.934C212.816%20137.659%20193.584%20156.891%20169.859%20156.891Z'%20fill='%23B9E3F8'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_3597_149764'%20x='108.635'%20y='54.6953'%20width='140.879'%20height='140.875'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='2'/%3e%3cfeGaussianBlur%20stdDeviation='3'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_3597_149764'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_3597_149764'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_3597_149764'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",illuOneExercizer="data:image/svg+xml,%3csvg%20width='250'%20height='195'%20viewBox='0%200%20250%20195'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3597_148725)'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3cpath%20d='M83.4104%20149.864L112.194%20135.472V111.738L83.4104%20124.138V149.864ZM78.5673%20115.516L108.965%20102.602L78.5673%2089.5493L48.3412%20102.773L78.5673%20115.516ZM160.349%20149.864L189.167%20135.472V111.738L160.384%20124.138L160.349%20149.864ZM155.506%20115.516L185.732%20102.773L155.472%2089.7211L125.074%20102.773L155.506%20115.516ZM121.88%2093.568L150.663%2081.2028V61.3498L121.88%2073.715V93.568ZM117.037%2065.2311L150.114%2051.1141L117.037%2036.8598L83.9256%2051.1141L117.037%2065.2311ZM198.682%20104.113V135.472C198.694%20137.212%20198.231%20138.923%20197.342%20140.418C196.429%20141.946%20195.059%20143.147%20193.426%20143.853L159.8%20160.684C158.476%20161.382%20157.003%20161.746%20155.506%20161.746C154.01%20161.746%20152.536%20161.382%20151.213%20160.684L117.586%20143.853C117.379%20143.822%20117.187%20143.726%20117.037%20143.578C116.881%20143.717%20116.692%20143.812%20116.487%20143.853L82.8608%20160.684C81.5508%20161.417%2080.068%20161.784%2078.5673%20161.748C77.0983%20161.794%2075.6461%20161.425%2074.3769%20160.684L40.7504%20143.853C39.1325%20143.137%2037.7764%20141.937%2036.8691%20140.418C35.9651%20138.922%2035.4568%20137.22%2035.3921%20135.472V104.113C35.3757%20102.237%2035.9395%20100.401%2037.0064%2098.8576C38.051%2097.299%2039.55%2096.0997%2041.2999%2095.4228L73.8617%2081.4433V51.3889C73.8545%2049.5056%2074.3966%2047.6611%2075.4214%2046.0811C76.4463%2044.5011%2077.9095%2043.2541%2079.6321%2042.4928L113.259%2028.1011C114.45%2027.581%20115.737%2027.3125%20117.037%2027.3125C118.337%2027.3125%20119.623%2027.581%20120.815%2028.1011L154.442%2042.4928C156.151%2043.2379%20157.633%2044.4231%20158.735%2045.9276C159.819%2047.5145%20160.383%2049.3988%20160.349%2051.3202V81.3059L192.911%2095.2854C194.661%2095.9623%20196.16%2097.1616%20197.205%2098.7202C198.26%20100.263%20198.779%20102.109%20198.682%20103.975V104.113Z'%20fill='%23A348C0'/%3e%3cg%20filter='url(%23filter0_d_3597_148725)'%3e%3cellipse%20cx='169.707'%20cy='113.765'%20rx='44.2029'%20ry='44.2029'%20fill='white'%20fill-opacity='0.85'/%3e%3cpath%20d='M241.707%20177.101L215.011%20150.405C214.308%20149.703%20213.482%20149.21%20212.605%20148.92C220.41%20139.391%20225.098%20127.21%20225.098%20113.934C225.098%2095.9054%20216.453%2079.891%20203.091%2069.8112C198.323%2066.217%20192.946%2063.3837%20187.149%2061.4707C181.707%2059.6808%20175.903%2058.6953%20169.866%2058.6953C165.678%2058.6953%20161.598%2059.1808%20157.678%2060.0649C152.634%2061.2026%20147.852%2063.0142%20143.432%2065.4272C135.272%2069.8837%20128.374%2076.3402%20123.366%2084.1373C121.403%2087.1953%20119.736%2090.4489%20118.403%2093.8765C115.975%20100.094%20114.634%20106.855%20114.634%20113.934C114.634%20144.442%20139.359%20169.166%20169.866%20169.166C183.142%20169.166%20195.323%20164.485%20204.852%20156.674C205.142%20157.55%20205.642%20158.384%20206.337%20159.079L233.033%20185.775C235.432%20188.174%20239.316%20188.174%20241.714%20185.775C244.113%20183.376%20244.113%20179.492%20241.714%20177.094L241.707%20177.101ZM169.859%20156.891C146.134%20156.891%20126.903%20137.659%20126.903%20113.934C126.903%20109.203%20127.678%20104.652%20129.091%20100.391C130.265%2096.8475%20131.888%2093.5141%20133.895%2090.4489C136.482%2086.4924%20139.707%2082.9924%20143.424%2080.0866C147.62%2076.804%20152.432%2074.2895%20157.671%2072.746C161.533%2071.6011%20165.627%2070.9779%20169.859%2070.9779C193.584%2070.9779%20212.816%2090.2098%20212.816%20113.934C212.816%20137.659%20193.584%20156.891%20169.859%20156.891Z'%20fill='%23B9E3F8'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_3597_148725'%20x='108.634'%20y='54.6953'%20width='140.879'%20height='140.875'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='2'/%3e%3cfeGaussianBlur%20stdDeviation='3'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_3597_148725'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_3597_148725'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_3597_148725'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",illuOneFormulaire="/assets/js/ode-explorer/illu-empty-search-formulaire.svg",illuOneForum="/assets/js/ode-explorer/illu-empty-search-forum.svg",illuOneHomeworks="/assets/js/ode-explorer/illu-empty-search-homeworks.svg",illuOneMagneto="data:image/svg+xml,%3csvg%20width='250'%20height='195'%20viewBox='0%200%20250%20195'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3597_149757)'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3cpath%20d='M127.341%20120.329V89.4164C127.341%2077.1185%20122.455%2065.3242%20113.759%2056.6282C105.063%2047.9322%2093.2691%2043.0469%2080.9711%2043.0469C68.6731%2043.0469%2056.8789%2047.9322%2048.1829%2056.6282C39.4869%2065.3242%2034.6016%2077.1185%2034.6016%2089.4164L34.6016%20120.329H55.2103V89.4164C55.2103%2082.5842%2057.9243%2076.0319%2062.7554%2071.2008C67.5865%2066.3696%2074.1389%2063.6556%2080.9711%2063.6556C84.3541%2063.6556%2087.7039%2064.3219%2090.8294%2065.6165C93.9548%2066.9111%2096.7947%2068.8086%2099.1868%2071.2007C101.579%2073.5929%20103.476%2076.4327%20104.771%2079.5582C106.066%2082.6836%20106.732%2086.0335%20106.732%2089.4164V120.329M55.2103%20130.634H34.6016V146.09H55.2103M127.341%20130.634H106.732V146.09H127.341'%20fill='%23F1CA00'/%3e%3cpath%20d='M199.472%20120.329V89.4164C199.472%2083.3271%20198.272%2077.2974%20195.942%2071.6716C193.612%2066.0457%20190.196%2060.934%20185.89%2056.6282C181.584%2052.3224%20176.473%2048.9068%20170.847%2046.5765C165.221%2044.2463%20159.191%2043.0469%20153.102%2043.0469C140.804%2043.0469%20129.01%2047.9322%20120.314%2056.6282C111.618%2065.3242%20106.732%2077.1185%20106.732%2089.4164V120.329H127.341V89.4164C127.341%2082.5842%20130.055%2076.0319%20134.886%2071.2008C139.717%2066.3696%20146.27%2063.6556%20153.102%2063.6556C156.485%2063.6556%20159.835%2064.3219%20162.96%2065.6165C166.086%2066.9111%20168.926%2068.8086%20171.318%2071.2007C173.71%2073.5929%20175.607%2076.4327%20176.902%2079.5582C178.197%2082.6836%20178.863%2086.0335%20178.863%2089.4164V120.329M127.341%20130.634H106.732V146.09H127.341M199.472%20130.634H178.863V146.09H199.472'%20fill='%23F1CA00'/%3e%3cg%20filter='url(%23filter0_d_3597_149757)'%3e%3cellipse%20cx='169.708'%20cy='113.765'%20rx='44.2029'%20ry='44.2029'%20fill='white'%20fill-opacity='0.85'/%3e%3cpath%20d='M241.707%20177.101L215.012%20150.405C214.309%20149.703%20213.483%20149.21%20212.606%20148.92C220.41%20139.391%20225.099%20127.21%20225.099%20113.934C225.099%2095.9054%20216.454%2079.891%20203.091%2069.8112C198.323%2066.217%20192.946%2063.3837%20187.149%2061.4707C181.707%2059.6808%20175.903%2058.6953%20169.867%2058.6953C165.678%2058.6953%20161.599%2059.1808%20157.678%2060.0649C152.635%2061.2026%20147.852%2063.0142%20143.432%2065.4272C135.272%2069.8837%20128.374%2076.3402%20123.367%2084.1373C121.403%2087.1953%20119.736%2090.4489%20118.403%2093.8765C115.975%20100.094%20114.635%20106.855%20114.635%20113.934C114.635%20144.442%20139.359%20169.166%20169.867%20169.166C183.142%20169.166%20195.323%20164.485%20204.852%20156.674C205.142%20157.55%20205.642%20158.384%20206.338%20159.079L233.033%20185.775C235.432%20188.174%20239.316%20188.174%20241.715%20185.775C244.113%20183.376%20244.113%20179.492%20241.715%20177.094L241.707%20177.101ZM169.859%20156.891C146.135%20156.891%20126.903%20137.659%20126.903%20113.934C126.903%20109.203%20127.678%20104.652%20129.091%20100.391C130.265%2096.8475%20131.888%2093.5141%20133.896%2090.4489C136.483%2086.4924%20139.707%2082.9924%20143.425%2080.0866C147.62%2076.804%20152.432%2074.2895%20157.671%2072.746C161.533%2071.6011%20165.628%2070.9779%20169.859%2070.9779C193.584%2070.9779%20212.816%2090.2098%20212.816%20113.934C212.816%20137.659%20193.584%20156.891%20169.859%20156.891Z'%20fill='%23B9E3F8'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_3597_149757'%20x='108.635'%20y='54.6953'%20width='140.879'%20height='140.875'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='2'/%3e%3cfeGaussianBlur%20stdDeviation='3'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_3597_149757'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_3597_149757'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_3597_149757'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",illuOneWiki="/assets/js/ode-explorer/illu-empty-search-wiki.svg",illuOneEmpty="/assets/js/ode-explorer/illu-empty-search.svg",illuNeoBlog="/assets/js/ode-explorer/illu-empty-search-blog2.svg",illuNeoCollaborativeWall="/assets/js/ode-explorer/illu-empty-search-collaborativewall2.svg",illuNeoCommunity="data:image/svg+xml,%3csvg%20width='250'%20height='195'%20viewBox='0%200%20250%20195'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3597_141038)'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3cpath%20d='M167.746%20130.552C172.704%20130.552%20176.962%20132.327%20180.519%20135.877C184.076%20139.427%20185.855%20143.677%20185.854%20148.625C185.854%20153.574%20184.076%20157.823%20180.519%20161.373C176.962%20164.923%20172.758%20166.698%20167.908%20166.698C163.057%20166.698%20158.799%20164.923%20155.135%20161.373C151.47%20157.823%20149.692%20153.52%20149.799%20148.464C149.799%20146.528%20150.23%20144.43%20151.093%20142.171L123.768%20122.484C118.487%20127.863%20112.127%20130.552%20104.69%20130.552C97.2522%20130.552%2090.8927%20127.917%2085.6111%20122.646C80.3295%20117.374%2077.6348%20110.974%2077.5271%20103.443C77.5271%20102.475%2077.6887%20101.077%2078.012%2099.2476L56.3468%2092.1477C54.6221%2093.6538%2052.6819%2094.4069%2050.5261%2094.4069C47.9391%2094.4069%2045.7833%2093.5463%2044.0587%2091.825C42.334%2090.1037%2041.4717%2087.9522%2041.4717%2085.3703C41.4717%2082.7884%2042.334%2080.6906%2044.0587%2079.0771C45.7833%2077.4635%2047.9391%2076.6028%2050.5261%2076.4952C52.6819%2076.4952%2054.5143%2077.1944%2056.0234%2078.5928C57.5325%2079.9912%2058.5564%2081.6586%2059.0953%2083.595L80.9224%2090.8565C83.1858%2086.4458%2086.4734%2082.9496%2090.785%2080.3677C95.0966%2077.7858%2099.7315%2076.4948%20104.69%2076.4948C110.295%2076.4948%20115.468%2078.1623%20120.211%2081.4971L152.386%2049.3856C150.661%2046.1582%20149.799%2043.1998%20149.799%2040.5105C149.799%2035.562%20151.577%2031.3127%20155.134%2027.7625C158.691%2024.2123%20162.949%2022.4373%20167.907%2022.4375C172.866%2022.4377%20177.069%2024.2127%20180.518%2027.7625C183.968%2031.3123%20185.746%2035.5616%20185.854%2040.5105C185.962%2045.4593%20184.183%2049.6548%20180.518%2053.0969C176.854%2056.539%20172.596%2058.314%20167.745%2058.4219C164.943%2058.4219%20161.979%2057.5075%20158.853%2055.6788L126.678%2087.9518C130.02%2092.6851%20131.69%2097.8488%20131.69%20103.443C131.69%20107.423%20130.774%20111.35%20128.942%20115.223L156.266%20134.748C159.823%20131.951%20163.65%20130.552%20167.746%20130.552V130.552Z'%20fill='%23823AA1'/%3e%3cg%20filter='url(%23filter0_d_3597_141038)'%3e%3cellipse%20cx='169.708'%20cy='113.765'%20rx='44.2029'%20ry='44.2029'%20fill='white'%20fill-opacity='0.85'/%3e%3cpath%20d='M241.707%20177.101L215.012%20150.405C214.309%20149.703%20213.483%20149.21%20212.606%20148.92C220.41%20139.391%20225.099%20127.21%20225.099%20113.934C225.099%2095.9054%20216.454%2079.891%20203.091%2069.8112C198.323%2066.217%20192.946%2063.3837%20187.149%2061.4707C181.707%2059.6808%20175.903%2058.6953%20169.867%2058.6953C165.678%2058.6953%20161.599%2059.1808%20157.678%2060.0649C152.635%2061.2026%20147.852%2063.0142%20143.432%2065.4272C135.272%2069.8837%20128.374%2076.3402%20123.367%2084.1373C121.403%2087.1953%20119.736%2090.4489%20118.403%2093.8765C115.975%20100.094%20114.635%20106.855%20114.635%20113.934C114.635%20144.442%20139.359%20169.166%20169.867%20169.166C183.142%20169.166%20195.323%20164.485%20204.852%20156.674C205.142%20157.55%20205.642%20158.384%20206.338%20159.079L233.033%20185.775C235.432%20188.174%20239.316%20188.174%20241.715%20185.775C244.113%20183.376%20244.113%20179.492%20241.715%20177.094L241.707%20177.101ZM169.859%20156.891C146.135%20156.891%20126.903%20137.659%20126.903%20113.934C126.903%20109.203%20127.678%20104.652%20129.091%20100.391C130.265%2096.8475%20131.888%2093.5141%20133.896%2090.4489C136.483%2086.4924%20139.707%2082.9924%20143.425%2080.0866C147.62%2076.804%20152.432%2074.2895%20157.671%2072.746C161.533%2071.6011%20165.628%2070.9779%20169.859%2070.9779C193.584%2070.9779%20212.816%2090.2098%20212.816%20113.934C212.816%20137.659%20193.584%20156.891%20169.859%20156.891Z'%20fill='%23B9E3F8'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_3597_141038'%20x='108.635'%20y='54.6953'%20width='140.879'%20height='140.875'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='2'/%3e%3cfeGaussianBlur%20stdDeviation='3'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_3597_141038'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_3597_141038'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_3597_141038'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",illuNeoExercizer="data:image/svg+xml,%3csvg%20width='250'%20height='195'%20viewBox='0%200%20250%20195'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3597_148718)'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3cpath%20d='M83.4104%20149.864L112.194%20135.472V111.738L83.4104%20124.138V149.864ZM78.5673%20115.516L108.965%20102.602L78.5673%2089.5493L48.3412%20102.773L78.5673%20115.516ZM160.349%20149.864L189.167%20135.472V111.738L160.384%20124.138L160.349%20149.864ZM155.506%20115.516L185.732%20102.773L155.472%2089.7211L125.074%20102.773L155.506%20115.516ZM121.88%2093.568L150.663%2081.2028V61.3498L121.88%2073.715V93.568ZM117.037%2065.2311L150.114%2051.1141L117.037%2036.8598L83.9256%2051.1141L117.037%2065.2311ZM198.682%20104.113V135.472C198.694%20137.212%20198.231%20138.923%20197.342%20140.418C196.429%20141.946%20195.059%20143.147%20193.426%20143.853L159.8%20160.684C158.476%20161.382%20157.003%20161.746%20155.506%20161.746C154.01%20161.746%20152.536%20161.382%20151.213%20160.684L117.586%20143.853C117.379%20143.822%20117.187%20143.726%20117.037%20143.578C116.881%20143.717%20116.692%20143.812%20116.487%20143.853L82.8608%20160.684C81.5508%20161.417%2080.068%20161.784%2078.5673%20161.748C77.0983%20161.794%2075.6461%20161.425%2074.3769%20160.684L40.7504%20143.853C39.1325%20143.137%2037.7764%20141.937%2036.8691%20140.418C35.9651%20138.922%2035.4568%20137.22%2035.3921%20135.472V104.113C35.3757%20102.237%2035.9395%20100.401%2037.0064%2098.8576C38.051%2097.299%2039.55%2096.0997%2041.2999%2095.4228L73.8617%2081.4433V51.3889C73.8545%2049.5056%2074.3966%2047.6611%2075.4214%2046.0811C76.4463%2044.5011%2077.9095%2043.2541%2079.6321%2042.4928L113.259%2028.1011C114.45%2027.581%20115.737%2027.3125%20117.037%2027.3125C118.337%2027.3125%20119.623%2027.581%20120.815%2028.1011L154.442%2042.4928C156.151%2043.2379%20157.633%2044.4231%20158.735%2045.9276C159.819%2047.5145%20160.383%2049.3988%20160.349%2051.3202V81.3059L192.911%2095.2854C194.661%2095.9623%20196.16%2097.1616%20197.205%2098.7202C198.26%20100.263%20198.779%20102.109%20198.682%20103.975V104.113Z'%20fill='%23823AA1'/%3e%3cg%20filter='url(%23filter0_d_3597_148718)'%3e%3cellipse%20cx='169.707'%20cy='113.765'%20rx='44.2029'%20ry='44.2029'%20fill='white'%20fill-opacity='0.85'/%3e%3cpath%20d='M241.707%20177.101L215.011%20150.405C214.308%20149.703%20213.482%20149.21%20212.605%20148.92C220.41%20139.391%20225.098%20127.21%20225.098%20113.934C225.098%2095.9054%20216.453%2079.891%20203.091%2069.8112C198.323%2066.217%20192.946%2063.3837%20187.149%2061.4707C181.707%2059.6808%20175.903%2058.6953%20169.866%2058.6953C165.678%2058.6953%20161.598%2059.1808%20157.678%2060.0649C152.634%2061.2026%20147.852%2063.0142%20143.432%2065.4272C135.272%2069.8837%20128.374%2076.3402%20123.366%2084.1373C121.403%2087.1953%20119.736%2090.4489%20118.403%2093.8765C115.975%20100.094%20114.634%20106.855%20114.634%20113.934C114.634%20144.442%20139.359%20169.166%20169.866%20169.166C183.142%20169.166%20195.323%20164.485%20204.852%20156.674C205.142%20157.55%20205.642%20158.384%20206.337%20159.079L233.033%20185.775C235.432%20188.174%20239.316%20188.174%20241.714%20185.775C244.113%20183.376%20244.113%20179.492%20241.714%20177.094L241.707%20177.101ZM169.859%20156.891C146.134%20156.891%20126.903%20137.659%20126.903%20113.934C126.903%20109.203%20127.678%20104.652%20129.091%20100.391C130.265%2096.8475%20131.888%2093.5141%20133.895%2090.4489C136.482%2086.4924%20139.707%2082.9924%20143.424%2080.0866C147.62%2076.804%20152.432%2074.2895%20157.671%2072.746C161.533%2071.6011%20165.627%2070.9779%20169.859%2070.9779C193.584%2070.9779%20212.816%2090.2098%20212.816%20113.934C212.816%20137.659%20193.584%20156.891%20169.859%20156.891Z'%20fill='%23B9E3F8'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_3597_148718'%20x='108.634'%20y='54.6953'%20width='140.879'%20height='140.875'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='2'/%3e%3cfeGaussianBlur%20stdDeviation='3'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_3597_148718'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_3597_148718'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_3597_148718'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",illuNeoFormulaire="/assets/js/ode-explorer/illu-empty-search-formulaire2.svg",illuNeoForum="/assets/js/ode-explorer/illu-empty-search-forum2.svg",illuNeoHomeworks="/assets/js/ode-explorer/illu-empty-search-homeworks2.svg",illuNeoMagneto="data:image/svg+xml,%3csvg%20width='250'%20height='195'%20viewBox='0%200%20250%20195'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_3597_141030)'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3cpath%20d='M127.341%20120.329V89.4164C127.341%2077.1185%20122.455%2065.3242%20113.759%2056.6282C105.063%2047.9322%2093.2691%2043.0469%2080.9711%2043.0469C68.6731%2043.0469%2056.8789%2047.9322%2048.1829%2056.6282C39.4869%2065.3242%2034.6016%2077.1185%2034.6016%2089.4164L34.6016%20120.329H55.2103V89.4164C55.2103%2082.5842%2057.9243%2076.0319%2062.7554%2071.2008C67.5865%2066.3696%2074.1389%2063.6556%2080.9711%2063.6556C84.3541%2063.6556%2087.7039%2064.3219%2090.8294%2065.6165C93.9548%2066.9111%2096.7947%2068.8086%2099.1868%2071.2007C101.579%2073.5929%20103.476%2076.4327%20104.771%2079.5582C106.066%2082.6836%20106.732%2086.0335%20106.732%2089.4164V120.329M55.2103%20130.634H34.6016V146.09H55.2103M127.341%20130.634H106.732V146.09H127.341'%20fill='%23ECBE30'/%3e%3cpath%20d='M199.472%20120.329V89.4164C199.472%2083.3271%20198.272%2077.2974%20195.942%2071.6716C193.612%2066.0457%20190.196%2060.934%20185.89%2056.6282C181.584%2052.3224%20176.473%2048.9068%20170.847%2046.5765C165.221%2044.2463%20159.191%2043.0469%20153.102%2043.0469C140.804%2043.0469%20129.01%2047.9322%20120.314%2056.6282C111.618%2065.3242%20106.732%2077.1185%20106.732%2089.4164V120.329H127.341V89.4164C127.341%2082.5842%20130.055%2076.0319%20134.886%2071.2008C139.717%2066.3696%20146.27%2063.6556%20153.102%2063.6556C156.485%2063.6556%20159.835%2064.3219%20162.96%2065.6165C166.086%2066.9111%20168.926%2068.8086%20171.318%2071.2007C173.71%2073.5929%20175.607%2076.4327%20176.902%2079.5582C178.197%2082.6836%20178.863%2086.0335%20178.863%2089.4164V120.329M127.341%20130.634H106.732V146.09H127.341M199.472%20130.634H178.863V146.09H199.472'%20fill='%23ECBE30'/%3e%3cg%20filter='url(%23filter0_d_3597_141030)'%3e%3cellipse%20cx='169.708'%20cy='113.765'%20rx='44.2029'%20ry='44.2029'%20fill='white'%20fill-opacity='0.85'/%3e%3cpath%20d='M241.707%20177.101L215.012%20150.405C214.309%20149.703%20213.483%20149.21%20212.606%20148.92C220.41%20139.391%20225.099%20127.21%20225.099%20113.934C225.099%2095.9054%20216.454%2079.891%20203.091%2069.8112C198.323%2066.217%20192.946%2063.3837%20187.149%2061.4707C181.707%2059.6808%20175.903%2058.6953%20169.867%2058.6953C165.678%2058.6953%20161.599%2059.1808%20157.678%2060.0649C152.635%2061.2026%20147.852%2063.0142%20143.432%2065.4272C135.272%2069.8837%20128.374%2076.3402%20123.367%2084.1373C121.403%2087.1953%20119.736%2090.4489%20118.403%2093.8765C115.975%20100.094%20114.635%20106.855%20114.635%20113.934C114.635%20144.442%20139.359%20169.166%20169.867%20169.166C183.142%20169.166%20195.323%20164.485%20204.852%20156.674C205.142%20157.55%20205.642%20158.384%20206.338%20159.079L233.033%20185.775C235.432%20188.174%20239.316%20188.174%20241.715%20185.775C244.113%20183.376%20244.113%20179.492%20241.715%20177.094L241.707%20177.101ZM169.859%20156.891C146.135%20156.891%20126.903%20137.659%20126.903%20113.934C126.903%20109.203%20127.678%20104.652%20129.091%20100.391C130.265%2096.8475%20131.888%2093.5141%20133.896%2090.4489C136.483%2086.4924%20139.707%2082.9924%20143.425%2080.0866C147.62%2076.804%20152.432%2074.2895%20157.671%2072.746C161.533%2071.6011%20165.628%2070.9779%20169.859%2070.9779C193.584%2070.9779%20212.816%2090.2098%20212.816%20113.934C212.816%20137.659%20193.584%20156.891%20169.859%20156.891Z'%20fill='%23B9E3F8'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_3597_141030'%20x='108.635'%20y='54.6953'%20width='140.879'%20height='140.875'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'/%3e%3cfeOffset%20dy='2'/%3e%3cfeGaussianBlur%20stdDeviation='3'/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.15%200'/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_3597_141030'/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_3597_141030'%20result='shape'/%3e%3c/filter%3e%3cclipPath%20id='clip0_3597_141030'%3e%3crect%20width='250'%20height='194.203'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",illuNeoWiki="/assets/js/ode-explorer/illu-empty-search-wiki2.svg",illuNeoEmpty="/assets/js/ode-explorer/illu-empty-search2.svg",emptyScreenMapping={one:{blog:illuOneBlog,wiki:illuOneWiki,empty:illuOneEmpty,"collaborative-wall":illuOneCollaborativeWall,community:illuOneCommunity,exercizer:illuOneExercizer,formulaire:illuOneFormulaire,forum:illuOneForum,homeworks:illuOneHomeworks,magneto:illuOneMagneto},neo:{blog:illuNeoBlog,wiki:illuNeoWiki,empty:illuNeoEmpty,"collaborative-wall":illuNeoCollaborativeWall,community:illuNeoCommunity,exercizer:illuNeoExercizer,formulaire:illuNeoFormulaire,forum:illuNeoForum,homeworks:illuNeoHomeworks,magneto:illuNeoMagneto}},InternalLinker=({appCode:e0,defaultAppCode:_e,defaultResourceId:i0,onChange:r0,onSelect:t0,multiple:n0=!0,resourceList:s0,applicationList:o0,showApplicationSelector:a0=!0,searchFilter:f0,disableApplicationSelector:l0=!1,resourceFilter:u0,onSearch:A0,hasMoreResources:c0,onLoadMore:k0,loadMoreLabel:d0})=>{const{t:h0}=useTranslation(),{theme:b0}=useEdificeTheme(),{resourceApplications:p0,loadResources:m0}=useResourceSearch(e0),[g0,v0]=reactExports.useState(),[x0,w0]=reactExports.useState(),[_0,y0]=reactExports.useState(),S0=useDebounce(_0||"",500),[B0,I0]=reactExports.useState([]),T0=reactExports.useCallback((Z0,N0)=>{var Q0,z0,K0;if(!N0)return!0;const H0=(N0==null?void 0:N0.toLowerCase())||"";return((Q0=Z0.name)==null?void 0:Q0.toLowerCase().includes(H0))||((z0=Z0.creatorName)==null?void 0:z0.toLowerCase().includes(H0))||((K0=Z0.description)==null?void 0:K0.toLowerCase().includes(H0))},[]),R0=reactExports.useCallback(Z0=>Z0.sort((N0,Q0)=>N0.modifiedAt<Q0.modifiedAt?1:-1),[]),E0=reactExports.useCallback(Z0=>{async function N0(){if(A0){try{I0(await A0(Z0||"",x0))}catch{I0([])}return}if(s0){let Q0=s0.filter(z0=>T0(z0,Z0));u0&&(Q0=Q0.filter(u0)),I0(R0(Q0));return}else if(x0)try{let Q0=(await m0({application:x0.application,search:Z0,types:[x0.application],filters:{},pagination:{startIdx:0,pageSize:300}})).filter(z0=>T0(z0,Z0));u0&&(Q0=Q0.filter(u0)),I0(R0(Q0));return}catch{}I0([])}N0()},[A0,m0,x0,T0,R0,s0,u0]),[C0,G0]=reactExports.useState([]),F0=Z0=>{r0==null||r0(Z0),w0(Z0)},M0=Z0=>{const N0=Z0.target.value;y0(N0.toString())},j0=reactExports.useCallback(Z0=>{E0(_0),Z0.stopPropagation(),Z0.preventDefault()},[E0,_0]),D0=reactExports.useCallback(Z0=>C0.findIndex(N0=>N0.assetId===Z0),[C0]),$0=reactExports.useCallback(Z0=>{G0(n0?N0=>[...N0,Z0]:[Z0])},[G0,n0]),X0=reactExports.useCallback(Z0=>{const N0=D0(Z0.assetId);N0<0?$0(Z0):G0(C0.filter((Q0,z0)=>z0!==N0))},[D0,$0,C0]);return reactExports.useEffect(()=>{(async()=>{if(o0){v0(o0.sort((z0,K0)=>z0.displayName.localeCompare(K0.displayName)));return}const Z0=p0.map(z0=>odeServices.session().getWebApp(z0)),N0=await Promise.all(Z0),Q0=p0.map((z0,K0)=>{var H0;let J0=((H0=N0[K0])==null?void 0:H0.displayName)??z0;return z0==="exercizer"?J0="bbm.linker.int.app.exercizer":z0==="formulaire"&&(J0="bbm.linker.int.app.forms"),{application:z0,displayName:h0(J0??z0),icon:jsxRuntimeExports.jsx(AppIcon,{app:N0[K0],size:"24"})}}).sort((z0,K0)=>z0.displayName.localeCompare(K0.displayName));v0(Q0)})()},[p0,h0,o0]),reactExports.useEffect(()=>{E0(S0)},[E0,S0]),reactExports.useEffect(()=>{t0==null||t0(C0)},[C0]),reactExports.useEffect(()=>{var Z0;const N0=_e??((o0==null?void 0:o0.length)===1&&((Z0=o0==null?void 0:o0[0])==null?void 0:Z0.application));if(N0){const Q0=g0==null?void 0:g0.find(z0=>N0===z0.application);w0(Q0),E0("")}},[g0,_e]),reactExports.useEffect(()=>{if(i0&&D0(i0)<0){const Z0=B0==null?void 0:B0.find(N0=>i0===N0.assetId);Z0&&$0(Z0)}},[B0]),jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column flex-fill overflow-hidden",children:[jsxRuntimeExports.jsxs("div",{className:"search d-flex bg-light rounded-top border border-bottom-0",children:[a0&&jsxRuntimeExports.jsx("div",{className:"flex-shrink-1 px-8 py-12 border-end",children:jsxRuntimeExports.jsxs(Dropdown,{overflow:!0,children:[jsxRuntimeExports.jsx(Dropdown.Trigger,{icon:jsxRuntimeExports.jsx("div",{className:"pe-8",children:(x0==null?void 0:x0.icon)||jsxRuntimeExports.jsx(SvgIconApplications,{})}),label:jsxRuntimeExports.jsxs("span",{className:"d-md-inline d-sm-none",children:[" ",h0((x0==null?void 0:x0.displayName)||"bbm.linker.int.choose")]}),variant:"ghost",size:"md",disabled:l0}),jsxRuntimeExports.jsx(Dropdown.Menu,{children:g0==null?void 0:g0.map(Z0=>jsxRuntimeExports.jsx(Dropdown.Item,{icon:Z0.icon,onClick:()=>F0(Z0),children:Z0.displayName},Z0.application))})]})}),!a0&&f0&&jsxRuntimeExports.jsx("div",{className:"flex-shrink-1 px-8 py-12 border-end align-self-center",children:f0}),jsxRuntimeExports.jsx("div",{className:"flex-grow-1 align-self-center",children:jsxRuntimeExports.jsx("form",{className:"gap-16 d-flex w-100 align-items-center px-16 py-8",onSubmit:j0,children:jsxRuntimeExports.jsx(SearchBar,{isVariant:!0,placeholder:h0("search"),size:"lg",className:"w-100",disabled:!x0,onChange:M0})})})]}),jsxRuntimeExports.jsxs("div",{className:"internal-linker flex-grow-1 w-100 rounded-bottom border gap-0 overflow-auto",children:[x0&&B0&&B0.length>0&&jsxRuntimeExports.jsxs("div",{children:[B0.map(Z0=>{const N0=C0.findIndex(Q0=>Q0.assetId===Z0.assetId)>=0;return jsxRuntimeExports.jsx(LinkerCard,{doc:Z0,isSelected:N0,onClick:()=>X0(Z0)},Z0.path)}),c0&&jsxRuntimeExports.jsx("div",{className:"d-grid gap-2 col-4 mx-auto my-24",children:jsxRuntimeExports.jsx(Button,{type:"button",color:"secondary",variant:"filled",onClick:k0,children:d0??h0("bbm.linker.see.more")})})]}),x0&&B0&&B0.length<=0&&jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-center mt-16",children:jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:emptyScreenMapping[(b0==null?void 0:b0.bootstrapVersion)??"one"][x0==null?void 0:x0.application],text:h0("bbm.linker.int.notfound"),className:"mt-16"})}),!x0&&jsxRuntimeExports.jsx("div",{className:"d-flex justify-content-center mt-32",children:jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:emptyScreenMapping[(b0==null?void 0:b0.bootstrapVersion)??"one"].empty,text:h0("bbm.linker.int.empty"),className:"mt-32"})})]})]})},InternalLink=({target:e0,resourceId:_e,appPrefix:i0})=>{const{t:r0}=useTranslation(),{setResult:t0,setResultCounter:n0,appCode:s0,multiple:o0}=useMediaLibraryContext(),[a0,f0]=useToggle(e0==="_blank"),[l0,u0]=reactExports.useState([]),A0=c0=>{u0(c0)};return reactExports.useEffect(()=>{t0({target:a0?"_blank":void 0,resources:l0}),l0&&l0.length?n0(l0.length):n0(void 0)},[a0,l0]),jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column flex-fill gap-16 overflow-hidden",children:[jsxRuntimeExports.jsx(InternalLinker,{appCode:s0,defaultAppCode:i0,defaultResourceId:_e,onSelect:A0,multiple:o0}),jsxRuntimeExports.jsx(Checkbox,{className:"align-items-center",checked:a0,label:r0("bbm.linker.open.tab"),onChange:f0})]})},illuNoContentInFolder="/assets/js/ode-explorer/illu-no-content-in-folder.svg",illuNoContentInFolder$1=Object.freeze(Object.defineProperty({__proto__:null,default:illuNoContentInFolder},Symbol.toStringTag,{value:"Module"}));function useNextcloudSearch(e0,_e,i0){var r0;const[t0,n0]=reactExports.useState({id:e0,name:_e,section:!0}),s0=reactExports.useCallback((c0,k0,d0)=>{n0(h0=>{const b0=findNodeById$1(h0,c0);if(!b0)return h0;const p0=k0.map(m0=>{var g0;const v0=(g0=b0.children)==null?void 0:g0.find(x0=>x0.id===m0.path);return v0?{...v0,name:m0.name}:{id:m0.path,name:m0.name}});return modifyNode$1(h0,m0=>m0.id===b0.id?{...m0,children:p0,files:d0}:m0)})},[]),o0=useQueryClient(),a0=useQuery({queryKey:["nextcloud","oauth2-status",i0],queryFn:()=>odeServices.nextcloud().getOauth2Status(i0),enabled:!!i0}),f0=!((r0=a0.data)!=null&&r0.connected),[l0,u0]=reactExports.useState(null),A0=reactExports.useCallback(async c0=>{if(!i0)return;const k0=c0===e0?void 0:c0;try{const d0=await o0.fetchQuery({queryKey:["nextcloud","documents",i0,k0??"/"],queryFn:()=>odeServices.nextcloud().listDocuments(i0,k0),staleTime:6e4}),h0=[],b0=[],p0=k0??"/";d0.filter(m0=>m0.path!==p0).forEach(m0=>{m0.isFolder?h0.push(m0):b0.push(m0)}),u0(null),s0(c0,h0,b0)}catch(d0){u0(d0)}},[e0,i0,o0,s0]);return{root:t0,needsAuth:f0,isCheckingAuth:a0.isLoading,isAuthError:a0.isError,refetchAuthStatus:a0.refetch,loadContent:A0,loadError:l0}}const roleMappings={csv:{icon:".CSV",color:"bg-orange-200"},xls:{icon:".XLS",color:"bg-green-200"},doc:{icon:".DOC",color:"bg-blue-200"},txt:{icon:".TXT",color:"bg-blue-200"},pdf:{icon:".PDF",color:"bg-red-200"},audio:{icon:jsxRuntimeExports.jsx(SvgIconMic,{width:22,height:22}),color:"bg-red-200"},ppt:{icon:".PPT",color:"bg-red-200"},img:{icon:jsxRuntimeExports.jsx(SvgIconLandscape,{width:22,height:22}),color:"bg-green-200"},video:{icon:jsxRuntimeExports.jsx(SvgIconVideo,{width:22,height:22}),color:"bg-purple-200"},zip:{icon:".ZIP",color:"bg-gray-300"},md:{icon:".MD",color:"bg-blue-200"},unknown:{icon:jsxRuntimeExports.jsx(SvgIconTextPage,{width:22,height:22}),color:"bg-gray-300"}};function getRoleMap(e0,_e,i0){return _e!==void 0||i0!==void 0?{icon:_e||jsxRuntimeExports.jsx(SvgIconTextPage,{width:22,height:22}),color:i0||"bg-gray-300",hasShadow:!1}:roleMappings[e0]??roleMappings.unknown}const NextcloudFileCard=({doc:e0,userId:_e,isClickable:i0=!0,isSelectable:r0=!1,isSelected:t0=!1,onClick:n0,className:s0,onSelect:o0,isFocused:a0,app:f0,customIcon:l0,customColor:u0})=>{const A0=reactExports.useRef(null),c0=DocumentHelper.role(e0.contentType,!1),k0=getRoleMap(c0??"unknown",l0,u0),d0=clsx("file position-relative rounded",(k0==null?void 0:k0.color)??"bg-yellow-200"),h0=c0==="img"?odeServices.nextcloud().getFileUrl(_e,e0):null,b0=useThumbnail(h0,{ref:A0}),p0=b0&&{backgroundImage:`url(${h0})`,backgroundSize:"cover"};return jsxRuntimeExports.jsx(Card,{className:clsx("card-file",s0),isClickable:i0,isSelectable:r0,isSelected:t0,onClick:n0,app:f0,isFocused:a0,onSelect:o0,children:jsxRuntimeExports.jsxs(Card.Body,{space:"8",children:[jsxRuntimeExports.jsx("div",{ref:A0,className:d0,style:{aspectRatio:"16/10",...p0},children:c0!=="img"||!b0?jsxRuntimeExports.jsx(FileIcon,{type:c0,roleMap:k0}):null}),jsxRuntimeExports.jsxs("div",{className:"mt-4",children:[jsxRuntimeExports.jsx(Card.Text,{children:e0.name}),jsxRuntimeExports.jsx(Card.Text,{className:"text-black-50",children:e0==null?void 0:e0.ownerDisplayName})]})]})})},ROOT_ID="root";function compare(e0,_e){return e0===_e?0:e0===void 0?-1:_e===void 0?1:e0.localeCompare(_e)}const Nextcloud$1=({onSelect:e0,multiple:_e=!0,roles:i0,className:r0})=>{const{t:t0}=useTranslation(),{user:n0}=useUser(),s0=useToast(),{root:o0,needsAuth:a0,isCheckingAuth:f0,isAuthError:l0,refetchAuthStatus:u0,loadContent:A0,loadError:c0}=useNextcloudSearch(ROOT_ID,t0("nextcloud"),n0==null?void 0:n0.userId),k0=reactExports.useRef(null),[d0,h0]=reactExports.useState(ROOT_ID),b0=findNodeById$1(o0,d0)??o0,[p0,m0]=reactExports.useState(void 0),[g0,v0]=reactExports.useState(["modified","desc"]),[x0,w0]=reactExports.useState([]),_0=reactExports.useCallback(C0=>{h0(C0),A0(C0)},[A0]);reactExports.useEffect(()=>{a0||A0(ROOT_ID)},[A0,a0]);const y0=reactExports.useMemo(()=>{if(!b0.files)return;const C0=j0=>{if(!i0)return!0;const D0=DocumentHelper.role(j0.contentType,!1);return Array.isArray(i0)?i0.includes(D0):i0===D0},G0=p0==null?void 0:p0.toLowerCase(),F0=b0.files.filter(j0=>(!G0||j0.name.toLowerCase().includes(G0))&&C0(j0));let M0;return g0[0]==="name"?M0=g0[1]==="asc"?(j0,D0)=>compare(j0.name,D0.name):(j0,D0)=>compare(D0.name,j0.name):M0=(j0,D0)=>compare(D0.lastModified,j0.lastModified),F0.sort(M0)},[b0,p0,g0,i0]),S0=reactExports.useMemo(()=>new Set(x0.map(C0=>C0.path)),[x0]),B0=reactExports.useCallback(C0=>{m0(C0.target.value)},[m0]);function I0(){return g0[0]==="name"?g0[1]==="asc"?t0("sort.order.alpha.asc"):t0("sort.order.alpha.desc"):t0("sort.order.modify.desc")}function T0(C0){let G0=[...x0];_e?G0.some(F0=>F0.path===C0.path)?G0=G0.filter(F0=>F0.path!==C0.path):G0=[...G0,C0]:G0=[C0],w0(G0),e0(G0)}const R0=clsx("workspace flex-grow-1 gap-0",r0),E0=()=>{k0.current=window.open(`${window.location.origin}/nextcloud/user/oauth2/init`,"","popup, height=600, width=400"),k0.current||s0.error(t0("nextcloud.auth.popupBlocked"))};return reactExports.useEffect(()=>{function C0(G0){var F0;G0.origin!==window.location.origin||((F0=G0.data)==null?void 0:F0.type)!=="nextcloud-connected"||(k0.current&&!k0.current.closed&&k0.current.close(),u0())}return window.addEventListener("message",C0),()=>window.removeEventListener("message",C0)},[u0]),f0?jsxRuntimeExports.jsx(LoadingScreen,{}):l0?jsxRuntimeExports.jsxs(Flex,{direction:"column",gap:"12",className:"h-full w-100",justify:"center",align:"center",children:[jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuError,title:t0("nextcloud.error.title"),text:t0("nextcloud.error.description")}),jsxRuntimeExports.jsx(Button,{onClick:()=>u0(),children:t0("retry")})]}):a0?jsxRuntimeExports.jsxs(Flex,{direction:"column",gap:"12",className:"h-full w-100",justify:"center",align:"center",children:[jsxRuntimeExports.jsxs(Flex,{direction:"column",gap:"8",justify:"center",align:"center",children:[jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuNoContentInFolder}),jsxRuntimeExports.jsx("h2",{className:"h2 text-secondary mb-8",children:t0("nextcloud.auth.title")}),jsxRuntimeExports.jsx("div",{className:"text",children:t0("nextcloud.auth.description")})]}),jsxRuntimeExports.jsx(Button,{onClick:E0,children:t0("nextcloud.auth.connect")})]}):jsxRuntimeExports.jsxs(Grid,{className:R0,children:[jsxRuntimeExports.jsx(Grid.Col,{sm:"12",md:"3",xl:"4",className:"workspace-folders p-12 pt-0 gap-12",children:jsxRuntimeExports.jsx("div",{style:{position:"sticky",top:0,paddingTop:"1.2rem"},children:jsxRuntimeExports.jsx(Tree,{nodes:o0,selectedNodeId:d0,showIcon:!0,onTreeItemClick:_0,onTreeItemUnfold:_0})})}),jsxRuntimeExports.jsx(Grid.Col,{sm:"12",md:"5",xl:"8",children:jsxRuntimeExports.jsxs(Grid,{className:"flex-grow-1 gap-0",children:[jsxRuntimeExports.jsxs(Grid.Col,{sm:"4",md:"8",xl:"12",children:[jsxRuntimeExports.jsx("div",{className:"workspace-search px-16 py-8 ",children:jsxRuntimeExports.jsx(SearchBar,{isVariant:!0,className:"gap-16",onChange:B0})}),jsxRuntimeExports.jsxs(Flex,{className:"px-8 py-4",align:"center",justify:"end",children:[jsxRuntimeExports.jsx("small",{className:"text-muted",children:t0("workspace.search.order")}),jsxRuntimeExports.jsxs(Dropdown,{children:[jsxRuntimeExports.jsx(Dropdown.Trigger,{size:"sm",label:I0(),variant:"ghost"}),jsxRuntimeExports.jsxs(Dropdown.Menu,{children:[jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortTime,{}),onClick:()=>v0(["modified","desc"]),children:t0("sort.order.modify.desc")}),jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortAscendingLetters,{}),onClick:()=>v0(["name","asc"]),children:t0("sort.order.alpha.asc")}),jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortDescendingLetters,{}),onClick:()=>v0(["name","desc"]),children:t0("sort.order.alpha.desc")})]})]})]})]}),jsxRuntimeExports.jsx(Grid.Col,{sm:"4",md:"8",xl:"12",className:"p-8 gap-8",children:c0?jsxRuntimeExports.jsxs(Flex,{direction:"column",gap:"12",className:"h-full w-100",justify:"center",align:"center",children:[jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuError,title:t0("nextcloud.error.title"),text:t0("nextcloud.error.description")}),jsxRuntimeExports.jsx(Button,{onClick:()=>A0(d0),children:t0("retry")})]}):y0?y0.length!==0?jsxRuntimeExports.jsx("div",{className:"grid grid-workspace",children:y0.map(C0=>{const G0=S0.has(C0.path);return jsxRuntimeExports.jsx(NextcloudFileCard,{doc:C0,userId:n0.userId,isSelected:G0,onClick:()=>T0(C0)},C0.path)})}):jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuTrash,text:t0("workspace.empty.docSpace"),title:t0("explorer.emptyScreen.trash.title")}):jsxRuntimeExports.jsx(LoadingScreen,{})})]})})]})},Nextcloud=()=>{const{appCode:e0,visibility:_e,type:i0,setResultCounter:r0,setResult:t0,setPreSuccess:n0,multiple:s0}=useMediaLibraryContext(),{user:o0}=useUser();function a0(){switch(i0){case"image":return"img";case"audio":return"audio";case"video":return"video";default:return null}}function f0(l0){r0(l0.length),l0.length?(t0(l0),n0(()=>()=>o0!=null&&o0.userId?odeServices.nextcloud().copyDocumentToWorkspace(o0.userId,l0.map(u0=>u0.path),void 0,{application:e0,visibility:_e}):Promise.resolve([]))):(t0(),n0(void 0))}return jsxRuntimeExports.jsx(Nextcloud$1,{roles:a0(),onSelect:f0,multiple:s0,className:"border rounded overflow-y-auto"})};var uaParser={exports:{}};(function(e0,_e){(function(i0,r0){var t0="1.0.36",n0="",s0="?",o0="function",a0="undefined",f0="object",l0="string",u0="major",A0="model",c0="name",k0="type",d0="vendor",h0="version",b0="architecture",p0="console",m0="mobile",g0="tablet",v0="smarttv",x0="wearable",w0="embedded",_0=350,y0="Amazon",S0="Apple",B0="ASUS",I0="BlackBerry",T0="Browser",R0="Chrome",E0="Edge",C0="Firefox",G0="Google",F0="Huawei",M0="LG",j0="Microsoft",D0="Motorola",$0="Opera",X0="Samsung",Z0="Sharp",N0="Sony",Q0="Xiaomi",z0="Zebra",K0="Facebook",H0="Chromium OS",J0="Mac OS",Y0=function(U0,L0){var q0={};for(var r2 in U0)L0[r2]&&L0[r2].length%2===0?q0[r2]=L0[r2].concat(U0[r2]):q0[r2]=U0[r2];return q0},e2=function(U0){for(var L0={},q0=0;q0<U0.length;q0++)L0[U0[q0].toUpperCase()]=U0[q0];return L0},s2=function(U0,L0){return typeof U0===l0?u2(L0).indexOf(u2(U0))!==-1:!1},u2=function(U0){return U0.toLowerCase()},A2=function(U0){return typeof U0===l0?U0.replace(/[^\d\.]/g,n0).split(".")[0]:r0},k2=function(U0,L0){if(typeof U0===l0)return U0=U0.replace(/^\s\s*/,n0),typeof L0===a0?U0:U0.substring(0,_0)},b2=function(U0,L0){for(var q0=0,r2,f2,d2,a2,t2,E2;q0<L0.length&&!t2;){var O2=L0[q0],X2=L0[q0+1];for(r2=f2=0;r2<O2.length&&!t2&&O2[r2];)if(t2=O2[r2++].exec(U0),t2)for(d2=0;d2<X2.length;d2++)E2=t2[++f2],a2=X2[d2],typeof a2===f0&&a2.length>0?a2.length===2?typeof a2[1]==o0?this[a2[0]]=a2[1].call(this,E2):this[a2[0]]=a2[1]:a2.length===3?typeof a2[1]===o0&&!(a2[1].exec&&a2[1].test)?this[a2[0]]=E2?a2[1].call(this,E2,a2[2]):r0:this[a2[0]]=E2?E2.replace(a2[1],a2[2]):r0:a2.length===4&&(this[a2[0]]=E2?a2[3].call(this,E2.replace(a2[1],a2[2])):r0):this[a2]=E2||r0;q0+=2}},v2=function(U0,L0){for(var q0 in L0)if(typeof L0[q0]===f0&&L0[q0].length>0){for(var r2=0;r2<L0[q0].length;r2++)if(s2(L0[q0][r2],U0))return q0===s0?r0:q0}else if(s2(L0[q0],U0))return q0===s0?r0:q0;return U0},x2={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},p2={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},P0={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h0,[c0,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h0,[c0,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c0,h0],[/opios[\/ ]+([\w\.]+)/i],[h0,[c0,$0+" Mini"]],[/\bopr\/([\w\.]+)/i],[h0,[c0,$0]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c0,h0],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h0,[c0,"UC"+T0]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[h0,[c0,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h0,[c0,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h0,[c0,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h0,[c0,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h0,[c0,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c0,/(.+)/,"$1 Secure "+T0],h0],[/\bfocus\/([\w\.]+)/i],[h0,[c0,C0+" Focus"]],[/\bopt\/([\w\.]+)/i],[h0,[c0,$0+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h0,[c0,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h0,[c0,"Dolphin"]],[/coast\/([\w\.]+)/i],[h0,[c0,$0+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h0,[c0,"MIUI "+T0]],[/fxios\/([-\w\.]+)/i],[h0,[c0,C0]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c0,"360 "+T0]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[c0,/(.+)/,"$1 "+T0],h0],[/(comodo_dragon)\/([\w\.]+)/i],[[c0,/_/g," "],h0],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c0,h0],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[c0],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c0,K0],h0],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c0,h0],[/\bgsa\/([\w\.]+) .*safari\//i],[h0,[c0,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h0,[c0,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h0,[c0,R0+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c0,R0+" WebView"],h0],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h0,[c0,"Android "+T0]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c0,h0],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h0,[c0,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h0,c0],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c0,[h0,v2,x2]],[/(webkit|khtml)\/([\w\.]+)/i],[c0,h0],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c0,"Netscape"],h0],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h0,[c0,C0+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[c0,h0],[/(cobalt)\/([\w\.]+)/i],[c0,[h0,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[b0,"amd64"]],[/(ia32(?=;))/i],[[b0,u2]],[/((?:i[346]|x)86)[;\)]/i],[[b0,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[b0,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b0,"armhf"]],[/windows (ce|mobile); ppc;/i],[[b0,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[b0,/ower/,n0,u2]],[/(sun4\w)[;\)]/i],[[b0,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b0,u2]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[A0,[d0,X0],[k0,g0]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[A0,[d0,X0],[k0,m0]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[A0,[d0,S0],[k0,m0]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[A0,[d0,S0],[k0,g0]],[/(macintosh);/i],[A0,[d0,S0]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[A0,[d0,Z0],[k0,m0]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[A0,[d0,F0],[k0,g0]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[A0,[d0,F0],[k0,m0]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[A0,/_/g," "],[d0,Q0],[k0,m0]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[A0,/_/g," "],[d0,Q0],[k0,g0]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[A0,[d0,"OPPO"],[k0,m0]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[A0,[d0,"Vivo"],[k0,m0]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[A0,[d0,"Realme"],[k0,m0]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[A0,[d0,D0],[k0,m0]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[A0,[d0,D0],[k0,g0]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[A0,[d0,M0],[k0,g0]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[A0,[d0,M0],[k0,m0]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[A0,[d0,"Lenovo"],[k0,g0]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[A0,/_/g," "],[d0,"Nokia"],[k0,m0]],[/(pixel c)\b/i],[A0,[d0,G0],[k0,g0]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[A0,[d0,G0],[k0,m0]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[A0,[d0,N0],[k0,m0]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[A0,"Xperia Tablet"],[d0,N0],[k0,g0]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[A0,[d0,"OnePlus"],[k0,m0]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[A0,[d0,y0],[k0,g0]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[A0,/(.+)/g,"Fire Phone $1"],[d0,y0],[k0,m0]],[/(playbook);[-\w\),; ]+(rim)/i],[A0,d0,[k0,g0]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[A0,[d0,I0],[k0,m0]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[A0,[d0,B0],[k0,g0]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[A0,[d0,B0],[k0,m0]],[/(nexus 9)/i],[A0,[d0,"HTC"],[k0,g0]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d0,[A0,/_/g," "],[k0,m0]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[A0,[d0,"Acer"],[k0,g0]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[A0,[d0,"Meizu"],[k0,m0]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d0,A0,[k0,m0]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d0,A0,[k0,g0]],[/(surface duo)/i],[A0,[d0,j0],[k0,g0]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[A0,[d0,"Fairphone"],[k0,m0]],[/(u304aa)/i],[A0,[d0,"AT&T"],[k0,m0]],[/\bsie-(\w*)/i],[A0,[d0,"Siemens"],[k0,m0]],[/\b(rct\w+) b/i],[A0,[d0,"RCA"],[k0,g0]],[/\b(venue[\d ]{2,7}) b/i],[A0,[d0,"Dell"],[k0,g0]],[/\b(q(?:mv|ta)\w+) b/i],[A0,[d0,"Verizon"],[k0,g0]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[A0,[d0,"Barnes & Noble"],[k0,g0]],[/\b(tm\d{3}\w+) b/i],[A0,[d0,"NuVision"],[k0,g0]],[/\b(k88) b/i],[A0,[d0,"ZTE"],[k0,g0]],[/\b(nx\d{3}j) b/i],[A0,[d0,"ZTE"],[k0,m0]],[/\b(gen\d{3}) b.+49h/i],[A0,[d0,"Swiss"],[k0,m0]],[/\b(zur\d{3}) b/i],[A0,[d0,"Swiss"],[k0,g0]],[/\b((zeki)?tb.*\b) b/i],[A0,[d0,"Zeki"],[k0,g0]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d0,"Dragon Touch"],A0,[k0,g0]],[/\b(ns-?\w{0,9}) b/i],[A0,[d0,"Insignia"],[k0,g0]],[/\b((nxa|next)-?\w{0,9}) b/i],[A0,[d0,"NextBook"],[k0,g0]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d0,"Voice"],A0,[k0,m0]],[/\b(lvtel\-)?(v1[12]) b/i],[[d0,"LvTel"],A0,[k0,m0]],[/\b(ph-1) /i],[A0,[d0,"Essential"],[k0,m0]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[A0,[d0,"Envizen"],[k0,g0]],[/\b(trio[-\w\. ]+) b/i],[A0,[d0,"MachSpeed"],[k0,g0]],[/\btu_(1491) b/i],[A0,[d0,"Rotor"],[k0,g0]],[/(shield[\w ]+) b/i],[A0,[d0,"Nvidia"],[k0,g0]],[/(sprint) (\w+)/i],[d0,A0,[k0,m0]],[/(kin\.[onetw]{3})/i],[[A0,/\./g," "],[d0,j0],[k0,m0]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[A0,[d0,z0],[k0,g0]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[A0,[d0,z0],[k0,m0]],[/smart-tv.+(samsung)/i],[d0,[k0,v0]],[/hbbtv.+maple;(\d+)/i],[[A0,/^/,"SmartTV"],[d0,X0],[k0,v0]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d0,M0],[k0,v0]],[/(apple) ?tv/i],[d0,[A0,S0+" TV"],[k0,v0]],[/crkey/i],[[A0,R0+"cast"],[d0,G0],[k0,v0]],[/droid.+aft(\w+)( bui|\))/i],[A0,[d0,y0],[k0,v0]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[A0,[d0,Z0],[k0,v0]],[/(bravia[\w ]+)( bui|\))/i],[A0,[d0,N0],[k0,v0]],[/(mitv-\w{5}) bui/i],[A0,[d0,Q0],[k0,v0]],[/Hbbtv.*(technisat) (.*);/i],[d0,A0,[k0,v0]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d0,k2],[A0,k2],[k0,v0]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[k0,v0]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d0,A0,[k0,p0]],[/droid.+; (shield) bui/i],[A0,[d0,"Nvidia"],[k0,p0]],[/(playstation [345portablevi]+)/i],[A0,[d0,N0],[k0,p0]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[A0,[d0,j0],[k0,p0]],[/((pebble))app/i],[d0,A0,[k0,x0]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[A0,[d0,S0],[k0,x0]],[/droid.+; (glass) \d/i],[A0,[d0,G0],[k0,x0]],[/droid.+; (wt63?0{2,3})\)/i],[A0,[d0,z0],[k0,x0]],[/(quest( 2| pro)?)/i],[A0,[d0,K0],[k0,x0]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d0,[k0,w0]],[/(aeobc)\b/i],[A0,[d0,y0],[k0,w0]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[A0,[k0,m0]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[A0,[k0,g0]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[k0,g0]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[k0,m0]],[/(android[-\w\. ]{0,9});.+buil/i],[A0,[d0,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h0,[c0,E0+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h0,[c0,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c0,h0],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h0,c0]],os:[[/microsoft (windows) (vista|xp)/i],[c0,h0],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c0,[h0,v2,p2]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c0,"Windows"],[h0,v2,p2]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h0,/_/g,"."],[c0,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c0,J0],[h0,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h0,c0],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c0,h0],[/\(bb(10);/i],[h0,[c0,I0]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h0,[c0,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h0,[c0,C0+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h0,[c0,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h0,[c0,"watchOS"]],[/crkey\/([\d\.]+)/i],[h0,[c0,R0+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c0,H0],h0],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c0,h0],[/(sunos) ?([\w\.\d]*)/i],[[c0,"Solaris"],h0],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c0,h0]]},V0=function(U0,L0){if(typeof U0===f0&&(L0=U0,U0=r0),!(this instanceof V0))return new V0(U0,L0).getResult();var q0=typeof i0!==a0&&i0.navigator?i0.navigator:r0,r2=U0||(q0&&q0.userAgent?q0.userAgent:n0),f2=q0&&q0.userAgentData?q0.userAgentData:r0,d2=L0?Y0(P0,L0):P0,a2=q0&&q0.userAgent==r2;return this.getBrowser=function(){var t2={};return t2[c0]=r0,t2[h0]=r0,b2.call(t2,r2,d2.browser),t2[u0]=A2(t2[h0]),a2&&q0&&q0.brave&&typeof q0.brave.isBrave==o0&&(t2[c0]="Brave"),t2},this.getCPU=function(){var t2={};return t2[b0]=r0,b2.call(t2,r2,d2.cpu),t2},this.getDevice=function(){var t2={};return t2[d0]=r0,t2[A0]=r0,t2[k0]=r0,b2.call(t2,r2,d2.device),a2&&!t2[k0]&&f2&&f2.mobile&&(t2[k0]=m0),a2&&t2[A0]=="Macintosh"&&q0&&typeof q0.standalone!==a0&&q0.maxTouchPoints&&q0.maxTouchPoints>2&&(t2[A0]="iPad",t2[k0]=g0),t2},this.getEngine=function(){var t2={};return t2[c0]=r0,t2[h0]=r0,b2.call(t2,r2,d2.engine),t2},this.getOS=function(){var t2={};return t2[c0]=r0,t2[h0]=r0,b2.call(t2,r2,d2.os),a2&&!t2[c0]&&f2&&f2.platform!="Unknown"&&(t2[c0]=f2.platform.replace(/chrome os/i,H0).replace(/macos/i,J0)),t2},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r2},this.setUA=function(t2){return r2=typeof t2===l0&&t2.length>_0?k2(t2,_0):t2,this},this.setUA(r2),this};V0.VERSION=t0,V0.BROWSER=e2([c0,h0,u0]),V0.CPU=e2([b0]),V0.DEVICE=e2([A0,d0,k0,p0,m0,v0,g0,x0,w0]),V0.ENGINE=V0.OS=e2([c0,h0]),e0.exports&&(_e=e0.exports=V0),_e.UAParser=V0;var O0=typeof i0!==a0&&(i0.jQuery||i0.Zepto);if(O0&&!O0.ua){var _i=new V0;O0.ua=_i.getResult(),O0.ua.get=function(){return _i.getUA()},O0.ua.set=function(U0){_i.setUA(U0);var L0=_i.getResult();for(var q0 in L0)O0.ua[q0]=L0[q0]}}})(typeof window=="object"?window:commonjsGlobal$1)})(uaParser,uaParser.exports);var uaParserExports=uaParser.exports;function useBrowserInfo(e0){const _e=new uaParserExports.UAParser(e0),i0=_e.getOS(),r0=_e.getDevice(),t0=_e.getBrowser(),n0=r0.model??"",s0=n0.includes("iPhone"),o0=n0.includes("iPod"),a0=n0.includes("iPad");return{os:i0,device:r0,browser:t0,isIphone:s0,isIpod:o0,isIpad:a0}}const useUpload=(e0,_e="media-library")=>{const[i0,r0]=reactExports.useState({}),{browser:t0,device:n0}=useBrowserInfo(navigator.userAgent),{create:s0}=useWorkspaceFile(),{t:o0}=useTranslation(),a0=reactExports.useCallback(h0=>i0[s$1(h0)],[i0]),f0=(h0,b0)=>{r0(p0=>{const m0=s$1(h0);return{...p0,[m0]:b0}})},l0=h0=>{r0(b0=>{const p0=s$1(h0),{[p0]:m0,...g0}=b0;return g0})},u0=()=>{const h0=new Date;return`${h0.getFullYear()}-${String(h0.getMonth()+1).padStart(2,"0")}-${String(h0.getDate()).padStart(2,"0")} ${String(h0.getHours()).padStart(2,"0")}h${String(h0.getMinutes()).padStart(2,"0")} `+o0("bbm.video.recorder.defaultName")};async function A0(h0,b0){f0(h0,"loading");try{let p0;return _e==="media-library"&&h0.type.includes("video")?p0=await k0(h0,{filename:h0.name,...b0}):p0=await s0(h0,{application:_e,visibility:e0}),f0(h0,"success"),p0}catch(p0){return console.error(p0),f0(h0,"error"),null}}async function c0(h0,b0){f0(h0,"loading");try{let p0;if(h0.type.includes("video"))p0=await k0(h0,b0);else throw new Error(ERROR_CODE.NOT_SUPPORTED);return f0(h0,"success"),p0}catch(p0){return console.error(p0),f0(h0,"error"),null}}const k0=async(h0,b0)=>{const p0={data:{device:n0.type,browser:{name:t0.name,version:t0.version},url:window.location.hostname,file:h0,filename:u0()??"filename",weight:h0.size},appCode:_e,captation:!(h0 instanceof File),duration:(b0==null?void 0:b0.duration)??0},m0=await odeServices.video().upload(p0);if(m0.state==="succeed")return{_id:m0.videoworkspaceid,file:m0.videoid,name:p0.data.filename,eType:"file",eParent:"",children:[],created:new Date,_shared:[],isShared:!1,owner:""};throw m0.state==="error"?new Error(m0.code||"Error while uploading video"):new Error("Video encoding is still running")};function d0(h0,b0,p0){return s$1(b0,s$1(h0)),A0(b0,p0)}return{getUploadStatus:a0,setUploadStatus:f0,clearUploadStatus:l0,uploadFile:A0,uploadAlternateFile:d0,uploadBlob:c0}},useUploadFiles=({handleOnChange:e0,visibility:_e,application:i0})=>{const[r0,t0]=reactExports.useState([]),n0=reactExports.useRef({}),[s0,o0]=reactExports.useState(void 0),{files:a0,deleteFile:f0,replaceFileAt:l0,inputRef:u0}=useDropzoneContext(),{remove:A0,createOrUpdate:c0}=useWorkspaceFile(),{getUploadStatus:k0,setUploadStatus:d0,clearUploadStatus:h0,uploadFile:b0,uploadAlternateFile:p0}=useUpload(_e,i0),m0=reactExports.useCallback(()=>{u0.current&&(u0.current.value="")},[u0]),g0=reactExports.useCallback(y0=>{y0.forEach(async(S0,B0)=>{if(S0==null)return;let I0,T0;if(S0.type.startsWith("image"))try{T0=await p$5.resizeImageFile(S0),I0=await p0(S0,T0),l0(B0,T0)}catch(R0){console.error(R0)}!I0&&!T0&&(I0=await b0(S0)),I0?(I0._id&&(n0.current[I0._id]={name:S0.name,lastModified:S0.lastModified}),t0(R0=>[...R0,I0])):m0()})},[p0,b0,l0]);reactExports.useEffect(()=>{let y0=0;const S0=a0.map(B0=>{if(y0>=5)return null;const I0=k0(B0);return I0==="loading"&&y0++,I0?null:B0});S0.forEach(B0=>B0&&d0(B0,"idle")),g0(S0)},[a0,r0,k0,d0,g0]),reactExports.useEffect(()=>{const y0=v0(a0,r0);e0(y0,{...n0.current})},[r0]);const v0=(y0,S0)=>{const B0=y0.reduce((I0,T0,R0)=>(T0.name in I0||(I0[T0.name]=R0),I0),{});return[...S0].sort((I0,T0)=>(B0[I0.name]??Number.MAX_SAFE_INTEGER)-(B0[T0.name]??Number.MAX_SAFE_INTEGER))};async function x0(y0){const S0=r0.find(B0=>B0.name===y0.name);S0&&(await A0(S0),h0(y0),S0._id&&delete n0.current[S0._id],t0(B0=>B0.filter(I0=>I0.name!==(S0==null?void 0:S0.name)))),f0(y0),m0()}async function w0({blob:y0,legend:S0,altText:B0}){if(s0)try{const I0=await c0({blob:y0,legend:S0,alt:B0,uri:_0(s0)});I0&&typeof I0=="object"&&t0(T0=>T0.map(R0=>R0._id===I0.file._id?{...I0.file,title:S0,alt:B0}:R0))}finally{o0(void 0)}}const _0=(y0,S0)=>{const B0=`/workspace/${y0!=null&&y0.public?"pub/":""}document/${y0==null?void 0:y0._id}`;return y0?S0?m$5(B0):B0:""};return{files:a0,getUploadStatus:k0,clearUploadStatus:h0,uploadedFiles:r0,editingImage:s0,setEditingImage:o0,getUrl:_0,updateImage:w0,uploadFile:b0,removeFile:x0}},SvgIconWand=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M10 0a1 1 0 0 1 1 1 1 1 0 0 0 1 1 1 1 0 1 1 0 2 1 1 0 0 0-1 1 1 1 0 1 1-2 0 1 1 0 0 0-1-1 1 1 0 0 1 0-2 1 1 0 0 0 1-1 1 1 0 0 1 1-1m9.914 2a2 2 0 0 0-2.828 0L1 18.086a2 2 0 0 0 0 2.828L3.086 23a2 2 0 0 0 2.828 0L22 6.914a2 2 0 0 0 0-2.828zm-3.75 3.75L18.5 3.414 20.586 5.5 18.25 7.836zM14.75 7.164 2.414 19.5 4.5 21.586 16.836 9.25zM21 13a1 1 0 1 0-2 0 1 1 0 0 1-1 1 1 1 0 1 0 0 2 1 1 0 0 1 1 1 1 1 0 1 0 2 0 1 1 0 0 1 1-1 1 1 0 1 0 0-2 1 1 0 0 1-1-1",clipRule:"evenodd"})]}),UploadCard=({item:e0,status:_e="idle",isClickable:i0=!1,isSelectable:r0=!1,onDelete:t0,onEdit:n0,onRetry:s0})=>{const{t:o0}=useTranslation(),{src:a0,name:f0,info:l0}=e0,u0=_e==="idle",A0=_e==="loading",c0=_e==="success",k0=l0==null?void 0:l0.type.startsWith("image"),d0={text:"",context:null,image:jsxRuntimeExports.jsx("img",{src:commonPlaceholder,alt:"",width:"48",height:"48"})},h0={error:{text:jsxRuntimeExports.jsx("strong",{children:jsxRuntimeExports.jsx("small",{className:"text-danger caption",children:o0("tiptap.upload.error")})}),context:jsxRuntimeExports.jsx(Button,{leftIcon:jsxRuntimeExports.jsx(SvgIconReset,{}),variant:"ghost",color:"tertiary",onClick:s0,children:o0("tiptap.upload.retry")}),image:jsxRuntimeExports.jsx(Image$1,{alt:"",src:`${commonPlaceholder}/common/image-status-error.svg`,objectFit:"cover"})},idle:d0,loading:{text:"",context:jsxRuntimeExports.jsx(Tooltip,{message:o0("tiptap.tooltip.upload.loading"),placement:"top",children:jsxRuntimeExports.jsx(Loading,{isLoading:!0,loadingPosition:"left",className:"text-secondary"})}),image:d0.image},warning:d0,success:{text:jsxRuntimeExports.jsxs("em",{children:[l0==null?void 0:l0.type," ",(l0==null?void 0:l0.weight)&&`- ${l0.weight}`]}),context:jsxRuntimeExports.jsx(Tooltip,{message:o0("tiptap.tooltip.upload.loaded"),placement:"top",children:jsxRuntimeExports.jsx(SvgIconSuccessOutline,{className:"text-success"})}),image:jsxRuntimeExports.jsx(Image$1,{alt:"",src:a0??"",width:"48",objectFit:"cover",className:"rounded",style:{aspectRatio:1/1}})},unknown:d0},b0=()=>k0&&jsxRuntimeExports.jsx(Tooltip,{message:o0("tiptap.tooltip.upload.edit"),placement:"top",children:jsxRuntimeExports.jsx(IconButton,{icon:jsxRuntimeExports.jsx(SvgIconWand,{}),variant:"ghost","aria-label":o0("tiptap.tooltip.upload.loading"),disabled:A0||!c0,onClick:n0,color:"secondary"})});return jsxRuntimeExports.jsx(Card,{isClickable:i0,isSelectable:r0,className:"card-upload",children:jsxRuntimeExports.jsxs(Card.Body,{children:[jsxRuntimeExports.jsx("div",{className:"card-image",children:h0[_e].image}),jsxRuntimeExports.jsxs("div",{className:"text-truncate",children:[jsxRuntimeExports.jsx(Card.Text,{children:f0}),jsxRuntimeExports.jsx(Card.Text,{className:"caption",children:h0[_e].text})]}),!u0&&jsxRuntimeExports.jsx("div",{className:"ms-auto",children:jsxRuntimeExports.jsxs("div",{className:"d-flex align-items-center gap-12",children:[h0[_e].context,!u0&&jsxRuntimeExports.jsx("div",{className:"vr"}),b0(),jsxRuntimeExports.jsx(Tooltip,{message:o0("tiptap.tooltip.upload.delete"),placement:"top",children:jsxRuntimeExports.jsx(IconButton,{icon:jsxRuntimeExports.jsx(SvgIconClose,{}),variant:"ghost","aria-label":o0("tiptap.tooltip.upload.delete"),color:"tertiary",onClick:t0})})]})})]})})},ImageEditor=reactExports.lazy(async()=>await __vitePreload(()=>Promise.resolve().then(()=>ImageEditor$2),void 0)),UploadFiles=({onFilesChange:e0,visibility:_e="protected"})=>{const{files:i0,uploadedFiles:r0,getUploadStatus:t0,uploadFile:n0,removeFile:s0,updateImage:o0,editingImage:a0,setEditingImage:f0,getUrl:l0}=useUploadFiles({handleOnChange:e0,application:"media-library",visibility:_e}),u0=reactExports.useRef(new Map);reactExports.useEffect(()=>{const k0=u0.current;return()=>{k0.forEach(d0=>URL.revokeObjectURL(d0)),k0.clear()}},[]);const A0=k0=>{const d0=k0.type.startsWith("image")?u0.current.get(k0.name):"";return u0.current.has(k0.name)||u0.current.set(k0.name,URL.createObjectURL(k0)),{name:k0.name,info:{type:k0.type,weight:c$2(k0.size||0,1)},src:d0}},c0=k0=>{const d0=u0.current.get(k0.name);d0&&(URL.revokeObjectURL(d0),u0.current.delete(k0.name)),s0(k0)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[i0.map(k0=>{const d0=r0.find(h0=>h0.name===k0.name);return jsxRuntimeExports.jsx(UploadCard,{status:t0(k0),item:A0(k0),onEdit:()=>f0(d0),onRetry:()=>n0(k0),onDelete:()=>c0(k0)},k0.name)}),a0&&jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx(LoadingScreen,{position:!1}),children:jsxRuntimeExports.jsx(ImageEditor,{altText:a0.alt,legend:a0.title,image:l0(a0,!0),isOpen:!!a0,onCancel:()=>f0(void 0),onSave:o0,onError:console.error})})]})},acceptedTypes=e0=>{const _e=[];switch(e0){case"audio":_e.push("audio/*");break;case"video":_e.push("video/*");break;case"image":_e.push("image/png"),_e.push("image/jpeg"),_e.push("image/webp"),_e.push("image/gif"),_e.push("image/avif"),_e.push("image/heic");break}return _e},orderUploadedFiles=(e0,_e,i0)=>{const r0=s0=>s0._id?_e[s0._id]:void 0,t0=s0=>{var o0;return((o0=r0(s0))==null?void 0:o0.name)??s0.name},n0=s0=>{var o0;return((o0=r0(s0))==null?void 0:o0.lastModified)??0};return i0?[...e0].sort((s0,o0)=>t0(s0).localeCompare(t0(o0),void 0,{numeric:!0})):[...e0].sort((s0,o0)=>n0(o0)-n0(s0)).reverse()},Upload=()=>{const{t:e0}=useTranslation(),{type:_e,visibility:i0,multiple:r0,setResult:t0,setResultCounter:n0,setCancellable:s0,setPreSuccess:o0}=useMediaLibraryContext(),[a0,f0]=reactExports.useState(!0),[l0,u0]=reactExports.useState([]),A0=reactExports.useRef({}),c0=(k0,d0)=>{A0.current=d0,u0(k0),k0.length?(s0(k0),n0(k0.length),t0(k0)):(s0([]),n0(void 0),t0(void 0))};return reactExports.useEffect(()=>{if(!r0||!l0.length){o0(void 0);return}o0(()=>()=>Promise.resolve(orderUploadedFiles(l0,A0.current,a0)))},[r0,l0,a0,o0]),jsxRuntimeExports.jsxs("div",{className:"flex-grow-1",children:[r0&&jsxRuntimeExports.jsxs(Flex,{className:"mb-16 ms-8",align:"start",direction:"column",gap:"8",children:[jsxRuntimeExports.jsxs("div",{children:[e0("bbm.upload.sort.title")," :"]}),jsxRuntimeExports.jsx(Radio,{label:e0("bbm.upload.sort.alpha"),name:"media-library-upload-sort",value:"alpha",model:a0?"alpha":"date",checked:a0,onChange:()=>f0(!0),"data-testid":"media-library-upload-sort-alpha"}),jsxRuntimeExports.jsx(Radio,{label:e0("bbm.upload.sort.date"),name:"media-library-upload-sort",value:"date",model:a0?"alpha":"date",checked:!a0,onChange:()=>f0(!1),"data-testid":"media-library-upload-sort-date"})]}),jsxRuntimeExports.jsx(Dropzone,{multiple:r0,accept:acceptedTypes(_e??"embedder"),children:jsxRuntimeExports.jsx(UploadFiles,{onFilesChange:c0,visibility:i0})})]})},VIDEO_HEIGHT=9,VIDEO_WIDTH=16;function useCameras(){const{device:e0}=useBrowserInfo(navigator.userAgent),{t:_e}=useTranslation(),[i0,r0]=reactExports.useState([]),[t0,n0]=reactExports.useState({audio:!0,video:!0}),[s0,o0]=reactExports.useState();async function a0(){return(await navigator.mediaDevices.enumerateDevices()).filter(A0=>A0.kind==="videoinput")}const f0=async A0=>{try{const c0=await navigator.mediaDevices.getUserMedia(A0);o0(c0)}catch(c0){console.error(c0)}},l0=()=>{s0==null||s0.getTracks().forEach(A0=>A0.stop()),f0(t0)},u0=A0=>{let c0={};A0!=null&&A0.deviceId?(A0.deviceId==="environment"||A0.deviceId==="user"?c0={audio:!0,video:{aspectRatio:VIDEO_WIDTH/VIDEO_HEIGHT,facingMode:A0==null?void 0:A0.deviceId}}:c0={audio:!0,video:{aspectRatio:VIDEO_WIDTH/VIDEO_HEIGHT,deviceId:{exact:A0.deviceId}}},n0(c0)):console.error("Selected input device id is null")};return reactExports.useEffect(()=>{l0()},[t0]),reactExports.useEffect(()=>{async function A0(){await f0(t0);const c0=await a0();switch(e0.type){case"mobile":case"tablet":{const k0={deviceId:"environment",label:_e("video.back.camera"),groupId:"",kind:"videoinput"},d0={deviceId:"user",label:_e("video.front.camera"),groupId:"",kind:"videoinput"};(c0==null?void 0:c0.length)>1?r0([k0,d0]):r0([k0]);break}default:r0(c0);break}}A0()},[]),{inputDevices:i0,setPreferedDevice:u0,stream:s0,restartStream:l0}}const SvgIconRecordStop=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M2 6a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4z"})]}),VideoRecorderToolbar=({playing:e0,recording:_e,recorded:i0,saving:r0,saved:t0,hideSaveAction:n0,handleRecord:s0,handleStop:o0,handlePlayPause:a0,handleReset:f0,handleSave:l0})=>{const{t:u0}=useTranslation(),A0=[{type:"icon",name:"record",props:{icon:jsxRuntimeExports.jsx(SvgIconRecord,{color:_e||i0?"":"red"}),color:"danger",disabled:_e||i0||r0,onClick:s0,"aria-label":u0("bbm.video.record.start")},tooltip:u0("bbm.video.record.start")},{type:"icon",name:"stop",props:{icon:jsxRuntimeExports.jsx(SvgIconRecordStop,{}),disabled:!_e||i0||r0,onClick:o0,"aria-label":u0("bbm.video.record.stop")},tooltip:u0("bbm.video.record.stop")},{type:"icon",name:"play",visibility:e0?"hide":"show",props:{icon:jsxRuntimeExports.jsx(SvgIconPlayFilled,{}),disabled:!i0||r0,onClick:a0,"aria-label":u0("bbm.video.play.start")},tooltip:u0("bbm.video.play.start")},{type:"icon",name:"pause",visibility:e0?"show":"hide",props:{icon:jsxRuntimeExports.jsx(SvgIconPause,{}),disabled:!i0||r0,onClick:a0,"aria-label":u0("bbm.video.play.pause")},tooltip:u0("bbm.video.play.pause")},{type:"divider"},{type:"icon",name:"reset",props:{icon:jsxRuntimeExports.jsx(SvgIconRefresh,{}),disabled:!i0||r0,onClick:f0,"aria-label":u0("bbm.video.record.reset")},tooltip:u0("bbm.video.record.reset")},{type:"icon",name:"save",visibility:n0?"hide":"show",props:{icon:jsxRuntimeExports.jsx(SvgIconSave,{}),disabled:!i0||r0||t0,onClick:l0,"aria-label":u0("bbm.video.record.save")},tooltip:u0("bbm.video.record.save")}];return jsxRuntimeExports.jsx(Toolbar,{items:A0,className:"position-absolute bottom-0 start-50 bg-white"})},SelectTrigger=e0=>jsxRuntimeExports.jsx(Dropdown.Trigger,{...e0,"aria-haspopup":"listbox",role:"combobox"}),Select=({selectedValue:e0,icon:_e,options:i0,overflow:r0,block:t0,variant:n0,size:s0,disabled:o0,placeholderOption:a0,onValueChange:f0,defaultValue:l0})=>{const[u0,A0]=reactExports.useState(),{t:c0}=useTranslation();reactExports.useEffect(()=>{e0!==void 0&&A0(e0)},[e0]),reactExports.useEffect(()=>{if(u0){const h0=typeof u0=="object"?u0.value:u0;f0==null||f0(h0)}},[u0]),reactExports.useEffect(()=>{if(l0){const h0=i0.find(b0=>(typeof b0=="object"?b0.value:b0)===l0);h0!==void 0&&A0(h0)}},[]);const k0=typeof u0=="object"?u0.label:u0,d0=typeof u0=="object"?u0.icon:void 0;return jsxRuntimeExports.jsxs(Dropdown,{overflow:r0,block:t0,children:[jsxRuntimeExports.jsx(SelectTrigger,{icon:d0||_e,label:jsxRuntimeExports.jsx("span",{className:"text-truncate",children:c0(k0||a0)}),variant:n0,size:s0,disabled:o0}),jsxRuntimeExports.jsx(Dropdown.Menu,{role:"listbox",children:i0==null?void 0:i0.map(h0=>{const b0=typeof h0=="object"?h0.value:h0,p0=typeof h0=="object"?h0.label:h0,m0=typeof h0=="object"?h0.icon:void 0;return jsxRuntimeExports.jsx(Dropdown.Item,{type:"action",onClick:()=>A0(h0),icon:m0,children:p0},b0)})})]})},VideoRecorder=reactExports.forwardRef(({appCode:e0,caption:_e,onSuccess:i0,onError:r0,onRecordUpdated:t0,hideSaveAction:n0=!1},s0)=>{const{inputDevices:o0,setPreferedDevice:a0,restartStream:f0,stream:l0}=useCameras(),[u0,A0]=reactExports.useState(18e4),[c0,k0]=reactExports.useState(!1),[d0,h0]=reactExports.useState(!1),[b0,p0]=reactExports.useState(!1),[m0,g0]=reactExports.useState(!1),[v0,x0]=reactExports.useState(!1),[w0,_0]=reactExports.useState(""),[y0,S0]=reactExports.useState([]),[B0,I0]=reactExports.useState(),[T0,R0]=reactExports.useState(0),[E0,C0]=reactExports.useState(0),G0=reactExports.useRef(null),F0=reactExports.useRef(null),{uploadBlob:M0}=useUpload(void 0,e0);reactExports.useImperativeHandle(s0,()=>({save:Q0}));const{t:j0}=useTranslation();reactExports.useEffect(()=>{D0()},[]);async function D0(){try{const H0=await odeServices.video().getVideoConf();A0(H0.maxDuration*60*1e3)}catch{A0(3*60*1e3)}}reactExports.useEffect(()=>{try{G0.current&&(G0.current.src&&(window.URL.revokeObjectURL(G0.current.src),G0.current.src=""),G0.current.srcObject instanceof MediaStream&&(G0.current.srcObject=null),l0&&(G0.current.srcObject=l0,G0.current.autoplay=!0,G0.current.volume=1,G0.current.muted=!0,G0.current.load()))}catch(H0){console.error(H0)}},[l0]),reactExports.useEffect(()=>{if(y0.length&&!c0&&G0.current){const H0=new Blob(y0,{type:w0});if(I0(H0),t0){const J0=window.URL.createObjectURL(H0);t0(J0)}G0.current.autoplay=!1,G0.current.srcObject=null,G0.current.src=window.URL.createObjectURL(H0)}},[c0,y0]),reactExports.useEffect(()=>{if(c0){const H0=Date.now(),J0=window.setInterval(()=>R0(Date.now()-H0),500);return()=>{window.clearInterval(J0)}}},[c0]),reactExports.useEffect(()=>{if(b0){const H0=window.setInterval(()=>C0(J0=>J0+500),500);return()=>{window.clearInterval(H0)}}},[b0]);const $0=reactExports.useCallback(()=>{k0(!0),G0&&G0.current&&(G0.current.muted=!0);const H0=o$1();_0(H0),l0&&(F0.current=new MediaRecorder(l0,{mimeType:H0}),F0.current.ondataavailable=({data:J0})=>{J0.size>0&&S0(Y0=>[...Y0,J0])},F0.current.onerror=J0=>console.error(J0),F0.current.start(1e3))},[l0]),X0=reactExports.useCallback(()=>{var H0;k0(!1),h0(!0),((H0=F0.current)==null?void 0:H0.state)==="recording"&&(F0.current.requestData(),F0.current.stop())},[F0]),Z0=reactExports.useCallback(()=>{var H0,J0;G0&&G0.current&&(G0.current.muted=!1),b0?((J0=G0==null?void 0:G0.current)==null||J0.pause(),p0(!1)):((H0=G0==null?void 0:G0.current)==null||H0.play(),p0(!0))},[b0]),N0=()=>{h0(!1),k0(!1),p0(!1),x0(!1),R0(0),S0([]),I0(void 0),f0(),t0&&t0()},Q0=async()=>{var H0;if((H0=G0==null?void 0:G0.current)==null||H0.pause(),g0(!0),!B0){console.error("Error while saving video: recorded video is undefined.");return}const J0=await M0(B0,{duration:T0});if(J0!=null)return i0==null||i0([J0]),g0(!1),x0(!0),[J0];r0("Error while uploading video"),g0(!1),x0(!0)},z0=()=>{p0(!1),C0(0),G0.current&&(G0.current.currentTime=0)},K0=H0=>{var J0;const Y0=o0.find(e2=>e2.label===H0);((J0=F0.current)==null?void 0:J0.state)==="recording"&&(F0.current.requestData(),F0.current.stop()),a0(Y0)};return reactExports.useEffect(()=>{T0>=u0&&X0()},[T0,X0]),jsxRuntimeExports.jsxs("div",{className:"video-recorder d-flex flex-fill flex-column align-items-center pb-8",children:[jsxRuntimeExports.jsx("div",{className:"video-recorder-caption d-none d-md-block",children:_e}),o0.length>1&&jsxRuntimeExports.jsx("div",{className:"video-recorder-devices mb-12",children:jsxRuntimeExports.jsxs(FormControl,{id:"selectInputDevice",children:[jsxRuntimeExports.jsx(Label,{className:"d-none d-md-block",children:j0("bbm.video.record.select.devices.label")}),jsxRuntimeExports.jsx(Select,{placeholderOption:j0("bbm.video.record.select.devices.placeholder"),options:o0.map(H0=>H0.label),onValueChange:K0})]})}),jsxRuntimeExports.jsxs("div",{className:"video-recorder-video-container position-relative align-self-stretch",children:[jsxRuntimeExports.jsx("video",{ref:G0,playsInline:!0,autoPlay:!0,controls:!1,muted:!0,onEnded:z0,className:"rounded",children:jsxRuntimeExports.jsx("track",{default:!0,kind:"captions",srcLang:"fr",src:""})}),(c0||d0)&&jsxRuntimeExports.jsxs("div",{className:"video-recorder-time d-flex align-items-center font-monospace fs-6 text-bg-dark rounded",children:[c0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SvgIconRecord,{width:12,height:12,color:"red",className:"me-4"}),jsxRuntimeExports.jsxs("span",{children:[n$4(T0),"/",n$4(u0)]})]}),d0&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(SvgIconRecordVideo,{width:14,height:14,className:"me-4"}),jsxRuntimeExports.jsxs("span",{children:[n$4(E0),"/",n$4(T0)]})]})]}),l0&&jsxRuntimeExports.jsx(VideoRecorderToolbar,{playing:b0,recording:c0,recorded:d0,saving:m0,saved:v0,hideSaveAction:n0,handleRecord:$0,handleStop:X0,handlePlayPause:Z0,handleReset:N0,handleSave:Q0})]}),m0&&jsxRuntimeExports.jsx(LoadingScreen,{position:!1,caption:j0("bbm.video.save.loader.caption")})]})}),Video=()=>{const{appCode:e0,setResult:_e,setPreSuccess:i0}=useMediaLibraryContext(),{t:r0}=useTranslation(),t0=reactExports.useRef(null),n0=o0=>{o0?(_e(o0),i0(()=>t0.current.save)):_e()},s0=o0=>{console.error(o0)};return jsxRuntimeExports.jsx(VideoRecorder,{ref:t0,appCode:e0,caption:r0("bbm.video.caption"),onRecordUpdated:n0,onError:s0,hideSaveAction:!0})},SvgIconArrowRight=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 12a1 1 0 0 1 1-1h14a1 1 0 1 1 0 2H5a1 1 0 0 1-1-1",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L17.586 12l-6.293-6.293a1 1 0 0 1 0-1.414",clipRule:"evenodd"})]}),VideoEmbed=({switchType:e0,onSuccess:_e})=>{const{t:i0}=useTranslation(),[r0,t0]=reactExports.useState(),[n0,s0]=reactExports.useState(),[o0,a0]=reactExports.useState(void 0),[f0,l0]=reactExports.useState(),u0=useDebounce(r0||"",300),A0=reactExports.useId();reactExports.useEffect(()=>{c0()},[]),reactExports.useEffect(()=>{if(f0&&u0){const b0=odeServices.embedder().getProviderFromUrl(f0,u0);if(b0){a0(b0);const p0=odeServices.embedder().getEmbedCodeForProvider(b0,u0);s0(p0),_e(p0)}else a0(void 0),_e()}},[u0,f0]);const c0=async()=>{const b0=await Promise.all([odeServices.embedder().getDefault(),odeServices.embedder().getCustom()]).then(p0=>p0.flat());l0(b0)};function k0(b0){const p0=b0.currentTarget.value;t0(p0),_e(p0!=null&&p0.length?p0:void 0)}function d0(){e0==null||e0("embedder")}const h0=()=>u0?o0?jsxRuntimeExports.jsxs("div",{className:"mx-auto mt-16",children:[jsxRuntimeExports.jsxs("div",{className:"video-embed-provider d-flex align-items-center",children:[jsxRuntimeExports.jsx(Image$1,{src:o0.logo,alt:"Logo "+o0.displayName,className:"video-embed-provider-logo"}),o0.displayName]}),n0&&jsxRuntimeExports.jsx("div",{className:"video-embed-preview mt-12",dangerouslySetInnerHTML:{__html:n0}})]}):jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column align-items-center m-16",children:[jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuError,title:i0("bbm.video.previewError.title"),text:i0("bbm.video.previewError.text")}),e0&&jsxRuntimeExports.jsxs(Button,{variant:"ghost",color:"primary",onClick:d0,className:"align-items-start mt-16",children:[i0("bbm.video.useEmbedCode")," ",jsxRuntimeExports.jsx(SvgIconArrowRight,{})]})]}):e0&&jsxRuntimeExports.jsx("div",{className:"d-flex my-16 align-items-start",children:jsxRuntimeExports.jsxs(Button,{variant:"ghost",color:"primary",onClick:d0,className:"align-items-start",children:[i0("bbm.video.useEmbedCode")," ",jsxRuntimeExports.jsx(SvgIconArrowRight,{})]})});return jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column flex-fill video-embed",children:[jsxRuntimeExports.jsxs("div",{className:"mb-8 d-flex",children:[jsxRuntimeExports.jsx(SvgIconGlobe,{className:"me-8"}),i0("bbm.video.url.title")]}),jsxRuntimeExports.jsx(FormControl,{id:A0,children:jsxRuntimeExports.jsx(Input,{size:"md",type:"text",placeholder:i0("bbm.video.url.placeholder"),onChange:k0})}),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:h0()})]})},VideoEmbedder=()=>{const{switchType:e0,setResult:_e}=useMediaLibraryContext();return jsxRuntimeExports.jsx(VideoEmbed,{switchType:e0,onSuccess:i0=>{_e(i0)}})};function useHasWorkflow(e0){const[_e,i0]=reactExports.useState();return reactExports.useEffect(()=>{(async()=>{let r0;typeof e0=="string"?r0=await odeServices.rights().sessionHasWorkflowRight(e0):r0=await odeServices.rights().sessionHasWorkflowRights(e0),i0(r0)})()},[e0]),_e}var __defProp=Object.defineProperty,__defNormalProp=(e0,_e,i0)=>_e in e0?__defProp(e0,_e,{enumerable:!0,configurable:!0,writable:!0,value:i0}):e0[_e]=i0,__publicField=(e0,_e,i0)=>__defNormalProp(e0,typeof _e!="symbol"?_e+"":_e,i0);function findTreeNode(e0,_e){if(_e(e0))return e0;if(Array.isArray(e0.children))for(const i0 of e0.children){const r0=findTreeNode(i0,_e);if(r0)return r0}}function findNodeById(e0,_e){if(Array.isArray(e0))for(const i0 of e0){const r0=findNodeById(i0,_e);if(r0)return r0}else{if(e0.id===_e)return e0;if(e0.children)for(const i0 of e0.children){const r0=findNodeById(i0,_e);if(r0)return r0}}}function addNode(e0,{parentId:_e,newFolder:i0}){return modifyNode(e0,r0=>{var t0;if(r0.id===_e){const n0=[...((t0=r0.folder)==null?void 0:t0.ancestors)||[]],s0=arrayUnique([...n0,r0.id]);return{...r0,children:[...r0.children||[],new TreeNodeFolderWrapper({...i0,ancestors:s0})]}}else return r0})}function arrayUnique(e0){return e0.filter((_e,i0)=>e0.indexOf(_e)===i0)}function deleteNode(e0,{folders:_e}){return modifyNode(e0,i0=>{if(!_e.includes(i0.id))return i0})}const findParentNode=(e0,_e)=>{if(e0.children)for(const i0 of e0.children){if(i0.id===_e)return e0;const r0=findParentNode(i0,_e);if(r0)return r0}};function getAncestors(e0,_e){var i0;const r0=findNodeById(e0,_e);return(i0=r0==null?void 0:r0.folder)!=null&&i0.ancestors?[...(r0==null?void 0:r0.folder.ancestors)||[],_e]:_e===FOLDER.BIN?[FOLDER.BIN]:[FOLDER.DEFAULT]}function modifyNode(e0,_e){return doModify(e0,_e)||e0}function doModify(e0,_e,i0){var r0;const t0=_e(e0,i0);if((r0=t0==null?void 0:t0.children)!=null&&r0.length){const n0=[];for(const s0 of(t0==null?void 0:t0.children)||[]){const o0=doModify(s0,_e,t0);o0&&n0.push(o0)}return{...t0,children:n0}}return t0}function moveNode(e0,{destinationId:_e,folders:i0}){return modifyNode(e0,(r0,t0)=>{var n0,s0;if(_e===r0.id){const o0=[...((n0=r0.folder)==null?void 0:n0.ancestors)||[]],a0=arrayUnique([...o0,r0.id]),f0=[...r0.children||[]],l0=((s0=r0.children)==null?void 0:s0.map(u0=>u0.id))||[];for(const u0 of i0)if(!l0.includes(u0)){const A0=findNodeById(r0,u0);A0&&f0.push({...A0,folder:{...A0==null?void 0:A0.folder,ancestors:a0}})}return{...r0,children:f0}}else return i0.includes(r0.id)&&_e!==(t0==null?void 0:t0.id)?void 0:r0})}const wrapTreeNode=(e0,_e,i0)=>modifyNode(e0,r0=>(r0.id===i0&&(r0.children=_e==null?void 0:_e.map(t0=>new TreeNodeFolderWrapper(t0))),r0));function updateNode(e0,{folderId:_e,newFolder:i0}){return modifyNode(e0,r0=>r0.id===_e?new TreeNodeFolderWrapper(i0):r0)}function findPathById(e0,_e){let i0=[];function r0(n0,s0){if(n0.id===_e)return i0=s0.concat(n0.id),!0;if(n0.children){for(const o0 of n0.children)if(r0(o0,s0.concat(n0.id)))return!0}return!1}function t0(n0){if(Array.isArray(n0)){for(const s0 of n0)if(r0(s0,[]))break}else r0(n0,[])}return t0(e0),i0}class TreeNodeFolderWrapper{constructor(_e){__publicField(this,"id"),__publicField(this,"name"),__publicField(this,"childNumber"),__publicField(this,"section",!1),__publicField(this,"children",[]),this.folder=_e,this.id=_e.id,this.name=_e.name,this.childNumber=_e.childNumber}}function useWorkspaceSearch(e0,_e,i0,r0){const t0=useHasWorkflow("org.entcore.workspace.controllers.WorkspaceController|listDocuments"),n0=useHasWorkflow("org.entcore.workspace.controllers.WorkspaceController|listFolders");function s0(l0,u0){switch(u0.type){case"update":{const A0=findNodeById(l0,u0.folderId);return A0&&(A0.children=u0.subfolders.map(c0=>({id:c0._id||"",name:c0.name})),A0.files=u0.files),{...l0}}default:throw Error("[useWorkspaceSearch] Unknown action type: "+u0.type)}}const[o0,a0]=reactExports.useReducer(s0,{id:e0,name:_e,section:!0}),f0=reactExports.useCallback(async l0=>{if(t0&&n0){const u0=l0===e0?"":l0,A0=await odeServices.workspace().listDocuments(i0,u0),c0=[],k0=[];A0.filter(d0=>{if(!r0||d0.eType==="folder")return!0;const h0=DocumentHelper.getRole(d0);return typeof r0=="string"?r0===h0:Array.isArray(r0)?r0.findIndex(b0=>b0===h0)>=0:!1}).forEach(d0=>{d0.eType==="folder"?c0.push(d0):k0.push(d0)}),a0({folderId:l0,subfolders:c0,files:k0,type:"update"})}},[t0,n0,e0,i0,r0]);return{root:o0,loadContent:f0}}const SvgIconRafterDown=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.012 7.871a1.5 1.5 0 0 1 2.117.141L12 14.722l5.871-6.71a1.5 1.5 0 1 1 2.258 1.976l-7 8a1.5 1.5 0 0 1-2.258 0l-7-8a1.5 1.5 0 0 1 .141-2.117",clipRule:"evenodd"})]}),TreeNode=({node:e0,showIcon:_e,selectedNodeId:i0,expandedNodes:r0,siblingsNodes:t0,draggedNodeId:n0,handleItemClick:s0,handleToggleNode:o0,handleItemAction:a0})=>{const f0=r0.has(e0.id),l0=t0==null?void 0:t0.current.has(e0.id),u0=i0===e0.id,A0=n0===e0.id,c0={action:clsx("action-container d-flex align-items-center gap-8 px-2",{"drag-focus":A0,"py-4":!e0.section}),arrow:clsx({"py-4":!e0.section,"py-8":e0.section,invisible:!Array.isArray(e0.children)||e0.children.length===0}),button:clsx("flex-fill d-flex align-items-center text-truncate gap-8",{"py-8":e0.section})},k0=e0.section?16:12,{t:d0}=useTranslation(),{setNodeRef:h0}=useDroppable$1({id:reactExports.useId(),data:{id:e0.id,name:e0.name,isTreeview:!0,accepts:["folder","resource"]}}),b0=_0=>s0==null?void 0:s0(_0),p0=_0=>o0==null?void 0:o0(_0),m0=_0=>a0==null?void 0:a0(_0),g0=_0=>{(_0.code==="Enter"||_0.code==="Space")&&(_0.preventDefault(),_0.stopPropagation(),s0==null||s0(e0.id))},v0=_0=>{(_0.code==="Enter"||_0.code==="Space")&&(_0.preventDefault(),_0.stopPropagation(),o0==null||o0(e0.id))},x0=_0=>jsxRuntimeExports.jsx(_0?SvgIconRafterDown:SvgIconRafterRight,{title:d0("foldUnfold"),width:k0,height:k0}),w0=()=>{var _0;const y0=!((_0=t0==null?void 0:t0.current)!=null&&_0.has(e0.id)),S0=Array.isArray(e0.children)&&e0.children.length>0;return l0||y0&&S0};return jsxRuntimeExports.jsx("li",{ref:h0,id:`treeitem-${e0.id}`,role:"treeitem","aria-selected":u0&&u0,"aria-expanded":f0&&f0,children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:c0.action,children:[jsxRuntimeExports.jsx("div",{className:c0.arrow,tabIndex:0,role:"button",onClick:()=>p0(e0.id),onKeyDown:v0,"aria-label":d0("foldUnfold"),children:w0()&&x0(f0)}),jsxRuntimeExports.jsxs("div",{tabIndex:0,role:"button",className:c0.button,onClick:()=>b0(e0.id),onKeyDown:g0,children:[e0.section&&_e&&jsxRuntimeExports.jsx(SvgIconFolder,{title:d0("folder"),width:20,height:20}),jsxRuntimeExports.jsx("span",{className:"text-truncate",children:e0.name})]}),e0.section&&a0&&jsxRuntimeExports.jsx("button",{className:"tree-btn mx-8",onClick:()=>m0(e0.id),children:jsxRuntimeExports.jsx(SvgIconPlus,{height:16,width:16})})]}),Array.isArray(e0.children)&&!!e0.children.length&&f0&&jsxRuntimeExports.jsx("ul",{role:"group",children:e0.children.map(_0=>jsxRuntimeExports.jsx(TreeNode,{node:_0,selectedNodeId:i0,expandedNodes:r0,siblingsNodes:t0,draggedNodeId:n0,handleItemClick:s0,handleToggleNode:o0},_0.id))})]})},e0.id)},useTreeView=({data:e0,ref:_e,externalSelectedNodeId:i0,draggedNode:r0,allExpandedNodes:t0,onTreeItemUnfold:n0,onTreeItemFold:s0,onTreeItemClick:o0})=>{const[a0,f0]=reactExports.useState(void 0),[l0,u0]=reactExports.useState(new Set),A0=reactExports.useRef(new Set),[c0,k0]=reactExports.useState(void 0),d0=a0??i0;function h0(B0){var I0;Array.isArray(B0)?B0.forEach(T0=>{const R0=new Set(A0.current);B0.filter(({id:E0})=>E0!==T0.id).some(E0=>E0.children&&E0.children.length>0)&&R0.add(T0.id),T0.children&&T0.children.length>0&&T0.children.forEach(E0=>{var C0;const G0=(C0=T0.children)==null?void 0:C0.filter(({id:F0})=>F0!==E0.id);G0!=null&&G0.some(F0=>F0.children&&F0.children.length>0)&&R0.add(E0.id),h0(E0)})}):(I0=B0.children)==null||I0.forEach(T0=>{var R0;const E0=new Set(A0.current),C0=(R0=B0.children)==null?void 0:R0.filter(G0=>G0.id!==T0.id);C0!=null&&C0.some(G0=>G0.children&&G0.children.length>0)&&(E0.add(T0.id),A0.current=E0),h0(T0)})}const b0=B0=>{const I0=new Set("");e0&&Array.isArray(e0)&&B0&&(e0.forEach(T0=>{I0.add(T0.id)}),u0(I0))};reactExports.useEffect(()=>{e0&&h0(e0)},[e0]),reactExports.useEffect(()=>{r0!=null&&r0.isOver&&r0.isTreeview?(r0.overId&&S0(r0.overId),k0(r0.overId)):k0(void 0)},[r0]);const p0=reactExports.useMemo(()=>({unselectAll(){f0(void 0)},select(B0){_0(B0)},allExpandedNodes(){b0(t0)}}),[]);reactExports.useImperativeHandle(_e,()=>p0,[p0]),reactExports.useEffect(()=>{b0(t0)},[]),reactExports.useEffect(()=>{i0&&!t0?(m0(i0),f0(i0)):f0(void 0)},[i0]);const m0=B0=>{if(!findNodeById(e0,d0)){f0(void 0);return}if(i0==="default"){l0.forEach(I0=>n0==null?void 0:n0(I0));return}g0(B0)},g0=B0=>{const I0=new Set(l0),T0=findPathById(e0,B0),R0=Array.from(I0);T0.forEach(E0=>{const C0=R0.indexOf(E0);C0>-1&&R0.splice(C0,1),R0.push(E0)}),I0.clear(),R0.forEach(E0=>I0.add(E0)),I0.forEach(E0=>n0==null?void 0:n0(E0)),u0(I0)},v0=B0=>{const I0=new Set(l0);I0.delete(B0),I0.forEach(T0=>s0==null?void 0:s0(T0)),u0(I0)},x0=B0=>{l0.has(B0)?v0(B0):g0(B0)},w0=B0=>{d0!==B0&&f0(B0)},_0=B0=>{w0(B0),g0(B0),o0==null||o0(B0)},y0=B0=>{x0(B0)},S0=B0=>{findNodeById(e0,i0)&&g0(B0)};return{selectedNodeId:d0,expandedNodes:l0,siblingsNodes:A0,draggedNodeId:c0,handleItemClick:_0,handleFoldUnfold:y0}},TreeView=reactExports.forwardRef((e0,_e)=>{const{data:i0,onTreeItemClick:r0,onTreeItemUnfold:t0,onTreeItemFold:n0,onTreeItemAction:s0,draggedNode:o0,showIcon:a0=!0,allExpandedNodes:f0=!1,selectedNodeId:l0}=e0,{selectedNodeId:u0,expandedNodes:A0,siblingsNodes:c0,draggedNodeId:k0,handleItemClick:d0,handleFoldUnfold:h0}=useTreeView({data:i0,ref:_e,externalSelectedNodeId:l0,draggedNode:o0,allExpandedNodes:f0,onTreeItemClick:r0,onTreeItemFold:n0,onTreeItemUnfold:t0});return jsxRuntimeExports.jsx("div",{className:"treeview",children:jsxRuntimeExports.jsx("ul",{role:"tree",className:"m-0 p-0",children:Array.isArray(i0)?i0.map(b0=>jsxRuntimeExports.jsx(TreeNode,{node:b0,showIcon:a0,selectedNodeId:u0,expandedNodes:A0,siblingsNodes:c0,draggedNodeId:k0,handleItemClick:d0,handleToggleNode:h0,handleItemAction:s0},b0.id)):jsxRuntimeExports.jsx(TreeNode,{node:i0,selectedNodeId:u0,expandedNodes:A0,siblingsNodes:c0,showIcon:a0,draggedNodeId:k0,handleItemClick:d0,handleToggleNode:h0})})})}),WORKSPACE_VIEW_WORKFLOW="org.entcore.workspace.controllers.WorkspaceController|view",Workspace$1=({roles:e0,onSelect:_e,multiple:i0=!0,className:r0,defaultFolder:t0,showPublicFolder:n0})=>{const{t:s0}=useTranslation(),o0=useHasWorkflow(WORKSPACE_VIEW_WORKFLOW),a0=!!o0,{root:f0,loadContent:l0}=useWorkspaceSearch("root",s0("workspace.tree.owner"),"owner",e0),{root:u0,loadContent:A0}=useWorkspaceSearch("root",s0("workspace.tree.shared"),"shared",e0),{root:c0,loadContent:k0}=useWorkspaceSearch("root",s0("workspace.tree.protected"),"protected",e0),{root:d0,loadContent:h0}=useWorkspaceSearch("root",s0("workspace.tree.public"),"public",e0),b0=reactExports.useRef(null),p0=reactExports.useRef(null),m0=reactExports.useRef(null),g0=reactExports.useRef(null),[v0,x0]=reactExports.useState(()=>t0==="public"?n0?t0:"protected":t0==="protected"||t0==="shared"?t0:"owner"),[w0,_0]=reactExports.useState(()=>t0==="public"?n0?d0:c0:t0==="protected"?c0:t0==="shared"?u0:f0),[y0,S0]=reactExports.useState(),[B0,I0]=reactExports.useState(null),[T0,R0]=reactExports.useState(["modified","desc"]),[E0,C0]=reactExports.useState([]),G0=reactExports.useCallback(N0=>{switch(N0){case"owner":return{root:f0,othersRef:[p0,m0,g0]};case"shared":return{root:u0,othersRef:[b0,m0,g0]};case"protected":return{root:c0,othersRef:[b0,p0,g0]};case"public":return{root:d0,othersRef:[b0,p0,m0]};default:throw"no.root.node"}},[f0,u0,c0,d0]),F0=reactExports.useCallback(()=>{switch(v0){case"owner":l0(w0.id);break;case"shared":A0(w0.id);break;case"protected":k0(w0.id);break;case"public":h0(w0.id);break;default:throw"no.way"}},[v0,w0.id,l0,k0,h0,A0]);function M0(N0,Q0){x0(N0);const{root:z0,othersRef:K0}=G0(N0),H0=findTreeNode(z0,J0=>J0.id===Q0);H0&&(_0(H0),K0.forEach(J0=>{var Y0;return(Y0=J0.current)==null?void 0:Y0.unselectAll()}))}reactExports.useEffect(()=>{var N0;let Q0;switch(v0){case"owner":Q0=b0;break;case"shared":Q0=p0;break;case"protected":Q0=m0;break;case"public":Q0=g0;break;default:return}(N0=Q0==null?void 0:Q0.current)==null||N0.select("root")},[v0]),reactExports.useEffect(()=>{o0===!1&&(v0==="owner"||v0==="shared")&&M0("protected","root")},[o0]),reactExports.useEffect(F0,[F0]),reactExports.useEffect(()=>{if(w0.files){let N0=[].concat(w0.files);B0&&(N0=N0.filter(z0=>z0.name.indexOf(B0)>=0));const Q0=T0[0]==="name"?T0[1]==="asc"?(z0,K0)=>D0(z0.name,K0.name):(z0,K0)=>D0(K0.name,z0.name):(z0,K0)=>D0(K0.modified,z0.modified);S0(()=>N0.sort(Q0))}else S0(void 0)},[w0,f0,c0,u0,d0,B0,T0]);const j0=reactExports.useCallback(N0=>{I0(N0.target.value)},[I0]);function D0(N0,Q0){return N0?Q0?N0.localeCompare(Q0):1:-1}function $0(){return T0[0]==="name"?T0[1]==="asc"?s0("sort.order.alpha.asc"):s0("sort.order.alpha.desc"):s0("sort.order.modify.desc")}function X0(N0){let Q0=[...E0];i0?Q0.includes(N0)?Q0=Q0.filter(z0=>z0._id!==N0._id):Q0=[...Q0,N0]:Q0=[N0],C0(Q0),_e(Q0)}const Z0=clsx("workspace flex-grow-1 gap-0",r0);return jsxRuntimeExports.jsxs(Grid,{className:Z0,children:[jsxRuntimeExports.jsx(Grid.Col,{sm:"12",md:"3",xl:"4",className:"workspace-folders p-12 pt-0 gap-12",children:jsxRuntimeExports.jsxs("div",{style:{position:"sticky",top:0,paddingTop:"1.2rem"},children:[a0&&jsxRuntimeExports.jsx(TreeView,{ref:b0,data:f0,onTreeItemClick:N0=>M0("owner",N0),onTreeItemUnfold:N0=>M0("owner",N0)}),a0&&jsxRuntimeExports.jsx(TreeView,{ref:p0,data:u0,onTreeItemClick:N0=>M0("shared",N0),onTreeItemUnfold:N0=>M0("shared",N0)}),jsxRuntimeExports.jsx(TreeView,{ref:m0,data:c0,onTreeItemClick:N0=>M0("protected",N0),onTreeItemUnfold:N0=>M0("protected",N0)}),n0&&jsxRuntimeExports.jsx(TreeView,{ref:g0,data:d0,onTreeItemClick:N0=>M0("public",N0),onTreeItemUnfold:N0=>M0("public",N0)})]})}),jsxRuntimeExports.jsx(Grid.Col,{sm:"12",md:"5",xl:"8",children:jsxRuntimeExports.jsxs(Grid,{className:"flex-grow-1 gap-0",children:[jsxRuntimeExports.jsxs(Grid.Col,{sm:"4",md:"8",xl:"12",children:[jsxRuntimeExports.jsx("div",{className:"workspace-search px-16 py-8 ",children:jsxRuntimeExports.jsx(SearchBar,{isVariant:!0,className:"gap-16",onChange:j0})}),jsxRuntimeExports.jsxs("div",{className:"d-flex align-items-center justify-content-end px-8 py-4",children:[jsxRuntimeExports.jsx("small",{className:"text-muted",children:s0("workspace.search.order")}),jsxRuntimeExports.jsxs(Dropdown,{children:[jsxRuntimeExports.jsx(Dropdown.Trigger,{size:"sm",label:$0(),variant:"ghost"}),jsxRuntimeExports.jsxs(Dropdown.Menu,{children:[jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortTime,{}),onClick:()=>R0(["modified","desc"]),children:s0("sort.order.modify.desc")}),jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortAscendingLetters,{}),onClick:()=>R0(["name","asc"]),children:s0("sort.order.alpha.asc")}),jsxRuntimeExports.jsx(Dropdown.Item,{icon:jsxRuntimeExports.jsx(SvgIconSortDescendingLetters,{}),onClick:()=>R0(["name","desc"]),children:s0("sort.order.alpha.desc")})]})]})]})]}),jsxRuntimeExports.jsx(Grid.Col,{sm:"4",md:"8",xl:"12",className:"p-8 gap-8",children:y0?y0.length!==0?jsxRuntimeExports.jsx("div",{className:"grid grid-workspace",children:y0.map(N0=>{const Q0=E0.includes(N0);return jsxRuntimeExports.jsx(FileCard,{doc:N0,isSelected:Q0,onClick:()=>X0(N0)},N0._id)})}):jsxRuntimeExports.jsx(EmptyScreen,{imageSrc:illuTrash,text:s0("workspace.empty.docSpace"),title:s0("explorer.emptyScreen.trash.title")}):jsxRuntimeExports.jsx(LoadingScreen,{})})]})})]})},Workspace=()=>{const{type:e0,setResultCounter:_e,setResult:i0,multiple:r0,visibility:t0}=useMediaLibraryContext();function n0(){switch(e0){case"image":return"img";case"audio":return"audio";case"video":return"video";default:return null}}function s0(o0){_e(o0.length),o0.length?i0(o0):i0()}return jsxRuntimeExports.jsx(Workspace$1,{roles:n0(),onSelect:s0,multiple:r0,className:"border rounded overflow-y-auto",defaultFolder:t0,showPublicFolder:t0==="public"})},InnerTabs={Audio,Video,Upload,ExternalLink,Workspace,Nextcloud,GoogleDrive,InternalLink,Iframe,VideoEmbedder};function usePublicConf(e0){return useQuery({queryKey:["publicConf",e0],queryFn:()=>odeServices.conf().getPublicConf(e0),staleTime:1/0})}const useHttpErrorToast=({active:e0=!0,..._e})=>{const i0=reactExports.useRef(),r0=useToast(),{t:t0}=useTranslation();return reactExports.useEffect(()=>{if(e0){const n0=odeServices.notify().events().subscribe(LAYER_NAME.TRANSPORT,s0=>{var o0;if(!(s0!=null&&s0.data))return;const{response:a0}=s0.data,f0=((o0=s0.data.payload)==null?void 0:o0.error)||([400,401,403,404,408,413,500,504].includes(a0==null?void 0:a0.status)?`e${s0.data.response.status}`:void 0)||(a0==null?void 0:a0.statusText);typeof f0=="string"&&(i0.current=t0(f0),r0.error(React$4.createElement("div",{children:[i0.current]}),_e))});return()=>n0.revoke()}},[t0,r0,e0]),i0.current},TabsContext=reactExports.createContext(null);function useTabsContext(){const e0=reactExports.useContext(TabsContext);if(!e0)throw new Error("Tabs compound components cannot be rendered outside the Tabs component");return e0}const useTabs=({defaultId:e0,items:_e,onChange:i0})=>{const[r0,t0]=reactExports.useState(e0||""),[n0,s0]=reactExports.useState(0),[o0,a0]=reactExports.useState(0),f0=reactExports.useRef([]),l0=reactExports.useCallback(k0=>{t0(k0)},[]);reactExports.useEffect(()=>{const k0=_e.find(d0=>d0.id===r0);k0&&(i0==null||i0(k0))},[r0]),reactExports.useEffect(()=>{function k0(){const d0=document.activeElement;if(!((d0==null?void 0:d0.tagName)==="INPUT"||(d0==null?void 0:d0.tagName)==="TEXTAREA"||d0!=null&&d0.isContentEditable)){const h0=_e.findIndex(p0=>p0.id===r0);h0===-1&&e0&&t0(e0);const b0=f0.current[h0];b0&&(b0.focus(),a0((b0==null?void 0:b0.offsetLeft)??0),s0((b0==null?void 0:b0.clientWidth)??0))}}return k0(),window.addEventListener("resize",k0),()=>window.removeEventListener("resize",k0)},[r0,_e,e0]);const u0=reactExports.useCallback(k0=>{var d0,h0,b0;const p0=_e.findIndex(m0=>m0.id===k0);k0===((d0=_e[0])==null?void 0:d0.id)?t0((h0=_e[_e.length-1])==null?void 0:h0.id):t0((b0=_e[p0-1])==null?void 0:b0.id)},[_e]),A0=reactExports.useCallback(k0=>{var d0,h0,b0;const p0=_e.findIndex(m0=>m0.id===k0);k0===((d0=_e[_e.length-1])==null?void 0:d0.id)?t0((h0=_e[0])==null?void 0:h0.id):t0((b0=_e[p0+1])==null?void 0:b0.id)},[_e]),c0=reactExports.useCallback(k0=>{var d0,h0;switch(k0.code){case"ArrowLeft":u0(r0);break;case"ArrowRight":A0(r0);break;case"Home":t0((d0=_e[0])==null?void 0:d0.id);break;case"End":t0((h0=_e[_e.length-1])==null?void 0:h0.id);break}},[r0,_e,A0,u0]);return{activeTab:r0,setSelectedTab:l0,tabsRef:f0,tabUnderlineLeft:o0,tabUnderlineWidth:n0,onKeyDown:c0}},TabsItem=({icon:e0,badge:_e,label:i0,id:r0,order:t0})=>{const{activeTab:n0,setSelectedTab:s0,onKeyDown:o0,tabsRef:a0}=useTabsContext(),{t:f0}=useTranslation(),l0=clsx("nav-link d-inline-flex gap-8 border-0",n0===r0?"selected":"");return jsxRuntimeExports.jsx("li",{className:"nav-item flex-shrink-0",role:"presentation",children:jsxRuntimeExports.jsxs("button",{ref:u0=>a0.current[t0]=u0,type:"button",id:`tab-${r0}`,className:l0,onClick:()=>s0(r0),onKeyDown:u0=>o0(u0),role:"tab","aria-controls":`tabpanel-${r0}`,"aria-selected":n0===r0,tabIndex:n0===r0?0:-1,children:[e0,jsxRuntimeExports.jsxs("small",{children:[f0(i0)," ",_e]})]})})},TabsList=e0=>{const{items:_e,tabUnderlineLeft:i0,tabUnderlineWidth:r0}=useTabsContext(),{className:t0,fullWidth:n0,isSticky:s0,stickyTop:o0,...a0}=e0,f0=clsx("nav nav-tabs flex-nowrap",{"w-100":n0}),l0=clsx(" flex-shrink-0 overflow-x-auto",{"position-sticky z-1":s0,"position-relative":!s0},t0);return jsxRuntimeExports.jsx("div",{className:l0,...a0,style:s0?{top:o0}:void 0,children:jsxRuntimeExports.jsxs("ul",{className:f0,role:"tablist",children:[_e.map((u0,A0)=>jsxRuntimeExports.jsx(Tabs.Item,{order:A0,...u0},u0.id)),jsxRuntimeExports.jsx("span",{className:"nav-slide",style:{left:i0,width:r0}})]})})},TabsPanel=({children:e0,currentItem:_e,fullHeight:i0,className:r0})=>{const{activeTab:t0}=useTabsContext(),n0=clsx("tab-content d-flex flex-fill w-100",{"position-relative h-100":i0},r0);return jsxRuntimeExports.jsx("div",{className:n0,children:jsxRuntimeExports.jsx("div",{className:`tab-pane flex-fill w-100 fade ${t0===(_e==null?void 0:_e.id)?"show active":""}`,id:`tabpanel-${_e==null?void 0:_e.id}`,role:"tabpanel","aria-labelledby":`tab-${_e==null?void 0:_e.id}`,tabIndex:0,children:e0})})},Tabs=({defaultId:e0,items:_e,fullWidth:i0=!1,fullHeight:r0=!1,onChange:t0,children:n0,isSticky:s0=!1,stickyTop:o0=0,headerClassName:a0,contentClassName:f0})=>{const{activeTab:l0,setSelectedTab:u0,tabsRef:A0,tabUnderlineLeft:c0,tabUnderlineWidth:k0,onKeyDown:d0}=useTabs({defaultId:e0,items:_e,onChange:t0}),h0=reactExports.useMemo(()=>({activeTab:l0,items:_e,setSelectedTab:u0,tabsRef:A0,tabUnderlineLeft:c0,tabUnderlineWidth:k0,onKeyDown:d0}),[l0,_e,d0,u0,c0,k0,A0]),b0=_e.find(p0=>p0.id===l0);return jsxRuntimeExports.jsx(TabsContext.Provider,{value:h0,children:typeof n0=="function"?n0(b0):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Tabs.List,{fullWidth:i0,isSticky:s0,stickyTop:o0,className:a0}),jsxRuntimeExports.jsx(Tabs.Panel,{currentItem:b0,fullHeight:r0,className:f0,children:b0==null?void 0:b0.content})]})})};Tabs.Item=TabsItem;Tabs.Panel=TabsPanel;Tabs.List=TabsList;const orderedTabs=["audio-capture","video-capture","internal-link","external-link","iframe","upload","workspace","nextcloud","google-drive","video-embedder"],GOOGLE_DRIVE_VIEW_WORKFLOW="io.edifice.google.drive.controller.GoogleDriveController|view",mediaLibraryTypes={none:null,audio:{title:"bbm.audio.modal.title",defaultTab:"audio-capture"},video:{title:"bbm.video.modal.title",defaultTab:"video-capture"},image:{title:"bbm.image.modal.title",defaultTab:"workspace"},attachment:{title:"bbm.attachment.modal.title",defaultTab:"workspace"},hyperlink:{title:"bbm.link.modal.title",defaultTab:"linker"},embedder:{title:"bbm.embed.modal.title",defaultTab:"iframe"},studio:{title:"bbm.studio.modal.title",defaultTab:"audio-capture"}},MediaLibrary=reactExports.forwardRef(({appCode:e0,visibility:_e,multiple:i0,onSuccess:r0,onCancel:t0,onTabChange:n0},s0)=>{var o0,a0,f0;const l0=reactExports.useRef(),u0=reactExports.useRef(null);reactExports.useImperativeHandle(s0,()=>({show:X0,hide:Z0,showLink:N0,type:g0,...u0.current}));const{t:A0}=useTranslation(),c0=useHasWorkflow("org.entcore.workspace.controllers.WorkspaceController|addDocument"),k0=useHasWorkflow("com.opendigitaleducation.video.controllers.VideoController|capture"),d0=useHasWorkflow("fr.openent.nextcloud.controller.NextcloudController|view"),h0=useHasWorkflow(GOOGLE_DRIVE_VIEW_WORKFLOW),{data:b0}=usePublicConf("workspace"),p0=((o0=b0==null?void 0:b0["folder-service"])==null?void 0:o0.includes("nextcloud"))&&d0,m0=((a0=b0==null?void 0:b0["folder-service"])==null?void 0:a0.includes("google-drive"))&&h0,[g0,v0]=reactExports.useState(null);useHttpErrorToast({active:!!g0,isDismissible:!0,duration:1/0});const x0={workspace:{id:"workspace",icon:jsxRuntimeExports.jsx(SvgIconFolder,{}),label:A0("bbm.workspace"),content:jsxRuntimeExports.jsx(InnerTabs.Workspace,{}),availableFor:["audio","video","image","attachment"],isEnable:null},nextcloud:{id:"nextcloud",icon:jsxRuntimeExports.jsx(SvgIconGlobe2,{}),label:A0("bbm.nextcloud"),content:jsxRuntimeExports.jsx(InnerTabs.Nextcloud,{}),availableFor:["audio","video","image","attachment"],isEnable:()=>!!p0},"google-drive":{id:"google-drive",icon:jsxRuntimeExports.jsx(SvgIconGlobe2,{}),label:A0("bbm.google-drive"),content:jsxRuntimeExports.jsx(InnerTabs.GoogleDrive,{}),availableFor:["audio","video","image","attachment"],isEnable:()=>!!m0},upload:{id:"upload",icon:jsxRuntimeExports.jsx(SvgIconSmartphone,{}),label:A0("bbm.device"),content:jsxRuntimeExports.jsx(InnerTabs.Upload,{}),availableFor:["audio","video","image","attachment"],isEnable:()=>!!c0},"video-capture":{id:"video-capture",icon:jsxRuntimeExports.jsx(SvgIconRecordVideo,{}),label:A0("bbm.video"),content:jsxRuntimeExports.jsx(InnerTabs.Video,{}),availableFor:["video","studio"],isEnable:()=>!!k0},"audio-capture":{id:"audio-capture",icon:jsxRuntimeExports.jsx(SvgIconMic,{}),label:A0("bbm.audio"),content:jsxRuntimeExports.jsx(InnerTabs.Audio,{}),availableFor:["audio","studio"],isEnable:()=>!!c0},"external-link":{id:"external-link",icon:jsxRuntimeExports.jsx(SvgIconGlobe,{}),label:A0("bbm.linker.ext"),content:jsxRuntimeExports.jsx(InnerTabs.ExternalLink,{...l0.current}),availableFor:["hyperlink"],isEnable:null},"internal-link":{id:"internal-link",icon:jsxRuntimeExports.jsx(SvgIconApplications,{}),label:A0("bbm.linker.int"),content:jsxRuntimeExports.jsx(InnerTabs.InternalLink,{...l0.current}),availableFor:["hyperlink"],isEnable:null},iframe:{id:"iframe",icon:jsxRuntimeExports.jsx(SvgIconCode,{}),label:A0("bbm.embed"),content:jsxRuntimeExports.jsx(InnerTabs.Iframe,{}),availableFor:["embedder"],isEnable:null},"video-embedder":{id:"iframe",icon:jsxRuntimeExports.jsx(SvgIconCode,{}),label:A0("bbm.embed"),content:jsxRuntimeExports.jsx(InnerTabs.VideoEmbedder,{}),availableFor:["video"],isEnable:null}},w0=reactExports.useMemo(()=>orderedTabs.map(Y0=>x0[Y0]).filter(Y0=>{var e2;return((e2=Y0.isEnable)==null?void 0:e2.call(Y0))!==!1&&(Y0.availableFor.length===0||Y0.availableFor.includes(g0))}),[g0]),[_0,y0]=reactExports.useState(),S0=reactExports.useMemo(()=>{const Y0=w0.findIndex(e2=>e2.id===_0);return 0>Y0||Y0>=w0.length?0:Y0},[w0,_0]),[B0,I0]=reactExports.useState(),[T0,R0]=reactExports.useState(),[E0,C0]=reactExports.useState([]),[G0,F0]=reactExports.useState(),[M0,j0]=reactExports.useState(!1);function D0(Y0){throw w0.findIndex(e2=>e2.id===Y0)<0?"tab.not.visible":"not.implemented.yet"}function $0(Y0){l0.current=void 0,y0(void 0),v0(Y0)}const X0=Y0=>{v0(Y0)},Z0=()=>{v0(null)},N0=Y0=>{l0.current=Y0,"resourceId"in Y0||"appPrefix"in Y0||y0("external-link"),v0("hyperlink")};reactExports.useEffect(()=>{var Y0,e2;const s2=g0||"none";!_0&&typeof((Y0=mediaLibraryTypes[s2])==null?void 0:Y0.defaultTab)=="string"&&y0((e2=mediaLibraryTypes[s2])==null?void 0:e2.defaultTab)},[_0,g0]);const Q0=A0(((f0=mediaLibraryTypes[g0??"none"])==null?void 0:f0.title)??"bbm"),z0=()=>{l0.current=void 0,R0(void 0),I0(void 0),y0(void 0),F0(void 0),C0([])},K0=Y0=>{n0==null||n0(Y0,E0),z0()},H0=reactExports.useCallback(()=>{if(M0)return;const Y0=async e2=>{e2 instanceof Array&&["protected","public"].findIndex(s2=>s2===_e)>=0&&(e2=await odeServices.workspace().transferDocuments(e2,e0??"media-library",_e)),r0(e2)};(async()=>{j0(!0);try{if(G0){const e2=await G0();await Y0(e2)}else T0&&await Y0(T0);z0()}catch{}finally{j0(!1)}})()},[M0,G0,T0,r0,_e,e0]),J0=()=>{t0(E0),z0()};return g0&&jsxRuntimeExports.jsx(MediaLibraryContext.Provider,{value:{appCode:e0,visibility:_e,multiple:i0,type:g0,setResultCounter:I0,setResult:R0,setCancellable:Y0=>C0([...Y0]),setVisibleTab:D0,switchType:$0,setPreSuccess:F0},children:jsxRuntimeExports.jsxs(Modal,{id:"media-library",isOpen:g0!==null,onModalClose:J0,size:"lg",viewport:!0,scrollable:!0,children:[jsxRuntimeExports.jsx(Modal.Header,{onModalClose:J0,children:Q0}),jsxRuntimeExports.jsx(Tabs,{items:w0,defaultId:w0[S0].id,onChange:K0,children:Y0=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[w0.length>1&&jsxRuntimeExports.jsx(Tabs.List,{className:"mt-16"}),jsxRuntimeExports.jsx(Modal.Body,{className:"d-flex",children:jsxRuntimeExports.jsx(Tabs.Panel,{currentItem:Y0,children:Y0==null?void 0:Y0.content})})]})}),jsxRuntimeExports.jsxs(Modal.Footer,{children:[jsxRuntimeExports.jsx(Button,{type:"button",color:"tertiary",variant:"ghost",onClick:J0,children:A0("cancel")}),jsxRuntimeExports.jsx(Button,{type:"button",color:"primary",variant:"filled",disabled:typeof T0>"u"||M0,onClick:H0,children:B0&&B0>1?A0("addMultiple",{number:B0}):A0("add")})]})]})})});Object.assign(MediaLibrary,InnerTabs);function isObject$3(e0){return e0!==null&&typeof e0=="object"&&"constructor"in e0&&e0.constructor===Object}function extend$2(e0,_e){e0===void 0&&(e0={}),_e===void 0&&(_e={}),Object.keys(_e).forEach(i0=>{typeof e0[i0]>"u"?e0[i0]=_e[i0]:isObject$3(_e[i0])&&isObject$3(e0[i0])&&Object.keys(_e[i0]).length>0&&extend$2(e0[i0],_e[i0])})}const ssrDocument={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function getDocument(){const e0=typeof document<"u"?document:{};return extend$2(e0,ssrDocument),e0}const ssrWindow={document:ssrDocument,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function e0(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e0){return typeof setTimeout>"u"?(e0(),null):setTimeout(e0,0)},cancelAnimationFrame(e0){typeof setTimeout>"u"||clearTimeout(e0)}};function getWindow(){const e0=typeof window<"u"?window:{};return extend$2(e0,ssrWindow),e0}function deleteProps(e0){const _e=e0;Object.keys(_e).forEach(i0=>{try{_e[i0]=null}catch{}try{delete _e[i0]}catch{}})}function nextTick(e0,_e){return _e===void 0&&(_e=0),setTimeout(e0,_e)}function now(){return Date.now()}function getComputedStyle$1(e0){const _e=getWindow();let i0;return _e.getComputedStyle&&(i0=_e.getComputedStyle(e0,null)),!i0&&e0.currentStyle&&(i0=e0.currentStyle),i0||(i0=e0.style),i0}function getTranslate(e0,_e){_e===void 0&&(_e="x");const i0=getWindow();let r0,t0,n0;const s0=getComputedStyle$1(e0);return i0.WebKitCSSMatrix?(t0=s0.transform||s0.webkitTransform,t0.split(",").length>6&&(t0=t0.split(", ").map(o0=>o0.replace(",",".")).join(", ")),n0=new i0.WebKitCSSMatrix(t0==="none"?"":t0)):(n0=s0.MozTransform||s0.OTransform||s0.MsTransform||s0.msTransform||s0.transform||s0.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r0=n0.toString().split(",")),_e==="x"&&(i0.WebKitCSSMatrix?t0=n0.m41:r0.length===16?t0=parseFloat(r0[12]):t0=parseFloat(r0[4])),_e==="y"&&(i0.WebKitCSSMatrix?t0=n0.m42:r0.length===16?t0=parseFloat(r0[13]):t0=parseFloat(r0[5])),t0||0}function isObject$2(e0){return typeof e0=="object"&&e0!==null&&e0.constructor&&Object.prototype.toString.call(e0).slice(8,-1)==="Object"}function isNode(e0){return typeof window<"u"&&typeof window.HTMLElement<"u"?e0 instanceof HTMLElement:e0&&(e0.nodeType===1||e0.nodeType===11)}function extend$1(){const e0=Object(arguments.length<=0?void 0:arguments[0]),_e=["__proto__","constructor","prototype"];for(let i0=1;i0<arguments.length;i0+=1){const r0=i0<0||arguments.length<=i0?void 0:arguments[i0];if(r0!=null&&!isNode(r0)){const t0=Object.keys(Object(r0)).filter(n0=>_e.indexOf(n0)<0);for(let n0=0,s0=t0.length;n0<s0;n0+=1){const o0=t0[n0],a0=Object.getOwnPropertyDescriptor(r0,o0);a0!==void 0&&a0.enumerable&&(isObject$2(e0[o0])&&isObject$2(r0[o0])?r0[o0].__swiper__?e0[o0]=r0[o0]:extend$1(e0[o0],r0[o0]):!isObject$2(e0[o0])&&isObject$2(r0[o0])?(e0[o0]={},r0[o0].__swiper__?e0[o0]=r0[o0]:extend$1(e0[o0],r0[o0])):e0[o0]=r0[o0])}}}return e0}function setCSSProperty(e0,_e,i0){e0.style.setProperty(_e,i0)}function animateCSSModeScroll(e0){let{swiper:_e,targetPosition:i0,side:r0}=e0;const t0=getWindow(),n0=-_e.translate;let s0=null,o0;const a0=_e.params.speed;_e.wrapperEl.style.scrollSnapType="none",t0.cancelAnimationFrame(_e.cssModeFrameID);const f0=i0>n0?"next":"prev",l0=(A0,c0)=>f0==="next"&&A0>=c0||f0==="prev"&&A0<=c0,u0=()=>{o0=new Date().getTime(),s0===null&&(s0=o0);const A0=Math.max(Math.min((o0-s0)/a0,1),0),c0=.5-Math.cos(A0*Math.PI)/2;let k0=n0+c0*(i0-n0);if(l0(k0,i0)&&(k0=i0),_e.wrapperEl.scrollTo({[r0]:k0}),l0(k0,i0)){_e.wrapperEl.style.overflow="hidden",_e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{_e.wrapperEl.style.overflow="",_e.wrapperEl.scrollTo({[r0]:k0})}),t0.cancelAnimationFrame(_e.cssModeFrameID);return}_e.cssModeFrameID=t0.requestAnimationFrame(u0)};u0()}function elementChildren(e0,_e){return _e===void 0&&(_e=""),[...e0.children].filter(i0=>i0.matches(_e))}function createElement(e0,_e){_e===void 0&&(_e=[]);const i0=document.createElement(e0);return i0.classList.add(...Array.isArray(_e)?_e:[_e]),i0}function elementPrevAll(e0,_e){const i0=[];for(;e0.previousElementSibling;){const r0=e0.previousElementSibling;_e?r0.matches(_e)&&i0.push(r0):i0.push(r0),e0=r0}return i0}function elementNextAll(e0,_e){const i0=[];for(;e0.nextElementSibling;){const r0=e0.nextElementSibling;_e?r0.matches(_e)&&i0.push(r0):i0.push(r0),e0=r0}return i0}function elementStyle(e0,_e){return getWindow().getComputedStyle(e0,null).getPropertyValue(_e)}function elementIndex(e0){let _e=e0,i0;if(_e){for(i0=0;(_e=_e.previousSibling)!==null;)_e.nodeType===1&&(i0+=1);return i0}}function elementParents(e0,_e){const i0=[];let r0=e0.parentElement;for(;r0;)_e?r0.matches(_e)&&i0.push(r0):i0.push(r0),r0=r0.parentElement;return i0}function elementOuterSize(e0,_e,i0){const r0=getWindow();return e0[_e==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r0.getComputedStyle(e0,null).getPropertyValue(_e==="width"?"margin-right":"margin-top"))+parseFloat(r0.getComputedStyle(e0,null).getPropertyValue(_e==="width"?"margin-left":"margin-bottom"))}function createElementIfNotDefined(e0,_e,i0,r0){return e0.params.createElements&&Object.keys(r0).forEach(t0=>{if(!i0[t0]&&i0.auto===!0){let n0=elementChildren(e0.el,`.${r0[t0]}`)[0];n0||(n0=createElement("div",r0[t0]),n0.className=r0[t0],e0.el.append(n0)),i0[t0]=n0,_e[t0]=n0}}),i0}function classesToSelector(e0){return e0===void 0&&(e0=""),`.${e0.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function Pagination(e0){let{swiper:_e,extendParams:i0,on:r0,emit:t0}=e0;const n0="swiper-pagination";i0({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:p0=>p0,formatFractionTotal:p0=>p0,bulletClass:`${n0}-bullet`,bulletActiveClass:`${n0}-bullet-active`,modifierClass:`${n0}-`,currentClass:`${n0}-current`,totalClass:`${n0}-total`,hiddenClass:`${n0}-hidden`,progressbarFillClass:`${n0}-progressbar-fill`,progressbarOppositeClass:`${n0}-progressbar-opposite`,clickableClass:`${n0}-clickable`,lockClass:`${n0}-lock`,horizontalClass:`${n0}-horizontal`,verticalClass:`${n0}-vertical`,paginationDisabledClass:`${n0}-disabled`}}),_e.pagination={el:null,bullets:[]};let s0,o0=0;const a0=p0=>(Array.isArray(p0)?p0:[p0]).filter(m0=>!!m0);function f0(){return!_e.params.pagination.el||!_e.pagination.el||Array.isArray(_e.pagination.el)&&_e.pagination.el.length===0}function l0(p0,m0){const{bulletActiveClass:g0}=_e.params.pagination;p0&&(p0=p0[`${m0==="prev"?"previous":"next"}ElementSibling`],p0&&(p0.classList.add(`${g0}-${m0}`),p0=p0[`${m0==="prev"?"previous":"next"}ElementSibling`],p0&&p0.classList.add(`${g0}-${m0}-${m0}`)))}function u0(p0){const m0=p0.target.closest(classesToSelector(_e.params.pagination.bulletClass));if(!m0)return;p0.preventDefault();const g0=elementIndex(m0)*_e.params.slidesPerGroup;if(_e.params.loop){if(_e.realIndex===g0)return;const v0=_e.getSlideIndexByData(g0),x0=_e.getSlideIndexByData(_e.realIndex);v0>_e.slides.length-_e.loopedSlides&&_e.loopFix({direction:v0>x0?"next":"prev",activeSlideIndex:v0,slideTo:!1}),_e.slideToLoop(g0)}else _e.slideTo(g0)}function A0(){const p0=_e.rtl,m0=_e.params.pagination;if(f0())return;let g0=_e.pagination.el;g0=a0(g0);let v0,x0;const w0=_e.virtual&&_e.params.virtual.enabled?_e.virtual.slides.length:_e.slides.length,_0=_e.params.loop?Math.ceil(w0/_e.params.slidesPerGroup):_e.snapGrid.length;if(_e.params.loop?(x0=_e.previousRealIndex||0,v0=_e.params.slidesPerGroup>1?Math.floor(_e.realIndex/_e.params.slidesPerGroup):_e.realIndex):typeof _e.snapIndex<"u"?(v0=_e.snapIndex,x0=_e.previousSnapIndex):(x0=_e.previousIndex||0,v0=_e.activeIndex||0),m0.type==="bullets"&&_e.pagination.bullets&&_e.pagination.bullets.length>0){const y0=_e.pagination.bullets;let S0,B0,I0;if(m0.dynamicBullets&&(s0=elementOuterSize(y0[0],_e.isHorizontal()?"width":"height"),g0.forEach(T0=>{T0.style[_e.isHorizontal()?"width":"height"]=`${s0*(m0.dynamicMainBullets+4)}px`}),m0.dynamicMainBullets>1&&x0!==void 0&&(o0+=v0-(x0||0),o0>m0.dynamicMainBullets-1?o0=m0.dynamicMainBullets-1:o0<0&&(o0=0)),S0=Math.max(v0-o0,0),B0=S0+(Math.min(y0.length,m0.dynamicMainBullets)-1),I0=(B0+S0)/2),y0.forEach(T0=>{const R0=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(E0=>`${m0.bulletActiveClass}${E0}`)].map(E0=>typeof E0=="string"&&E0.includes(" ")?E0.split(" "):E0).flat();T0.classList.remove(...R0)}),g0.length>1)y0.forEach(T0=>{const R0=elementIndex(T0);R0===v0?T0.classList.add(...m0.bulletActiveClass.split(" ")):_e.isElement&&T0.setAttribute("part","bullet"),m0.dynamicBullets&&(R0>=S0&&R0<=B0&&T0.classList.add(...`${m0.bulletActiveClass}-main`.split(" ")),R0===S0&&l0(T0,"prev"),R0===B0&&l0(T0,"next"))});else{const T0=y0[v0];if(T0&&T0.classList.add(...m0.bulletActiveClass.split(" ")),_e.isElement&&y0.forEach((R0,E0)=>{R0.setAttribute("part",E0===v0?"bullet-active":"bullet")}),m0.dynamicBullets){const R0=y0[S0],E0=y0[B0];for(let C0=S0;C0<=B0;C0+=1)y0[C0]&&y0[C0].classList.add(...`${m0.bulletActiveClass}-main`.split(" "));l0(R0,"prev"),l0(E0,"next")}}if(m0.dynamicBullets){const T0=Math.min(y0.length,m0.dynamicMainBullets+4),R0=(s0*T0-s0)/2-I0*s0,E0=p0?"right":"left";y0.forEach(C0=>{C0.style[_e.isHorizontal()?E0:"top"]=`${R0}px`})}}g0.forEach((y0,S0)=>{if(m0.type==="fraction"&&(y0.querySelectorAll(classesToSelector(m0.currentClass)).forEach(B0=>{B0.textContent=m0.formatFractionCurrent(v0+1)}),y0.querySelectorAll(classesToSelector(m0.totalClass)).forEach(B0=>{B0.textContent=m0.formatFractionTotal(_0)})),m0.type==="progressbar"){let B0;m0.progressbarOpposite?B0=_e.isHorizontal()?"vertical":"horizontal":B0=_e.isHorizontal()?"horizontal":"vertical";const I0=(v0+1)/_0;let T0=1,R0=1;B0==="horizontal"?T0=I0:R0=I0,y0.querySelectorAll(classesToSelector(m0.progressbarFillClass)).forEach(E0=>{E0.style.transform=`translate3d(0,0,0) scaleX(${T0}) scaleY(${R0})`,E0.style.transitionDuration=`${_e.params.speed}ms`})}m0.type==="custom"&&m0.renderCustom?(y0.innerHTML=m0.renderCustom(_e,v0+1,_0),S0===0&&t0("paginationRender",y0)):(S0===0&&t0("paginationRender",y0),t0("paginationUpdate",y0)),_e.params.watchOverflow&&_e.enabled&&y0.classList[_e.isLocked?"add":"remove"](m0.lockClass)})}function c0(){const p0=_e.params.pagination;if(f0())return;const m0=_e.virtual&&_e.params.virtual.enabled?_e.virtual.slides.length:_e.slides.length;let g0=_e.pagination.el;g0=a0(g0);let v0="";if(p0.type==="bullets"){let x0=_e.params.loop?Math.ceil(m0/_e.params.slidesPerGroup):_e.snapGrid.length;_e.params.freeMode&&_e.params.freeMode.enabled&&x0>m0&&(x0=m0);for(let w0=0;w0<x0;w0+=1)p0.renderBullet?v0+=p0.renderBullet.call(_e,w0,p0.bulletClass):v0+=`<${p0.bulletElement} ${_e.isElement?'part="bullet"':""} class="${p0.bulletClass}"></${p0.bulletElement}>`}p0.type==="fraction"&&(p0.renderFraction?v0=p0.renderFraction.call(_e,p0.currentClass,p0.totalClass):v0=`<span class="${p0.currentClass}"></span> / <span class="${p0.totalClass}"></span>`),p0.type==="progressbar"&&(p0.renderProgressbar?v0=p0.renderProgressbar.call(_e,p0.progressbarFillClass):v0=`<span class="${p0.progressbarFillClass}"></span>`),_e.pagination.bullets=[],g0.forEach(x0=>{p0.type!=="custom"&&(x0.innerHTML=v0||""),p0.type==="bullets"&&_e.pagination.bullets.push(...x0.querySelectorAll(classesToSelector(p0.bulletClass)))}),p0.type!=="custom"&&t0("paginationRender",g0[0])}function k0(){_e.params.pagination=createElementIfNotDefined(_e,_e.originalParams.pagination,_e.params.pagination,{el:"swiper-pagination"});const p0=_e.params.pagination;if(!p0.el)return;let m0;typeof p0.el=="string"&&_e.isElement&&(m0=_e.el.querySelector(p0.el)),!m0&&typeof p0.el=="string"&&(m0=[...document.querySelectorAll(p0.el)]),m0||(m0=p0.el),!(!m0||m0.length===0)&&(_e.params.uniqueNavElements&&typeof p0.el=="string"&&Array.isArray(m0)&&m0.length>1&&(m0=[..._e.el.querySelectorAll(p0.el)],m0.length>1&&(m0=m0.filter(g0=>elementParents(g0,".swiper")[0]===_e.el)[0])),Array.isArray(m0)&&m0.length===1&&(m0=m0[0]),Object.assign(_e.pagination,{el:m0}),m0=a0(m0),m0.forEach(g0=>{p0.type==="bullets"&&p0.clickable&&g0.classList.add(p0.clickableClass),g0.classList.add(p0.modifierClass+p0.type),g0.classList.add(_e.isHorizontal()?p0.horizontalClass:p0.verticalClass),p0.type==="bullets"&&p0.dynamicBullets&&(g0.classList.add(`${p0.modifierClass}${p0.type}-dynamic`),o0=0,p0.dynamicMainBullets<1&&(p0.dynamicMainBullets=1)),p0.type==="progressbar"&&p0.progressbarOpposite&&g0.classList.add(p0.progressbarOppositeClass),p0.clickable&&g0.addEventListener("click",u0),_e.enabled||g0.classList.add(p0.lockClass)}))}function d0(){const p0=_e.params.pagination;if(f0())return;let m0=_e.pagination.el;m0&&(m0=a0(m0),m0.forEach(g0=>{g0.classList.remove(p0.hiddenClass),g0.classList.remove(p0.modifierClass+p0.type),g0.classList.remove(_e.isHorizontal()?p0.horizontalClass:p0.verticalClass),p0.clickable&&g0.removeEventListener("click",u0)})),_e.pagination.bullets&&_e.pagination.bullets.forEach(g0=>g0.classList.remove(...p0.bulletActiveClass.split(" ")))}r0("changeDirection",()=>{if(!_e.pagination||!_e.pagination.el)return;const p0=_e.params.pagination;let{el:m0}=_e.pagination;m0=a0(m0),m0.forEach(g0=>{g0.classList.remove(p0.horizontalClass,p0.verticalClass),g0.classList.add(_e.isHorizontal()?p0.horizontalClass:p0.verticalClass)})}),r0("init",()=>{_e.params.pagination.enabled===!1?b0():(k0(),c0(),A0())}),r0("activeIndexChange",()=>{typeof _e.snapIndex>"u"&&A0()}),r0("snapIndexChange",()=>{A0()}),r0("snapGridLengthChange",()=>{c0(),A0()}),r0("destroy",()=>{d0()}),r0("enable disable",()=>{let{el:p0}=_e.pagination;p0&&(p0=a0(p0),p0.forEach(m0=>m0.classList[_e.enabled?"remove":"add"](_e.params.pagination.lockClass)))}),r0("lock unlock",()=>{A0()}),r0("click",(p0,m0)=>{const g0=m0.target,v0=a0(_e.pagination.el);if(_e.params.pagination.el&&_e.params.pagination.hideOnClick&&v0&&v0.length>0&&!g0.classList.contains(_e.params.pagination.bulletClass)){if(_e.navigation&&(_e.navigation.nextEl&&g0===_e.navigation.nextEl||_e.navigation.prevEl&&g0===_e.navigation.prevEl))return;const x0=v0[0].classList.contains(_e.params.pagination.hiddenClass);t0(x0===!0?"paginationShow":"paginationHide"),v0.forEach(w0=>w0.classList.toggle(_e.params.pagination.hiddenClass))}});const h0=()=>{_e.el.classList.remove(_e.params.pagination.paginationDisabledClass);let{el:p0}=_e.pagination;p0&&(p0=a0(p0),p0.forEach(m0=>m0.classList.remove(_e.params.pagination.paginationDisabledClass))),k0(),c0(),A0()},b0=()=>{_e.el.classList.add(_e.params.pagination.paginationDisabledClass);let{el:p0}=_e.pagination;p0&&(p0=a0(p0),p0.forEach(m0=>m0.classList.add(_e.params.pagination.paginationDisabledClass))),d0()};Object.assign(_e.pagination,{enable:h0,disable:b0,render:c0,update:A0,init:k0,destroy:d0})}let support;function calcSupport(){const e0=getWindow(),_e=getDocument();return{smoothScroll:_e.documentElement&&_e.documentElement.style&&"scrollBehavior"in _e.documentElement.style,touch:!!("ontouchstart"in e0||e0.DocumentTouch&&_e instanceof e0.DocumentTouch)}}function getSupport(){return support||(support=calcSupport()),support}let deviceCached;function calcDevice(e0){let{userAgent:_e}=e0===void 0?{}:e0;const i0=getSupport(),r0=getWindow(),t0=r0.navigator.platform,n0=_e||r0.navigator.userAgent,s0={ios:!1,android:!1},o0=r0.screen.width,a0=r0.screen.height,f0=n0.match(/(Android);?[\s\/]+([\d.]+)?/);let l0=n0.match(/(iPad).*OS\s([\d_]+)/);const u0=n0.match(/(iPod)(.*OS\s([\d_]+))?/),A0=!l0&&n0.match(/(iPhone\sOS|iOS)\s([\d_]+)/),c0=t0==="Win32";let k0=t0==="MacIntel";const d0=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!l0&&k0&&i0.touch&&d0.indexOf(`${o0}x${a0}`)>=0&&(l0=n0.match(/(Version)\/([\d.]+)/),l0||(l0=[0,1,"13_0_0"]),k0=!1),f0&&!c0&&(s0.os="android",s0.android=!0),(l0||A0||u0)&&(s0.os="ios",s0.ios=!0),s0}function getDevice(e0){return e0===void 0&&(e0={}),deviceCached||(deviceCached=calcDevice(e0)),deviceCached}let browser;function calcBrowser(){const e0=getWindow();let _e=!1;function i0(){const r0=e0.navigator.userAgent.toLowerCase();return r0.indexOf("safari")>=0&&r0.indexOf("chrome")<0&&r0.indexOf("android")<0}if(i0()){const r0=String(e0.navigator.userAgent);if(r0.includes("Version/")){const[t0,n0]=r0.split("Version/")[1].split(" ")[0].split(".").map(s0=>Number(s0));_e=t0<16||t0===16&&n0<2}}return{isSafari:_e||i0(),needPerspectiveFix:_e,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e0.navigator.userAgent)}}function getBrowser(){return browser||(browser=calcBrowser()),browser}function Resize(e0){let{swiper:_e,on:i0,emit:r0}=e0;const t0=getWindow();let n0=null,s0=null;const o0=()=>{!_e||_e.destroyed||!_e.initialized||(r0("beforeResize"),r0("resize"))},a0=()=>{!_e||_e.destroyed||!_e.initialized||(n0=new ResizeObserver(u0=>{s0=t0.requestAnimationFrame(()=>{const{width:A0,height:c0}=_e;let k0=A0,d0=c0;u0.forEach(h0=>{let{contentBoxSize:b0,contentRect:p0,target:m0}=h0;m0&&m0!==_e.el||(k0=p0?p0.width:(b0[0]||b0).inlineSize,d0=p0?p0.height:(b0[0]||b0).blockSize)}),(k0!==A0||d0!==c0)&&o0()})}),n0.observe(_e.el))},f0=()=>{s0&&t0.cancelAnimationFrame(s0),n0&&n0.unobserve&&_e.el&&(n0.unobserve(_e.el),n0=null)},l0=()=>{!_e||_e.destroyed||!_e.initialized||r0("orientationchange")};i0("init",()=>{if(_e.params.resizeObserver&&typeof t0.ResizeObserver<"u"){a0();return}t0.addEventListener("resize",o0),t0.addEventListener("orientationchange",l0)}),i0("destroy",()=>{f0(),t0.removeEventListener("resize",o0),t0.removeEventListener("orientationchange",l0)})}function Observer(e0){let{swiper:_e,extendParams:i0,on:r0,emit:t0}=e0;const n0=[],s0=getWindow(),o0=function(l0,u0){u0===void 0&&(u0={});const A0=s0.MutationObserver||s0.WebkitMutationObserver,c0=new A0(k0=>{if(_e.__preventObserver__)return;if(k0.length===1){t0("observerUpdate",k0[0]);return}const d0=function(){t0("observerUpdate",k0[0])};s0.requestAnimationFrame?s0.requestAnimationFrame(d0):s0.setTimeout(d0,0)});c0.observe(l0,{attributes:typeof u0.attributes>"u"?!0:u0.attributes,childList:typeof u0.childList>"u"?!0:u0.childList,characterData:typeof u0.characterData>"u"?!0:u0.characterData}),n0.push(c0)},a0=()=>{if(_e.params.observer){if(_e.params.observeParents){const l0=elementParents(_e.hostEl);for(let u0=0;u0<l0.length;u0+=1)o0(l0[u0])}o0(_e.hostEl,{childList:_e.params.observeSlideChildren}),o0(_e.wrapperEl,{attributes:!1})}},f0=()=>{n0.forEach(l0=>{l0.disconnect()}),n0.splice(0,n0.length)};i0({observer:!1,observeParents:!1,observeSlideChildren:!1}),r0("init",a0),r0("destroy",f0)}var eventsEmitter={on(e0,_e,i0){const r0=this;if(!r0.eventsListeners||r0.destroyed||typeof _e!="function")return r0;const t0=i0?"unshift":"push";return e0.split(" ").forEach(n0=>{r0.eventsListeners[n0]||(r0.eventsListeners[n0]=[]),r0.eventsListeners[n0][t0](_e)}),r0},once(e0,_e,i0){const r0=this;if(!r0.eventsListeners||r0.destroyed||typeof _e!="function")return r0;function t0(){r0.off(e0,t0),t0.__emitterProxy&&delete t0.__emitterProxy;for(var n0=arguments.length,s0=new Array(n0),o0=0;o0<n0;o0++)s0[o0]=arguments[o0];_e.apply(r0,s0)}return t0.__emitterProxy=_e,r0.on(e0,t0,i0)},onAny(e0,_e){const i0=this;if(!i0.eventsListeners||i0.destroyed||typeof e0!="function")return i0;const r0=_e?"unshift":"push";return i0.eventsAnyListeners.indexOf(e0)<0&&i0.eventsAnyListeners[r0](e0),i0},offAny(e0){const _e=this;if(!_e.eventsListeners||_e.destroyed||!_e.eventsAnyListeners)return _e;const i0=_e.eventsAnyListeners.indexOf(e0);return i0>=0&&_e.eventsAnyListeners.splice(i0,1),_e},off(e0,_e){const i0=this;return!i0.eventsListeners||i0.destroyed||!i0.eventsListeners||e0.split(" ").forEach(r0=>{typeof _e>"u"?i0.eventsListeners[r0]=[]:i0.eventsListeners[r0]&&i0.eventsListeners[r0].forEach((t0,n0)=>{(t0===_e||t0.__emitterProxy&&t0.__emitterProxy===_e)&&i0.eventsListeners[r0].splice(n0,1)})}),i0},emit(){const e0=this;if(!e0.eventsListeners||e0.destroyed||!e0.eventsListeners)return e0;let _e,i0,r0;for(var t0=arguments.length,n0=new Array(t0),s0=0;s0<t0;s0++)n0[s0]=arguments[s0];return typeof n0[0]=="string"||Array.isArray(n0[0])?(_e=n0[0],i0=n0.slice(1,n0.length),r0=e0):(_e=n0[0].events,i0=n0[0].data,r0=n0[0].context||e0),i0.unshift(r0),(Array.isArray(_e)?_e:_e.split(" ")).forEach(a0=>{e0.eventsAnyListeners&&e0.eventsAnyListeners.length&&e0.eventsAnyListeners.forEach(f0=>{f0.apply(r0,[a0,...i0])}),e0.eventsListeners&&e0.eventsListeners[a0]&&e0.eventsListeners[a0].forEach(f0=>{f0.apply(r0,i0)})}),e0}};function updateSize(){const e0=this;let _e,i0;const r0=e0.el;typeof e0.params.width<"u"&&e0.params.width!==null?_e=e0.params.width:_e=r0.clientWidth,typeof e0.params.height<"u"&&e0.params.height!==null?i0=e0.params.height:i0=r0.clientHeight,!(_e===0&&e0.isHorizontal()||i0===0&&e0.isVertical())&&(_e=_e-parseInt(elementStyle(r0,"padding-left")||0,10)-parseInt(elementStyle(r0,"padding-right")||0,10),i0=i0-parseInt(elementStyle(r0,"padding-top")||0,10)-parseInt(elementStyle(r0,"padding-bottom")||0,10),Number.isNaN(_e)&&(_e=0),Number.isNaN(i0)&&(i0=0),Object.assign(e0,{width:_e,height:i0,size:e0.isHorizontal()?_e:i0}))}function updateSlides(){const e0=this;function _e(B0){return e0.isHorizontal()?B0:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[B0]}function i0(B0,I0){return parseFloat(B0.getPropertyValue(_e(I0))||0)}const r0=e0.params,{wrapperEl:t0,slidesEl:n0,size:s0,rtlTranslate:o0,wrongRTL:a0}=e0,f0=e0.virtual&&r0.virtual.enabled,l0=f0?e0.virtual.slides.length:e0.slides.length,u0=elementChildren(n0,`.${e0.params.slideClass}, swiper-slide`),A0=f0?e0.virtual.slides.length:u0.length;let c0=[];const k0=[],d0=[];let h0=r0.slidesOffsetBefore;typeof h0=="function"&&(h0=r0.slidesOffsetBefore.call(e0));let b0=r0.slidesOffsetAfter;typeof b0=="function"&&(b0=r0.slidesOffsetAfter.call(e0));const p0=e0.snapGrid.length,m0=e0.slidesGrid.length;let g0=r0.spaceBetween,v0=-h0,x0=0,w0=0;if(typeof s0>"u")return;typeof g0=="string"&&g0.indexOf("%")>=0?g0=parseFloat(g0.replace("%",""))/100*s0:typeof g0=="string"&&(g0=parseFloat(g0)),e0.virtualSize=-g0,u0.forEach(B0=>{o0?B0.style.marginLeft="":B0.style.marginRight="",B0.style.marginBottom="",B0.style.marginTop=""}),r0.centeredSlides&&r0.cssMode&&(setCSSProperty(t0,"--swiper-centered-offset-before",""),setCSSProperty(t0,"--swiper-centered-offset-after",""));const _0=r0.grid&&r0.grid.rows>1&&e0.grid;_0&&e0.grid.initSlides(A0);let y0;const S0=r0.slidesPerView==="auto"&&r0.breakpoints&&Object.keys(r0.breakpoints).filter(B0=>typeof r0.breakpoints[B0].slidesPerView<"u").length>0;for(let B0=0;B0<A0;B0+=1){y0=0;let I0;if(u0[B0]&&(I0=u0[B0]),_0&&e0.grid.updateSlide(B0,I0,A0,_e),!(u0[B0]&&elementStyle(I0,"display")==="none")){if(r0.slidesPerView==="auto"){S0&&(u0[B0].style[_e("width")]="");const T0=getComputedStyle(I0),R0=I0.style.transform,E0=I0.style.webkitTransform;if(R0&&(I0.style.transform="none"),E0&&(I0.style.webkitTransform="none"),r0.roundLengths)y0=e0.isHorizontal()?elementOuterSize(I0,"width"):elementOuterSize(I0,"height");else{const C0=i0(T0,"width"),G0=i0(T0,"padding-left"),F0=i0(T0,"padding-right"),M0=i0(T0,"margin-left"),j0=i0(T0,"margin-right"),D0=T0.getPropertyValue("box-sizing");if(D0&&D0==="border-box")y0=C0+M0+j0;else{const{clientWidth:$0,offsetWidth:X0}=I0;y0=C0+G0+F0+M0+j0+(X0-$0)}}R0&&(I0.style.transform=R0),E0&&(I0.style.webkitTransform=E0),r0.roundLengths&&(y0=Math.floor(y0))}else y0=(s0-(r0.slidesPerView-1)*g0)/r0.slidesPerView,r0.roundLengths&&(y0=Math.floor(y0)),u0[B0]&&(u0[B0].style[_e("width")]=`${y0}px`);u0[B0]&&(u0[B0].swiperSlideSize=y0),d0.push(y0),r0.centeredSlides?(v0=v0+y0/2+x0/2+g0,x0===0&&B0!==0&&(v0=v0-s0/2-g0),B0===0&&(v0=v0-s0/2-g0),Math.abs(v0)<1/1e3&&(v0=0),r0.roundLengths&&(v0=Math.floor(v0)),w0%r0.slidesPerGroup===0&&c0.push(v0),k0.push(v0)):(r0.roundLengths&&(v0=Math.floor(v0)),(w0-Math.min(e0.params.slidesPerGroupSkip,w0))%e0.params.slidesPerGroup===0&&c0.push(v0),k0.push(v0),v0=v0+y0+g0),e0.virtualSize+=y0+g0,x0=y0,w0+=1}}if(e0.virtualSize=Math.max(e0.virtualSize,s0)+b0,o0&&a0&&(r0.effect==="slide"||r0.effect==="coverflow")&&(t0.style.width=`${e0.virtualSize+g0}px`),r0.setWrapperSize&&(t0.style[_e("width")]=`${e0.virtualSize+g0}px`),_0&&e0.grid.updateWrapperSize(y0,c0,_e),!r0.centeredSlides){const B0=[];for(let I0=0;I0<c0.length;I0+=1){let T0=c0[I0];r0.roundLengths&&(T0=Math.floor(T0)),c0[I0]<=e0.virtualSize-s0&&B0.push(T0)}c0=B0,Math.floor(e0.virtualSize-s0)-Math.floor(c0[c0.length-1])>1&&c0.push(e0.virtualSize-s0)}if(f0&&r0.loop){const B0=d0[0]+g0;if(r0.slidesPerGroup>1){const I0=Math.ceil((e0.virtual.slidesBefore+e0.virtual.slidesAfter)/r0.slidesPerGroup),T0=B0*r0.slidesPerGroup;for(let R0=0;R0<I0;R0+=1)c0.push(c0[c0.length-1]+T0)}for(let I0=0;I0<e0.virtual.slidesBefore+e0.virtual.slidesAfter;I0+=1)r0.slidesPerGroup===1&&c0.push(c0[c0.length-1]+B0),k0.push(k0[k0.length-1]+B0),e0.virtualSize+=B0}if(c0.length===0&&(c0=[0]),g0!==0){const B0=e0.isHorizontal()&&o0?"marginLeft":_e("marginRight");u0.filter((I0,T0)=>!r0.cssMode||r0.loop?!0:T0!==u0.length-1).forEach(I0=>{I0.style[B0]=`${g0}px`})}if(r0.centeredSlides&&r0.centeredSlidesBounds){let B0=0;d0.forEach(T0=>{B0+=T0+(g0||0)}),B0-=g0;const I0=B0-s0;c0=c0.map(T0=>T0<=0?-h0:T0>I0?I0+b0:T0)}if(r0.centerInsufficientSlides){let B0=0;if(d0.forEach(I0=>{B0+=I0+(g0||0)}),B0-=g0,B0<s0){const I0=(s0-B0)/2;c0.forEach((T0,R0)=>{c0[R0]=T0-I0}),k0.forEach((T0,R0)=>{k0[R0]=T0+I0})}}if(Object.assign(e0,{slides:u0,snapGrid:c0,slidesGrid:k0,slidesSizesGrid:d0}),r0.centeredSlides&&r0.cssMode&&!r0.centeredSlidesBounds){setCSSProperty(t0,"--swiper-centered-offset-before",`${-c0[0]}px`),setCSSProperty(t0,"--swiper-centered-offset-after",`${e0.size/2-d0[d0.length-1]/2}px`);const B0=-e0.snapGrid[0],I0=-e0.slidesGrid[0];e0.snapGrid=e0.snapGrid.map(T0=>T0+B0),e0.slidesGrid=e0.slidesGrid.map(T0=>T0+I0)}if(A0!==l0&&e0.emit("slidesLengthChange"),c0.length!==p0&&(e0.params.watchOverflow&&e0.checkOverflow(),e0.emit("snapGridLengthChange")),k0.length!==m0&&e0.emit("slidesGridLengthChange"),r0.watchSlidesProgress&&e0.updateSlidesOffset(),!f0&&!r0.cssMode&&(r0.effect==="slide"||r0.effect==="fade")){const B0=`${r0.containerModifierClass}backface-hidden`,I0=e0.el.classList.contains(B0);A0<=r0.maxBackfaceHiddenSlides?I0||e0.el.classList.add(B0):I0&&e0.el.classList.remove(B0)}}function updateAutoHeight(e0){const _e=this,i0=[],r0=_e.virtual&&_e.params.virtual.enabled;let t0=0,n0;typeof e0=="number"?_e.setTransition(e0):e0===!0&&_e.setTransition(_e.params.speed);const s0=o0=>r0?_e.slides[_e.getSlideIndexByData(o0)]:_e.slides[o0];if(_e.params.slidesPerView!=="auto"&&_e.params.slidesPerView>1)if(_e.params.centeredSlides)(_e.visibleSlides||[]).forEach(o0=>{i0.push(o0)});else for(n0=0;n0<Math.ceil(_e.params.slidesPerView);n0+=1){const o0=_e.activeIndex+n0;if(o0>_e.slides.length&&!r0)break;i0.push(s0(o0))}else i0.push(s0(_e.activeIndex));for(n0=0;n0<i0.length;n0+=1)if(typeof i0[n0]<"u"){const o0=i0[n0].offsetHeight;t0=o0>t0?o0:t0}(t0||t0===0)&&(_e.wrapperEl.style.height=`${t0}px`)}function updateSlidesOffset(){const e0=this,_e=e0.slides,i0=e0.isElement?e0.isHorizontal()?e0.wrapperEl.offsetLeft:e0.wrapperEl.offsetTop:0;for(let r0=0;r0<_e.length;r0+=1)_e[r0].swiperSlideOffset=(e0.isHorizontal()?_e[r0].offsetLeft:_e[r0].offsetTop)-i0-e0.cssOverflowAdjustment()}function updateSlidesProgress(e0){e0===void 0&&(e0=this&&this.translate||0);const _e=this,i0=_e.params,{slides:r0,rtlTranslate:t0,snapGrid:n0}=_e;if(r0.length===0)return;typeof r0[0].swiperSlideOffset>"u"&&_e.updateSlidesOffset();let s0=-e0;t0&&(s0=e0),r0.forEach(a0=>{a0.classList.remove(i0.slideVisibleClass)}),_e.visibleSlidesIndexes=[],_e.visibleSlides=[];let o0=i0.spaceBetween;typeof o0=="string"&&o0.indexOf("%")>=0?o0=parseFloat(o0.replace("%",""))/100*_e.size:typeof o0=="string"&&(o0=parseFloat(o0));for(let a0=0;a0<r0.length;a0+=1){const f0=r0[a0];let l0=f0.swiperSlideOffset;i0.cssMode&&i0.centeredSlides&&(l0-=r0[0].swiperSlideOffset);const u0=(s0+(i0.centeredSlides?_e.minTranslate():0)-l0)/(f0.swiperSlideSize+o0),A0=(s0-n0[0]+(i0.centeredSlides?_e.minTranslate():0)-l0)/(f0.swiperSlideSize+o0),c0=-(s0-l0),k0=c0+_e.slidesSizesGrid[a0];(c0>=0&&c0<_e.size-1||k0>1&&k0<=_e.size||c0<=0&&k0>=_e.size)&&(_e.visibleSlides.push(f0),_e.visibleSlidesIndexes.push(a0),r0[a0].classList.add(i0.slideVisibleClass)),f0.progress=t0?-u0:u0,f0.originalProgress=t0?-A0:A0}}function updateProgress(e0){const _e=this;if(typeof e0>"u"){const l0=_e.rtlTranslate?-1:1;e0=_e&&_e.translate&&_e.translate*l0||0}const i0=_e.params,r0=_e.maxTranslate()-_e.minTranslate();let{progress:t0,isBeginning:n0,isEnd:s0,progressLoop:o0}=_e;const a0=n0,f0=s0;if(r0===0)t0=0,n0=!0,s0=!0;else{t0=(e0-_e.minTranslate())/r0;const l0=Math.abs(e0-_e.minTranslate())<1,u0=Math.abs(e0-_e.maxTranslate())<1;n0=l0||t0<=0,s0=u0||t0>=1,l0&&(t0=0),u0&&(t0=1)}if(i0.loop){const l0=_e.getSlideIndexByData(0),u0=_e.getSlideIndexByData(_e.slides.length-1),A0=_e.slidesGrid[l0],c0=_e.slidesGrid[u0],k0=_e.slidesGrid[_e.slidesGrid.length-1],d0=Math.abs(e0);d0>=A0?o0=(d0-A0)/k0:o0=(d0+k0-c0)/k0,o0>1&&(o0-=1)}Object.assign(_e,{progress:t0,progressLoop:o0,isBeginning:n0,isEnd:s0}),(i0.watchSlidesProgress||i0.centeredSlides&&i0.autoHeight)&&_e.updateSlidesProgress(e0),n0&&!a0&&_e.emit("reachBeginning toEdge"),s0&&!f0&&_e.emit("reachEnd toEdge"),(a0&&!n0||f0&&!s0)&&_e.emit("fromEdge"),_e.emit("progress",t0)}function updateSlidesClasses(){const e0=this,{slides:_e,params:i0,slidesEl:r0,activeIndex:t0}=e0,n0=e0.virtual&&i0.virtual.enabled,s0=a0=>elementChildren(r0,`.${i0.slideClass}${a0}, swiper-slide${a0}`)[0];_e.forEach(a0=>{a0.classList.remove(i0.slideActiveClass,i0.slideNextClass,i0.slidePrevClass)});let o0;if(n0)if(i0.loop){let a0=t0-e0.virtual.slidesBefore;a0<0&&(a0=e0.virtual.slides.length+a0),a0>=e0.virtual.slides.length&&(a0-=e0.virtual.slides.length),o0=s0(`[data-swiper-slide-index="${a0}"]`)}else o0=s0(`[data-swiper-slide-index="${t0}"]`);else o0=_e[t0];if(o0){o0.classList.add(i0.slideActiveClass);let a0=elementNextAll(o0,`.${i0.slideClass}, swiper-slide`)[0];i0.loop&&!a0&&(a0=_e[0]),a0&&a0.classList.add(i0.slideNextClass);let f0=elementPrevAll(o0,`.${i0.slideClass}, swiper-slide`)[0];i0.loop&&!f0===0&&(f0=_e[_e.length-1]),f0&&f0.classList.add(i0.slidePrevClass)}e0.emitSlidesClasses()}const processLazyPreloader=(e0,_e)=>{if(!e0||e0.destroyed||!e0.params)return;const i0=()=>e0.isElement?"swiper-slide":`.${e0.params.slideClass}`,r0=_e.closest(i0());if(r0){const t0=r0.querySelector(`.${e0.params.lazyPreloaderClass}`);t0&&t0.remove()}},unlazy=(e0,_e)=>{if(!e0.slides[_e])return;const i0=e0.slides[_e].querySelector('[loading="lazy"]');i0&&i0.removeAttribute("loading")},preload=e0=>{if(!e0||e0.destroyed||!e0.params)return;let _e=e0.params.lazyPreloadPrevNext;const i0=e0.slides.length;if(!i0||!_e||_e<0)return;_e=Math.min(_e,i0);const r0=e0.params.slidesPerView==="auto"?e0.slidesPerViewDynamic():Math.ceil(e0.params.slidesPerView),t0=e0.activeIndex;if(e0.params.grid&&e0.params.grid.rows>1){const s0=t0,o0=[s0-_e];o0.push(...Array.from({length:_e}).map((a0,f0)=>s0+r0+f0)),e0.slides.forEach((a0,f0)=>{o0.includes(a0.column)&&unlazy(e0,f0)});return}const n0=t0+r0-1;if(e0.params.rewind||e0.params.loop)for(let s0=t0-_e;s0<=n0+_e;s0+=1){const o0=(s0%i0+i0)%i0;(o0<t0||o0>n0)&&unlazy(e0,o0)}else for(let s0=Math.max(t0-_e,0);s0<=Math.min(n0+_e,i0-1);s0+=1)s0!==t0&&(s0>n0||s0<t0)&&unlazy(e0,s0)};function getActiveIndexByTranslate(e0){const{slidesGrid:_e,params:i0}=e0,r0=e0.rtlTranslate?e0.translate:-e0.translate;let t0;for(let n0=0;n0<_e.length;n0+=1)typeof _e[n0+1]<"u"?r0>=_e[n0]&&r0<_e[n0+1]-(_e[n0+1]-_e[n0])/2?t0=n0:r0>=_e[n0]&&r0<_e[n0+1]&&(t0=n0+1):r0>=_e[n0]&&(t0=n0);return i0.normalizeSlideIndex&&(t0<0||typeof t0>"u")&&(t0=0),t0}function updateActiveIndex(e0){const _e=this,i0=_e.rtlTranslate?_e.translate:-_e.translate,{snapGrid:r0,params:t0,activeIndex:n0,realIndex:s0,snapIndex:o0}=_e;let a0=e0,f0;const l0=A0=>{let c0=A0-_e.virtual.slidesBefore;return c0<0&&(c0=_e.virtual.slides.length+c0),c0>=_e.virtual.slides.length&&(c0-=_e.virtual.slides.length),c0};if(typeof a0>"u"&&(a0=getActiveIndexByTranslate(_e)),r0.indexOf(i0)>=0)f0=r0.indexOf(i0);else{const A0=Math.min(t0.slidesPerGroupSkip,a0);f0=A0+Math.floor((a0-A0)/t0.slidesPerGroup)}if(f0>=r0.length&&(f0=r0.length-1),a0===n0){f0!==o0&&(_e.snapIndex=f0,_e.emit("snapIndexChange")),_e.params.loop&&_e.virtual&&_e.params.virtual.enabled&&(_e.realIndex=l0(a0));return}let u0;_e.virtual&&t0.virtual.enabled&&t0.loop?u0=l0(a0):_e.slides[a0]?u0=parseInt(_e.slides[a0].getAttribute("data-swiper-slide-index")||a0,10):u0=a0,Object.assign(_e,{previousSnapIndex:o0,snapIndex:f0,previousRealIndex:s0,realIndex:u0,previousIndex:n0,activeIndex:a0}),_e.initialized&&preload(_e),_e.emit("activeIndexChange"),_e.emit("snapIndexChange"),s0!==u0&&_e.emit("realIndexChange"),(_e.initialized||_e.params.runCallbacksOnInit)&&_e.emit("slideChange")}function updateClickedSlide(e0){const _e=this,i0=_e.params,r0=e0.closest(`.${i0.slideClass}, swiper-slide`);let t0=!1,n0;if(r0){for(let s0=0;s0<_e.slides.length;s0+=1)if(_e.slides[s0]===r0){t0=!0,n0=s0;break}}if(r0&&t0)_e.clickedSlide=r0,_e.virtual&&_e.params.virtual.enabled?_e.clickedIndex=parseInt(r0.getAttribute("data-swiper-slide-index"),10):_e.clickedIndex=n0;else{_e.clickedSlide=void 0,_e.clickedIndex=void 0;return}i0.slideToClickedSlide&&_e.clickedIndex!==void 0&&_e.clickedIndex!==_e.activeIndex&&_e.slideToClickedSlide()}var update={updateSize,updateSlides,updateAutoHeight,updateSlidesOffset,updateSlidesProgress,updateProgress,updateSlidesClasses,updateActiveIndex,updateClickedSlide};function getSwiperTranslate(e0){e0===void 0&&(e0=this.isHorizontal()?"x":"y");const _e=this,{params:i0,rtlTranslate:r0,translate:t0,wrapperEl:n0}=_e;if(i0.virtualTranslate)return r0?-t0:t0;if(i0.cssMode)return t0;let s0=getTranslate(n0,e0);return s0+=_e.cssOverflowAdjustment(),r0&&(s0=-s0),s0||0}function setTranslate(e0,_e){const i0=this,{rtlTranslate:r0,params:t0,wrapperEl:n0,progress:s0}=i0;let o0=0,a0=0;const f0=0;i0.isHorizontal()?o0=r0?-e0:e0:a0=e0,t0.roundLengths&&(o0=Math.floor(o0),a0=Math.floor(a0)),i0.previousTranslate=i0.translate,i0.translate=i0.isHorizontal()?o0:a0,t0.cssMode?n0[i0.isHorizontal()?"scrollLeft":"scrollTop"]=i0.isHorizontal()?-o0:-a0:t0.virtualTranslate||(i0.isHorizontal()?o0-=i0.cssOverflowAdjustment():a0-=i0.cssOverflowAdjustment(),n0.style.transform=`translate3d(${o0}px, ${a0}px, ${f0}px)`);let l0;const u0=i0.maxTranslate()-i0.minTranslate();u0===0?l0=0:l0=(e0-i0.minTranslate())/u0,l0!==s0&&i0.updateProgress(e0),i0.emit("setTranslate",i0.translate,_e)}function minTranslate(){return-this.snapGrid[0]}function maxTranslate(){return-this.snapGrid[this.snapGrid.length-1]}function translateTo(e0,_e,i0,r0,t0){e0===void 0&&(e0=0),_e===void 0&&(_e=this.params.speed),i0===void 0&&(i0=!0),r0===void 0&&(r0=!0);const n0=this,{params:s0,wrapperEl:o0}=n0;if(n0.animating&&s0.preventInteractionOnTransition)return!1;const a0=n0.minTranslate(),f0=n0.maxTranslate();let l0;if(r0&&e0>a0?l0=a0:r0&&e0<f0?l0=f0:l0=e0,n0.updateProgress(l0),s0.cssMode){const u0=n0.isHorizontal();if(_e===0)o0[u0?"scrollLeft":"scrollTop"]=-l0;else{if(!n0.support.smoothScroll)return animateCSSModeScroll({swiper:n0,targetPosition:-l0,side:u0?"left":"top"}),!0;o0.scrollTo({[u0?"left":"top"]:-l0,behavior:"smooth"})}return!0}return _e===0?(n0.setTransition(0),n0.setTranslate(l0),i0&&(n0.emit("beforeTransitionStart",_e,t0),n0.emit("transitionEnd"))):(n0.setTransition(_e),n0.setTranslate(l0),i0&&(n0.emit("beforeTransitionStart",_e,t0),n0.emit("transitionStart")),n0.animating||(n0.animating=!0,n0.onTranslateToWrapperTransitionEnd||(n0.onTranslateToWrapperTransitionEnd=function(A0){!n0||n0.destroyed||A0.target===this&&(n0.wrapperEl.removeEventListener("transitionend",n0.onTranslateToWrapperTransitionEnd),n0.onTranslateToWrapperTransitionEnd=null,delete n0.onTranslateToWrapperTransitionEnd,i0&&n0.emit("transitionEnd"))}),n0.wrapperEl.addEventListener("transitionend",n0.onTranslateToWrapperTransitionEnd))),!0}var translate={getTranslate:getSwiperTranslate,setTranslate,minTranslate,maxTranslate,translateTo};function setTransition(e0,_e){const i0=this;i0.params.cssMode||(i0.wrapperEl.style.transitionDuration=`${e0}ms`),i0.emit("setTransition",e0,_e)}function transitionEmit(e0){let{swiper:_e,runCallbacks:i0,direction:r0,step:t0}=e0;const{activeIndex:n0,previousIndex:s0}=_e;let o0=r0;if(o0||(n0>s0?o0="next":n0<s0?o0="prev":o0="reset"),_e.emit(`transition${t0}`),i0&&n0!==s0){if(o0==="reset"){_e.emit(`slideResetTransition${t0}`);return}_e.emit(`slideChangeTransition${t0}`),o0==="next"?_e.emit(`slideNextTransition${t0}`):_e.emit(`slidePrevTransition${t0}`)}}function transitionStart(e0,_e){e0===void 0&&(e0=!0);const i0=this,{params:r0}=i0;r0.cssMode||(r0.autoHeight&&i0.updateAutoHeight(),transitionEmit({swiper:i0,runCallbacks:e0,direction:_e,step:"Start"}))}function transitionEnd(e0,_e){e0===void 0&&(e0=!0);const i0=this,{params:r0}=i0;i0.animating=!1,!r0.cssMode&&(i0.setTransition(0),transitionEmit({swiper:i0,runCallbacks:e0,direction:_e,step:"End"}))}var transition={setTransition,transitionStart,transitionEnd};function slideTo(e0,_e,i0,r0,t0){e0===void 0&&(e0=0),_e===void 0&&(_e=this.params.speed),i0===void 0&&(i0=!0),typeof e0=="string"&&(e0=parseInt(e0,10));const n0=this;let s0=e0;s0<0&&(s0=0);const{params:o0,snapGrid:a0,slidesGrid:f0,previousIndex:l0,activeIndex:u0,rtlTranslate:A0,wrapperEl:c0,enabled:k0}=n0;if(n0.animating&&o0.preventInteractionOnTransition||!k0&&!r0&&!t0)return!1;const d0=Math.min(n0.params.slidesPerGroupSkip,s0);let h0=d0+Math.floor((s0-d0)/n0.params.slidesPerGroup);h0>=a0.length&&(h0=a0.length-1);const b0=-a0[h0];if(o0.normalizeSlideIndex)for(let m0=0;m0<f0.length;m0+=1){const g0=-Math.floor(b0*100),v0=Math.floor(f0[m0]*100),x0=Math.floor(f0[m0+1]*100);typeof f0[m0+1]<"u"?g0>=v0&&g0<x0-(x0-v0)/2?s0=m0:g0>=v0&&g0<x0&&(s0=m0+1):g0>=v0&&(s0=m0)}if(n0.initialized&&s0!==u0&&(!n0.allowSlideNext&&(A0?b0>n0.translate&&b0>n0.minTranslate():b0<n0.translate&&b0<n0.minTranslate())||!n0.allowSlidePrev&&b0>n0.translate&&b0>n0.maxTranslate()&&(u0||0)!==s0))return!1;s0!==(l0||0)&&i0&&n0.emit("beforeSlideChangeStart"),n0.updateProgress(b0);let p0;if(s0>u0?p0="next":s0<u0?p0="prev":p0="reset",A0&&-b0===n0.translate||!A0&&b0===n0.translate)return n0.updateActiveIndex(s0),o0.autoHeight&&n0.updateAutoHeight(),n0.updateSlidesClasses(),o0.effect!=="slide"&&n0.setTranslate(b0),p0!=="reset"&&(n0.transitionStart(i0,p0),n0.transitionEnd(i0,p0)),!1;if(o0.cssMode){const m0=n0.isHorizontal(),g0=A0?b0:-b0;if(_e===0){const v0=n0.virtual&&n0.params.virtual.enabled;v0&&(n0.wrapperEl.style.scrollSnapType="none",n0._immediateVirtual=!0),v0&&!n0._cssModeVirtualInitialSet&&n0.params.initialSlide>0?(n0._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{c0[m0?"scrollLeft":"scrollTop"]=g0})):c0[m0?"scrollLeft":"scrollTop"]=g0,v0&&requestAnimationFrame(()=>{n0.wrapperEl.style.scrollSnapType="",n0._immediateVirtual=!1})}else{if(!n0.support.smoothScroll)return animateCSSModeScroll({swiper:n0,targetPosition:g0,side:m0?"left":"top"}),!0;c0.scrollTo({[m0?"left":"top"]:g0,behavior:"smooth"})}return!0}return n0.setTransition(_e),n0.setTranslate(b0),n0.updateActiveIndex(s0),n0.updateSlidesClasses(),n0.emit("beforeTransitionStart",_e,r0),n0.transitionStart(i0,p0),_e===0?n0.transitionEnd(i0,p0):n0.animating||(n0.animating=!0,n0.onSlideToWrapperTransitionEnd||(n0.onSlideToWrapperTransitionEnd=function(g0){!n0||n0.destroyed||g0.target===this&&(n0.wrapperEl.removeEventListener("transitionend",n0.onSlideToWrapperTransitionEnd),n0.onSlideToWrapperTransitionEnd=null,delete n0.onSlideToWrapperTransitionEnd,n0.transitionEnd(i0,p0))}),n0.wrapperEl.addEventListener("transitionend",n0.onSlideToWrapperTransitionEnd)),!0}function slideToLoop(e0,_e,i0,r0){e0===void 0&&(e0=0),_e===void 0&&(_e=this.params.speed),i0===void 0&&(i0=!0),typeof e0=="string"&&(e0=parseInt(e0,10));const t0=this;let n0=e0;return t0.params.loop&&(t0.virtual&&t0.params.virtual.enabled?n0=n0+t0.virtual.slidesBefore:n0=t0.getSlideIndexByData(n0)),t0.slideTo(n0,_e,i0,r0)}function slideNext(e0,_e,i0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0);const r0=this,{enabled:t0,params:n0,animating:s0}=r0;if(!t0)return r0;let o0=n0.slidesPerGroup;n0.slidesPerView==="auto"&&n0.slidesPerGroup===1&&n0.slidesPerGroupAuto&&(o0=Math.max(r0.slidesPerViewDynamic("current",!0),1));const a0=r0.activeIndex<n0.slidesPerGroupSkip?1:o0,f0=r0.virtual&&n0.virtual.enabled;if(n0.loop){if(s0&&!f0&&n0.loopPreventsSliding)return!1;r0.loopFix({direction:"next"}),r0._clientLeft=r0.wrapperEl.clientLeft}return n0.rewind&&r0.isEnd?r0.slideTo(0,e0,_e,i0):r0.slideTo(r0.activeIndex+a0,e0,_e,i0)}function slidePrev(e0,_e,i0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0);const r0=this,{params:t0,snapGrid:n0,slidesGrid:s0,rtlTranslate:o0,enabled:a0,animating:f0}=r0;if(!a0)return r0;const l0=r0.virtual&&t0.virtual.enabled;if(t0.loop){if(f0&&!l0&&t0.loopPreventsSliding)return!1;r0.loopFix({direction:"prev"}),r0._clientLeft=r0.wrapperEl.clientLeft}const u0=o0?r0.translate:-r0.translate;function A0(b0){return b0<0?-Math.floor(Math.abs(b0)):Math.floor(b0)}const c0=A0(u0),k0=n0.map(b0=>A0(b0));let d0=n0[k0.indexOf(c0)-1];if(typeof d0>"u"&&t0.cssMode){let b0;n0.forEach((p0,m0)=>{c0>=p0&&(b0=m0)}),typeof b0<"u"&&(d0=n0[b0>0?b0-1:b0])}let h0=0;if(typeof d0<"u"&&(h0=s0.indexOf(d0),h0<0&&(h0=r0.activeIndex-1),t0.slidesPerView==="auto"&&t0.slidesPerGroup===1&&t0.slidesPerGroupAuto&&(h0=h0-r0.slidesPerViewDynamic("previous",!0)+1,h0=Math.max(h0,0))),t0.rewind&&r0.isBeginning){const b0=r0.params.virtual&&r0.params.virtual.enabled&&r0.virtual?r0.virtual.slides.length-1:r0.slides.length-1;return r0.slideTo(b0,e0,_e,i0)}return r0.slideTo(h0,e0,_e,i0)}function slideReset(e0,_e,i0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0);const r0=this;return r0.slideTo(r0.activeIndex,e0,_e,i0)}function slideToClosest(e0,_e,i0,r0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0),r0===void 0&&(r0=.5);const t0=this;let n0=t0.activeIndex;const s0=Math.min(t0.params.slidesPerGroupSkip,n0),o0=s0+Math.floor((n0-s0)/t0.params.slidesPerGroup),a0=t0.rtlTranslate?t0.translate:-t0.translate;if(a0>=t0.snapGrid[o0]){const f0=t0.snapGrid[o0],l0=t0.snapGrid[o0+1];a0-f0>(l0-f0)*r0&&(n0+=t0.params.slidesPerGroup)}else{const f0=t0.snapGrid[o0-1],l0=t0.snapGrid[o0];a0-f0<=(l0-f0)*r0&&(n0-=t0.params.slidesPerGroup)}return n0=Math.max(n0,0),n0=Math.min(n0,t0.slidesGrid.length-1),t0.slideTo(n0,e0,_e,i0)}function slideToClickedSlide(){const e0=this,{params:_e,slidesEl:i0}=e0,r0=_e.slidesPerView==="auto"?e0.slidesPerViewDynamic():_e.slidesPerView;let t0=e0.clickedIndex,n0;const s0=e0.isElement?"swiper-slide":`.${_e.slideClass}`;if(_e.loop){if(e0.animating)return;n0=parseInt(e0.clickedSlide.getAttribute("data-swiper-slide-index"),10),_e.centeredSlides?t0<e0.loopedSlides-r0/2||t0>e0.slides.length-e0.loopedSlides+r0/2?(e0.loopFix(),t0=e0.getSlideIndex(elementChildren(i0,`${s0}[data-swiper-slide-index="${n0}"]`)[0]),nextTick(()=>{e0.slideTo(t0)})):e0.slideTo(t0):t0>e0.slides.length-r0?(e0.loopFix(),t0=e0.getSlideIndex(elementChildren(i0,`${s0}[data-swiper-slide-index="${n0}"]`)[0]),nextTick(()=>{e0.slideTo(t0)})):e0.slideTo(t0)}else e0.slideTo(t0)}var slide={slideTo,slideToLoop,slideNext,slidePrev,slideReset,slideToClosest,slideToClickedSlide};function loopCreate(e0){const _e=this,{params:i0,slidesEl:r0}=_e;if(!i0.loop||_e.virtual&&_e.params.virtual.enabled)return;elementChildren(r0,`.${i0.slideClass}, swiper-slide`).forEach((n0,s0)=>{n0.setAttribute("data-swiper-slide-index",s0)}),_e.loopFix({slideRealIndex:e0,direction:i0.centeredSlides?void 0:"next"})}function loopFix(e0){let{slideRealIndex:_e,slideTo:i0=!0,direction:r0,setTranslate:t0,activeSlideIndex:n0,byController:s0,byMousewheel:o0}=e0===void 0?{}:e0;const a0=this;if(!a0.params.loop)return;a0.emit("beforeLoopFix");const{slides:f0,allowSlidePrev:l0,allowSlideNext:u0,slidesEl:A0,params:c0}=a0;if(a0.allowSlidePrev=!0,a0.allowSlideNext=!0,a0.virtual&&c0.virtual.enabled){i0&&(!c0.centeredSlides&&a0.snapIndex===0?a0.slideTo(a0.virtual.slides.length,0,!1,!0):c0.centeredSlides&&a0.snapIndex<c0.slidesPerView?a0.slideTo(a0.virtual.slides.length+a0.snapIndex,0,!1,!0):a0.snapIndex===a0.snapGrid.length-1&&a0.slideTo(a0.virtual.slidesBefore,0,!1,!0)),a0.allowSlidePrev=l0,a0.allowSlideNext=u0,a0.emit("loopFix");return}const k0=c0.slidesPerView==="auto"?a0.slidesPerViewDynamic():Math.ceil(parseFloat(c0.slidesPerView,10));let d0=c0.loopedSlides||k0;d0%c0.slidesPerGroup!==0&&(d0+=c0.slidesPerGroup-d0%c0.slidesPerGroup),a0.loopedSlides=d0;const h0=[],b0=[];let p0=a0.activeIndex;typeof n0>"u"?n0=a0.getSlideIndex(a0.slides.filter(w0=>w0.classList.contains(c0.slideActiveClass))[0]):p0=n0;const m0=r0==="next"||!r0,g0=r0==="prev"||!r0;let v0=0,x0=0;if(n0<d0){v0=Math.max(d0-n0,c0.slidesPerGroup);for(let w0=0;w0<d0-n0;w0+=1){const _0=w0-Math.floor(w0/f0.length)*f0.length;h0.push(f0.length-_0-1)}}else if(n0>a0.slides.length-d0*2){x0=Math.max(n0-(a0.slides.length-d0*2),c0.slidesPerGroup);for(let w0=0;w0<x0;w0+=1){const _0=w0-Math.floor(w0/f0.length)*f0.length;b0.push(_0)}}if(g0&&h0.forEach(w0=>{a0.slides[w0].swiperLoopMoveDOM=!0,A0.prepend(a0.slides[w0]),a0.slides[w0].swiperLoopMoveDOM=!1}),m0&&b0.forEach(w0=>{a0.slides[w0].swiperLoopMoveDOM=!0,A0.append(a0.slides[w0]),a0.slides[w0].swiperLoopMoveDOM=!1}),a0.recalcSlides(),c0.slidesPerView==="auto"&&a0.updateSlides(),c0.watchSlidesProgress&&a0.updateSlidesOffset(),i0){if(h0.length>0&&g0)if(typeof _e>"u"){const w0=a0.slidesGrid[p0],y0=a0.slidesGrid[p0+v0]-w0;o0?a0.setTranslate(a0.translate-y0):(a0.slideTo(p0+v0,0,!1,!0),t0&&(a0.touches[a0.isHorizontal()?"startX":"startY"]+=y0,a0.touchEventsData.currentTranslate=a0.translate))}else t0&&(a0.slideToLoop(_e,0,!1,!0),a0.touchEventsData.currentTranslate=a0.translate);else if(b0.length>0&&m0)if(typeof _e>"u"){const w0=a0.slidesGrid[p0],y0=a0.slidesGrid[p0-x0]-w0;o0?a0.setTranslate(a0.translate-y0):(a0.slideTo(p0-x0,0,!1,!0),t0&&(a0.touches[a0.isHorizontal()?"startX":"startY"]+=y0,a0.touchEventsData.currentTranslate=a0.translate))}else a0.slideToLoop(_e,0,!1,!0)}if(a0.allowSlidePrev=l0,a0.allowSlideNext=u0,a0.controller&&a0.controller.control&&!s0){const w0={slideRealIndex:_e,slideTo:!1,direction:r0,setTranslate:t0,activeSlideIndex:n0,byController:!0};Array.isArray(a0.controller.control)?a0.controller.control.forEach(_0=>{!_0.destroyed&&_0.params.loop&&_0.loopFix(w0)}):a0.controller.control instanceof a0.constructor&&a0.controller.control.params.loop&&a0.controller.control.loopFix(w0)}a0.emit("loopFix")}function loopDestroy(){const e0=this,{params:_e,slidesEl:i0}=e0;if(!_e.loop||e0.virtual&&e0.params.virtual.enabled)return;e0.recalcSlides();const r0=[];e0.slides.forEach(t0=>{const n0=typeof t0.swiperSlideIndex>"u"?t0.getAttribute("data-swiper-slide-index")*1:t0.swiperSlideIndex;r0[n0]=t0}),e0.slides.forEach(t0=>{t0.removeAttribute("data-swiper-slide-index")}),r0.forEach(t0=>{i0.append(t0)}),e0.recalcSlides(),e0.slideTo(e0.realIndex,0)}var loop={loopCreate,loopFix,loopDestroy};function setGrabCursor(e0){const _e=this;if(!_e.params.simulateTouch||_e.params.watchOverflow&&_e.isLocked||_e.params.cssMode)return;const i0=_e.params.touchEventsTarget==="container"?_e.el:_e.wrapperEl;_e.isElement&&(_e.__preventObserver__=!0),i0.style.cursor="move",i0.style.cursor=e0?"grabbing":"grab",_e.isElement&&requestAnimationFrame(()=>{_e.__preventObserver__=!1})}function unsetGrabCursor(){const e0=this;e0.params.watchOverflow&&e0.isLocked||e0.params.cssMode||(e0.isElement&&(e0.__preventObserver__=!0),e0[e0.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e0.isElement&&requestAnimationFrame(()=>{e0.__preventObserver__=!1}))}var grabCursor={setGrabCursor,unsetGrabCursor};function closestElement(e0,_e){_e===void 0&&(_e=this);function i0(r0){if(!r0||r0===getDocument()||r0===getWindow())return null;r0.assignedSlot&&(r0=r0.assignedSlot);const t0=r0.closest(e0);return!t0&&!r0.getRootNode?null:t0||i0(r0.getRootNode().host)}return i0(_e)}function onTouchStart(e0){const _e=this,i0=getDocument(),r0=getWindow(),t0=_e.touchEventsData;t0.evCache.push(e0);const{params:n0,touches:s0,enabled:o0}=_e;if(!o0||!n0.simulateTouch&&e0.pointerType==="mouse"||_e.animating&&n0.preventInteractionOnTransition)return;!_e.animating&&n0.cssMode&&n0.loop&&_e.loopFix();let a0=e0;a0.originalEvent&&(a0=a0.originalEvent);let f0=a0.target;if(n0.touchEventsTarget==="wrapper"&&!_e.wrapperEl.contains(f0)||"which"in a0&&a0.which===3||"button"in a0&&a0.button>0||t0.isTouched&&t0.isMoved)return;const l0=!!n0.noSwipingClass&&n0.noSwipingClass!=="",u0=e0.composedPath?e0.composedPath():e0.path;l0&&a0.target&&a0.target.shadowRoot&&u0&&(f0=u0[0]);const A0=n0.noSwipingSelector?n0.noSwipingSelector:`.${n0.noSwipingClass}`,c0=!!(a0.target&&a0.target.shadowRoot);if(n0.noSwiping&&(c0?closestElement(A0,f0):f0.closest(A0))){_e.allowClick=!0;return}if(n0.swipeHandler&&!f0.closest(n0.swipeHandler))return;s0.currentX=a0.pageX,s0.currentY=a0.pageY;const k0=s0.currentX,d0=s0.currentY,h0=n0.edgeSwipeDetection||n0.iOSEdgeSwipeDetection,b0=n0.edgeSwipeThreshold||n0.iOSEdgeSwipeThreshold;if(h0&&(k0<=b0||k0>=r0.innerWidth-b0))if(h0==="prevent")e0.preventDefault();else return;Object.assign(t0,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s0.startX=k0,s0.startY=d0,t0.touchStartTime=now(),_e.allowClick=!0,_e.updateSize(),_e.swipeDirection=void 0,n0.threshold>0&&(t0.allowThresholdMove=!1);let p0=!0;f0.matches(t0.focusableElements)&&(p0=!1,f0.nodeName==="SELECT"&&(t0.isTouched=!1)),i0.activeElement&&i0.activeElement.matches(t0.focusableElements)&&i0.activeElement!==f0&&i0.activeElement.blur();const m0=p0&&_e.allowTouchMove&&n0.touchStartPreventDefault;(n0.touchStartForcePreventDefault||m0)&&!f0.isContentEditable&&a0.preventDefault(),n0.freeMode&&n0.freeMode.enabled&&_e.freeMode&&_e.animating&&!n0.cssMode&&_e.freeMode.onTouchStart(),_e.emit("touchStart",a0)}function onTouchMove(e0){const _e=getDocument(),i0=this,r0=i0.touchEventsData,{params:t0,touches:n0,rtlTranslate:s0,enabled:o0}=i0;if(!o0||!t0.simulateTouch&&e0.pointerType==="mouse")return;let a0=e0;if(a0.originalEvent&&(a0=a0.originalEvent),!r0.isTouched){r0.startMoving&&r0.isScrolling&&i0.emit("touchMoveOpposite",a0);return}const f0=r0.evCache.findIndex(x0=>x0.pointerId===a0.pointerId);f0>=0&&(r0.evCache[f0]=a0);const l0=r0.evCache.length>1?r0.evCache[0]:a0,u0=l0.pageX,A0=l0.pageY;if(a0.preventedByNestedSwiper){n0.startX=u0,n0.startY=A0;return}if(!i0.allowTouchMove){a0.target.matches(r0.focusableElements)||(i0.allowClick=!1),r0.isTouched&&(Object.assign(n0,{startX:u0,startY:A0,prevX:i0.touches.currentX,prevY:i0.touches.currentY,currentX:u0,currentY:A0}),r0.touchStartTime=now());return}if(t0.touchReleaseOnEdges&&!t0.loop){if(i0.isVertical()){if(A0<n0.startY&&i0.translate<=i0.maxTranslate()||A0>n0.startY&&i0.translate>=i0.minTranslate()){r0.isTouched=!1,r0.isMoved=!1;return}}else if(u0<n0.startX&&i0.translate<=i0.maxTranslate()||u0>n0.startX&&i0.translate>=i0.minTranslate())return}if(_e.activeElement&&a0.target===_e.activeElement&&a0.target.matches(r0.focusableElements)){r0.isMoved=!0,i0.allowClick=!1;return}if(r0.allowTouchCallbacks&&i0.emit("touchMove",a0),a0.targetTouches&&a0.targetTouches.length>1)return;n0.currentX=u0,n0.currentY=A0;const c0=n0.currentX-n0.startX,k0=n0.currentY-n0.startY;if(i0.params.threshold&&Math.sqrt(c0**2+k0**2)<i0.params.threshold)return;if(typeof r0.isScrolling>"u"){let x0;i0.isHorizontal()&&n0.currentY===n0.startY||i0.isVertical()&&n0.currentX===n0.startX?r0.isScrolling=!1:c0*c0+k0*k0>=25&&(x0=Math.atan2(Math.abs(k0),Math.abs(c0))*180/Math.PI,r0.isScrolling=i0.isHorizontal()?x0>t0.touchAngle:90-x0>t0.touchAngle)}if(r0.isScrolling&&i0.emit("touchMoveOpposite",a0),typeof r0.startMoving>"u"&&(n0.currentX!==n0.startX||n0.currentY!==n0.startY)&&(r0.startMoving=!0),r0.isScrolling||i0.zoom&&i0.params.zoom&&i0.params.zoom.enabled&&r0.evCache.length>1){r0.isTouched=!1;return}if(!r0.startMoving)return;i0.allowClick=!1,!t0.cssMode&&a0.cancelable&&a0.preventDefault(),t0.touchMoveStopPropagation&&!t0.nested&&a0.stopPropagation();let d0=i0.isHorizontal()?c0:k0,h0=i0.isHorizontal()?n0.currentX-n0.previousX:n0.currentY-n0.previousY;t0.oneWayMovement&&(d0=Math.abs(d0)*(s0?1:-1),h0=Math.abs(h0)*(s0?1:-1)),n0.diff=d0,d0*=t0.touchRatio,s0&&(d0=-d0,h0=-h0);const b0=i0.touchesDirection;i0.swipeDirection=d0>0?"prev":"next",i0.touchesDirection=h0>0?"prev":"next";const p0=i0.params.loop&&!t0.cssMode;if(!r0.isMoved){if(p0&&i0.loopFix({direction:i0.swipeDirection}),r0.startTranslate=i0.getTranslate(),i0.setTransition(0),i0.animating){const x0=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});i0.wrapperEl.dispatchEvent(x0)}r0.allowMomentumBounce=!1,t0.grabCursor&&(i0.allowSlideNext===!0||i0.allowSlidePrev===!0)&&i0.setGrabCursor(!0),i0.emit("sliderFirstMove",a0)}let m0;r0.isMoved&&b0!==i0.touchesDirection&&p0&&Math.abs(d0)>=1&&(i0.loopFix({direction:i0.swipeDirection,setTranslate:!0}),m0=!0),i0.emit("sliderMove",a0),r0.isMoved=!0,r0.currentTranslate=d0+r0.startTranslate;let g0=!0,v0=t0.resistanceRatio;if(t0.touchReleaseOnEdges&&(v0=0),d0>0?(p0&&!m0&&r0.currentTranslate>(t0.centeredSlides?i0.minTranslate()-i0.size/2:i0.minTranslate())&&i0.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r0.currentTranslate>i0.minTranslate()&&(g0=!1,t0.resistance&&(r0.currentTranslate=i0.minTranslate()-1+(-i0.minTranslate()+r0.startTranslate+d0)**v0))):d0<0&&(p0&&!m0&&r0.currentTranslate<(t0.centeredSlides?i0.maxTranslate()+i0.size/2:i0.maxTranslate())&&i0.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:i0.slides.length-(t0.slidesPerView==="auto"?i0.slidesPerViewDynamic():Math.ceil(parseFloat(t0.slidesPerView,10)))}),r0.currentTranslate<i0.maxTranslate()&&(g0=!1,t0.resistance&&(r0.currentTranslate=i0.maxTranslate()+1-(i0.maxTranslate()-r0.startTranslate-d0)**v0))),g0&&(a0.preventedByNestedSwiper=!0),!i0.allowSlideNext&&i0.swipeDirection==="next"&&r0.currentTranslate<r0.startTranslate&&(r0.currentTranslate=r0.startTranslate),!i0.allowSlidePrev&&i0.swipeDirection==="prev"&&r0.currentTranslate>r0.startTranslate&&(r0.currentTranslate=r0.startTranslate),!i0.allowSlidePrev&&!i0.allowSlideNext&&(r0.currentTranslate=r0.startTranslate),t0.threshold>0)if(Math.abs(d0)>t0.threshold||r0.allowThresholdMove){if(!r0.allowThresholdMove){r0.allowThresholdMove=!0,n0.startX=n0.currentX,n0.startY=n0.currentY,r0.currentTranslate=r0.startTranslate,n0.diff=i0.isHorizontal()?n0.currentX-n0.startX:n0.currentY-n0.startY;return}}else{r0.currentTranslate=r0.startTranslate;return}!t0.followFinger||t0.cssMode||((t0.freeMode&&t0.freeMode.enabled&&i0.freeMode||t0.watchSlidesProgress)&&(i0.updateActiveIndex(),i0.updateSlidesClasses()),t0.freeMode&&t0.freeMode.enabled&&i0.freeMode&&i0.freeMode.onTouchMove(),i0.updateProgress(r0.currentTranslate),i0.setTranslate(r0.currentTranslate))}function onTouchEnd(e0){const _e=this,i0=_e.touchEventsData,r0=i0.evCache.findIndex(m0=>m0.pointerId===e0.pointerId);if(r0>=0&&i0.evCache.splice(r0,1),["pointercancel","pointerout","pointerleave"].includes(e0.type)&&!(e0.type==="pointercancel"&&(_e.browser.isSafari||_e.browser.isWebView)))return;const{params:t0,touches:n0,rtlTranslate:s0,slidesGrid:o0,enabled:a0}=_e;if(!a0||!t0.simulateTouch&&e0.pointerType==="mouse")return;let f0=e0;if(f0.originalEvent&&(f0=f0.originalEvent),i0.allowTouchCallbacks&&_e.emit("touchEnd",f0),i0.allowTouchCallbacks=!1,!i0.isTouched){i0.isMoved&&t0.grabCursor&&_e.setGrabCursor(!1),i0.isMoved=!1,i0.startMoving=!1;return}t0.grabCursor&&i0.isMoved&&i0.isTouched&&(_e.allowSlideNext===!0||_e.allowSlidePrev===!0)&&_e.setGrabCursor(!1);const l0=now(),u0=l0-i0.touchStartTime;if(_e.allowClick){const m0=f0.path||f0.composedPath&&f0.composedPath();_e.updateClickedSlide(m0&&m0[0]||f0.target),_e.emit("tap click",f0),u0<300&&l0-i0.lastClickTime<300&&_e.emit("doubleTap doubleClick",f0)}if(i0.lastClickTime=now(),nextTick(()=>{_e.destroyed||(_e.allowClick=!0)}),!i0.isTouched||!i0.isMoved||!_e.swipeDirection||n0.diff===0||i0.currentTranslate===i0.startTranslate){i0.isTouched=!1,i0.isMoved=!1,i0.startMoving=!1;return}i0.isTouched=!1,i0.isMoved=!1,i0.startMoving=!1;let A0;if(t0.followFinger?A0=s0?_e.translate:-_e.translate:A0=-i0.currentTranslate,t0.cssMode)return;if(t0.freeMode&&t0.freeMode.enabled){_e.freeMode.onTouchEnd({currentPos:A0});return}let c0=0,k0=_e.slidesSizesGrid[0];for(let m0=0;m0<o0.length;m0+=m0<t0.slidesPerGroupSkip?1:t0.slidesPerGroup){const g0=m0<t0.slidesPerGroupSkip-1?1:t0.slidesPerGroup;typeof o0[m0+g0]<"u"?A0>=o0[m0]&&A0<o0[m0+g0]&&(c0=m0,k0=o0[m0+g0]-o0[m0]):A0>=o0[m0]&&(c0=m0,k0=o0[o0.length-1]-o0[o0.length-2])}let d0=null,h0=null;t0.rewind&&(_e.isBeginning?h0=t0.virtual&&t0.virtual.enabled&&_e.virtual?_e.virtual.slides.length-1:_e.slides.length-1:_e.isEnd&&(d0=0));const b0=(A0-o0[c0])/k0,p0=c0<t0.slidesPerGroupSkip-1?1:t0.slidesPerGroup;if(u0>t0.longSwipesMs){if(!t0.longSwipes){_e.slideTo(_e.activeIndex);return}_e.swipeDirection==="next"&&(b0>=t0.longSwipesRatio?_e.slideTo(t0.rewind&&_e.isEnd?d0:c0+p0):_e.slideTo(c0)),_e.swipeDirection==="prev"&&(b0>1-t0.longSwipesRatio?_e.slideTo(c0+p0):h0!==null&&b0<0&&Math.abs(b0)>t0.longSwipesRatio?_e.slideTo(h0):_e.slideTo(c0))}else{if(!t0.shortSwipes){_e.slideTo(_e.activeIndex);return}_e.navigation&&(f0.target===_e.navigation.nextEl||f0.target===_e.navigation.prevEl)?f0.target===_e.navigation.nextEl?_e.slideTo(c0+p0):_e.slideTo(c0):(_e.swipeDirection==="next"&&_e.slideTo(d0!==null?d0:c0+p0),_e.swipeDirection==="prev"&&_e.slideTo(h0!==null?h0:c0))}}function onResize(){const e0=this,{params:_e,el:i0}=e0;if(i0&&i0.offsetWidth===0)return;_e.breakpoints&&e0.setBreakpoint();const{allowSlideNext:r0,allowSlidePrev:t0,snapGrid:n0}=e0,s0=e0.virtual&&e0.params.virtual.enabled;e0.allowSlideNext=!0,e0.allowSlidePrev=!0,e0.updateSize(),e0.updateSlides(),e0.updateSlidesClasses();const o0=s0&&_e.loop;(_e.slidesPerView==="auto"||_e.slidesPerView>1)&&e0.isEnd&&!e0.isBeginning&&!e0.params.centeredSlides&&!o0?e0.slideTo(e0.slides.length-1,0,!1,!0):e0.params.loop&&!s0?e0.slideToLoop(e0.realIndex,0,!1,!0):e0.slideTo(e0.activeIndex,0,!1,!0),e0.autoplay&&e0.autoplay.running&&e0.autoplay.paused&&(clearTimeout(e0.autoplay.resizeTimeout),e0.autoplay.resizeTimeout=setTimeout(()=>{e0.autoplay&&e0.autoplay.running&&e0.autoplay.paused&&e0.autoplay.resume()},500)),e0.allowSlidePrev=t0,e0.allowSlideNext=r0,e0.params.watchOverflow&&n0!==e0.snapGrid&&e0.checkOverflow()}function onClick(e0){const _e=this;_e.enabled&&(_e.allowClick||(_e.params.preventClicks&&e0.preventDefault(),_e.params.preventClicksPropagation&&_e.animating&&(e0.stopPropagation(),e0.stopImmediatePropagation())))}function onScroll(){const e0=this,{wrapperEl:_e,rtlTranslate:i0,enabled:r0}=e0;if(!r0)return;e0.previousTranslate=e0.translate,e0.isHorizontal()?e0.translate=-_e.scrollLeft:e0.translate=-_e.scrollTop,e0.translate===0&&(e0.translate=0),e0.updateActiveIndex(),e0.updateSlidesClasses();let t0;const n0=e0.maxTranslate()-e0.minTranslate();n0===0?t0=0:t0=(e0.translate-e0.minTranslate())/n0,t0!==e0.progress&&e0.updateProgress(i0?-e0.translate:e0.translate),e0.emit("setTranslate",e0.translate,!1)}function onLoad(e0){const _e=this;processLazyPreloader(_e,e0.target),!(_e.params.cssMode||_e.params.slidesPerView!=="auto"&&!_e.params.autoHeight)&&_e.update()}let dummyEventAttached=!1;function dummyEventListener(){}const events$3=(e0,_e)=>{const i0=getDocument(),{params:r0,el:t0,wrapperEl:n0,device:s0}=e0,o0=!!r0.nested,a0=_e==="on"?"addEventListener":"removeEventListener",f0=_e;t0[a0]("pointerdown",e0.onTouchStart,{passive:!1}),i0[a0]("pointermove",e0.onTouchMove,{passive:!1,capture:o0}),i0[a0]("pointerup",e0.onTouchEnd,{passive:!0}),i0[a0]("pointercancel",e0.onTouchEnd,{passive:!0}),i0[a0]("pointerout",e0.onTouchEnd,{passive:!0}),i0[a0]("pointerleave",e0.onTouchEnd,{passive:!0}),(r0.preventClicks||r0.preventClicksPropagation)&&t0[a0]("click",e0.onClick,!0),r0.cssMode&&n0[a0]("scroll",e0.onScroll),r0.updateOnWindowResize?e0[f0](s0.ios||s0.android?"resize orientationchange observerUpdate":"resize observerUpdate",onResize,!0):e0[f0]("observerUpdate",onResize,!0),t0[a0]("load",e0.onLoad,{capture:!0})};function attachEvents(){const e0=this,_e=getDocument(),{params:i0}=e0;e0.onTouchStart=onTouchStart.bind(e0),e0.onTouchMove=onTouchMove.bind(e0),e0.onTouchEnd=onTouchEnd.bind(e0),i0.cssMode&&(e0.onScroll=onScroll.bind(e0)),e0.onClick=onClick.bind(e0),e0.onLoad=onLoad.bind(e0),dummyEventAttached||(_e.addEventListener("touchstart",dummyEventListener),dummyEventAttached=!0),events$3(e0,"on")}function detachEvents(){events$3(this,"off")}var events$1$1={attachEvents,detachEvents};const isGridEnabled=(e0,_e)=>e0.grid&&_e.grid&&_e.grid.rows>1;function setBreakpoint(){const e0=this,{realIndex:_e,initialized:i0,params:r0,el:t0}=e0,n0=r0.breakpoints;if(!n0||n0&&Object.keys(n0).length===0)return;const s0=e0.getBreakpoint(n0,e0.params.breakpointsBase,e0.el);if(!s0||e0.currentBreakpoint===s0)return;const a0=(s0 in n0?n0[s0]:void 0)||e0.originalParams,f0=isGridEnabled(e0,r0),l0=isGridEnabled(e0,a0),u0=r0.enabled;f0&&!l0?(t0.classList.remove(`${r0.containerModifierClass}grid`,`${r0.containerModifierClass}grid-column`),e0.emitContainerClasses()):!f0&&l0&&(t0.classList.add(`${r0.containerModifierClass}grid`),(a0.grid.fill&&a0.grid.fill==="column"||!a0.grid.fill&&r0.grid.fill==="column")&&t0.classList.add(`${r0.containerModifierClass}grid-column`),e0.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach(d0=>{if(typeof a0[d0]>"u")return;const h0=r0[d0]&&r0[d0].enabled,b0=a0[d0]&&a0[d0].enabled;h0&&!b0&&e0[d0].disable(),!h0&&b0&&e0[d0].enable()});const A0=a0.direction&&a0.direction!==r0.direction,c0=r0.loop&&(a0.slidesPerView!==r0.slidesPerView||A0);A0&&i0&&e0.changeDirection(),extend$1(e0.params,a0);const k0=e0.params.enabled;Object.assign(e0,{allowTouchMove:e0.params.allowTouchMove,allowSlideNext:e0.params.allowSlideNext,allowSlidePrev:e0.params.allowSlidePrev}),u0&&!k0?e0.disable():!u0&&k0&&e0.enable(),e0.currentBreakpoint=s0,e0.emit("_beforeBreakpoint",a0),c0&&i0&&(e0.loopDestroy(),e0.loopCreate(_e),e0.updateSlides()),e0.emit("breakpoint",a0)}function getBreakpoint(e0,_e,i0){if(_e===void 0&&(_e="window"),!e0||_e==="container"&&!i0)return;let r0=!1;const t0=getWindow(),n0=_e==="window"?t0.innerHeight:i0.clientHeight,s0=Object.keys(e0).map(o0=>{if(typeof o0=="string"&&o0.indexOf("@")===0){const a0=parseFloat(o0.substr(1));return{value:n0*a0,point:o0}}return{value:o0,point:o0}});s0.sort((o0,a0)=>parseInt(o0.value,10)-parseInt(a0.value,10));for(let o0=0;o0<s0.length;o0+=1){const{point:a0,value:f0}=s0[o0];_e==="window"?t0.matchMedia(`(min-width: ${f0}px)`).matches&&(r0=a0):f0<=i0.clientWidth&&(r0=a0)}return r0||"max"}var breakpoints={setBreakpoint,getBreakpoint};function prepareClasses(e0,_e){const i0=[];return e0.forEach(r0=>{typeof r0=="object"?Object.keys(r0).forEach(t0=>{r0[t0]&&i0.push(_e+t0)}):typeof r0=="string"&&i0.push(_e+r0)}),i0}function addClasses(){const e0=this,{classNames:_e,params:i0,rtl:r0,el:t0,device:n0}=e0,s0=prepareClasses(["initialized",i0.direction,{"free-mode":e0.params.freeMode&&i0.freeMode.enabled},{autoheight:i0.autoHeight},{rtl:r0},{grid:i0.grid&&i0.grid.rows>1},{"grid-column":i0.grid&&i0.grid.rows>1&&i0.grid.fill==="column"},{android:n0.android},{ios:n0.ios},{"css-mode":i0.cssMode},{centered:i0.cssMode&&i0.centeredSlides},{"watch-progress":i0.watchSlidesProgress}],i0.containerModifierClass);_e.push(...s0),t0.classList.add(..._e),e0.emitContainerClasses()}function removeClasses(){const e0=this,{el:_e,classNames:i0}=e0;_e.classList.remove(...i0),e0.emitContainerClasses()}var classes={addClasses,removeClasses};function checkOverflow(){const e0=this,{isLocked:_e,params:i0}=e0,{slidesOffsetBefore:r0}=i0;if(r0){const t0=e0.slides.length-1,n0=e0.slidesGrid[t0]+e0.slidesSizesGrid[t0]+r0*2;e0.isLocked=e0.size>n0}else e0.isLocked=e0.snapGrid.length===1;i0.allowSlideNext===!0&&(e0.allowSlideNext=!e0.isLocked),i0.allowSlidePrev===!0&&(e0.allowSlidePrev=!e0.isLocked),_e&&_e!==e0.isLocked&&(e0.isEnd=!1),_e!==e0.isLocked&&e0.emit(e0.isLocked?"lock":"unlock")}var checkOverflow$1={checkOverflow},defaults={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function moduleExtendParams(e0,_e){return function(r0){r0===void 0&&(r0={});const t0=Object.keys(r0)[0],n0=r0[t0];if(typeof n0!="object"||n0===null){extend$1(_e,r0);return}if(["navigation","pagination","scrollbar"].indexOf(t0)>=0&&e0[t0]===!0&&(e0[t0]={auto:!0}),!(t0 in e0&&"enabled"in n0)){extend$1(_e,r0);return}e0[t0]===!0&&(e0[t0]={enabled:!0}),typeof e0[t0]=="object"&&!("enabled"in e0[t0])&&(e0[t0].enabled=!0),e0[t0]||(e0[t0]={enabled:!1}),extend$1(_e,r0)}}const prototypes={eventsEmitter,update,translate,transition,slide,loop,grabCursor,events:events$1$1,breakpoints,checkOverflow:checkOverflow$1,classes},extendedDefaults={};let Swiper$1=class rr{constructor(){let _e,i0;for(var r0=arguments.length,t0=new Array(r0),n0=0;n0<r0;n0++)t0[n0]=arguments[n0];t0.length===1&&t0[0].constructor&&Object.prototype.toString.call(t0[0]).slice(8,-1)==="Object"?i0=t0[0]:[_e,i0]=t0,i0||(i0={}),i0=extend$1({},i0),_e&&!i0.el&&(i0.el=_e);const s0=getDocument();if(i0.el&&typeof i0.el=="string"&&s0.querySelectorAll(i0.el).length>1){const l0=[];return s0.querySelectorAll(i0.el).forEach(u0=>{const A0=extend$1({},i0,{el:u0});l0.push(new rr(A0))}),l0}const o0=this;o0.__swiper__=!0,o0.support=getSupport(),o0.device=getDevice({userAgent:i0.userAgent}),o0.browser=getBrowser(),o0.eventsListeners={},o0.eventsAnyListeners=[],o0.modules=[...o0.__modules__],i0.modules&&Array.isArray(i0.modules)&&o0.modules.push(...i0.modules);const a0={};o0.modules.forEach(l0=>{l0({params:i0,swiper:o0,extendParams:moduleExtendParams(i0,a0),on:o0.on.bind(o0),once:o0.once.bind(o0),off:o0.off.bind(o0),emit:o0.emit.bind(o0)})});const f0=extend$1({},defaults,a0);return o0.params=extend$1({},f0,extendedDefaults,i0),o0.originalParams=extend$1({},o0.params),o0.passedParams=extend$1({},i0),o0.params&&o0.params.on&&Object.keys(o0.params.on).forEach(l0=>{o0.on(l0,o0.params.on[l0])}),o0.params&&o0.params.onAny&&o0.onAny(o0.params.onAny),Object.assign(o0,{enabled:o0.params.enabled,el:_e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return o0.params.direction==="horizontal"},isVertical(){return o0.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:o0.params.allowSlideNext,allowSlidePrev:o0.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:o0.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:o0.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),o0.emit("_swiper"),o0.params.init&&o0.init(),o0}getSlideIndex(_e){const{slidesEl:i0,params:r0}=this,t0=elementChildren(i0,`.${r0.slideClass}, swiper-slide`),n0=elementIndex(t0[0]);return elementIndex(_e)-n0}getSlideIndexByData(_e){return this.getSlideIndex(this.slides.filter(i0=>i0.getAttribute("data-swiper-slide-index")*1===_e)[0])}recalcSlides(){const _e=this,{slidesEl:i0,params:r0}=_e;_e.slides=elementChildren(i0,`.${r0.slideClass}, swiper-slide`)}enable(){const _e=this;_e.enabled||(_e.enabled=!0,_e.params.grabCursor&&_e.setGrabCursor(),_e.emit("enable"))}disable(){const _e=this;_e.enabled&&(_e.enabled=!1,_e.params.grabCursor&&_e.unsetGrabCursor(),_e.emit("disable"))}setProgress(_e,i0){const r0=this;_e=Math.min(Math.max(_e,0),1);const t0=r0.minTranslate(),s0=(r0.maxTranslate()-t0)*_e+t0;r0.translateTo(s0,typeof i0>"u"?0:i0),r0.updateActiveIndex(),r0.updateSlidesClasses()}emitContainerClasses(){const _e=this;if(!_e.params._emitClasses||!_e.el)return;const i0=_e.el.className.split(" ").filter(r0=>r0.indexOf("swiper")===0||r0.indexOf(_e.params.containerModifierClass)===0);_e.emit("_containerClasses",i0.join(" "))}getSlideClasses(_e){const i0=this;return i0.destroyed?"":_e.className.split(" ").filter(r0=>r0.indexOf("swiper-slide")===0||r0.indexOf(i0.params.slideClass)===0).join(" ")}emitSlidesClasses(){const _e=this;if(!_e.params._emitClasses||!_e.el)return;const i0=[];_e.slides.forEach(r0=>{const t0=_e.getSlideClasses(r0);i0.push({slideEl:r0,classNames:t0}),_e.emit("_slideClass",r0,t0)}),_e.emit("_slideClasses",i0)}slidesPerViewDynamic(_e,i0){_e===void 0&&(_e="current"),i0===void 0&&(i0=!1);const r0=this,{params:t0,slides:n0,slidesGrid:s0,slidesSizesGrid:o0,size:a0,activeIndex:f0}=r0;let l0=1;if(t0.centeredSlides){let u0=n0[f0]?n0[f0].swiperSlideSize:0,A0;for(let c0=f0+1;c0<n0.length;c0+=1)n0[c0]&&!A0&&(u0+=n0[c0].swiperSlideSize,l0+=1,u0>a0&&(A0=!0));for(let c0=f0-1;c0>=0;c0-=1)n0[c0]&&!A0&&(u0+=n0[c0].swiperSlideSize,l0+=1,u0>a0&&(A0=!0))}else if(_e==="current")for(let u0=f0+1;u0<n0.length;u0+=1)(i0?s0[u0]+o0[u0]-s0[f0]<a0:s0[u0]-s0[f0]<a0)&&(l0+=1);else for(let u0=f0-1;u0>=0;u0-=1)s0[f0]-s0[u0]<a0&&(l0+=1);return l0}update(){const _e=this;if(!_e||_e.destroyed)return;const{snapGrid:i0,params:r0}=_e;r0.breakpoints&&_e.setBreakpoint(),[..._e.el.querySelectorAll('[loading="lazy"]')].forEach(s0=>{s0.complete&&processLazyPreloader(_e,s0)}),_e.updateSize(),_e.updateSlides(),_e.updateProgress(),_e.updateSlidesClasses();function t0(){const s0=_e.rtlTranslate?_e.translate*-1:_e.translate,o0=Math.min(Math.max(s0,_e.maxTranslate()),_e.minTranslate());_e.setTranslate(o0),_e.updateActiveIndex(),_e.updateSlidesClasses()}let n0;if(r0.freeMode&&r0.freeMode.enabled&&!r0.cssMode)t0(),r0.autoHeight&&_e.updateAutoHeight();else{if((r0.slidesPerView==="auto"||r0.slidesPerView>1)&&_e.isEnd&&!r0.centeredSlides){const s0=_e.virtual&&r0.virtual.enabled?_e.virtual.slides:_e.slides;n0=_e.slideTo(s0.length-1,0,!1,!0)}else n0=_e.slideTo(_e.activeIndex,0,!1,!0);n0||t0()}r0.watchOverflow&&i0!==_e.snapGrid&&_e.checkOverflow(),_e.emit("update")}changeDirection(_e,i0){i0===void 0&&(i0=!0);const r0=this,t0=r0.params.direction;return _e||(_e=t0==="horizontal"?"vertical":"horizontal"),_e===t0||_e!=="horizontal"&&_e!=="vertical"||(r0.el.classList.remove(`${r0.params.containerModifierClass}${t0}`),r0.el.classList.add(`${r0.params.containerModifierClass}${_e}`),r0.emitContainerClasses(),r0.params.direction=_e,r0.slides.forEach(n0=>{_e==="vertical"?n0.style.width="":n0.style.height=""}),r0.emit("changeDirection"),i0&&r0.update()),r0}changeLanguageDirection(_e){const i0=this;i0.rtl&&_e==="rtl"||!i0.rtl&&_e==="ltr"||(i0.rtl=_e==="rtl",i0.rtlTranslate=i0.params.direction==="horizontal"&&i0.rtl,i0.rtl?(i0.el.classList.add(`${i0.params.containerModifierClass}rtl`),i0.el.dir="rtl"):(i0.el.classList.remove(`${i0.params.containerModifierClass}rtl`),i0.el.dir="ltr"),i0.update())}mount(_e){const i0=this;if(i0.mounted)return!0;let r0=_e||i0.params.el;if(typeof r0=="string"&&(r0=document.querySelector(r0)),!r0)return!1;r0.swiper=i0,r0.parentNode&&r0.parentNode.host&&r0.parentNode.host.nodeName==="SWIPER-CONTAINER"&&(i0.isElement=!0);const t0=()=>`.${(i0.params.wrapperClass||"").trim().split(" ").join(".")}`;let s0=r0&&r0.shadowRoot&&r0.shadowRoot.querySelector?r0.shadowRoot.querySelector(t0()):elementChildren(r0,t0())[0];return!s0&&i0.params.createElements&&(s0=createElement("div",i0.params.wrapperClass),r0.append(s0),elementChildren(r0,`.${i0.params.slideClass}`).forEach(o0=>{s0.append(o0)})),Object.assign(i0,{el:r0,wrapperEl:s0,slidesEl:i0.isElement&&!r0.parentNode.host.slideSlots?r0.parentNode.host:s0,hostEl:i0.isElement?r0.parentNode.host:r0,mounted:!0,rtl:r0.dir.toLowerCase()==="rtl"||elementStyle(r0,"direction")==="rtl",rtlTranslate:i0.params.direction==="horizontal"&&(r0.dir.toLowerCase()==="rtl"||elementStyle(r0,"direction")==="rtl"),wrongRTL:elementStyle(s0,"display")==="-webkit-box"}),!0}init(_e){const i0=this;return i0.initialized||i0.mount(_e)===!1||(i0.emit("beforeInit"),i0.params.breakpoints&&i0.setBreakpoint(),i0.addClasses(),i0.updateSize(),i0.updateSlides(),i0.params.watchOverflow&&i0.checkOverflow(),i0.params.grabCursor&&i0.enabled&&i0.setGrabCursor(),i0.params.loop&&i0.virtual&&i0.params.virtual.enabled?i0.slideTo(i0.params.initialSlide+i0.virtual.slidesBefore,0,i0.params.runCallbacksOnInit,!1,!0):i0.slideTo(i0.params.initialSlide,0,i0.params.runCallbacksOnInit,!1,!0),i0.params.loop&&i0.loopCreate(),i0.attachEvents(),[...i0.el.querySelectorAll('[loading="lazy"]')].forEach(t0=>{t0.complete?processLazyPreloader(i0,t0):t0.addEventListener("load",n0=>{processLazyPreloader(i0,n0.target)})}),preload(i0),i0.initialized=!0,preload(i0),i0.emit("init"),i0.emit("afterInit")),i0}destroy(_e,i0){_e===void 0&&(_e=!0),i0===void 0&&(i0=!0);const r0=this,{params:t0,el:n0,wrapperEl:s0,slides:o0}=r0;return typeof r0.params>"u"||r0.destroyed||(r0.emit("beforeDestroy"),r0.initialized=!1,r0.detachEvents(),t0.loop&&r0.loopDestroy(),i0&&(r0.removeClasses(),n0.removeAttribute("style"),s0.removeAttribute("style"),o0&&o0.length&&o0.forEach(a0=>{a0.classList.remove(t0.slideVisibleClass,t0.slideActiveClass,t0.slideNextClass,t0.slidePrevClass),a0.removeAttribute("style"),a0.removeAttribute("data-swiper-slide-index")})),r0.emit("destroy"),Object.keys(r0.eventsListeners).forEach(a0=>{r0.off(a0)}),_e!==!1&&(r0.el.swiper=null,deleteProps(r0)),r0.destroyed=!0),null}static extendDefaults(_e){extend$1(extendedDefaults,_e)}static get extendedDefaults(){return extendedDefaults}static get defaults(){return defaults}static installModule(_e){rr.prototype.__modules__||(rr.prototype.__modules__=[]);const i0=rr.prototype.__modules__;typeof _e=="function"&&i0.indexOf(_e)<0&&i0.push(_e)}static use(_e){return Array.isArray(_e)?(_e.forEach(i0=>rr.installModule(i0)),rr):(rr.installModule(_e),rr)}};Object.keys(prototypes).forEach(e0=>{Object.keys(prototypes[e0]).forEach(_e=>{Swiper$1.prototype[_e]=prototypes[e0][_e]})});Swiper$1.use([Resize,Observer]);const paramsList=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopedSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideNextClass","slidePrevClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function isObject$1(e0){return typeof e0=="object"&&e0!==null&&e0.constructor&&Object.prototype.toString.call(e0).slice(8,-1)==="Object"}function extend(e0,_e){const i0=["__proto__","constructor","prototype"];Object.keys(_e).filter(r0=>i0.indexOf(r0)<0).forEach(r0=>{typeof e0[r0]>"u"?e0[r0]=_e[r0]:isObject$1(_e[r0])&&isObject$1(e0[r0])&&Object.keys(_e[r0]).length>0?_e[r0].__swiper__?e0[r0]=_e[r0]:extend(e0[r0],_e[r0]):e0[r0]=_e[r0]})}function needsNavigation(e0){return e0===void 0&&(e0={}),e0.navigation&&typeof e0.navigation.nextEl>"u"&&typeof e0.navigation.prevEl>"u"}function needsPagination(e0){return e0===void 0&&(e0={}),e0.pagination&&typeof e0.pagination.el>"u"}function needsScrollbar(e0){return e0===void 0&&(e0={}),e0.scrollbar&&typeof e0.scrollbar.el>"u"}function uniqueClasses(e0){e0===void 0&&(e0="");const _e=e0.split(" ").map(r0=>r0.trim()).filter(r0=>!!r0),i0=[];return _e.forEach(r0=>{i0.indexOf(r0)<0&&i0.push(r0)}),i0.join(" ")}function wrapperClass(e0){return e0===void 0&&(e0=""),e0?e0.includes("swiper-wrapper")?e0:`swiper-wrapper ${e0}`:"swiper-wrapper"}function updateSwiper(e0){let{swiper:_e,slides:i0,passedParams:r0,changedParams:t0,nextEl:n0,prevEl:s0,scrollbarEl:o0,paginationEl:a0}=e0;const f0=t0.filter(y0=>y0!=="children"&&y0!=="direction"&&y0!=="wrapperClass"),{params:l0,pagination:u0,navigation:A0,scrollbar:c0,virtual:k0,thumbs:d0}=_e;let h0,b0,p0,m0,g0,v0,x0,w0;t0.includes("thumbs")&&r0.thumbs&&r0.thumbs.swiper&&l0.thumbs&&!l0.thumbs.swiper&&(h0=!0),t0.includes("controller")&&r0.controller&&r0.controller.control&&l0.controller&&!l0.controller.control&&(b0=!0),t0.includes("pagination")&&r0.pagination&&(r0.pagination.el||a0)&&(l0.pagination||l0.pagination===!1)&&u0&&!u0.el&&(p0=!0),t0.includes("scrollbar")&&r0.scrollbar&&(r0.scrollbar.el||o0)&&(l0.scrollbar||l0.scrollbar===!1)&&c0&&!c0.el&&(m0=!0),t0.includes("navigation")&&r0.navigation&&(r0.navigation.prevEl||s0)&&(r0.navigation.nextEl||n0)&&(l0.navigation||l0.navigation===!1)&&A0&&!A0.prevEl&&!A0.nextEl&&(g0=!0);const _0=y0=>{_e[y0]&&(_e[y0].destroy(),y0==="navigation"?(_e.isElement&&(_e[y0].prevEl.remove(),_e[y0].nextEl.remove()),l0[y0].prevEl=void 0,l0[y0].nextEl=void 0,_e[y0].prevEl=void 0,_e[y0].nextEl=void 0):(_e.isElement&&_e[y0].el.remove(),l0[y0].el=void 0,_e[y0].el=void 0))};t0.includes("loop")&&_e.isElement&&(l0.loop&&!r0.loop?v0=!0:!l0.loop&&r0.loop?x0=!0:w0=!0),f0.forEach(y0=>{if(isObject$1(l0[y0])&&isObject$1(r0[y0]))extend(l0[y0],r0[y0]),(y0==="navigation"||y0==="pagination"||y0==="scrollbar")&&"enabled"in r0[y0]&&!r0[y0].enabled&&_0(y0);else{const S0=r0[y0];(S0===!0||S0===!1)&&(y0==="navigation"||y0==="pagination"||y0==="scrollbar")?S0===!1&&_0(y0):l0[y0]=r0[y0]}}),f0.includes("controller")&&!b0&&_e.controller&&_e.controller.control&&l0.controller&&l0.controller.control&&(_e.controller.control=l0.controller.control),t0.includes("children")&&i0&&k0&&l0.virtual.enabled&&(k0.slides=i0,k0.update(!0)),t0.includes("children")&&i0&&l0.loop&&(w0=!0),h0&&d0.init()&&d0.update(!0),b0&&(_e.controller.control=l0.controller.control),p0&&(_e.isElement&&(!a0||typeof a0=="string")&&(a0=document.createElement("div"),a0.classList.add("swiper-pagination"),_e.el.appendChild(a0)),a0&&(l0.pagination.el=a0),u0.init(),u0.render(),u0.update()),m0&&(_e.isElement&&(!o0||typeof o0=="string")&&(o0=document.createElement("div"),o0.classList.add("swiper-scrollbar"),_e.el.appendChild(o0)),o0&&(l0.scrollbar.el=o0),c0.init(),c0.updateSize(),c0.setTranslate()),g0&&(_e.isElement&&((!n0||typeof n0=="string")&&(n0=document.createElement("div"),n0.classList.add("swiper-button-next"),n0.innerHTML=_e.hostEl.nextButtonSvg,_e.el.appendChild(n0)),(!s0||typeof s0=="string")&&(s0=document.createElement("div"),s0.classList.add("swiper-button-prev"),n0.innerHTML=_e.hostEl.prevButtonSvg,_e.el.appendChild(s0))),n0&&(l0.navigation.nextEl=n0),s0&&(l0.navigation.prevEl=s0),A0.init(),A0.update()),t0.includes("allowSlideNext")&&(_e.allowSlideNext=r0.allowSlideNext),t0.includes("allowSlidePrev")&&(_e.allowSlidePrev=r0.allowSlidePrev),t0.includes("direction")&&_e.changeDirection(r0.direction,!1),(v0||w0)&&_e.loopDestroy(),(x0||w0)&&_e.loopCreate(),_e.update()}function getParams(e0,_e){e0===void 0&&(e0={}),_e===void 0&&(_e=!0);const i0={on:{}},r0={},t0={};extend(i0,defaults),i0._emitClasses=!0,i0.init=!1;const n0={},s0=paramsList.map(a0=>a0.replace(/_/,"")),o0=Object.assign({},e0);return Object.keys(o0).forEach(a0=>{typeof e0[a0]>"u"||(s0.indexOf(a0)>=0?isObject$1(e0[a0])?(i0[a0]={},t0[a0]={},extend(i0[a0],e0[a0]),extend(t0[a0],e0[a0])):(i0[a0]=e0[a0],t0[a0]=e0[a0]):a0.search(/on[A-Z]/)===0&&typeof e0[a0]=="function"?_e?r0[`${a0[2].toLowerCase()}${a0.substr(3)}`]=e0[a0]:i0.on[`${a0[2].toLowerCase()}${a0.substr(3)}`]=e0[a0]:n0[a0]=e0[a0])}),["navigation","pagination","scrollbar"].forEach(a0=>{i0[a0]===!0&&(i0[a0]={}),i0[a0]===!1&&delete i0[a0]}),{params:i0,passedParams:t0,rest:n0,events:r0}}function mountSwiper(e0,_e){let{el:i0,nextEl:r0,prevEl:t0,paginationEl:n0,scrollbarEl:s0,swiper:o0}=e0;needsNavigation(_e)&&r0&&t0&&(o0.params.navigation.nextEl=r0,o0.originalParams.navigation.nextEl=r0,o0.params.navigation.prevEl=t0,o0.originalParams.navigation.prevEl=t0),needsPagination(_e)&&n0&&(o0.params.pagination.el=n0,o0.originalParams.pagination.el=n0),needsScrollbar(_e)&&s0&&(o0.params.scrollbar.el=s0,o0.originalParams.scrollbar.el=s0),o0.init(i0)}function getChangedParams(e0,_e,i0,r0,t0){const n0=[];if(!_e)return n0;const s0=a0=>{n0.indexOf(a0)<0&&n0.push(a0)};if(i0&&r0){const a0=r0.map(t0),f0=i0.map(t0);a0.join("")!==f0.join("")&&s0("children"),r0.length!==i0.length&&s0("children")}return paramsList.filter(a0=>a0[0]==="_").map(a0=>a0.replace(/_/,"")).forEach(a0=>{if(a0 in e0&&a0 in _e)if(isObject$1(e0[a0])&&isObject$1(_e[a0])){const f0=Object.keys(e0[a0]),l0=Object.keys(_e[a0]);f0.length!==l0.length?s0(a0):(f0.forEach(u0=>{e0[a0][u0]!==_e[a0][u0]&&s0(a0)}),l0.forEach(u0=>{e0[a0][u0]!==_e[a0][u0]&&s0(a0)}))}else e0[a0]!==_e[a0]&&s0(a0)}),n0}const updateOnVirtualData=e0=>{!e0||e0.destroyed||!e0.params.virtual||e0.params.virtual&&!e0.params.virtual.enabled||(e0.updateSlides(),e0.updateProgress(),e0.updateSlidesClasses(),e0.parallax&&e0.params.parallax&&e0.params.parallax.enabled&&e0.parallax.setTranslate())};function _extends(){return _extends=Object.assign?Object.assign.bind():function(e0){for(var _e=1;_e<arguments.length;_e++){var i0=arguments[_e];for(var r0 in i0)Object.prototype.hasOwnProperty.call(i0,r0)&&(e0[r0]=i0[r0])}return e0},_extends.apply(this,arguments)}function isChildSwiperSlide(e0){return e0.type&&e0.type.displayName&&e0.type.displayName.includes("SwiperSlide")}function processChildren(e0){const _e=[];return React$4.Children.toArray(e0).forEach(i0=>{isChildSwiperSlide(i0)?_e.push(i0):i0.props&&i0.props.children&&processChildren(i0.props.children).forEach(r0=>_e.push(r0))}),_e}function getChildren(e0){const _e=[],i0={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return React$4.Children.toArray(e0).forEach(r0=>{if(isChildSwiperSlide(r0))_e.push(r0);else if(r0.props&&r0.props.slot&&i0[r0.props.slot])i0[r0.props.slot].push(r0);else if(r0.props&&r0.props.children){const t0=processChildren(r0.props.children);t0.length>0?t0.forEach(n0=>_e.push(n0)):i0["container-end"].push(r0)}else i0["container-end"].push(r0)}),{slides:_e,slots:i0}}function renderVirtual(e0,_e,i0){if(!i0)return null;const r0=l0=>{let u0=l0;return l0<0?u0=_e.length+l0:u0>=_e.length&&(u0=u0-_e.length),u0},t0=e0.isHorizontal()?{[e0.rtlTranslate?"right":"left"]:`${i0.offset}px`}:{top:`${i0.offset}px`},{from:n0,to:s0}=i0,o0=e0.params.loop?-_e.length:0,a0=e0.params.loop?_e.length*2:_e.length,f0=[];for(let l0=o0;l0<a0;l0+=1)l0>=n0&&l0<=s0&&f0.push(_e[r0(l0)]);return f0.map((l0,u0)=>React$4.cloneElement(l0,{swiper:e0,style:t0,key:`slide-${u0}`}))}function useIsomorphicLayoutEffect$1(e0,_e){return typeof window>"u"?reactExports.useEffect(e0,_e):reactExports.useLayoutEffect(e0,_e)}const SwiperSlideContext=reactExports.createContext(null),SwiperContext=reactExports.createContext(null),Swiper=reactExports.forwardRef(function(e0,_e){let{className:i0,tag:r0="div",wrapperTag:t0="div",children:n0,onSwiper:s0,...o0}=e0===void 0?{}:e0,a0=!1;const[f0,l0]=reactExports.useState("swiper"),[u0,A0]=reactExports.useState(null),[c0,k0]=reactExports.useState(!1),d0=reactExports.useRef(!1),h0=reactExports.useRef(null),b0=reactExports.useRef(null),p0=reactExports.useRef(null),m0=reactExports.useRef(null),g0=reactExports.useRef(null),v0=reactExports.useRef(null),x0=reactExports.useRef(null),w0=reactExports.useRef(null),{params:_0,passedParams:y0,rest:S0,events:B0}=getParams(o0),{slides:I0,slots:T0}=getChildren(n0),R0=()=>{k0(!c0)};Object.assign(_0.on,{_containerClasses(M0,j0){l0(j0)}});const E0=()=>{Object.assign(_0.on,B0),a0=!0;const M0={..._0};if(delete M0.wrapperClass,b0.current=new Swiper$1(M0),b0.current.virtual&&b0.current.params.virtual.enabled){b0.current.virtual.slides=I0;const j0={cache:!1,slides:I0,renderExternal:A0,renderExternalUpdate:!1};extend(b0.current.params.virtual,j0),extend(b0.current.originalParams.virtual,j0)}};h0.current||E0(),b0.current&&b0.current.on("_beforeBreakpoint",R0);const C0=()=>{a0||!B0||!b0.current||Object.keys(B0).forEach(M0=>{b0.current.on(M0,B0[M0])})},G0=()=>{!B0||!b0.current||Object.keys(B0).forEach(M0=>{b0.current.off(M0,B0[M0])})};reactExports.useEffect(()=>()=>{b0.current&&b0.current.off("_beforeBreakpoint",R0)}),reactExports.useEffect(()=>{!d0.current&&b0.current&&(b0.current.emitSlidesClasses(),d0.current=!0)}),useIsomorphicLayoutEffect$1(()=>{if(_e&&(_e.current=h0.current),!!h0.current)return b0.current.destroyed&&E0(),mountSwiper({el:h0.current,nextEl:g0.current,prevEl:v0.current,paginationEl:x0.current,scrollbarEl:w0.current,swiper:b0.current},_0),s0&&s0(b0.current),()=>{b0.current&&!b0.current.destroyed&&b0.current.destroy(!0,!1)}},[]),useIsomorphicLayoutEffect$1(()=>{C0();const M0=getChangedParams(y0,p0.current,I0,m0.current,j0=>j0.key);return p0.current=y0,m0.current=I0,M0.length&&b0.current&&!b0.current.destroyed&&updateSwiper({swiper:b0.current,slides:I0,passedParams:y0,changedParams:M0,nextEl:g0.current,prevEl:v0.current,scrollbarEl:w0.current,paginationEl:x0.current}),()=>{G0()}}),useIsomorphicLayoutEffect$1(()=>{updateOnVirtualData(b0.current)},[u0]);function F0(){return _0.virtual?renderVirtual(b0.current,I0,u0):I0.map((M0,j0)=>React$4.cloneElement(M0,{swiper:b0.current,swiperSlideIndex:j0}))}return React$4.createElement(r0,_extends({ref:h0,className:uniqueClasses(`${f0}${i0?` ${i0}`:""}`)},S0),React$4.createElement(SwiperContext.Provider,{value:b0.current},T0["container-start"],React$4.createElement(t0,{className:wrapperClass(_0.wrapperClass)},T0["wrapper-start"],F0(),T0["wrapper-end"]),needsNavigation(_0)&&React$4.createElement(React$4.Fragment,null,React$4.createElement("div",{ref:v0,className:"swiper-button-prev"}),React$4.createElement("div",{ref:g0,className:"swiper-button-next"})),needsScrollbar(_0)&&React$4.createElement("div",{ref:w0,className:"swiper-scrollbar"}),needsPagination(_0)&&React$4.createElement("div",{ref:x0,className:"swiper-pagination"}),T0["container-end"]))});Swiper.displayName="Swiper";const SwiperSlide=reactExports.forwardRef(function(e0,_e){let{tag:i0="div",children:r0,className:t0="",swiper:n0,zoom:s0,lazy:o0,virtualIndex:a0,swiperSlideIndex:f0,...l0}=e0===void 0?{}:e0;const u0=reactExports.useRef(null),[A0,c0]=reactExports.useState("swiper-slide"),[k0,d0]=reactExports.useState(!1);function h0(g0,v0,x0){v0===u0.current&&c0(x0)}useIsomorphicLayoutEffect$1(()=>{if(typeof f0<"u"&&(u0.current.swiperSlideIndex=f0),_e&&(_e.current=u0.current),!(!u0.current||!n0)){if(n0.destroyed){A0!=="swiper-slide"&&c0("swiper-slide");return}return n0.on("_slideClass",h0),()=>{n0&&n0.off("_slideClass",h0)}}}),useIsomorphicLayoutEffect$1(()=>{n0&&u0.current&&!n0.destroyed&&c0(n0.getSlideClasses(u0.current))},[n0]);const b0={isActive:A0.indexOf("swiper-slide-active")>=0,isVisible:A0.indexOf("swiper-slide-visible")>=0,isPrev:A0.indexOf("swiper-slide-prev")>=0,isNext:A0.indexOf("swiper-slide-next")>=0},p0=()=>typeof r0=="function"?r0(b0):r0,m0=()=>{d0(!0)};return React$4.createElement(i0,_extends({ref:u0,className:uniqueClasses(`${A0}${t0?` ${t0}`:""}`),"data-swiper-slide-index":a0,onLoad:m0},l0),s0&&React$4.createElement(SwiperSlideContext.Provider,{value:b0},React$4.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s0=="number"?s0:void 0},p0(),o0&&!k0&&React$4.createElement("div",{className:"swiper-lazy-preloader"}))),!s0&&React$4.createElement(SwiperSlideContext.Provider,{value:b0},p0(),o0&&!k0&&React$4.createElement("div",{className:"swiper-lazy-preloader"})))});SwiperSlide.displayName="SwiperSlide";function usePreferences(e0){return{getPreference:async()=>await odeServices.conf().getPreference(e0),savePreference:async _e=>await odeServices.conf().savePreference(e0,JSON.stringify(_e))}}const useOnboardingModal=(e0,_e)=>{const i0=reactExports.useRef(),[r0,t0]=reactExports.useState(!1),[n0,s0]=reactExports.useState(!1),{getPreference:o0,savePreference:a0}=usePreferences(e0);reactExports.useEffect(()=>{(async()=>{const l0=await o0();if(l0)if(_e){const{display:u0,nextState:A0}=_e(l0.key);t0(u0),s0(u0),i0.current=A0}else l0.key===!0&&t0(!0),s0(!!l0.key),i0.current=void 0;else t0(!0),s0(!0),i0.current=void 0})()},[]);const f0=reactExports.useCallback(async()=>{await a0({key:i0.current}),t0(!1),s0(!1)},[a0,t0,s0]);return{isOpen:r0,setIsOpen:t0,isOnboarding:n0,handleSavePreference:f0}},OnboardingModalInner=({id:e0,items:_e,modalOptions:i0={},isOnboardingChange:r0,onDisplayRuleCheck:t0=s0=>({display:s0===!0,nextState:!1})},n0)=>{var s0;const[o0,a0]=reactExports.useState(),[f0,l0]=reactExports.useState(0),{isOpen:u0,isOnboarding:A0,setIsOpen:c0,handleSavePreference:k0}=useOnboardingModal(e0,t0);reactExports.useImperativeHandle(n0,()=>({setIsOpen:c0,handleSavePreference:k0})),reactExports.useEffect(()=>{r0==null||r0(A0)},[A0,r0]),reactExports.useEffect(()=>{const w0=document.createElement("link");return w0.href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",w0.rel="stylesheet",w0.type="text/css",document.head.appendChild(w0),()=>{document.head.removeChild(w0)}},[]);const{t:d0}=useTranslation(),{title:h0,prevText:b0,closeText:p0,nextText:m0}=i0,g0=(o0==null?void 0:o0.activeIndex)!=null&&(s0=_e[o0==null?void 0:o0.activeIndex])!=null&&s0.title?_e[o0.activeIndex].title:h0,v0=()=>{k0(),l0(0)},x0=()=>{c0(!1),l0(0)};return u0?reactDomExports.createPortal(jsxRuntimeExports.jsxs(Modal,{id:"onboarding-modal","data-testid":"modal-onboarding",size:"md",isOpen:u0,focusId:"nextButtonId",onModalClose:x0,children:[jsxRuntimeExports.jsx(Modal.Header,{onModalClose:x0,centered:!0,children:d0(g0||"explorer.modal.onboarding.trash.title")}),jsxRuntimeExports.jsx(Modal.Body,{children:jsxRuntimeExports.jsx(Swiper,{modules:[Pagination],onSwiper:w0=>{a0(w0)},onSlideChange:w0=>{l0(w0.progress)},pagination:{clickable:!0},children:_e.map((w0,_0)=>jsxRuntimeExports.jsxs(SwiperSlide,{children:[jsxRuntimeExports.jsx(Image$1,{width:"270",height:"140",className:"mx-auto my-12 onboarding-modal-image",loading:"lazy",src:w0.src,alt:d0(w0.alt)}),jsxRuntimeExports.jsx("p",{className:"text-center",dangerouslySetInnerHTML:{__html:d0(w0.text)}})]},_0))})}),jsxRuntimeExports.jsxs(Modal.Footer,{children:[jsxRuntimeExports.jsx(Button,{"data-testid":"modal-onboarding-later",type:"button",color:"tertiary",variant:"ghost",onClick:x0,children:d0("explorer.modal.onboarding.trash.later")}),f0>0&&jsxRuntimeExports.jsx(Button,{"data-testid":"modal-onboarding-previous",type:"button",color:"primary",variant:"outline",onClick:()=>o0.slidePrev(),children:d0(b0||"explorer.modal.onboarding.trash.prev")}),_e.length>1&&f0<1&&jsxRuntimeExports.jsx(Button,{id:"nextButtonId","data-testid":"modal-onboarding-next",type:"button",color:"primary",variant:"filled",onClick:()=>o0.slideNext(),children:d0(m0||"explorer.modal.onboarding.trash.next")}),(_e.length===1||f0===1)&&jsxRuntimeExports.jsx(Button,{"data-testid":"modal-onboarding-close",type:"button",color:"primary",variant:"filled",onClick:()=>{A0?v0():x0()},children:d0(p0||"explorer.modal.onboarding.trash.close")})]})]}),document.getElementById("portal")||document.body):null},OnboardingModal$2=reactExports.forwardRef(OnboardingModalInner);function Navbar({children:e0,className:_e,...i0}){const r0=clsx("navbar",_e);return jsxRuntimeExports.jsx("nav",{className:r0,...i0,children:e0})}const NavItem=reactExports.forwardRef(({children:e0,className:_e,...i0},r0)=>{const t0=clsx("nav-item",_e);return jsxRuntimeExports.jsx("li",{ref:r0,className:t0,...i0,children:e0})}),VisuallyHidden=reactExports.forwardRef(({children:e0},_e)=>jsxRuntimeExports.jsx("span",{className:"visually-hidden",ref:_e,children:e0}));function NavLink({link:e0,className:_e,children:i0,translate:r0,button:t0,...n0}){const s0=clsx("nav-link",_e);return jsxRuntimeExports.jsxs("a",{href:e0,className:s0,...n0,children:[i0,r0&&jsxRuntimeExports.jsx(VisuallyHidden,{children:jsxRuntimeExports.jsx("span",{className:"nav-text",children:r0})})]})}function useBookmark(){var e0;const{sessionQuery:_e}=useEdificeClient(),i0=new Set;return(e0=_e==null?void 0:_e.data)==null?void 0:e0.bookmarkedApps.filter(r0=>{const t0=i0.has(r0.displayName);return i0.add(r0.displayName),!t0})}function useHeader({user:e0,avatar:_e}){const{appCode:i0}=useEdificeClient(),{t:r0}=useTranslation(),t0=r0(i0),[n0,s0]=reactExports.useState(!0),[o0,a0]=useHover$2(),f0=reactExports.useId(),l0=reactExports.useId(),u0=_e,A0=e0==null?void 0:e0.username,c0=r0("welcome",{username:e0==null?void 0:e0.firstName}),k0=useBookmark(),d0=useHasWorkflow("community.access"),h0=useHasWorkflow("org.entcore.conversation.controllers.ConversationController|view"),b0=useHasWorkflow("fr.openent.searchengine.controllers.SearchEngineController|view"),p0=reactExports.useCallback(()=>{s0(!n0)},[n0]);return reactExports.useMemo(()=>({title:t0,bookmarkedApps:k0,appsRef:o0,isAppsHovered:a0,popoverAppsId:f0,popoverSearchId:l0,userAvatar:u0,userName:A0,welcomeUser:c0,communitiesWorkflow:d0,conversationWorflow:h0,searchWorkflow:b0,isCollapsed:n0,toggleCollapsedNav:p0}),[o0,k0,d0,h0,a0,n0,f0,l0,b0,t0,p0,u0,A0,c0])}const SvgIconCommunitiesBeta=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 32 32","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsxs("g",{strokeMiterlimit:10,strokeWidth:2.667,clipPath:"url(#icon-communities-beta_svg__a)",children:[jsxRuntimeExports.jsx("path",{fill:"#FEECFE",stroke:"#E26AE2",d:"M19.96 5.803a3.803 3.803 0 1 0-7.605 0 3.803 3.803 0 0 0 7.606 0Z"}),jsxRuntimeExports.jsx("path",{stroke:"#E26AE2",d:"M9.668 11.861a3.803 3.803 0 1 0-7.606 0 3.803 3.803 0 0 0 7.606 0ZM30.254 11.861a3.803 3.803 0 1 0-7.606 0 3.803 3.803 0 0 0 7.606 0Z"}),jsxRuntimeExports.jsx("path",{stroke:"#FC94FF",d:"M6.389 18.847a5.25 5.25 0 0 1 5.248 5.248v6.837H1.14v-6.837a5.25 5.25 0 0 1 5.248-5.248ZM25.637 18.847a5.25 5.25 0 0 1 5.248 5.248v6.837H20.389v-6.837a5.25 5.25 0 0 1 5.248-5.248Z"}),jsxRuntimeExports.jsx("path",{fill:"#FEECFE",stroke:"#E26AE2",d:"M16.158 12.955a5.25 5.25 0 0 1 5.248 5.248v12.73H10.91v-12.73a5.25 5.25 0 0 1 5.248-5.248Z"})]}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-communities-beta_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h32v32H0z"})})})]}),SvgIconDisconnect=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M22.996 13.153q0 2.09-.873 3.987a10.6 10.6 0 0 1-2.336 3.292q-1.462 1.393-3.516 2.21t-4.26.817-4.287-.817-3.49-2.21a12.3 12.3 0 0 1-2.362-3.291A8.1 8.1 0 0 1 1 13.153q0-2.451 1.155-4.589t3.234-3.627q.616-.433 1.386-.337t1.181.673q.462.553.36 1.273-.104.72-.72 1.13a7 7 0 0 0-2.155 2.426 6.38 6.38 0 0 0-.18 5.717 7 7 0 0 0 1.566 2.186q.975.913 2.335 1.466a7.5 7.5 0 0 0 2.85.552 7.3 7.3 0 0 0 2.823-.552 8.3 8.3 0 0 0 2.36-1.466 6.04 6.04 0 0 0 1.567-2.186q.538-1.274.564-2.666 0-1.635-.77-3.051T16.4 7.675a1.75 1.75 0 0 1-.719-1.129q-.128-.697.36-1.273.436-.577 1.206-.673t1.36.337q2.079 1.466 3.234 3.627a9.6 9.6 0 0 1 1.155 4.589M13.833 2.846v8.6q0 .698-.54 1.202-.538.505-1.283.505t-1.309-.505q-.564-.505-.539-1.201v-8.6q0-.697.54-1.202.538-.504 1.308-.504t1.284.504.539 1.201"})]}),SvgIconHomeBeta=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 32 32","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("g",{clipPath:"url(#icon-home-beta_svg__a)",children:jsxRuntimeExports.jsx("path",{fill:"#383838",d:"M15.183.28a1.334 1.334 0 0 1 1.636 0l12 9.335c.325.252.515.64.515 1.052v14.666a4 4 0 0 1-4 4H6.668a4 4 0 0 1-4-4V10.667c0-.411.19-.8.515-1.052zM5.334 11.32v14.014a1.335 1.335 0 0 0 1.334 1.334h4v-12c0-.736.597-1.334 1.333-1.334h8c.736 0 1.333.598 1.333 1.334v12h4a1.335 1.335 0 0 0 1.334-1.334V11.32L16.001 3.023zm8 15.348h5.334V16h-5.334z"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-home-beta_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h32v32H0z"})})})]}),SvgIconMessagesBeta=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 32 32","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsxs("g",{clipPath:"url(#icon-messages-beta_svg__a)",children:[jsxRuntimeExports.jsx("path",{stroke:"#E5A800",strokeMiterlimit:10,strokeWidth:2.667,d:"m5.93 10.246-4.8 3.088v12.267a5.335 5.335 0 0 0 5.334 5.333h24.534v-17.6l-4.689-3.013"}),jsxRuntimeExports.jsx("path",{fill:"#FCF3CF",d:"M26.196 15.468v-14.4H5.93v14.4"}),jsxRuntimeExports.jsx("path",{stroke:"#FFC403",strokeMiterlimit:10,strokeWidth:2.667,d:"M26.196 15.468v-14.4H5.93v14.4"}),jsxRuntimeExports.jsx("path",{stroke:"#E5A800",strokeMiterlimit:10,strokeWidth:2.667,d:"M9.13 5.334h13.867M10.197 9.6h11.734M1.13 13.334l14.934 8.533 14.933-8.533"})]}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-messages-beta_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h32v32H0z"})})})]}),SvgIconMyAppsBeta=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 32 32","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("g",{stroke:"#1C1C73",strokeMiterlimit:10,strokeWidth:2.667,clipPath:"url(#icon-my-apps-beta_svg__a)",children:jsxRuntimeExports.jsx("path",{d:"M31.117 1H19v12.117h12.117zM13.207 18.884H1.09V31h12.117zM1 1.084c6.688 0 12.117 5.43 12.117 12.117H1zM30.934 18.884H18.816V31h12.118z"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-my-apps-beta_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h32v32H0z"})})})]}),SvgIconNotificationBeta=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 32 32","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{stroke:"#1C1C73",strokeMiterlimit:10,strokeWidth:2.667,d:"M13.363 5.348a2.726 2.726 0 1 1 5.383-.622q0 .423-.12.808M19.886 25.184a3.919 3.919 0 1 1-7.559-.26"}),jsxRuntimeExports.jsx("path",{stroke:"#1C1C73",strokeMiterlimit:10,strokeWidth:2.667,d:"M28.62 18.901H4.058v6.682h24.56z"}),jsxRuntimeExports.jsx("path",{stroke:"#1C1C73",strokeMiterlimit:10,strokeWidth:2.667,d:"M16.189 4.889c5.639 0 10.22 4.581 10.22 10.22v3.794H5.97V15.11c0-5.639 4.581-10.22 10.22-10.22Z"})]}),createNotificationService=e0=>({getNotifications(_e,i0){const r0=new URLSearchParams({page:i0.toString()});return _e.forEach(t0=>{r0.append("type",t0)}),odeServices.http().get(`${e0}/timeline/lastNotifications?${r0.toString()}`).then(t0=>t0.status!=="ok"?[]:t0.number&&t0.results?t0.results:[])},getNotificationTypes(){return odeServices.http().get(`${e0}/timeline/types`)},reportNotification(_e){return odeServices.http().put(`${e0}/timeline/${_e}/report`)},deleteNotification(_e){return odeServices.http().put(`${e0}/timeline/${_e}`)}}),notificationService=createNotificationService(""),notificationQueryKeys={all:()=>["notifications"],notifications:(e0=[])=>[...notificationQueryKeys.all(),"list",e0],types:()=>[...notificationQueryKeys.all(),"types"],preference:()=>[...notificationQueryKeys.all(),"preference"]},notificationQueryOptions={getNotifications(e0,_e){return{queryKey:notificationQueryKeys.notifications(e0),queryFn:({pageParam:i0=0})=>notificationService.getNotifications(e0,i0),staleTime:5*60*1e3,initialPageParam:0,select(i0){const r0=new Set;return i0.pages.flat().filter(t0=>r0.has(t0._id)?!1:(r0.add(t0._id),!0))},getNextPageParam:(i0,r0,t0)=>{if((i0==null?void 0:i0.length)!==0)return t0+1},enabled:_e}},getNotificationTypes(){return{queryKey:notificationQueryKeys.types(),queryFn:async()=>notificationService.getNotificationTypes()}}},useNotifications=(e0=[],_e=!0)=>useInfiniteQuery(notificationQueryOptions.getNotifications(e0,_e)),useNotificationTypes=()=>useQuery(notificationQueryOptions.getNotificationTypes()),useTimelinePreference=()=>useQuery({queryKey:notificationQueryKeys.preference(),queryFn:()=>odeServices.conf().getPreference("timeline")}),useSaveTimelinePreference=()=>{const e0=useQueryClient();return useMutation({mutationFn:_e=>odeServices.conf().savePreference("timeline",_e),onSuccess:(_e,i0)=>{e0.setQueryData(notificationQueryKeys.preference(),i0)},onError:()=>{e0.invalidateQueries({queryKey:notificationQueryKeys.preference()})}})},useReportNotification=()=>useMutation({mutationFn:e0=>notificationService.reportNotification(e0)}),useDeleteNotification=()=>{const e0=useQueryClient();return useMutation({mutationFn:_e=>notificationService.deleteNotification(_e),onSuccess:(_e,i0)=>{e0.setQueriesData({queryKey:[...notificationQueryKeys.all(),"list"]},r0=>r0&&{...r0,pages:r0.pages.map(t0=>t0.filter(n0=>n0._id!==i0))})}})},useNotificationListContainer=()=>{const{data:e0,isLoading:_e,isFetched:i0,error:r0}=useNotificationTypes(),{data:t0,isFetched:n0}=useTimelinePreference(),{mutate:s0}=useSaveTimelinePreference(),[o0,a0]=reactExports.useState();reactExports.useEffect(()=>{if(o0===void 0&&i0&&n0){const d0=t0==null?void 0:t0.type;a0(d0&&d0.length>0?d0:e0??[])}},[o0,i0,n0,t0,e0]);const f0=d0=>{a0(d0),s0({...t0,type:d0})},{data:l0,hasNextPage:u0,isLoading:A0,error:c0,fetchNextPage:k0}=useNotifications(o0??[],i0&&!!o0);return{notifications:l0,notificationTypes:e0,selectedTypes:o0,setSelectedTypes:f0,hasNextPage:u0,loadNextPage:()=>k0(),isLoading:_e||A0,error:r0||c0}},useHasNotificationToday=()=>{const{dateIsToday:e0}=useDate(),{data:_e,isFetched:i0}=useNotificationTypes(),{data:r0}=useNotifications(_e??[],i0);return(r0==null?void 0:r0.some(t0=>e0(t0.date)))??!1},useConversation=()=>{const e0=useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|view"),_e=useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|preauth"),[i0,r0]=reactExports.useState(""),t0={unread:!0,_:new Date().getTime()},{data:n0}=useQuery({queryKey:["folder","count","inbox"],queryFn:async()=>await odeServices.http().get(e0?"/zimbra/count/INBOX":"/conversation/api/count/inbox",{queryParams:t0}),staleTime:5*60*1e3}),s0=async()=>{const o0="/zimbra/zimbra";try{const{preference:a0}=await odeServices.http().get("/userbook/preference/zimbra"),f0=a0?JSON.parse(a0).modeExpert:!1;r0(f0&&_e?"/zimbra/preauth":window.location.origin+o0)}catch(a0){console.error(a0),r0(window.location.origin+o0)}};return reactExports.useEffect(()=>{s0()},[]),{messages:n0?n0.count:0,msgLink:i0,zimbraWorkflow:e0}};function useHover(){const[e0,_e]=reactExports.useState(!1),i0=reactExports.useRef(null),r0=()=>{_e(!0)},t0=()=>{_e(!1)};return reactExports.useEffect(()=>{const n0=i0.current;if(n0)return n0.addEventListener("mouseover",r0),n0.addEventListener("mouseout",t0),()=>{n0.removeEventListener("mouseover",r0),n0.removeEventListener("mouseout",t0)}},[i0]),[i0,e0]}const PopoverBody=({children:e0,className:_e})=>{const i0=clsx("popover-body",_e);return jsxRuntimeExports.jsx("div",{className:i0,children:e0})},PopoverFooter=({children:e0,className:_e})=>{const i0=clsx("popover-footer p-8",_e);return jsxRuntimeExports.jsx("div",{className:i0,children:e0})},Popover=reactExports.forwardRef(({align:e0="center",children:_e,className:i0,id:r0,isVisible:t0,...n0},s0)=>{const o0=clsx("popover d-block position-absolute top-100",e0==="end"?"end-0 popover-align-end":"start-50 translate-middle-x",i0);return useTransition(t0,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0},config:{duration:0}})((a0,f0)=>f0&&jsxRuntimeExports.jsx(animated.div,{ref:s0,"aria-labelledby":r0,className:o0,role:"tooltip",style:a0,...n0,children:_e}))}),Header$1=({src:e0="",onNotificationsClick:_e,dataProduct:i0})=>{const{t:r0}=useTranslation(),{messages:t0}=useConversation(),{user:n0,avatar:s0}=useUser(),o0=useHasWorkflow("org.entcore.auth.controllers.CarbonioPreauthController|preauth")||!1,a0=clsx("header-beta d-print-none no-2d no-1d"),{userAvatar:f0,userName:l0,communitiesWorkflow:u0,conversationWorflow:A0}=useHeader({user:n0,avatar:s0}),{theme:c0}=useEdificeTheme(),k0=t0>0,d0=useHasNotificationToday(),[h0,b0]=useHover(),p0=reactExports.useId(),m0=()=>{_e==null||_e()};return jsxRuntimeExports.jsx("header",{className:a0,"data-product":i0,children:jsxRuntimeExports.jsxs(Navbar,{className:"px-24",children:[jsxRuntimeExports.jsx(LogoBeta,{src:`${e0}/img/illustrations/logo.png`}),jsxRuntimeExports.jsxs("ul",{className:"navbar-nav",children:[jsxRuntimeExports.jsx(NavItem,{children:jsxRuntimeExports.jsx(NavLink,{link:"/timeline/timeline",translate:r0("navbar.home"),"data-testid":"header-home-button",children:jsxRuntimeExports.jsx(SvgIconHomeBeta,{})})}),u0&&jsxRuntimeExports.jsx(NavItem,{children:jsxRuntimeExports.jsx(NavLink,{link:"/communities",translate:r0("navbar.community"),"data-testid":"header-community-button",children:jsxRuntimeExports.jsx(SvgIconCommunitiesBeta,{className:"icon community"})})}),A0&&jsxRuntimeExports.jsx(NavItem,{children:jsxRuntimeExports.jsxs(NavLink,{className:"position-relative",link:"/conversation/conversation",translate:r0("conversation"),"data-testid":"header-messagerie-button",children:[jsxRuntimeExports.jsx(SvgIconMessagesBeta,{}),k0&&jsxRuntimeExports.jsx(Badge,{variant:{type:"notification",level:"danger"},className:"position-absolute",children:t0})]})}),o0&&jsxRuntimeExports.jsx(NavItem,{children:jsxRuntimeExports.jsxs("a",{className:"nav-link position-relative",href:"/auth/carbonio/preauth",target:"_blank","data-testid":"header-messagerie-button",children:[jsxRuntimeExports.jsx(SvgIconMessagesBeta,{}),jsxRuntimeExports.jsx(VisuallyHidden,{children:r0("conversation")})]})}),jsxRuntimeExports.jsx(NavItem,{children:jsxRuntimeExports.jsx(NavLink,{link:"/welcome",translate:r0("navbar.applications"),"data-testid":"header-my-apps-button",children:jsxRuntimeExports.jsx(SvgIconMyAppsBeta,{})})}),jsxRuntimeExports.jsxs(NavItem,{className:"position-relative",children:[jsxRuntimeExports.jsx(ButtonBeta,{leftIcon:jsxRuntimeExports.jsx(SvgIconNotificationBeta,{}),variant:"ghost",onClick:m0}),d0&&jsxRuntimeExports.jsx("span",{style:{position:"absolute",top:0,right:0,width:15,height:15,background:"red",borderRadius:"50%",border:"2px solid white",pointerEvents:"none",zIndex:1,display:"block"},"aria-label":r0("homepage.notifications.new-badge",{defaultValue:"Nouvelle notification"})})]}),jsxRuntimeExports.jsxs(NavItem,{className:"position-relative",ref:h0,id:p0,"aria-haspopup":"true","aria-expanded":b0,"data-testid":"header-user-menu-button",children:[jsxRuntimeExports.jsx(NavLink,{link:"/userbook/mon-compte",translate:r0("navbar.myaccount"),"data-testid":"header-user-profile-button",children:jsxRuntimeExports.jsx(Avatar,{alt:l0,size:"sm",src:f0,variant:"circle",className:"bg-white",width:"32",height:"32"})}),jsxRuntimeExports.jsx(Popover,{align:"end",className:"widget",id:p0,isVisible:b0,children:jsxRuntimeExports.jsx(PopoverBody,{children:jsxRuntimeExports.jsxs("a",{href:"/auth/logout?callback="+((c0==null?void 0:c0.logoutCallback)??""),className:"nav-link logout d-flex align-items-center gap-8","data-testid":"header-logout-button",children:[jsxRuntimeExports.jsx(SvgIconDisconnect,{className:"icon logout"}),jsxRuntimeExports.jsx("span",{id:"logout-label",className:"nav-text",children:r0("navbar.disconnect")})]})})})]})]})]})})},Header$2=Object.freeze(Object.defineProperty({__proto__:null,default:Header$1},Symbol.toStringTag,{value:"Module"})),__vite_import_meta_env__$2={},createStoreImpl$1=e0=>{let _e;const i0=new Set,r0=(l0,u0)=>{const A0=typeof l0=="function"?l0(_e):l0;if(!Object.is(A0,_e)){const c0=_e;_e=u0??(typeof A0!="object"||A0===null)?A0:Object.assign({},_e,A0),i0.forEach(k0=>k0(_e,c0))}},t0=()=>_e,a0={setState:r0,getState:t0,getInitialState:()=>f0,subscribe:l0=>(i0.add(l0),()=>i0.delete(l0)),destroy:()=>{(__vite_import_meta_env__$2?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),i0.clear()}},f0=_e=e0(r0,t0,a0);return a0},createStore$1=e0=>e0?createStoreImpl$1(e0):createStoreImpl$1;var withSelector$1={exports:{}},withSelector_production={},shim$3={exports:{}},useSyncExternalStoreShim_production={};/**
|
|
1585
1585
|
* @license React
|
|
1586
1586
|
* use-sync-external-store-shim.production.js
|
|
1587
1587
|
*
|