@arbocollab/arbo-web-scene 0.26.6-alpha.3 → 0.26.6-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.es.js CHANGED
@@ -11928,7 +11928,7 @@ const rlr = (e, t) => {
11928
11928
  (s = (i = e == null ? void 0 : e.config) == null ? void 0 : i.globalProperties) == null || s.setStoreValue("scene", "setCurrentSceneTabId", a);
11929
11929
  }
11930
11930
  return e.config.globalProperties.setStoreValue = r, e.config.globalProperties.handleSetTab = o, { handleSetTab: o };
11931
- }, olr = "0.26.6-alpha.3", alr = {
11931
+ }, olr = "0.26.6-alpha.5", alr = {
11932
11932
  "@arbocollab/arbo-chart-component": "1.0.1",
11933
11933
  "@arbocollab/arbo-comment-utils": "1.0.1",
11934
11934
  "@arbocollab/arbo-common-utils": "npm:@arbocollab/arbo-common-utils@0.0.12-alpha.0",
@@ -423249,13 +423249,14 @@ const Ytn = 3, i4i = /* @__PURE__ */ yt({
423249
423249
  return (($ = a.value) == null ? void 0 : $.name) ?? "";
423250
423250
  }), m = te(
423251
423251
  () => {
423252
- var $, P, U, F;
423252
+ var $, P, U, F, L;
423253
423253
  return {
423254
423254
  type: w(($ = a.value) == null ? void 0 : $.type),
423255
423255
  src: ((P = a.value) == null ? void 0 : P.url) ?? "",
423256
423256
  poster: ((U = a.value) == null ? void 0 : U.thumbnail) ?? "",
423257
423257
  framePerSecond: 24,
423258
- fileType: ((F = a.value) == null ? void 0 : F.fileType) || ""
423258
+ fileType: ((F = a.value) == null ? void 0 : F.fileType) || "",
423259
+ name: ((L = a.value) == null ? void 0 : L.name) ?? ""
423259
423260
  };
423260
423261
  }
423261
423262
  ), p = () => {
@@ -423465,7 +423466,7 @@ function h4i(e, t, n, r, o, a) {
423465
423466
  Oi(Gs({
423466
423467
  listItems: [r.resourceURL],
423467
423468
  isReviewFile: !1,
423468
- name: "",
423469
+ name: r.fileName,
423469
423470
  type: r.resourceURL.type
423470
423471
  })),
423471
423472
  null,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arbocollab/arbo-web-scene",
3
3
  "description": "Arbo Web Scene",
4
- "version": "0.26.6-alpha.3",
4
+ "version": "0.26.6-alpha.5",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "scripts": {
package/umd/index.umd.js CHANGED
@@ -37,7 +37,7 @@ Only state can be modified.`);i[0]="$state",z8=!1,r.set(a,i,r.state.value),z8=!0
37
37
  Found in store "${O.$id}".`),v&&a&&n.hydrate&&n.hydrate(O.$state,v),u=!0,d=!0,O}/*! #__NO_SIDE_EFFECTS__ */function xO(e,t,n){let r;const o=typeof t=="function";r=o?n:t;function a(i,s){const l=a_();if(i=(Je.env.NODE_ENV==="test"&&qQ&&qQ._testing?null:i)||(l?_a(kTt,null):null),i&&KQ(i),Je.env.NODE_ENV!=="production"&&!qQ)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
38
38
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
39
39
  This will fail in production.`);i=qQ,i._s.has(e)||(o?t4e(e,t,r,i):HTt(e,r,i),Je.env.NODE_ENV!=="production"&&(a._pinia=i));const u=i._s.get(e);if(Je.env.NODE_ENV!=="production"&&s){const d="__hot:"+e,f=o?t4e(d,t,r,i,!0):HTt(d,RS({},r),i,!0);s._hotUpdate(f),delete i.state.value[d],i._s.delete(d)}if(Je.env.NODE_ENV!=="production"&&yN){const d=Ha();if(d&&d.proxy&&!s){const f=d.proxy,m="_pStores"in f?f._pStores:f._pStores={};m[e]=u}}return u}return a.$id=e,a}function ia(e){const t=Fa(e),n={};for(const r in t){const o=t[r];o.effect?n[r]=te({get:()=>e[r],set(a){e[r]=a}}):(Wr(o)||Bc(o))&&(n[r]=Zs(e,r))}return n}function Csr(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var r=e.indexOf("rv:");return parseInt(e.substring(r+3,e.indexOf(".",r)),10)}var o=e.indexOf("Edge/");return o>0?parseInt(e.substring(o+5,e.indexOf(".",o)),10):-1}let rbe;function n4e(){n4e.init||(n4e.init=!0,rbe=Csr()!==-1)}var obe={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){n4e(),It(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",rbe&&this.$el.appendChild(e),e.data="about:blank",rbe||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!rbe&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const xsr=orr();nrr("data-v-b329ee4c");const ksr={class:"resize-observer",tabindex:"-1"};rrr();const Tsr=xsr((e,t,n,r,o,a)=>(W(),st("div",ksr)));obe.render=Tsr,obe.__scopeId="data-v-b329ee4c",obe.__file="src/components/ResizeObserver.vue";function abe(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?abe=function(t){return typeof t}:abe=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},abe(e)}function Osr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dsr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Asr(e,t,n){return t&&Dsr(e.prototype,t),e}function zTt(e){return $sr(e)||Isr(e)||Rsr(e)||Psr()}function $sr(e){if(Array.isArray(e))return r4e(e)}function Isr(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Rsr(e,t){if(e){if(typeof e=="string")return r4e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r4e(e,t)}}function r4e(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Psr(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
40
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nsr(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function Msr(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,o,a,i=function(l){for(var u=arguments.length,d=new Array(u>1?u-1:0),f=1;f<u;f++)d[f-1]=arguments[f];if(a=d,!(r&&l===o)){var m=n.leading;typeof m=="function"&&(m=m(l,o)),(!r||l!==o)&&m&&e.apply(void 0,[l].concat(zTt(a))),o=l,clearTimeout(r),r=setTimeout(function(){e.apply(void 0,[l].concat(zTt(a))),r=0},t)}};return i._clear=function(){clearTimeout(r),r=null},i}function WTt(e,t){if(e===t)return!0;if(abe(e)==="object"){for(var n in e)if(!WTt(e[n],t[n]))return!1;return!0}return!1}var Lsr=function(){function e(t,n,r){Osr(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return Asr(e,[{key:"createObserver",value:function(n,r){var o=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=Nsr(n),this.callback=function(s,l){o.options.callback(s,l),s&&o.options.once&&(o.frozen=!0,o.destroyObserver())},this.callback&&this.options.throttle){var a=this.options.throttleOptions||{},i=a.leading;this.callback=Msr(this.callback,this.options.throttle,{leading:function(l){return i==="both"||i==="visible"&&l||i==="hidden"&&!l}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(s){var l=s[0];if(s.length>1){var u=s.find(function(f){return f.isIntersecting});u&&(l=u)}if(o.callback){var d=l.isIntersecting&&l.intersectionRatio>=o.threshold;if(d===o.oldResult)return;o.oldResult=d,o.callback(d,l)}},this.options.intersection),It(function(){o.observer&&o.observer.observe(o.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function qTt(e,t,n){var r=t.value;if(r)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var o=new Lsr(e,r,n);e._vue_visibilityState=o}}function Fsr(e,t,n){var r=t.value,o=t.oldValue;if(!WTt(r,o)){var a=e._vue_visibilityState;if(!r){KTt(e);return}a?a.createObserver(r,n):qTt(e,{value:r},n)}}function KTt(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var Bsr={beforeMount:qTt,updated:Fsr,unmounted:KTt};function Vsr(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}var GTt={itemsLimit:1e3},Usr=/(auto|scroll)/;function YTt(e,t){return e.parentNode===null?t:YTt(e.parentNode,t.concat([e]))}var o4e=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},jsr=function(t){return o4e(t,"overflow")+o4e(t,"overflow-y")+o4e(t,"overflow-x")},Hsr=function(t){return Usr.test(jsr(t))};function ZTt(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=YTt(e.parentNode,[]),n=0;n<t.length;n+=1)if(Hsr(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function a4e(e){"@babel/helpers - typeof";return a4e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a4e(e)}var XTt={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function JTt(){return this.items.length&&a4e(this.items[0])!=="object"}var i4e=!1;if(typeof window<"u"){i4e=!1;try{var zsr=Object.defineProperty({},"passive",{get:function(){i4e=!0}});window.addEventListener("test",null,zsr)}catch{}}let Wsr=0;var GQ={name:"RecycleScroller",components:{ResizeObserver:obe},directives:{ObserveVisibility:Bsr},props:{...XTt,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,r=this.minItemSize;let o=1e4,a=0,i;for(let s=0,l=t.length;s<l;s++)i=t[s][n]||r,i<o&&(o=i),a+=i,e[s]={accumulator:a,size:i};return this.$_computedMinItemSize=o,e}return[]},simpleArray:JTt,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let r=0,o=t.length;r<o;r++)n[t[r][e]]=r;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,r,o){const a=Su({id:Wsr++,index:t,used:!0,key:r,type:o}),i=BEt({item:n,position:0,nr:a});return e.push(i),i},unuseView(e,t=!1){const n=this.$_unusedViews,r=e.nr.type;let o=n.get(r);o||(o=[],n.set(r,o)),o.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,r=this.gridItems||1,o=this.itemSecondarySize||n,a=this.$_computedMinItemSize,i=this.typeField,s=this.simpleArray?null:this.keyField,l=this.items,u=l.length,d=this.sizes,f=this.$_views,m=this.$_unusedViews,p=this.pool,v=this.itemIndexByKey;let g,w,S,E,x;if(!u)g=w=E=x=S=0;else if(this.$_prerender)g=E=0,w=x=Math.min(this.prerender,l.length),S=null;else{const $=this.getScroll();if(t){let F=$.start-this.$_lastUpdateScrollPosition;if(F<0&&(F=-F),n===null&&F<a||F<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=$.start;const P=this.buffer;$.start-=P,$.end+=P;let U=0;if(this.$refs.before&&(U=this.$refs.before.scrollHeight,$.start-=U),this.$refs.after){const F=this.$refs.after.scrollHeight;$.end+=F}if(n===null){let F,L=0,j=u-1,B=~~(u/2),G;do G=B,F=d[B].accumulator,F<$.start?L=B:B<u-1&&d[B+1].accumulator>$.start&&(j=B),B=~~((L+j)/2);while(B!==G);for(B<0&&(B=0),g=B,S=d[u-1].accumulator,w=B;w<u&&d[w].accumulator<$.end;w++);for(w===-1?w=l.length-1:(w++,w>u&&(w=u)),E=g;E<u&&U+d[E].accumulator<$.start;E++);for(x=E;x<u&&U+d[x].accumulator<$.end;x++);}else{g=~~($.start/n*r);const F=g%r;g-=F,w=Math.ceil($.end/n*r),E=Math.max(0,Math.floor(($.start-U)/n*r)),x=Math.floor(($.end-U)/n*r),g<0&&(g=0),w>u&&(w=u),E<0&&(E=0),x>u&&(x=u),S=Math.ceil(u/r)*n}}w-g>GTt.itemsLimit&&this.itemsLimitError(),this.totalSize=S;let y;const D=g<=this.$_endIndex&&w>=this.$_startIndex;if(D)for(let $=0,P=p.length;$<P;$++)y=p[$],y.nr.used&&(e&&(y.nr.index=v[y.item[s]]),(y.nr.index==null||y.nr.index<g||y.nr.index>=w)&&this.unuseView(y));const k=D?null:new Map;let O,R,I;for(let $=g;$<w;$++){O=l[$];const P=s?O[s]:O;if(P==null)throw new Error(`Key is ${P} on item (keyField is '${s}')`);if(y=f.get(P),!n&&!d[$].size){y&&this.unuseView(y);continue}R=O[i];let U=m.get(R),F=!1;if(!y)D?U&&U.length?y=U.pop():y=this.addView(p,$,O,P,R):(I=k.get(R)||0,(!U||I>=U.length)&&(y=this.addView(p,$,O,P,R),this.unuseView(y,!0),U=m.get(R)),y=U[I],k.set(R,I+1)),f.delete(y.nr.key),y.nr.used=!0,y.nr.index=$,y.nr.key=P,y.nr.type=R,f.set(P,y),F=!0;else if(!y.nr.used&&(y.nr.used=!0,F=!0,U)){const L=U.indexOf(y);L!==-1&&U.splice(L,1)}y.item=O,F&&($===l.length-1&&this.$emit("scroll-end"),$===0&&this.$emit("scroll-start")),n===null?(y.position=d[$-1].accumulator,y.offset=0):(y.position=Math.floor($/r)*n,y.offset=$%r*o)}return this.$_startIndex=g,this.$_endIndex=w,this.emitUpdate&&this.$emit("update",g,w,E,x),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:D}},getListenerTarget(){let e=ZTt(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,n=t==="vertical";let r;if(this.pageMode){const o=e.getBoundingClientRect(),a=n?o.height:o.width;let i=-(n?o.top:o.left),s=n?window.innerHeight:window.innerWidth;i<0&&(s+=i,i=0),i+s>a&&(s=a-i),r={start:i,end:i+s}}else n?r={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:r={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return r},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,i4e?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const n=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,r,o;if(this.pageMode){const a=ZTt(this.$el),i=a.tagName==="HTML"?0:a[t.scroll],s=a.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[t.start]-s[t.start];n=a,r=t.scroll,o=e+i+u}else n=this.$el,r=t.scroll,o=e;n[r]=o},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const qsr={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Ksr={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Gsr(e,t,n,r,o,a){const i=Tr("ResizeObserver"),s=Ri("observe-visibility");return Tt((W(),me("div",{class:De(["vue-recycle-scroller",{ready:o.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...l)=>a.handleScroll&&a.handleScroll(...l))},[e.$slots.before?(W(),me("div",qsr,[ft(e.$slots,"before")],512)):Ye("v-if",!0),(W(),st(Bd(n.listTag),{ref:"wrapper",style:dn({[e.direction==="vertical"?"minHeight":"minWidth"]:o.totalSize+"px"}),class:De(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:je(()=>[(W(!0),me(qt,null,bn(o.pool,l=>(W(),st(Bd(n.itemTag),on({key:l.nr.id,style:o.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${l.position}px) translate${e.direction==="vertical"?"X":"Y"}(${l.offset}px)`,width:n.gridItems?`${e.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&o.hoverKey===l.nr.key}]]},prr(n.skipHover?{}:{mouseenter:()=>{o.hoverKey=l.nr.key},mouseleave:()=>{o.hoverKey=null}})),{default:je(()=>[ft(e.$slots,"default",{item:l.item,index:l.nr.index,active:l.nr.used})]),_:2},1040,["style","class"]))),128)),ft(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(W(),me("div",Ksr,[ft(e.$slots,"after")],512)):Ye("v-if",!0),Me(i,{onNotify:a.handleResize},null,8,["onNotify"])],34)),[[s,a.handleVisibilityChange]])}GQ.render=Gsr,GQ.__file="src/components/RecycleScroller.vue";var ibe={name:"DynamicScroller",components:{RecycleScroller:GQ},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(e=>{requestAnimationFrame(()=>{if(Array.isArray(e)){for(const t of e)if(t.target&&t.target.$_vs_onResize){let n,r;if(t.borderBoxSize){const o=t.borderBoxSize[0];n=o.inlineSize,r=o.blockSize}else n=t.contentRect.width,r=t.contentRect.height;t.target.$_vs_onResize(t.target.$_vs_id,n,r)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...XTt,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:JTt,itemsWithSize(){const e=[],{items:t,keyField:n,simpleArray:r}=this,o=this.vscrollData.sizes,a=t.length;for(let i=0;i<a;i++){const s=t[i],l=r?i:s[n];let u=o[l];typeof u>"u"&&!this.$_undefinedMap[l]&&(u=0),e.push({item:s,id:l,size:u})}return e}},watch:{items(){this.forceUpdate()},simpleArray:{handler(e){this.vscrollData.simpleArray=e},immediate:!0},direction(e){this.forceUpdate(!0)},itemsWithSize(e,t){const n=this.$el.scrollTop;let r=0,o=0;const a=Math.min(e.length,t.length);for(let s=0;s<a&&!(r>=n);s++)r+=t[s].size||this.minItemSize,o+=e[s].size||this.minItemSize;const i=o-r;i!==0&&(this.$el.scrollTop+=i)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=Vsr()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(e=!1){(e||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(e){const t=this.$refs.scroller;t&&t.scrollToItem(e)},getItemSize(e,t=void 0){const n=this.simpleArray?t??this.items.indexOf(e):e[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const e=this.$el;this.$nextTick(()=>{e.scrollTop=e.scrollHeight+5e3;const t=()=>{e.scrollTop=e.scrollHeight+5e3,requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(t)})};requestAnimationFrame(t)})}}};function Ysr(e,t,n,r,o,a){const i=Tr("RecycleScroller");return W(),st(i,on({ref:"scroller",items:a.itemsWithSize,"min-item-size":n.minItemSize,direction:e.direction,"key-field":"id","list-tag":e.listTag,"item-tag":e.itemTag},e.$attrs,{onResize:a.onScrollerResize,onVisible:a.onScrollerVisible}),{default:je(({item:s,index:l,active:u})=>[ft(e.$slots,"default",Ti(Ks({item:s.item,index:l,active:u,itemWithSize:s})))]),before:je(()=>[ft(e.$slots,"before")]),after:je(()=>[ft(e.$slots,"after")]),empty:je(()=>[ft(e.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}ibe.render=Ysr,ibe.__file="src/components/DynamicScroller.vue";var s4e={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(e,t){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[t],r=this.vscrollData.sizes[e];n!=null&&n!==r&&this.applySize(n)}},finalActive(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const e in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[e],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:e}){!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||e||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(e){this.$nextTick(()=>{if(this.id===e){const t=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(t,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(e,t){const n=~~(this.vscrollParent.direction==="vertical"?t:e);n&&this.size!==n&&this.applySize(n)},applySize(e){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=e,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(e,t,n){this.id===e&&this.applyWidthHeight(t,n)}},render(){return Pi(this.tag,this.$slots.default())}};s4e.__file="src/components/DynamicScrollerItem.vue";function Zsr(e,t){e.component("".concat(t,"recycle-scroller"),GQ),e.component("".concat(t,"RecycleScroller"),GQ),e.component("".concat(t,"dynamic-scroller"),ibe),e.component("".concat(t,"DynamicScroller"),ibe),e.component("".concat(t,"dynamic-scroller-item"),s4e),e.component("".concat(t,"DynamicScrollerItem"),s4e)}var Xsr={version:"2.0.0-beta.8",install:function(t,n){var r=Object.assign({},{installComponents:!0,componentsPrefix:""},n);for(var o in r)typeof r[o]<"u"&&(GTt[o]=r[o]);r.installComponents&&Zsr(t,r.componentsPrefix)}};const Jsr=(e,t)=>{const n=a=>t._s.get(a),r=(a,i,s)=>{const l=n(a);return l&&i in l?(l[i](s),!0):(console.warn(`[initWebScene] Store "${a}" or dispactcher "${i}" not found`),!1)};function o(a){var i,s;(s=(i=e==null?void 0:e.config)==null?void 0:i.globalProperties)==null||s.setStoreValue("scene","setCurrentSceneTabId",a)}return e.config.globalProperties.setStoreValue=r,e.config.globalProperties.handleSetTab=o,{handleSetTab:o}},Qsr="0.26.6-alpha.3",elr={"@arbocollab/arbo-chart-component":"1.0.1","@arbocollab/arbo-comment-utils":"1.0.1","@arbocollab/arbo-common-utils":"npm:@arbocollab/arbo-common-utils@0.0.12-alpha.0","@arbocollab/arbo-media-player-component":"0.0.16","@arbocollab/arbo-table-component":"1.0.1","@arbocollab/arbo-ui-components":"npm:@arbocollab/arbo-ui-components-beta@0.0.376-alpha.119","@arbocollab/arbo-calendar-component":"0.0.38","@arbocollab/arbo-metric-table":"npm:@arbocollab/arbo-metric-table@0.0.24","@arbocollab/ag-grid-ui-components":"0.0.43","@vueuse/core":"^10.11.1","@ctrl/tinycolor":"^4.2.0",axios:"^1.7.2","date-fns":"^4.1.0","date-fns-tz":"^3.2.0",dayjs:"^1.11.11",dexie:"4.0.10","js-cookie":"^3.0.5",pinia:"^3.0.3","prettier-plugin-stylus":"^0.1.0","sanitize-html":"^2.15.0","vite-bundle-visualizer":"^1.2.1","vite-plugin-html":"^3.2.2",vue:"^3.5.18","vue-draggable-next":"^2.2.1","vue-i18n":"^9.13.1","vue-router":"^4.5.1","vue-virtual-scroller":"^2.0.0-beta.8"};var Si=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function YQ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function tlr(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var QTt={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Si,function(){/*! *****************************************************************************
40
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nsr(e){var t;return typeof e=="function"?t={callback:e}:t=e,t}function Msr(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,o,a,i=function(l){for(var u=arguments.length,d=new Array(u>1?u-1:0),f=1;f<u;f++)d[f-1]=arguments[f];if(a=d,!(r&&l===o)){var m=n.leading;typeof m=="function"&&(m=m(l,o)),(!r||l!==o)&&m&&e.apply(void 0,[l].concat(zTt(a))),o=l,clearTimeout(r),r=setTimeout(function(){e.apply(void 0,[l].concat(zTt(a))),r=0},t)}};return i._clear=function(){clearTimeout(r),r=null},i}function WTt(e,t){if(e===t)return!0;if(abe(e)==="object"){for(var n in e)if(!WTt(e[n],t[n]))return!1;return!0}return!1}var Lsr=function(){function e(t,n,r){Osr(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return Asr(e,[{key:"createObserver",value:function(n,r){var o=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=Nsr(n),this.callback=function(s,l){o.options.callback(s,l),s&&o.options.once&&(o.frozen=!0,o.destroyObserver())},this.callback&&this.options.throttle){var a=this.options.throttleOptions||{},i=a.leading;this.callback=Msr(this.callback,this.options.throttle,{leading:function(l){return i==="both"||i==="visible"&&l||i==="hidden"&&!l}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(s){var l=s[0];if(s.length>1){var u=s.find(function(f){return f.isIntersecting});u&&(l=u)}if(o.callback){var d=l.isIntersecting&&l.intersectionRatio>=o.threshold;if(d===o.oldResult)return;o.oldResult=d,o.callback(d,l)}},this.options.intersection),It(function(){o.observer&&o.observer.observe(o.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),e}();function qTt(e,t,n){var r=t.value;if(r)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var o=new Lsr(e,r,n);e._vue_visibilityState=o}}function Fsr(e,t,n){var r=t.value,o=t.oldValue;if(!WTt(r,o)){var a=e._vue_visibilityState;if(!r){KTt(e);return}a?a.createObserver(r,n):qTt(e,{value:r},n)}}function KTt(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var Bsr={beforeMount:qTt,updated:Fsr,unmounted:KTt};function Vsr(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}var GTt={itemsLimit:1e3},Usr=/(auto|scroll)/;function YTt(e,t){return e.parentNode===null?t:YTt(e.parentNode,t.concat([e]))}var o4e=function(t,n){return getComputedStyle(t,null).getPropertyValue(n)},jsr=function(t){return o4e(t,"overflow")+o4e(t,"overflow-y")+o4e(t,"overflow-x")},Hsr=function(t){return Usr.test(jsr(t))};function ZTt(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=YTt(e.parentNode,[]),n=0;n<t.length;n+=1)if(Hsr(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function a4e(e){"@babel/helpers - typeof";return a4e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a4e(e)}var XTt={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(t){return["vertical","horizontal"].includes(t)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function JTt(){return this.items.length&&a4e(this.items[0])!=="object"}var i4e=!1;if(typeof window<"u"){i4e=!1;try{var zsr=Object.defineProperty({},"passive",{get:function(){i4e=!0}});window.addEventListener("test",null,zsr)}catch{}}let Wsr=0;var GQ={name:"RecycleScroller",components:{ResizeObserver:obe},directives:{ObserveVisibility:Bsr},props:{...XTt,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,r=this.minItemSize;let o=1e4,a=0,i;for(let s=0,l=t.length;s<l;s++)i=t[s][n]||r,i<o&&(o=i),a+=i,e[s]={accumulator:a,size:i};return this.$_computedMinItemSize=o,e}return[]},simpleArray:JTt,itemIndexByKey(){const{keyField:e,items:t}=this,n={};for(let r=0,o=t.length;r<o;r++)n[t[r][e]]=r;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const e=this.$_lastUpdateScrollPosition;typeof e=="number"&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,n,r,o){const a=Su({id:Wsr++,index:t,used:!0,key:r,type:o}),i=BEt({item:n,position:0,nr:a});return e.push(i),i},unuseView(e,t=!1){const n=this.$_unusedViews,r=e.nr.type;let o=n.get(r);o||(o=[],n.set(r,o)),o.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const t=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:n}=this.updateVisibleItems(!1,!0);n||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});t(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&t()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(e,t=!1){const n=this.itemSize,r=this.gridItems||1,o=this.itemSecondarySize||n,a=this.$_computedMinItemSize,i=this.typeField,s=this.simpleArray?null:this.keyField,l=this.items,u=l.length,d=this.sizes,f=this.$_views,m=this.$_unusedViews,p=this.pool,v=this.itemIndexByKey;let g,w,S,E,x;if(!u)g=w=E=x=S=0;else if(this.$_prerender)g=E=0,w=x=Math.min(this.prerender,l.length),S=null;else{const $=this.getScroll();if(t){let F=$.start-this.$_lastUpdateScrollPosition;if(F<0&&(F=-F),n===null&&F<a||F<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=$.start;const P=this.buffer;$.start-=P,$.end+=P;let U=0;if(this.$refs.before&&(U=this.$refs.before.scrollHeight,$.start-=U),this.$refs.after){const F=this.$refs.after.scrollHeight;$.end+=F}if(n===null){let F,L=0,j=u-1,B=~~(u/2),G;do G=B,F=d[B].accumulator,F<$.start?L=B:B<u-1&&d[B+1].accumulator>$.start&&(j=B),B=~~((L+j)/2);while(B!==G);for(B<0&&(B=0),g=B,S=d[u-1].accumulator,w=B;w<u&&d[w].accumulator<$.end;w++);for(w===-1?w=l.length-1:(w++,w>u&&(w=u)),E=g;E<u&&U+d[E].accumulator<$.start;E++);for(x=E;x<u&&U+d[x].accumulator<$.end;x++);}else{g=~~($.start/n*r);const F=g%r;g-=F,w=Math.ceil($.end/n*r),E=Math.max(0,Math.floor(($.start-U)/n*r)),x=Math.floor(($.end-U)/n*r),g<0&&(g=0),w>u&&(w=u),E<0&&(E=0),x>u&&(x=u),S=Math.ceil(u/r)*n}}w-g>GTt.itemsLimit&&this.itemsLimitError(),this.totalSize=S;let y;const D=g<=this.$_endIndex&&w>=this.$_startIndex;if(D)for(let $=0,P=p.length;$<P;$++)y=p[$],y.nr.used&&(e&&(y.nr.index=v[y.item[s]]),(y.nr.index==null||y.nr.index<g||y.nr.index>=w)&&this.unuseView(y));const k=D?null:new Map;let O,R,I;for(let $=g;$<w;$++){O=l[$];const P=s?O[s]:O;if(P==null)throw new Error(`Key is ${P} on item (keyField is '${s}')`);if(y=f.get(P),!n&&!d[$].size){y&&this.unuseView(y);continue}R=O[i];let U=m.get(R),F=!1;if(!y)D?U&&U.length?y=U.pop():y=this.addView(p,$,O,P,R):(I=k.get(R)||0,(!U||I>=U.length)&&(y=this.addView(p,$,O,P,R),this.unuseView(y,!0),U=m.get(R)),y=U[I],k.set(R,I+1)),f.delete(y.nr.key),y.nr.used=!0,y.nr.index=$,y.nr.key=P,y.nr.type=R,f.set(P,y),F=!0;else if(!y.nr.used&&(y.nr.used=!0,F=!0,U)){const L=U.indexOf(y);L!==-1&&U.splice(L,1)}y.item=O,F&&($===l.length-1&&this.$emit("scroll-end"),$===0&&this.$emit("scroll-start")),n===null?(y.position=d[$-1].accumulator,y.offset=0):(y.position=Math.floor($/r)*n,y.offset=$%r*o)}return this.$_startIndex=g,this.$_endIndex=w,this.emitUpdate&&this.$emit("update",g,w,E,x),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:D}},getListenerTarget(){let e=ZTt(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){const{$el:e,direction:t}=this,n=t==="vertical";let r;if(this.pageMode){const o=e.getBoundingClientRect(),a=n?o.height:o.width;let i=-(n?o.top:o.left),s=n?window.innerHeight:window.innerWidth;i<0&&(s+=i,i=0),i+s>a&&(s=a-i),r={start:i,end:i+s}}else n?r={start:e.scrollTop,end:e.scrollTop+e.clientHeight}:r={start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return r},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,i4e?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(e){let t;const n=this.gridItems||1;this.itemSize===null?t=e>0?this.sizes[e-1].accumulator:0:t=Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){const t=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let n,r,o;if(this.pageMode){const a=ZTt(this.$el),i=a.tagName==="HTML"?0:a[t.scroll],s=a.getBoundingClientRect(),u=this.$el.getBoundingClientRect()[t.start]-s[t.start];n=a,r=t.scroll,o=e+i+u}else n=this.$el,r=t.scroll,o=e;n[r]=o},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}};const qsr={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Ksr={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Gsr(e,t,n,r,o,a){const i=Tr("ResizeObserver"),s=Ri("observe-visibility");return Tt((W(),me("div",{class:De(["vue-recycle-scroller",{ready:o.ready,"page-mode":n.pageMode,[`direction-${e.direction}`]:!0}]),onScrollPassive:t[0]||(t[0]=(...l)=>a.handleScroll&&a.handleScroll(...l))},[e.$slots.before?(W(),me("div",qsr,[ft(e.$slots,"before")],512)):Ye("v-if",!0),(W(),st(Bd(n.listTag),{ref:"wrapper",style:dn({[e.direction==="vertical"?"minHeight":"minWidth"]:o.totalSize+"px"}),class:De(["vue-recycle-scroller__item-wrapper",n.listClass])},{default:je(()=>[(W(!0),me(qt,null,bn(o.pool,l=>(W(),st(Bd(n.itemTag),on({key:l.nr.id,style:o.ready?{transform:`translate${e.direction==="vertical"?"Y":"X"}(${l.position}px) translate${e.direction==="vertical"?"X":"Y"}(${l.offset}px)`,width:n.gridItems?`${e.direction==="vertical"&&n.itemSecondarySize||n.itemSize}px`:void 0,height:n.gridItems?`${e.direction==="horizontal"&&n.itemSecondarySize||n.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[n.itemClass,{hover:!n.skipHover&&o.hoverKey===l.nr.key}]]},prr(n.skipHover?{}:{mouseenter:()=>{o.hoverKey=l.nr.key},mouseleave:()=>{o.hoverKey=null}})),{default:je(()=>[ft(e.$slots,"default",{item:l.item,index:l.nr.index,active:l.nr.used})]),_:2},1040,["style","class"]))),128)),ft(e.$slots,"empty")]),_:3},8,["style","class"])),e.$slots.after?(W(),me("div",Ksr,[ft(e.$slots,"after")],512)):Ye("v-if",!0),Me(i,{onNotify:a.handleResize},null,8,["onNotify"])],34)),[[s,a.handleVisibilityChange]])}GQ.render=Gsr,GQ.__file="src/components/RecycleScroller.vue";var ibe={name:"DynamicScroller",components:{RecycleScroller:GQ},provide(){return typeof ResizeObserver<"u"&&(this.$_resizeObserver=new ResizeObserver(e=>{requestAnimationFrame(()=>{if(Array.isArray(e)){for(const t of e)if(t.target&&t.target.$_vs_onResize){let n,r;if(t.borderBoxSize){const o=t.borderBoxSize[0];n=o.inlineSize,r=o.blockSize}else n=t.contentRect.width,r=t.contentRect.height;t.target.$_vs_onResize(t.target.$_vs_id,n,r)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...XTt,minItemSize:{type:[Number,String],required:!0}},emits:["resize","visible"],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:JTt,itemsWithSize(){const e=[],{items:t,keyField:n,simpleArray:r}=this,o=this.vscrollData.sizes,a=t.length;for(let i=0;i<a;i++){const s=t[i],l=r?i:s[n];let u=o[l];typeof u>"u"&&!this.$_undefinedMap[l]&&(u=0),e.push({item:s,id:l,size:u})}return e}},watch:{items(){this.forceUpdate()},simpleArray:{handler(e){this.vscrollData.simpleArray=e},immediate:!0},direction(e){this.forceUpdate(!0)},itemsWithSize(e,t){const n=this.$el.scrollTop;let r=0,o=0;const a=Math.min(e.length,t.length);for(let s=0;s<a&&!(r>=n);s++)r+=t[s].size||this.minItemSize,o+=e[s].size||this.minItemSize;const i=o-r;i!==0&&(this.$el.scrollTop+=i)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=Vsr()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit("resize")},onScrollerVisible(){this.$_events.emit("vscroll:update",{force:!1}),this.$emit("visible")},forceUpdate(e=!1){(e||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit("vscroll:update",{force:!0})},scrollToItem(e){const t=this.$refs.scroller;t&&t.scrollToItem(e)},getItemSize(e,t=void 0){const n=this.simpleArray?t??this.items.indexOf(e):e[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;const e=this.$el;this.$nextTick(()=>{e.scrollTop=e.scrollHeight+5e3;const t=()=>{e.scrollTop=e.scrollHeight+5e3,requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(t)})};requestAnimationFrame(t)})}}};function Ysr(e,t,n,r,o,a){const i=Tr("RecycleScroller");return W(),st(i,on({ref:"scroller",items:a.itemsWithSize,"min-item-size":n.minItemSize,direction:e.direction,"key-field":"id","list-tag":e.listTag,"item-tag":e.itemTag},e.$attrs,{onResize:a.onScrollerResize,onVisible:a.onScrollerVisible}),{default:je(({item:s,index:l,active:u})=>[ft(e.$slots,"default",Ti(Ks({item:s.item,index:l,active:u,itemWithSize:s})))]),before:je(()=>[ft(e.$slots,"before")]),after:je(()=>[ft(e.$slots,"after")]),empty:je(()=>[ft(e.$slots,"empty")]),_:3},16,["items","min-item-size","direction","list-tag","item-tag","onResize","onVisible"])}ibe.render=Ysr,ibe.__file="src/components/DynamicScroller.vue";var s4e={name:"DynamicScrollerItem",inject:["vscrollData","vscrollParent","vscrollResizeObserver"],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:"div"}},emits:["resize"],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:"updateWatchData",id(e,t){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){const n=this.vscrollData.sizes[t],r=this.vscrollData.sizes[e];n!=null&&n!==r&&this.applySize(n)}},finalActive(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(const e in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[e],this.onDataUpdate);this.vscrollParent.$_events.on("vscroll:update",this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off("vscroll:update",this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch("item",()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:e}){!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||e||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(e){this.$nextTick(()=>{if(this.id===e){const t=this.$el.offsetWidth,n=this.$el.offsetHeight;this.applyWidthHeight(t,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(e,t){const n=~~(this.vscrollParent.direction==="vertical"?t:e);n&&this.size!==n&&this.applySize(n)},applySize(e){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=e,this.emitResize&&this.$emit("resize",this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(e,t,n){this.id===e&&this.applyWidthHeight(t,n)}},render(){return Pi(this.tag,this.$slots.default())}};s4e.__file="src/components/DynamicScrollerItem.vue";function Zsr(e,t){e.component("".concat(t,"recycle-scroller"),GQ),e.component("".concat(t,"RecycleScroller"),GQ),e.component("".concat(t,"dynamic-scroller"),ibe),e.component("".concat(t,"DynamicScroller"),ibe),e.component("".concat(t,"dynamic-scroller-item"),s4e),e.component("".concat(t,"DynamicScrollerItem"),s4e)}var Xsr={version:"2.0.0-beta.8",install:function(t,n){var r=Object.assign({},{installComponents:!0,componentsPrefix:""},n);for(var o in r)typeof r[o]<"u"&&(GTt[o]=r[o]);r.installComponents&&Zsr(t,r.componentsPrefix)}};const Jsr=(e,t)=>{const n=a=>t._s.get(a),r=(a,i,s)=>{const l=n(a);return l&&i in l?(l[i](s),!0):(console.warn(`[initWebScene] Store "${a}" or dispactcher "${i}" not found`),!1)};function o(a){var i,s;(s=(i=e==null?void 0:e.config)==null?void 0:i.globalProperties)==null||s.setStoreValue("scene","setCurrentSceneTabId",a)}return e.config.globalProperties.setStoreValue=r,e.config.globalProperties.handleSetTab=o,{handleSetTab:o}},Qsr="0.26.6-alpha.5",elr={"@arbocollab/arbo-chart-component":"1.0.1","@arbocollab/arbo-comment-utils":"1.0.1","@arbocollab/arbo-common-utils":"npm:@arbocollab/arbo-common-utils@0.0.12-alpha.0","@arbocollab/arbo-media-player-component":"0.0.16","@arbocollab/arbo-table-component":"1.0.1","@arbocollab/arbo-ui-components":"npm:@arbocollab/arbo-ui-components-beta@0.0.376-alpha.119","@arbocollab/arbo-calendar-component":"0.0.38","@arbocollab/arbo-metric-table":"npm:@arbocollab/arbo-metric-table@0.0.24","@arbocollab/ag-grid-ui-components":"0.0.43","@vueuse/core":"^10.11.1","@ctrl/tinycolor":"^4.2.0",axios:"^1.7.2","date-fns":"^4.1.0","date-fns-tz":"^3.2.0",dayjs:"^1.11.11",dexie:"4.0.10","js-cookie":"^3.0.5",pinia:"^3.0.3","prettier-plugin-stylus":"^0.1.0","sanitize-html":"^2.15.0","vite-bundle-visualizer":"^1.2.1","vite-plugin-html":"^3.2.2",vue:"^3.5.18","vue-draggable-next":"^2.2.1","vue-i18n":"^9.13.1","vue-router":"^4.5.1","vue-virtual-scroller":"^2.0.0-beta.8"};var Si=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function YQ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function tlr(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var QTt={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Si,function(){/*! *****************************************************************************
41
41
  Copyright (c) Microsoft Corporation.
42
42
  Permission to use, copy, modify, and/or distribute this software for any
43
43
  purpose with or without fee is hereby granted.
@@ -1563,7 +1563,7 @@ ${eJ(t)}`),n.map&&!n.map.bytes&&(this.logger_("going to request init segment."),
1563
1563
  * @author RubaXa <trash@rubaxa.org>
1564
1564
  * @author owenm <owen23355@gmail.com>
1565
1565
  * @license MIT
1566
- */function Uqn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function F$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uqn(Object(n),!0).forEach(function(r){LMi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uqn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oMe(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?oMe=function(t){return typeof t}:oMe=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oMe(e)}function LMi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fP(){return fP=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fP.apply(this,arguments)}function FMi(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function BMi(e,t){if(e==null)return{};var n=FMi(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var VMi="1.14.0";function hP(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var pP=hP(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),jhe=hP(/Edge/i),jqn=hP(/firefox/i),Hhe=hP(/safari/i)&&!hP(/chrome/i)&&!hP(/android/i),Hqn=hP(/iP(ad|od|hone)/i),UMi=hP(/chrome/i)&&hP(/android/i),zqn={capture:!1,passive:!1};function yc(e,t,n){e.addEventListener(t,n,!pP&&zqn)}function Fu(e,t,n){e.removeEventListener(t,n,!pP&&zqn)}function aMe(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function jMi(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function B$(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&aMe(e,t):aMe(e,t))||r&&e===n)return e;if(e===n)break}while(e=jMi(e))}return null}var Wqn=/\s+/g;function sS(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(Wqn," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(Wqn," ")}}function hs(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function nJ(e,t){var n="";if(typeof e=="string")n=e;else do{var r=hs(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function qqn(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,a=r.length;if(n)for(;o<a;o++)n(r[o],o);return r}return[]}function V$(){var e=document.scrollingElement;return e||document.documentElement}function mg(e,t,n,r,o){if(!(!e.getBoundingClientRect&&e!==window)){var a,i,s,l,u,d,f;if(e!==window&&e.parentNode&&e!==V$()?(a=e.getBoundingClientRect(),i=a.top,s=a.left,l=a.bottom,u=a.right,d=a.height,f=a.width):(i=0,s=0,l=window.innerHeight,u=window.innerWidth,d=window.innerHeight,f=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!pP))do if(o&&o.getBoundingClientRect&&(hs(o,"transform")!=="none"||n&&hs(o,"position")!=="static")){var m=o.getBoundingClientRect();i-=m.top+parseInt(hs(o,"border-top-width")),s-=m.left+parseInt(hs(o,"border-left-width")),l=i+a.height,u=s+a.width;break}while(o=o.parentNode);if(r&&e!==window){var p=nJ(o||e),v=p&&p.a,g=p&&p.d;p&&(i/=g,s/=v,f/=v,d/=g,l=i+d,u=s+f)}return{top:i,left:s,bottom:l,right:u,width:f,height:d}}}function Kqn(e,t,n){for(var r=y3(e,!0),o=mg(e)[t];r;){var a=mg(r)[n],i=void 0;if(i=o>=a,!i)return r;if(r===V$())break;r=y3(r,!1)}return!1}function rJ(e,t,n,r){for(var o=0,a=0,i=e.children;a<i.length;){if(i[a].style.display!=="none"&&i[a]!==ps.ghost&&(r||i[a]!==ps.dragged)&&B$(i[a],n.draggable,e,!1)){if(o===t)return i[a];o++}a++}return null}function Mmt(e,t){for(var n=e.lastElementChild;n&&(n===ps.ghost||hs(n,"display")==="none"||t&&!aMe(n,t));)n=n.previousElementSibling;return n||null}function fx(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==ps.clone&&(!t||aMe(e,t))&&n++;return n}function Gqn(e){var t=0,n=0,r=V$();if(e)do{var o=nJ(e),a=o.a,i=o.d;t+=e.scrollLeft*a,n+=e.scrollTop*i}while(e!==r&&(e=e.parentNode));return[t,n]}function HMi(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n)}return-1}function y3(e,t){if(!e||!e.getBoundingClientRect)return V$();var n=e,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=hs(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return V$();if(r||t)return n;r=!0}}while(n=n.parentNode);return V$()}function zMi(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Lmt(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var zhe;function Yqn(e,t){return function(){if(!zhe){var n=arguments,r=this;n.length===1?e.call(r,n[0]):e.apply(r,n),zhe=setTimeout(function(){zhe=void 0},t)}}}function WMi(){clearTimeout(zhe),zhe=void 0}function Zqn(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Xqn(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var lS="Sortable"+new Date().getTime();function qMi(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(o){if(!(hs(o,"display")==="none"||o===ps.ghost)){e.push({target:o,rect:mg(o)});var a=F$({},e[e.length-1].rect);if(o.thisAnimationDuration){var i=nJ(o,!0);i&&(a.top-=i.f,a.left-=i.e)}o.fromRect=a}})}},addAnimationState:function(r){e.push(r)},removeAnimationState:function(r){e.splice(HMi(e,{target:r}),1)},animateAll:function(r){var o=this;if(!this.options.animation){clearTimeout(t),typeof r=="function"&&r();return}var a=!1,i=0;e.forEach(function(s){var l=0,u=s.target,d=u.fromRect,f=mg(u),m=u.prevFromRect,p=u.prevToRect,v=s.rect,g=nJ(u,!0);g&&(f.top-=g.f,f.left-=g.e),u.toRect=f,u.thisAnimationDuration&&Lmt(m,f)&&!Lmt(d,f)&&(v.top-f.top)/(v.left-f.left)===(d.top-f.top)/(d.left-f.left)&&(l=GMi(v,m,p,o.options)),Lmt(f,d)||(u.prevFromRect=d,u.prevToRect=f,l||(l=o.options.animation),o.animate(u,v,f,l)),l&&(a=!0,i=Math.max(i,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(t),a?t=setTimeout(function(){typeof r=="function"&&r()},i):typeof r=="function"&&r(),e=[]},animate:function(r,o,a,i){if(i){hs(r,"transition",""),hs(r,"transform","");var s=nJ(this.el),l=s&&s.a,u=s&&s.d,d=(o.left-a.left)/(l||1),f=(o.top-a.top)/(u||1);r.animatingX=!!d,r.animatingY=!!f,hs(r,"transform","translate3d("+d+"px,"+f+"px,0)"),this.forRepaintDummy=KMi(r),hs(r,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),hs(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){hs(r,"transition",""),hs(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},i)}}}}function KMi(e){return e.offsetWidth}function GMi(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}var oJ=[],Fmt={initializeByDefault:!0},Whe={mount:function(t){for(var n in Fmt)Fmt.hasOwnProperty(n)&&!(n in t)&&(t[n]=Fmt[n]);oJ.forEach(function(r){if(r.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),oJ.push(t)},pluginEvent:function(t,n,r){var o=this;this.eventCanceled=!1,r.cancel=function(){o.eventCanceled=!0};var a=t+"Global";oJ.forEach(function(i){n[i.pluginName]&&(n[i.pluginName][a]&&n[i.pluginName][a](F$({sortable:n},r)),n.options[i.pluginName]&&n[i.pluginName][t]&&n[i.pluginName][t](F$({sortable:n},r)))})},initializePlugins:function(t,n,r,o){oJ.forEach(function(s){var l=s.pluginName;if(!(!t.options[l]&&!s.initializeByDefault)){var u=new s(t,n,t.options);u.sortable=t,u.options=t.options,t[l]=u,fP(r,u.defaults)}});for(var a in t.options)if(t.options.hasOwnProperty(a)){var i=this.modifyOption(t,a,t.options[a]);typeof i<"u"&&(t.options[a]=i)}},getEventProperties:function(t,n){var r={};return oJ.forEach(function(o){typeof o.eventProperties=="function"&&fP(r,o.eventProperties.call(n[o.pluginName],t))}),r},modifyOption:function(t,n,r){var o;return oJ.forEach(function(a){t[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[n]=="function"&&(o=a.optionListeners[n].call(t[a.pluginName],r))}),o}};function YMi(e){var t=e.sortable,n=e.rootEl,r=e.name,o=e.targetEl,a=e.cloneEl,i=e.toEl,s=e.fromEl,l=e.oldIndex,u=e.newIndex,d=e.oldDraggableIndex,f=e.newDraggableIndex,m=e.originalEvent,p=e.putSortable,v=e.extraEventProperties;if(t=t||n&&n[lS],!!t){var g,w=t.options,S="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!pP&&!jhe?g=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent(r,!0,!0)),g.to=i||n,g.from=s||n,g.item=o||n,g.clone=a,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=d,g.newDraggableIndex=f,g.originalEvent=m,g.pullMode=p?p.lastPutMode:void 0;var E=F$(F$({},v),Whe.getEventProperties(r,t));for(var x in E)g[x]=E[x];n&&n.dispatchEvent(g),w[S]&&w[S].call(t,g)}}var ZMi=["evt"],Yw=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.evt,a=BMi(r,ZMi);Whe.pluginEvent.bind(ps)(t,n,F$({dragEl:Ao,parentEl:op,ghostEl:kl,rootEl:jf,nextEl:X6,lastDownEl:iMe,cloneEl:ap,cloneHidden:b3,dragStarted:Khe,putSortable:Nv,activeSortable:ps.active,originalEvent:o,oldIndex:aJ,oldDraggableIndex:qhe,newIndex:uS,newDraggableIndex:w3,hideGhostForTarget:o7n,unhideGhostForTarget:a7n,cloneNowHidden:function(){b3=!0},cloneNowShown:function(){b3=!1},dispatchSortableEvent:function(s){i0({sortable:n,name:s,originalEvent:o})}},a))};function i0(e){YMi(F$({putSortable:Nv,cloneEl:ap,targetEl:Ao,rootEl:jf,oldIndex:aJ,oldDraggableIndex:qhe,newIndex:uS,newDraggableIndex:w3},e))}var Ao,op,kl,jf,X6,iMe,ap,b3,aJ,uS,qhe,w3,sMe,Nv,iJ=!1,lMe=!1,uMe=[],J6,GT,Bmt,Vmt,Jqn,Qqn,Khe,sJ,Ghe,Yhe=!1,cMe=!1,dMe,fb,Umt=[],jmt=!1,fMe=[],hMe=typeof document<"u",pMe=Hqn,e7n=jhe||pP?"cssFloat":"float",XMi=hMe&&!UMi&&!Hqn&&"draggable"in document.createElement("div"),t7n=function(){if(hMe){if(pP)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),n7n=function(t,n){var r=hs(t),o=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),a=rJ(t,0,n),i=rJ(t,1,n),s=a&&hs(a),l=i&&hs(i),u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+mg(a).width,d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+mg(i).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&s.float&&s.float!=="none"){var f=s.float==="left"?"left":"right";return i&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||u>=o&&r[e7n]==="none"||i&&r[e7n]==="none"&&u+d>o)?"vertical":"horizontal"},JMi=function(t,n,r){var o=r?t.left:t.top,a=r?t.right:t.bottom,i=r?t.width:t.height,s=r?n.left:n.top,l=r?n.right:n.bottom,u=r?n.width:n.height;return o===s||a===l||o+i/2===s+u/2},QMi=function(t,n){var r;return uMe.some(function(o){var a=o[lS].options.emptyInsertThreshold;if(!(!a||Mmt(o))){var i=mg(o),s=t>=i.left-a&&t<=i.right+a,l=n>=i.top-a&&n<=i.bottom+a;if(s&&l)return r=o}}),r},r7n=function(t){function n(a,i){return function(s,l,u,d){var f=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(a==null&&(i||f))return!0;if(a==null||a===!1)return!1;if(i&&a==="clone")return a;if(typeof a=="function")return n(a(s,l,u,d),i)(s,l,u,d);var m=(i?s:l).options.group.name;return a===!0||typeof a=="string"&&a===m||a.join&&a.indexOf(m)>-1}}var r={},o=t.group;(!o||oMe(o)!="object")&&(o={name:o}),r.name=o.name,r.checkPull=n(o.pull,!0),r.checkPut=n(o.put),r.revertClone=o.revertClone,t.group=r},o7n=function(){!t7n&&kl&&hs(kl,"display","none")},a7n=function(){!t7n&&kl&&hs(kl,"display","")};hMe&&document.addEventListener("click",function(e){if(lMe)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),lMe=!1,!1},!0);var Q6=function(t){if(Ao){t=t.touches?t.touches[0]:t;var n=QMi(t.clientX,t.clientY);if(n){var r={};for(var o in t)t.hasOwnProperty(o)&&(r[o]=t[o]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[lS]._onDragOver(r)}}},eLi=function(t){Ao&&Ao.parentNode[lS]._isOutsideThisEl(t.target)};function ps(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=fP({},t),e[lS]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return n7n(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,s){i.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ps.supportPointer!==!1&&"PointerEvent"in window&&!Hhe,emptyInsertThreshold:5};Whe.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);r7n(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:XMi,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?yc(e,"pointerdown",this._onTapStart):(yc(e,"mousedown",this._onTapStart),yc(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(yc(e,"dragover",this),yc(e,"dragenter",this)),uMe.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),fP(this,qMi())}ps.prototype={constructor:ps,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(sJ=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,Ao):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,r=this.el,o=this.options,a=o.preventOnFilter,i=t.type,s=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(s||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,d=o.filter;if(lLi(r),!Ao&&!(/mousedown|pointerdown/.test(i)&&t.button!==0||o.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Hhe&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=B$(l,o.draggable,r,!1),!(l&&l.animated)&&iMe!==l)){if(aJ=fx(l),qhe=fx(l,o.draggable),typeof d=="function"){if(d.call(this,t,l,this)){i0({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:r,fromEl:r}),Yw("filter",n,{evt:t}),a&&t.cancelable&&t.preventDefault();return}}else if(d&&(d=d.split(",").some(function(f){if(f=B$(u,f.trim(),r,!1),f)return i0({sortable:n,rootEl:f,name:"filter",targetEl:l,fromEl:r,toEl:r}),Yw("filter",n,{evt:t}),!0}),d)){a&&t.cancelable&&t.preventDefault();return}o.handle&&!B$(u,o.handle,r,!1)||this._prepareDragStart(t,s,l)}}},_prepareDragStart:function(t,n,r){var o=this,a=o.el,i=o.options,s=a.ownerDocument,l;if(r&&!Ao&&r.parentNode===a){var u=mg(r);if(jf=a,Ao=r,op=Ao.parentNode,X6=Ao.nextSibling,iMe=r,sMe=i.group,ps.dragged=Ao,J6={target:Ao,clientX:(n||t).clientX,clientY:(n||t).clientY},Jqn=J6.clientX-u.left,Qqn=J6.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,Ao.style["will-change"]="all",l=function(){if(Yw("delayEnded",o,{evt:t}),ps.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!jqn&&o.nativeDraggable&&(Ao.draggable=!0),o._triggerDragStart(t,n),i0({sortable:o,name:"choose",originalEvent:t}),sS(Ao,i.chosenClass,!0)},i.ignore.split(",").forEach(function(d){qqn(Ao,d.trim(),Hmt)}),yc(s,"dragover",Q6),yc(s,"mousemove",Q6),yc(s,"touchmove",Q6),yc(s,"mouseup",o._onDrop),yc(s,"touchend",o._onDrop),yc(s,"touchcancel",o._onDrop),jqn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ao.draggable=!0),Yw("delayStart",this,{evt:t}),i.delay&&(!i.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(jhe||pP))){if(ps.eventCanceled){this._onDrop();return}yc(s,"mouseup",o._disableDelayedDrag),yc(s,"touchend",o._disableDelayedDrag),yc(s,"touchcancel",o._disableDelayedDrag),yc(s,"mousemove",o._delayedDragTouchMoveHandler),yc(s,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&&yc(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,i.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ao&&Hmt(Ao),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Fu(t,"mouseup",this._disableDelayedDrag),Fu(t,"touchend",this._disableDelayedDrag),Fu(t,"touchcancel",this._disableDelayedDrag),Fu(t,"mousemove",this._delayedDragTouchMoveHandler),Fu(t,"touchmove",this._delayedDragTouchMoveHandler),Fu(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?yc(document,"pointermove",this._onTouchMove):n?yc(document,"touchmove",this._onTouchMove):yc(document,"mousemove",this._onTouchMove):(yc(Ao,"dragend",this),yc(jf,"dragstart",this._onDragStart));try{document.selection?gMe(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(iJ=!1,jf&&Ao){Yw("dragStarted",this,{evt:n}),this.nativeDraggable&&yc(document,"dragover",eLi);var r=this.options;!t&&sS(Ao,r.dragClass,!1),sS(Ao,r.ghostClass,!0),ps.active=this,t&&this._appendGhost(),i0({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(GT){this._lastX=GT.clientX,this._lastY=GT.clientY,o7n();for(var t=document.elementFromPoint(GT.clientX,GT.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(GT.clientX,GT.clientY),t!==n);)n=t;if(Ao.parentNode[lS]._isOutsideThisEl(t),n)do{if(n[lS]){var r=void 0;if(r=n[lS]._onDragOver({clientX:GT.clientX,clientY:GT.clientY,target:t,rootEl:n}),r&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);a7n()}},_onTouchMove:function(t){if(J6){var n=this.options,r=n.fallbackTolerance,o=n.fallbackOffset,a=t.touches?t.touches[0]:t,i=kl&&nJ(kl,!0),s=kl&&i&&i.a,l=kl&&i&&i.d,u=pMe&&fb&&Gqn(fb),d=(a.clientX-J6.clientX+o.x)/(s||1)+(u?u[0]-Umt[0]:0)/(s||1),f=(a.clientY-J6.clientY+o.y)/(l||1)+(u?u[1]-Umt[1]:0)/(l||1);if(!ps.active&&!iJ){if(r&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<r)return;this._onDragStart(t,!0)}if(kl){i?(i.e+=d-(Bmt||0),i.f+=f-(Vmt||0)):i={a:1,b:0,c:0,d:1,e:d,f};var m="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");hs(kl,"webkitTransform",m),hs(kl,"mozTransform",m),hs(kl,"msTransform",m),hs(kl,"transform",m),Bmt=d,Vmt=f,GT=a}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!kl){var t=this.options.fallbackOnBody?document.body:jf,n=mg(Ao,!0,pMe,!0,t),r=this.options;if(pMe){for(fb=t;hs(fb,"position")==="static"&&hs(fb,"transform")==="none"&&fb!==document;)fb=fb.parentNode;fb!==document.body&&fb!==document.documentElement?(fb===document&&(fb=V$()),n.top+=fb.scrollTop,n.left+=fb.scrollLeft):fb=V$(),Umt=Gqn(fb)}kl=Ao.cloneNode(!0),sS(kl,r.ghostClass,!1),sS(kl,r.fallbackClass,!0),sS(kl,r.dragClass,!0),hs(kl,"transition",""),hs(kl,"transform",""),hs(kl,"box-sizing","border-box"),hs(kl,"margin",0),hs(kl,"top",n.top),hs(kl,"left",n.left),hs(kl,"width",n.width),hs(kl,"height",n.height),hs(kl,"opacity","0.8"),hs(kl,"position",pMe?"absolute":"fixed"),hs(kl,"zIndex","100000"),hs(kl,"pointerEvents","none"),ps.ghost=kl,t.appendChild(kl),hs(kl,"transform-origin",Jqn/parseInt(kl.style.width)*100+"% "+Qqn/parseInt(kl.style.height)*100+"%")}},_onDragStart:function(t,n){var r=this,o=t.dataTransfer,a=r.options;if(Yw("dragStart",this,{evt:t}),ps.eventCanceled){this._onDrop();return}Yw("setupClone",this),ps.eventCanceled||(ap=Xqn(Ao),ap.draggable=!1,ap.style["will-change"]="",this._hideClone(),sS(ap,this.options.chosenClass,!1),ps.clone=ap),r.cloneId=gMe(function(){Yw("clone",r),!ps.eventCanceled&&(r.options.removeCloneOnHide||jf.insertBefore(ap,Ao),r._hideClone(),i0({sortable:r,name:"clone"}))}),!n&&sS(Ao,a.dragClass,!0),n?(lMe=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Fu(document,"mouseup",r._onDrop),Fu(document,"touchend",r._onDrop),Fu(document,"touchcancel",r._onDrop),o&&(o.effectAllowed="move",a.setData&&a.setData.call(r,o,Ao)),yc(document,"drop",r),hs(Ao,"transform","translateZ(0)")),iJ=!0,r._dragStartId=gMe(r._dragStarted.bind(r,n,t)),yc(document,"selectstart",r),Khe=!0,Hhe&&hs(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,r=t.target,o,a,i,s=this.options,l=s.group,u=ps.active,d=sMe===l,f=s.sort,m=Nv||u,p,v=this,g=!1;if(jmt)return;function w(J,se){Yw(J,v,F$({evt:t,isOwner:d,axis:p?"vertical":"horizontal",revert:i,dragRect:o,targetRect:a,canSort:f,fromSortable:m,target:r,completed:E,onMove:function(fe,K){return mMe(jf,n,Ao,o,fe,mg(fe),t,K)},changed:x},se))}function S(){w("dragOverAnimationCapture"),v.captureAnimationState(),v!==m&&m.captureAnimationState()}function E(J){return w("dragOverCompleted",{insertion:J}),J&&(d?u._hideClone():u._showClone(v),v!==m&&(sS(Ao,Nv?Nv.options.ghostClass:u.options.ghostClass,!1),sS(Ao,s.ghostClass,!0)),Nv!==v&&v!==ps.active?Nv=v:v===ps.active&&Nv&&(Nv=null),m===v&&(v._ignoreWhileAnimating=r),v.animateAll(function(){w("dragOverAnimationComplete"),v._ignoreWhileAnimating=null}),v!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(r===Ao&&!Ao.animated||r===n&&!r.animated)&&(sJ=null),!s.dragoverBubble&&!t.rootEl&&r!==document&&(Ao.parentNode[lS]._isOutsideThisEl(t.target),!J&&Q6(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function x(){uS=fx(Ao),w3=fx(Ao,s.draggable),i0({sortable:v,name:"change",toEl:n,newIndex:uS,newDraggableIndex:w3,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),r=B$(r,s.draggable,n,!0),w("dragOver"),ps.eventCanceled)return g;if(Ao.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||v._ignoreWhileAnimating===r)return E(!1);if(lMe=!1,u&&!s.disabled&&(d?f||(i=op!==jf):Nv===this||(this.lastPutMode=sMe.checkPull(this,u,Ao,t))&&l.checkPut(this,u,Ao,t))){if(p=this._getDirection(t,r)==="vertical",o=mg(Ao),w("dragOverValid"),ps.eventCanceled)return g;if(i)return op=jf,S(),this._hideClone(),w("revert"),ps.eventCanceled||(X6?jf.insertBefore(Ao,X6):jf.appendChild(Ao)),E(!0);var y=Mmt(n,s.draggable);if(!y||oLi(t,p,this)&&!y.animated){if(y===Ao)return E(!1);if(y&&n===t.target&&(r=y),r&&(a=mg(r)),mMe(jf,n,Ao,o,r,a,t,!!r)!==!1)return S(),n.appendChild(Ao),op=n,x(),E(!0)}else if(y&&rLi(t,p,this)){var D=rJ(n,0,s,!0);if(D===Ao)return E(!1);if(r=D,a=mg(r),mMe(jf,n,Ao,o,r,a,t,!1)!==!1)return S(),n.insertBefore(Ao,D),op=n,x(),E(!0)}else if(r.parentNode===n){a=mg(r);var k=0,O,R=Ao.parentNode!==n,I=!JMi(Ao.animated&&Ao.toRect||o,r.animated&&r.toRect||a,p),$=p?"top":"left",P=Kqn(r,"top","top")||Kqn(Ao,"top","top"),U=P?P.scrollTop:void 0;sJ!==r&&(O=a[$],Yhe=!1,cMe=!I&&s.invertSwap||R),k=aLi(t,r,a,p,I?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,cMe,sJ===r);var F;if(k!==0){var L=fx(Ao);do L-=k,F=op.children[L];while(F&&(hs(F,"display")==="none"||F===kl))}if(k===0||F===r)return E(!1);sJ=r,Ghe=k;var j=r.nextElementSibling,B=!1;B=k===1;var G=mMe(jf,n,Ao,o,r,a,t,B);if(G!==!1)return(G===1||G===-1)&&(B=G===1),jmt=!0,setTimeout(nLi,30),S(),B&&!j?n.appendChild(Ao):r.parentNode.insertBefore(Ao,B?j:r),P&&Zqn(P,0,U-P.scrollTop),op=Ao.parentNode,O!==void 0&&!cMe&&(dMe=Math.abs(O-mg(r)[$])),x(),E(!0)}if(n.contains(Ao))return E(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Fu(document,"mousemove",this._onTouchMove),Fu(document,"touchmove",this._onTouchMove),Fu(document,"pointermove",this._onTouchMove),Fu(document,"dragover",Q6),Fu(document,"mousemove",Q6),Fu(document,"touchmove",Q6)},_offUpEvents:function(){var t=this.el.ownerDocument;Fu(t,"mouseup",this._onDrop),Fu(t,"touchend",this._onDrop),Fu(t,"pointerup",this._onDrop),Fu(t,"touchcancel",this._onDrop),Fu(document,"selectstart",this)},_onDrop:function(t){var n=this.el,r=this.options;if(uS=fx(Ao),w3=fx(Ao,r.draggable),Yw("drop",this,{evt:t}),op=Ao&&Ao.parentNode,uS=fx(Ao),w3=fx(Ao,r.draggable),ps.eventCanceled){this._nulling();return}iJ=!1,cMe=!1,Yhe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),zmt(this.cloneId),zmt(this._dragStartId),this.nativeDraggable&&(Fu(document,"drop",this),Fu(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Hhe&&hs(document.body,"user-select",""),hs(Ao,"transform",""),t&&(Khe&&(t.cancelable&&t.preventDefault(),!r.dropBubble&&t.stopPropagation()),kl&&kl.parentNode&&kl.parentNode.removeChild(kl),(jf===op||Nv&&Nv.lastPutMode!=="clone")&&ap&&ap.parentNode&&ap.parentNode.removeChild(ap),Ao&&(this.nativeDraggable&&Fu(Ao,"dragend",this),Hmt(Ao),Ao.style["will-change"]="",Khe&&!iJ&&sS(Ao,Nv?Nv.options.ghostClass:this.options.ghostClass,!1),sS(Ao,this.options.chosenClass,!1),i0({sortable:this,name:"unchoose",toEl:op,newIndex:null,newDraggableIndex:null,originalEvent:t}),jf!==op?(uS>=0&&(i0({rootEl:op,name:"add",toEl:op,fromEl:jf,originalEvent:t}),i0({sortable:this,name:"remove",toEl:op,originalEvent:t}),i0({rootEl:op,name:"sort",toEl:op,fromEl:jf,originalEvent:t}),i0({sortable:this,name:"sort",toEl:op,originalEvent:t})),Nv&&Nv.save()):uS!==aJ&&uS>=0&&(i0({sortable:this,name:"update",toEl:op,originalEvent:t}),i0({sortable:this,name:"sort",toEl:op,originalEvent:t})),ps.active&&((uS==null||uS===-1)&&(uS=aJ,w3=qhe),i0({sortable:this,name:"end",toEl:op,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Yw("nulling",this),jf=Ao=op=kl=X6=ap=iMe=b3=J6=GT=Khe=uS=w3=aJ=qhe=sJ=Ghe=Nv=sMe=ps.dragged=ps.ghost=ps.clone=ps.active=null,fMe.forEach(function(t){t.checked=!0}),fMe.length=Bmt=Vmt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Ao&&(this._onDragOver(t),tLi(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,r=this.el.children,o=0,a=r.length,i=this.options;o<a;o++)n=r[o],B$(n,i.draggable,this.el,!1)&&t.push(n.getAttribute(i.dataIdAttr)||sLi(n));return t},sort:function(t,n){var r={},o=this.el;this.toArray().forEach(function(a,i){var s=o.children[i];B$(s,this.options.draggable,o,!1)&&(r[a]=s)},this),n&&this.captureAnimationState(),t.forEach(function(a){r[a]&&(o.removeChild(r[a]),o.appendChild(r[a]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return B$(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var r=this.options;if(n===void 0)return r[t];var o=Whe.modifyOption(this,t,n);typeof o<"u"?r[t]=o:r[t]=n,t==="group"&&r7n(r)},destroy:function(){Yw("destroy",this);var t=this.el;t[lS]=null,Fu(t,"mousedown",this._onTapStart),Fu(t,"touchstart",this._onTapStart),Fu(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Fu(t,"dragover",this),Fu(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),uMe.splice(uMe.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!b3){if(Yw("hideClone",this),ps.eventCanceled)return;hs(ap,"display","none"),this.options.removeCloneOnHide&&ap.parentNode&&ap.parentNode.removeChild(ap),b3=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(b3){if(Yw("showClone",this),ps.eventCanceled)return;Ao.parentNode==jf&&!this.options.group.revertClone?jf.insertBefore(ap,Ao):X6?jf.insertBefore(ap,X6):jf.appendChild(ap),this.options.group.revertClone&&this.animate(Ao,ap),hs(ap,"display",""),b3=!1}}};function tLi(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function mMe(e,t,n,r,o,a,i,s){var l,u=e[lS],d=u.options.onMove,f;return window.CustomEvent&&!pP&&!jhe?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=o||t,l.relatedRect=a||mg(t),l.willInsertAfter=s,l.originalEvent=i,e.dispatchEvent(l),d&&(f=d.call(u,l,i)),f}function Hmt(e){e.draggable=!1}function nLi(){jmt=!1}function rLi(e,t,n){var r=mg(rJ(n.el,0,n.options,!0)),o=10;return t?e.clientX<r.left-o||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-o||e.clientY<r.bottom&&e.clientX<r.left}function oLi(e,t,n){var r=mg(Mmt(n.el,n.options.draggable)),o=10;return t?e.clientX>r.right+o||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+o}function aLi(e,t,n,r,o,a,i,s){var l=r?e.clientY:e.clientX,u=r?n.height:n.width,d=r?n.top:n.left,f=r?n.bottom:n.right,m=!1;if(!i){if(s&&dMe<u*o){if(!Yhe&&(Ghe===1?l>d+u*a/2:l<f-u*a/2)&&(Yhe=!0),Yhe)m=!0;else if(Ghe===1?l<d+dMe:l>f-dMe)return-Ghe}else if(l>d+u*(1-o)/2&&l<f-u*(1-o)/2)return iLi(t)}return m=m||i,m&&(l<d+u*a/2||l>f-u*a/2)?l>d+u/2?1:-1:0}function iLi(e){return fx(Ao)<fx(e)?1:-1}function sLi(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function lLi(e){fMe.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&fMe.push(r)}}function gMe(e){return setTimeout(e,0)}function zmt(e){return clearTimeout(e)}hMe&&yc(document,"touchmove",function(e){(ps.active||iJ)&&e.cancelable&&e.preventDefault()}),ps.utils={on:yc,off:Fu,css:hs,find:qqn,is:function(t,n){return!!B$(t,n,t,!1)},extend:zMi,throttle:Yqn,closest:B$,toggleClass:sS,clone:Xqn,index:fx,nextTick:gMe,cancelNextTick:zmt,detectDirection:n7n,getChild:rJ},ps.get=function(e){return e[lS]},ps.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(ps.utils=F$(F$({},ps.utils),r.utils)),Whe.mount(r)})},ps.create=function(e,t){return new ps(e,t)},ps.version=VMi;var Sm=[],Zhe,Wmt,qmt=!1,Kmt,Gmt,vMe,Xhe;function uLi(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var r=n.originalEvent;this.sortable.nativeDraggable?yc(document,"dragover",this._handleAutoScroll):this.options.supportPointer?yc(document,"pointermove",this._handleFallbackAutoScroll):r.touches?yc(document,"touchmove",this._handleFallbackAutoScroll):yc(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var r=n.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?Fu(document,"dragover",this._handleAutoScroll):(Fu(document,"pointermove",this._handleFallbackAutoScroll),Fu(document,"touchmove",this._handleFallbackAutoScroll),Fu(document,"mousemove",this._handleFallbackAutoScroll)),i7n(),yMe(),WMi()},nulling:function(){vMe=Wmt=Zhe=qmt=Xhe=Kmt=Gmt=null,Sm.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,r){var o=this,a=(n.touches?n.touches[0]:n).clientX,i=(n.touches?n.touches[0]:n).clientY,s=document.elementFromPoint(a,i);if(vMe=n,r||this.options.forceAutoScrollFallback||jhe||pP||Hhe){Ymt(n,this.options,s,r);var l=y3(s,!0);qmt&&(!Xhe||a!==Kmt||i!==Gmt)&&(Xhe&&i7n(),Xhe=setInterval(function(){var u=y3(document.elementFromPoint(a,i),!0);u!==l&&(l=u,yMe()),Ymt(n,o.options,u,r)},10),Kmt=a,Gmt=i)}else{if(!this.options.bubbleScroll||y3(s,!0)===V$()){yMe();return}Ymt(n,this.options,y3(s,!1),!1)}}},fP(e,{pluginName:"scroll",initializeByDefault:!0})}function yMe(){Sm.forEach(function(e){clearInterval(e.pid)}),Sm=[]}function i7n(){clearInterval(Xhe)}var Ymt=Yqn(function(e,t,n,r){if(t.scroll){var o=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,i=t.scrollSensitivity,s=t.scrollSpeed,l=V$(),u=!1,d;Wmt!==n&&(Wmt=n,yMe(),Zhe=t.scroll,d=t.scrollFn,Zhe===!0&&(Zhe=y3(n,!0)));var f=0,m=Zhe;do{var p=m,v=mg(p),g=v.top,w=v.bottom,S=v.left,E=v.right,x=v.width,y=v.height,D=void 0,k=void 0,O=p.scrollWidth,R=p.scrollHeight,I=hs(p),$=p.scrollLeft,P=p.scrollTop;p===l?(D=x<O&&(I.overflowX==="auto"||I.overflowX==="scroll"||I.overflowX==="visible"),k=y<R&&(I.overflowY==="auto"||I.overflowY==="scroll"||I.overflowY==="visible")):(D=x<O&&(I.overflowX==="auto"||I.overflowX==="scroll"),k=y<R&&(I.overflowY==="auto"||I.overflowY==="scroll"));var U=D&&(Math.abs(E-o)<=i&&$+x<O)-(Math.abs(S-o)<=i&&!!$),F=k&&(Math.abs(w-a)<=i&&P+y<R)-(Math.abs(g-a)<=i&&!!P);if(!Sm[f])for(var L=0;L<=f;L++)Sm[L]||(Sm[L]={});(Sm[f].vx!=U||Sm[f].vy!=F||Sm[f].el!==p)&&(Sm[f].el=p,Sm[f].vx=U,Sm[f].vy=F,clearInterval(Sm[f].pid),(U!=0||F!=0)&&(u=!0,Sm[f].pid=setInterval((function(){r&&this.layer===0&&ps.active._onTouchMove(vMe);var j=Sm[this.layer].vy?Sm[this.layer].vy*s:0,B=Sm[this.layer].vx?Sm[this.layer].vx*s:0;typeof d=="function"&&d.call(ps.dragged.parentNode[lS],B,j,e,vMe,Sm[this.layer].el)!=="continue"||Zqn(Sm[this.layer].el,B,j)}).bind({layer:f}),24))),f++}while(t.bubbleScroll&&m!==l&&(m=y3(m,!1)));qmt=u}},30),s7n=function(t){var n=t.originalEvent,r=t.putSortable,o=t.dragEl,a=t.activeSortable,i=t.dispatchSortableEvent,s=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(n){var u=r||a;s();var d=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,f=document.elementFromPoint(d.clientX,d.clientY);l(),u&&!u.el.contains(f)&&(i("spill"),this.onSpill({dragEl:o,putSortable:r}))}};function Zmt(){}Zmt.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,r=t.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var o=rJ(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),r&&r.animateAll()},drop:s7n},fP(Zmt,{pluginName:"revertOnSpill"});function Xmt(){}Xmt.prototype={onSpill:function(t){var n=t.dragEl,r=t.putSortable,o=r||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:s7n},fP(Xmt,{pluginName:"removeOnSpill"}),ps.mount(new uLi),ps.mount(Xmt,Zmt);function cLi(e,t){return Object.values(e).indexOf(t)}function dLi(e,t,n,r){if(!e)return[];const o=Object.values(e),a=t.length-r;return[...t].map((s,l)=>l>=a?o.length:o.indexOf(s))}function fLi(e){return["transition-group","TransitionGroup"].includes(e)}function l7n(e){if(!e||e.length!==1)return!1;const[{type:t}]=e;return t?fLi(t.name):!1}function hLi(e,t){return t?{...t.props,...t.attrs}:e}const Jmt=["Start","Add","Remove","Update","End"],Qmt=["Choose","Unchoose","Sort","Filter","Clone"],pLi=["Move",...Jmt,...Qmt].map(e=>"on"+e);let egt=null;const u7n=yt({name:"VueDraggableNext",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},emits:["update:modelValue","move","change",...Jmt.map(e=>e.toLowerCase()),...Qmt.map(e=>e.toLowerCase())],setup(e,{emit:t,slots:n,attrs:r}){const o=oe(!1),a=oe(!1),i=oe(0),s=oe(0),l=oe([]),u=oe(null),d=oe(null),f=te(()=>e.list?e.list:e.modelValue),m=Ha();function p(){return e.component?Tr(e.component):e.tag}function v(N){if(d.value)for(const Y in N){const de=Bqn(Y);pLi.indexOf(de)===-1&&d.value.option(de,N[Y])}}function g(){var N;return((N=m==null?void 0:m.proxy)==null?void 0:N.$el.children)||[]}async function w(){var N;await It(),l.value=dLi(g(),((N=m==null?void 0:m.proxy)==null?void 0:N.$el.children)||[],o.value,s.value)}function S(N){const Y=cLi(g()||[],N);if(Y===-1)return null;const de=f.value?f.value[Y]:null;return{index:Y,element:de}}function E(N){It(()=>t("change",N))}function x(N){if(e.list){N(e.list);return}const Y=[...e.modelValue||[]];N(Y),t("update:modelValue",Y)}function y(...N){x(de=>de.splice(...N))}function D(N,Y){x(Ce=>Ce.splice(Y,0,Ce.splice(N,1)[0]))}function k(N){const Y=l.value,de=Y.length;return N>de-1?de:Y[N]}function O(){var Y,de;return n.default&&((de=(Y=n.default()[0])==null?void 0:Y.component)==null?void 0:de.proxy)||null}function R(N){if(!e.noTransitionOnDrag||!o.value)return;const Y=g();Y[N]&&(Y[N].data=null);const de=O();de&&(de.children=[],de.kept=void 0)}function I(N){w(),u.value=S(N.item),u.value&&(N.item._underlying_vm_=e.clone(u.value.element),egt=N.item)}function $(N){const Y=N.item._underlying_vm_;if(Y===void 0)return;Nmt(N.item);const de=k(N.newIndex);y(de,0,Y),w(),E({added:{element:Y,newIndex:de}})}function P(N){var de;if(Vqn((de=m==null?void 0:m.proxy)==null?void 0:de.$el,N.item,N.oldIndex),N.pullMode==="clone"){Nmt(N.clone);return}if(!u.value)return;const Y=u.value.index;y(Y,1),R(Y),E({removed:{element:u.value.element,oldIndex:Y}})}function U(N){var Ce,we;Nmt(N.item),Vqn(N.from,N.item,N.oldIndex);const Y=(Ce=u.value)==null?void 0:Ce.index,de=k(N.newIndex);D(Y,de),E({moved:{element:(we=u.value)==null?void 0:we.element,oldIndex:Y,newIndex:de}})}function F(N,Y){Object.prototype.hasOwnProperty.call(N,Y)&&(N[Y]+=i.value)}function L(N){return N.__draggable_component__}function j({to:N,related:Y}){const de=L(N);if(!de)return{component:de};const Ce=de.realList,we={list:Ce,component:de};if(N!==Y&&Ce&&de.getUnderlyingVm){const ee=de.getUnderlyingVm(Y);if(ee)return Object.assign(ee,we)}return we}function B(N,Y){const de=[...Y.to.children].filter(Q=>Q.style.display!=="none");if(de.length===0)return 0;const Ce=de.indexOf(Y.related),we=N.component.getVmIndex(Ce);return de.indexOf(egt)!==-1||!Y.willInsertAfter?we:we+1}const G=()=>{var we,ee;const N={};Jmt.forEach(Q=>{N["on"+Q]=se(Q)}),Qmt.forEach(Q=>{N["on"+Q]=J.bind(null,Q)});const Y=Object.keys(r).reduce((Q,Ae)=>(Q[Bqn(Ae)]=r[Ae],Q),{}),de=Object.assign({},Y,N,{onMove:(Q,Ae)=>ve(Q,Ae)});"draggable"in de||(de.draggable=">*");const Ce=((we=m==null?void 0:m.proxy)==null?void 0:we.$el.nodeType)===1?m.proxy.$el:((ee=m==null?void 0:m.proxy)==null?void 0:ee.$el.parentElement)||null;Ce&&(d.value=new ps(Ce,de),Ce.__draggable_component__=m==null?void 0:m.proxy,w())};function J(N,Y){It(()=>t(N.toLowerCase(),Y))}function se(N){return Y=>{if(f.value!==null){const de="onDrag"+N,Ce=K[de];Ce&&Ce(Y)}J(N,Y)}}function ve(N,Y){const de=e.move;if(!de||!f.value)return!0;const Ce=j(N),we=u.value,ee=B(Ce,N);we&&Object.assign(we,{futureIndex:ee});const Q=Object.assign({},N,{relatedContext:Ce,draggedContext:we});return de(Q,Y)}function fe(){w(),egt=null}const K={onDragStart:I,onDragAdd:$,onDragRemove:P,onDragUpdate:U,onDragMove:ve,onDragEnd:fe};return mn(()=>{G()}),e.list!==null&&e.modelValue!==null&&PMi.error("list props are mutually exclusive! Please set one."),{getTag:p,realList:f,visibleIndexes:l,noneFunctionalComponentMode:a,headerOffset:i,footerOffset:s,transitionMode:o,computeIndexes:w,updateOptions:v,getChildrenNodes:g,getUnderlyingVm:S,emitChanges:E,alterList:x,spliceList:y,updatePosition:D,getVmIndex:k,getComponent:O,resetTransitionData:R,onDragStart:I,onDragAdd:$,onDragRemove:P,onDragUpdate:U,updateProperty:F,onDragMove:ve,onDragEnd:fe,mounted:G,context:u,sortableInstance:d,getRelatedContextFromMoveEvent:j,getTargetedComponent:L,computeFutureIndex:B}},render(){const e=this.getTag(),t=hLi(this.$attrs,this.componentData);if(typeof e=="string"){const r=this.$slots.default&&typeof this.$slots.default=="function"?this.$slots.default():null;return r?(this.transitionMode=l7n(r),Pi(e,t,r)):Pi(e,t,[])}const n=this.$slots.default?{default:this.$slots.default}:{};if(this.$slots.default){const r=typeof this.$slots.default=="function"?this.$slots.default():null;this.transitionMode=l7n(r||[])}return Pi(e,t,n)}}),mLi=yt({__name:"VisualWrapper",props:{name:{type:String,required:!0},h:{type:[Number,String],required:!1,default:180},w:{type:[Number,String],required:!1,default:180}},setup(e,{expose:t}){t();const n=e,r=te(()=>({height:typeof n.h=="number"?`${n.h}px`:n.h,width:typeof n.w=="number"?`${n.w}px`:n.w})),o={props:n,styles:r};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}});function gLi(e,t,n,r,o,a){const i=Tr("ArboIcon");return W(),me("div",{class:"visual-wrapper flex items-center justify-center",style:dn(r.styles)},[Me(i,{name:n.name,type:"visual"},null,8,["name"])],4)}const vLi=za(mLi,[["render",gLi],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/common/VisualWrapper.vue"]]),bMe=250;var c7n=(e=>(e[e.UPLOAD_FILE=0]="UPLOAD_FILE",e[e.UPLOAD_IN_PROGRESS=1]="UPLOAD_IN_PROGRESS",e[e.UPLOAD_SUCCESS=2]="UPLOAD_SUCCESS",e[e.UPLOAD_FAILED=3]="UPLOAD_FAILED",e))(c7n||{});const yLi=yt({__name:"ModalAddRendition",emits:["upload-success","close"],setup(e,{expose:t,emit:n}){t();const{t:r}=Ux(),{upLoadFile:o,createNewRendition:a,uploadNewFileInNewRendition:i,checkLengthAndTypeRendition:s}=hDe(),l=n,u=LL(),d=xp(),{updateSceneAPI:f}=AO(),{allStatus:m,status:p}=ia(d),{fileReference:v,numberOfRendition:g}=ia(u),w=hr({name:`Rendition ${g.value+1}`,description:""});vt(g,Q=>{w.name=`Rendition ${Q+1}`},{immediate:!0});const S=oe(0),E=oe(),x=oe(!1),y=oe(xya),D=oe(!0),k=te(()=>{let Q=!1;switch(S.value){case 0:Q=!w.name.trim()||!v.value.length||v.value.length>5||v.value.length==0;break;case 1:Q=!0;break;case 2:Q=!L.value;break}return Q}),O=oe(!1),R=oe(),I=te({get:()=>v.value??[],set:Q=>{v.value&&(v.value=Q)}}),$=te(()=>d.allStatus),P=oe($.value),U=async Q=>{Q?P.value=$.value.filter(Ae=>Ae.name.toLowerCase().includes(Q.toLowerCase())):P.value=$.value},{permission:F}=sC(),L=te(()=>F.value.updateStatus),{getSceneData:j}=d,B=async Q=>{var be;if(!L.value)return;const Ae=(be=m==null?void 0:m.value)==null?void 0:be.find(Ve=>Ve.id===Q);Ae&&((await f({template_flow_status_id:Ae.id})).success?(R.value=Q,setTimeout(async()=>{await j()},1e3)):R.value=p.value),l("close")},G=()=>{O.value=!0};vt(I,Q=>{S.value>1||Q.length>0&&G()},{deep:!0,immediate:!0}),vt(O,Q=>{Q&&(w.name=`Rendition ${g.value+1}`)},{immediate:!0});const J=async()=>{var Q;try{S.value=1;const Ae=v.value.map(rt=>rt.originFile),be=await o(Ae);if(!be.length)throw new Error("Upload failed");const Ve=be.map(rt=>({name:rt.name,type:rt.type,mimetype:rt.mimetype,accept_type:rt.accept_type,path:rt.path,thumbnail:rt.thumbnail}));let Oe=[];Oe=[{...w,attachments:Ve}];const Be=await a(Oe),ke=Be.success?{textCancelBtn:"No, thanks",textConfirmBtn:"Update status"}:{textCancelBtn:"",textConfirmBtn:"Try again"};y.value.splice(2,1,ke),Be.success?(D.value=!0,S.value=2,l("upload-success",(Q=Be.data)==null?void 0:Q.data.map(rt=>rt.id))):(D.value=!1,S.value=3)}catch{S.value=3}},se=async()=>{switch(S.value){case 0:J();break;case 1:break;case 2:await B(R.value),ve();break;case 3:ve();break}},ve=()=>{v.value=[],O.value=!1,S.value=0,w.name="",O.value=!1},fe=Q=>{const Ae=v.value.findIndex(be=>be.url===Q);Ae>-1&&v.value.splice(Ae,1)},K=async Q=>{var Oe,Be;const Ae=(Oe=v.value[0])==null?void 0:Oe.originFile.type,be=Q.target;if(!((Be=be.files)!=null&&Be.length))return;const Ve=s(void 0,be.files,Ae,v.value.length);i(Ve)},N=async Q=>{const Ae=["Backspace","ArrowLeft","ArrowRight"];w.name.length>=bMe&&!Ae.includes(Q.key)&&(Q.preventDefault(),Q.stopPropagation())},Y=()=>{w.name.length>bMe&&(w.name=w.name.slice(0,bMe))},de=async Q=>{if(R.value=Q,L.value)R.value=Q;else throw new Error("Permission denied")},Ce=()=>{ve(),l("close")},we=()=>{E.value.click()};vt(p,()=>{R.value=p.value},{immediate:!0}),_o(()=>{ve()});const ee={t:r,upLoadFile:o,createNewRendition:a,uploadNewFileInNewRendition:i,checkLengthAndTypeRendition:s,emits:l,maxLengthNameRendition:bMe,renditionStore:u,sceneStore:d,updateSceneAPI:f,allStatus:m,status:p,fileReference:v,numberOfRendition:g,formState:w,UploadStep:c7n,currentStep:S,fileInput:E,isLoading:x,textButton:y,isUploadSuccess:D,isBtnDisable:k,isShow:O,_status:R,listFileRendition:I,_allStatus:$,listStatus:P,handleSearch:U,permission:F,canUpdate:L,getSceneData:j,handleUpdateStatus:B,show:G,handleUploadStep:J,handleNextStep:se,reset:ve,removeFile:fe,handleFileChange:K,handleChangeNameRendition:N,handleInput:Y,handleSelectStatus:de,closeModal:Ce,triggerFileUpload:we,get VueDraggableNext(){return u7n},get STEPS(){return kya},VisualWrapper:vLi};return Object.defineProperty(ee,"__isScriptSetup",{enumerable:!1,value:!0}),ee}}),bLi={class:"flex justify-center relative w-full"},wLi={class:"text-[24px] font-bold"},_Li={class:"-mt-6"},SLi={class:"flex justify-center w-full"},ELi={class:"stepper"},CLi={key:0,class:"check"},xLi={key:1,class:"text-[12px]"},kLi={key:0,class:"line"},TLi={key:0,class:"mt-4"},OLi={class:"flex gap-2"},DLi={class:"relative w-[40%] shadow-md bg-cover aspect-ratio rounded-md overflow-hidden"},ALi=["src"],$Li={class:"flex-1"},ILi={class:"text-center text-sm"},RLi={class:"overflow-auto"},PLi={class:"flex justify-center"},NLi={key:0,class:"loader"},MLi={class:"text-start"},LLi={key:1},FLi={class:"text-lg font-bold text-center mt-3"},BLi={class:"h-[220px] p-4 flex justify-center"},VLi={class:"text sx text-center"},ULi={key:2},jLi={class:"text-lg font-bold text-center mt-3"},HLi={class:"h-[220px] p-4 flex justify-center"},zLi={class:"text sx text-center"},WLi={key:0,class:"relative"};function qLi(e,t,n,r,o,a){const i=Tr("arbo-button"),s=Tr("ArboInput"),l=Tr("TessReviewFileCard"),u=Tr("TessStatusSelect"),d=Tr("ArboTooltip"),f=Tr("arbo-modal");return W(),st(f,on({show:r.isShow},{...r.textButton[r.currentStep]},{disable:r.isBtnDisable,icon:"''",class:"modal-add-rendition",onConfirmed:r.handleNextStep,onHidden:r.closeModal}),{header:je(()=>[$e("div",bLi,[$e("p",wLi,Et(r.t("rendition.create_rendition")),1),$e("div",{class:"absolute -right-8 -top-4",onClick:r.closeModal},[Me(i,{"prefix-tooltip":"Close","prefix-icon":"Xmark",type:"tertiary",label:""})])])]),"main-icon":je(()=>[...t[3]||(t[3]=[$e("div",null,null,-1)])]),default:je(()=>[ft(e.$slots,"default",{},()=>[$e("div",_Li,[$e("div",SLi,[$e("div",ELi,[(W(!0),me(qt,null,bn(r.STEPS,(m,p)=>(W(),me("div",{key:p,class:"step"},[$e("div",{class:De(["circle",{active:p<=r.currentStep}])},[p<r.currentStep?(W(),me("span",CLi,"✓")):(W(),me("span",xLi,Et(p+1),1))],2),p<r.STEPS.length-1?(W(),me("div",kLi)):Ye("v-if",!0)]))),128))])])]),$e("div",null,[r.currentStep===0?(W(),me("div",TLi,[$e("div",OLi,[$e("div",DLi,[r.fileReference[0]?(W(),me("img",{key:0,loading:"lazy",class:"absolute top-0 left-0 w-full h-full object-cover",src:r.fileReference[0].url,alt:""},null,8,ALi)):Ye("v-if",!0)]),$e("div",$Li,[Me(s,{modelValue:r.formState.name,"onUpdate:modelValue":t[0]||(t[0]=m=>r.formState.name=m),placeholder:r.t("rendition.placeHolder"),class:"rendition-name-input","onInput:keyDown":r.handleChangeNameRendition,"onInput:change":r.handleInput},null,8,["modelValue","placeholder"])])]),$e("p",ILi,Et(r.t("rendition.drag_files")),1),$e("div",RLi,[Me(r.VueDraggableNext,{modelValue:r.listFileRendition,"onUpdate:modelValue":t[1]||(t[1]=m=>r.listFileRendition=m),class:"dragArea list-group w-full flex flex-col gap-2"},{default:je(()=>[(W(!0),me(qt,null,bn(r.listFileRendition,(m,p)=>(W(),me("div",{key:p,class:"w-full"},[Me(l,{"ready-only":!1,"thumbnail-url":m.url,"thumbnail-name":m.name,"is-unaccepted":!1,class:"rendition-review-card",onDeleteCard:()=>{r.removeFile(m.url)}},null,8,["thumbnail-url","thumbnail-name","onDeleteCard"])]))),128))]),_:1},8,["modelValue"])]),$e("div",PLi,[r.isLoading?(W(),me("div",NLi)):Ye("v-if",!0)]),$e("div",MLi,[$e("span",{class:De(`text-[#3C9BFA] text-sm mt-2 cursor-pointer ${r.fileReference.length>=5?"pointer-events-none text-gray-600":""}`),onClick:r.triggerFileUpload},Et(r.t("rendition.upload_more")),3),$e("input",{ref:"fileInput",type:"file",class:"hidden",multiple:"",onChange:r.handleFileChange},null,544)])])):r.currentStep===1?(W(),me("div",LLi,[$e("div",FLi,Et(r.t("rendition.upload_in_progress")),1),$e("div",BLi,[Me(r.VisualWrapper,{name:"UploadInProgress"})]),$e("p",VLi,[Zt(Et(r.t("rendition.keep_open_the_modal")),1),t[4]||(t[4]=$e("br",null,null,-1)),Zt(" "+Et(r.t("rendition.uploading_background")),1)])])):r.currentStep===2?(W(),me("div",ULi,[$e("div",jLi,Et(r.isUploadSuccess?r.t("rendition.upload_successful"):r.t("rendition.upload_ failed")),1),$e("div",HLi,[Me(r.VisualWrapper,{name:r.isUploadSuccess?"Successful1":"Unsuccessful1"},null,8,["name"])]),$e("p",zLi,Et(r.isUploadSuccess?r.t("rendition.update_status_char"):r.t("rendition.update_fail")),1),r.isUploadSuccess?(W(),me("div",WLi,[Me(d,{content:r.canUpdate?"":"Uh Oh! You don't have access.",class:"!w-full","hide-on-click":!1},{default:je(()=>[Me(u,{modelValue:r._status,"onUpdate:modelValue":[t[2]||(t[2]=m=>r._status=m),r.handleSelectStatus],options:r.allStatus,"is-unaccepted":!1,class:"rendition-change-status","is-clearable":!1,onSearch:r.handleSearch},null,8,["modelValue","options"])]),_:1},8,["content"])])):Ye("v-if",!0)])):Ye("v-if",!0)])],!0)]),_:3},16,["show","disable"])}const KLi=za(yLi,[["render",qLi],["__scopeId","data-v-bd8166b7"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/ModalAddRendition.vue"]]),GLi=yt({__name:"RenditionFiles",props:{isLoading:{type:Boolean,required:!0},description:{type:String,required:!0},currentIdRendition:{type:String,required:!0},activeItem:{type:String,required:!0},renditionFiles:{type:Array,required:!0},updateRenditionDescriptionFnc:{type:Function,required:!0}},emits:["triggerFileUpload","addNewFileToSelectedRendition","handleRemoveFile","update:currentIdRendition","updateDescription","selectRenditionFile"],setup(e,{expose:t,emit:n}){t();const{changeSortOrderApi:r}=Wet(),o=e,a=n,i=oe(o.description||""),{permission:s}=sC(),l=oe(!1),u=b1().getEnvVariable("DELAY_SAVE")||3e3;vt(i,iy(async y=>{if(l.value){l.value=!1;return}await o.updateRenditionDescriptionFnc(y)||(l.value=!0,i.value=o.description)},Number(u)),{immediate:!1});const d=()=>{const y=document.createElement("input");y.type="file",y.multiple=!0,y.accept=["jpeg","png","mov","mp4","jpg"].join(","),y.style.display="none",y.addEventListener("change",w),y.click()},f=oe([]),m=te(()=>(o.renditionFiles??[]).reduce((k,O)=>(k[O.id]=O,k),{})),{getRenditionDetail:p}=hDe(),v=te(()=>{var y;return((y=f.value)==null?void 0:y.length)??0});vt(()=>o.renditionFiles,()=>{var y;f.value=((y=o.renditionFiles)==null?void 0:y.map(D=>D.id))??[],o.renditionFiles.forEach(D=>{m.value[D.id]=D})},{immediate:!0,deep:!0});const g=async()=>{try{const y=Array.from(new Set(f.value));if(o.currentIdRendition)if(await r(o.currentIdRendition,y))p(o.currentIdRendition);else throw new Error("Update failed.")}catch{_s().showMessage("Update failed.","error")}},w=y=>{a("addNewFileToSelectedRendition",y)},x={changeSortOrderApi:r,props:o,emits:a,description:i,permission:s,revertDescription:l,DELAY_MS:u,triggerFileUpload:d,renditionAttachmentIds:f,renditionAttachments:m,getRenditionDetail:p,numberOfFiles:v,updateSorting:g,handleChangeFile:w,handleRemoveFile:y=>{var D;((D=Object.keys(m.value))==null?void 0:D.length)<2?_s().showMessage("Cannot be deleted. Each rendition must have at least one file","error"):a("handleRemoveFile",y)},handleClickCard:y=>{const D=String(y);a("selectRenditionFile",D)},get ArboTextArea(){return Gvn},get VueDraggableNext(){return u7n}};return Object.defineProperty(x,"__isScriptSetup",{enumerable:!1,value:!0}),x}}),YLi={class:"rendition-files"},ZLi={class:"my-2 flex justify-between"},XLi={class:"w-max"},JLi={class:"list-file overflow-auto"},QLi={class:"flex justify-center mt-2"},eFi={key:0,class:"loader"};function tFi(e,t,n,r,o,a){const i=Tr("TessNonInteractiveChip"),s=Tr("ArboTooltip"),l=Tr("TessReviewFileCard"),u=Tr("ArboButton");return W(),me("div",YLi,[Me(r.ArboTextArea,{modelValue:r.description,"onUpdate:modelValue":t[0]||(t[0]=d=>r.description=d),"max-height":"64px",placeholder:"Enter description",disabled:!r.permission.editRendition},null,8,["modelValue","disabled"]),$e("div",ZLi,[t[2]||(t[2]=$e("div",{class:"flex items-center justify-between flex-1"},[$e("span",{class:"font-lato text-[14px] font-bold leading-[18px] flex-1"},"Review files")],-1)),$e("div",XLi,[Me(s,{delay:[300,0],"hide-on-click":!1,content:`${r.numberOfFiles} review files`},{default:je(()=>[Me(i,{"component-styles":{background:"#F3F5F8"},icon:"File",label:String(r.numberOfFiles)},null,8,["label"])]),_:1},8,["content"])])]),$e("div",JLi,[Me(r.VueDraggableNext,{modelValue:r.renditionAttachmentIds,"onUpdate:modelValue":t[1]||(t[1]=d=>r.renditionAttachmentIds=d),"item-key":"id",class:"flex flex-col gap-2",disabled:!r.permission.addReviewFiles,onChange:r.updateSorting},{default:je(()=>[(W(!0),me(qt,null,bn(r.renditionAttachmentIds,d=>{var f,m;return W(),me("div",{key:d},[Me(l,{"disable-drag":!r.permission.addReviewFiles,"ready-only":!r.permission.deleteReviewFiles,class:De({selected:r.renditionAttachments[d].id==n.activeItem}),"thumbnail-url":(f=r.renditionAttachments[d])==null?void 0:f.thumbnail,"thumbnail-name":(m=r.renditionAttachments[d])==null?void 0:m.name,"is-unaccepted":!1,"shared-styles":{"--review-card--background":"#F3F5F8"},onClick:p=>r.handleClickCard(d),onDeleteCard:()=>{r.handleRemoveFile(d)}},null,8,["disable-drag","ready-only","class","thumbnail-url","thumbnail-name","onClick","onDeleteCard"])])}),128))]),_:1},8,["modelValue","disabled"])]),$e("div",QLi,[n.isLoading?(W(),me("div",eFi)):Ye("v-if",!0)]),r.permission.addReviewFiles?(W(),st(u,on({key:0},{prefixIcon:"Plus",type:"secondary",class:"actions-item",label:"Add more review files"},{disable:r.numberOfFiles>=5,class:"w-full",onClick:r.triggerFileUpload}),null,16,["disable"])):Ye("v-if",!0)])}const nFi=za(GLi,[["render",tFi],["__scopeId","data-v-e25366db"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/RenditionFiles.vue"]]),rFi=yt({__name:"RenditionList",props:{statusFetching:{type:String,required:!0},currentIdRendition:{type:String,required:!0},loadingMoreRendition:{type:Boolean,required:!0},totalRenditionPage:{type:Number,required:!0},initPage:{type:Number,required:!1}},emits:["handleCreateNewRendition","selectRendition","copyLink","deleteRendition","loadOlderRendition","loadNewerRendition"],setup(e,{expose:t,emit:n}){const r=LL(),{renditionList:o}=ia(r),a=n,{permission:i}=sC(),s=e,l=oe(),u=oe(null),d=k=>{a("copyLink",k)},f=k=>{a("deleteRendition",k)},m=k=>{var O;l!=null&&l.value&&((O=l.value)==null||O.clearFile()),a("handleCreateNewRendition",k)},p=k=>{a("selectRendition",k)},v=te(()=>{const k=Object.keys(o.value).map(O=>o.value[O]);return k.sort((O,R)=>new Date(R.created_at).getTime()-new Date(O.created_at).getTime()),k.map(O=>O.id)}),g=()=>{var k;(k=l.value)==null||k.clearFile()},w=hr({start:(s==null?void 0:s.initPage)||_N,end:(s==null?void 0:s.initPage)||_N,total:1,loading:!1});vt(()=>s.totalRenditionPage,k=>{w.total=k});const S=async(k,O)=>{const R=document.getElementById(`rendition_${k}`);R&&It(()=>{setTimeout(()=>{R==null||R.scrollIntoView(),O&&(R==null||R.classList.add("highlight"),setTimeout(()=>{R==null||R.classList.remove("highlight")},3e3))},1e3)})},E=fDe(),{redirectConfig:x}=ia(E);vt(()=>s.currentIdRendition,()=>{var k,O,R;(k=x.value)!=null&&k.renditionConfig&&((R=(O=x.value)==null?void 0:O.renditionConfig)==null?void 0:R.renditionId)===s.currentIdRendition&&It(()=>{var I;(I=s.currentIdRendition)!=null&&I.trim()&&S(s.currentIdRendition,!0)})},{immediate:!0}),mn(()=>{_ee(u.value,async()=>{w.loading||w.start<=1||(w.start=w.start-1,w.loading=!0,a("loadNewerRendition",w.start),w.loading=!1)},{distance:10,direction:"top",canLoadMore:()=>w.start>1&&!w.loading}),_ee(u.value,async()=>{w.loading&&w.end>=w.total||(w.end=w.end+1,w.loading=!0,a("loadOlderRendition",w.end),w.loading=!1)},{distance:10,direction:"bottom",canLoadMore:()=>w.end<w.total&&!w.loading})});const y=()=>{w.start=_N,w.end=_N,w.total=_N};t({elementRef:u,clearFile:g,reset:y});const D={renditionStore:r,renditionList:o,emits:a,permission:i,props:s,uploadRef:l,elementRef:u,handleCopyLink:d,handleDeleteRendition:f,handleCreateNewRendition:m,handleSelectKey:p,renditionIds:v,clearFile:g,page:w,gotoRendition:S,redirectStore:E,redirectConfig:x,handleResetList:y,UploadRenditionFiles:qet,get STATUS_FETCH(){return Qk}};return Object.defineProperty(D,"__isScriptSetup",{enumerable:!1,value:!0}),D}}),oFi={class:"flex flex-col justify-between rendition-list"},aFi={key:0,class:"rendition-upload-new"},iFi={ref:"elementRef",class:"flex-1 overflow-y-auto overflow-x-hidden"},sFi={key:0,class:"flex flex-col gap-y-2"},lFi=["id","onClick"],uFi={key:1,class:"flex flex-col gap-y-2"},cFi={key:2,class:"h-10 flex justify-center items-center"};function dFi(e,t,n,r,o,a){const i=Tr("TessRenditionCard"),s=Tr("ArboSkeletonLoading");return W(),me("div",oFi,[r.permission.createRendition?(W(),me("div",aFi,[Me(r.UploadRenditionFiles,{ref:"uploadRef","rendition-id":void 0,type:"small",onHandleCreateNewRendition:r.handleCreateNewRendition},null,512)])):Ye("v-if",!0),$e("div",iFi,[n.statusFetching!==r.STATUS_FETCH.LOADING?(W(),me("div",sFi,[(W(!0),me(qt,null,bn(r.renditionIds,l=>(W(),me("div",{id:`rendition_${l}`,key:l,class:"rendition-item",onClick:()=>r.handleSelectKey(l)},[Me(i,{active:l===n.currentIdRendition,"rendition-data":r.renditionList[l],"is-deletable":r.permission.deleteRendition,"has-new-comment":!!r.renditionList[l].has_new_comment,"is-read-only":!1,tooltip:r.renditionList[l].name||"",disabled:!1,onCopy:r.handleCopyLink,onDelete:r.handleDeleteRendition,onOnClick:r.handleSelectKey},null,8,["active","rendition-data","is-deletable","has-new-comment","tooltip"])],8,lFi))),128))])):(W(),me("div",uFi,[(W(),me(qt,null,bn(5,l=>$e("div",{key:l},[Me(s,{width:"144px"})])),64))])),n.loadingMoreRendition?(W(),me("div",cFi,[...t[0]||(t[0]=[$e("div",{class:"loader"},null,-1)])])):Ye("v-if",!0)],512)])}const fFi=za(rFi,[["render",dFi],["__scopeId","data-v-fecfea63"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/RenditionList.vue"]]),hFi=yt({__name:"RenditionNodata",setup(e,{expose:t}){const{t:n}=Ux(),r=xp(),{sceneData:o}=ia(r),{getEnvVariable:a}=b1(),i=()=>{if(!o.value)return;const{entity_id:p,id:v}=o.value,g=a("BASE_REVIEW_URL"),w=rh({type:"review_scene",config:{reviewDomain:g,ws_code:dp(),scene_id:v,take_id:p}});window.open(w.url,"_blank")},s=oe(),l=()=>{var p;(p=s.value)==null||p.clearFile()},u=vK(),{hasOpenPermission:d}=ia(u),f=te(()=>d.value.review);t({clearFile:l});const m={t:n,sceneStore:r,sceneData:o,getEnvVariable:a,redirectToArboReview:i,uploadRef:s,clearFile:l,permissionStore:u,hasOpenPermission:d,canOpenRendition:f,EmptyData:Cle,UploadRenditionFiles:qet};return Object.defineProperty(m,"__isScriptSetup",{enumerable:!1,value:!0}),m}}),pFi={class:"rendition-no-data"},mFi={class:"flex justify-center items-center"},gFi={class:"upload"};function vFi(e,t,n,r,o,a){const i=Tr("ArboButton");return W(),me("div",pFi,[$e("div",{class:De(["rendition-no-data-container",{"no-open-in":!r.canOpenRendition}])},[r.canOpenRendition?(W(),st(i,{key:0,label:r.t("common.open_in_new_review"),class:"w-ful",style:{width:"100%"},type:"secondary",onClick:r.redirectToArboReview},null,8,["label"])):Ye("v-if",!0),$e("div",mFi,[Me(r.EmptyData,{type:"rendition",class:"max-w-[600px]"})]),$e("div",gFi,[Me(r.UploadRenditionFiles,{ref:"uploadRef",type:"default"},null,512)])],2)])}const yFi=za(hFi,[["render",vFi],["__scopeId","data-v-51d1de48"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/empty-data/RenditionNodata.vue"]]),bFi={},wFi={class:"flex-col h-full w-full"};function _Fi(e,t){return W(),me("div",wFi,[...t[0]||(t[0]=[d2('<div class="flex flex-row w-full px-4 gap-x-[16px] h-full" data-v-6fa8c2fc><div class="w-[197px] flex flex-col mr-4" data-v-6fa8c2fc><div class="h-[62px] frame white:bg-gray-700 w-[197px] mb-2" data-v-6fa8c2fc></div><div class="flex-1" data-v-6fa8c2fc><div class="h-[172px] frame white:bg-gray-700 w-[197px] mb-2" data-v-6fa8c2fc></div><div class="h-[172px] frame white:bg-gray-700 w-[197px] mb-2" data-v-6fa8c2fc></div><div class="h-[172px] frame white:bg-gray-700 w-[197px] mb-2" data-v-6fa8c2fc></div></div></div><div class="flex flex-col gap-4 flex-1" data-v-6fa8c2fc><div class="flex w-full flex-col gap-[2px]" data-v-6fa8c2fc><div class="h-[36px] frame white:bg-gray-700 w-full border-b" data-v-6fa8c2fc></div><div class="flex items-center justify-center w-full frame white:bg-gray-700 animate-pulse aspect-[16/9]" data-v-6fa8c2fc><svg class="w-20 h-24 text-gray-400 white:text-gray-600" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 18" data-v-6fa8c2fc><path d="M18 0H2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2Zm-5.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm4.376 10.481A1 1 0 0 1 16 15H4a1 1 0 0 1-.895-1.447l3.5-7A1 1 0 0 1 7.468 6a.965.965 0 0 1 .9.5l2.775 4.757 1.546-1.887a1 1 0 0 1 1.618.1l2.541 4a1 1 0 0 1 .028 1.011Z" data-v-6fa8c2fc></path></svg></div></div><div class="flex flex-col" data-v-6fa8c2fc><div class="h-[68px] frame white:bg-gray-700 w-full mb-2" data-v-6fa8c2fc></div><div class="flex flex-row justify-between items-center" data-v-6fa8c2fc><div class="h-5 frame white:bg-gray-700 w-44 mb-2 max-w-[50%]" data-v-6fa8c2fc></div><div class="h-8 frame white:bg-gray-700 w-[104px] mb-2" data-v-6fa8c2fc></div></div><div class="h-9 frame white:bg-gray-700 w-full mb-2" data-v-6fa8c2fc></div><div class="h-9 frame white:bg-gray-700 w-full mb-2" data-v-6fa8c2fc></div><div class="h-9 frame white:bg-gray-700 w-full mb-2" data-v-6fa8c2fc></div></div></div></div><span class="sr-only" data-v-6fa8c2fc>Loading...</span>',2)])])}const SFi=za(bFi,[["render",_Fi],["__scopeId","data-v-6fa8c2fc"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/empty-data/RenditionSkeletonLoading.vue"]]),EFi=yt({__name:"SceneRendition",emits:["loaded"],setup(e,{expose:t,emit:n}){const r=n,{getRenditions:o,upLoadFile:a,removeFile:i,updateFileRendition:s,updateInfoRendition:l,uploadNewFileInNewRendition:u,checkLengthAndTypeRendition:d,deleteRendition:f,getRenditionDetail:m}=hDe(),{getEnvVariable:p}=b1(),v=xp(),g=LL(),w=E1(),S=vK(),E=fDe(),{sceneData:x,currentIdRendition:y,currentSceneTabId:D}=ia(v),{renditionList:k,numberOfRendition:O}=ia(g),{commentRenditionId:R}=ia(w),{hasOpenPermission:I}=ia(S),{redirectConfig:$}=ia(E),P=oe(!1),U=oe(Qk.LOADING),F=oe(!1),L=oe(),j=oe(),B=oe(_N),G=oe(0),J=oe(),se=oe(0),ve=oe(!1),fe=oe(),K=oe(),N=oe(),Y=oe(""),de=te(()=>{if(I.value.review)return{label:"Open Review",icon:"PenRuler",tooltip:"Open current rendition in Review"}}),Ce=te(()=>{var pe;return((pe=k.value[y.value])==null?void 0:pe.attachments.map(Ue=>({...Ue})))??[]}),we=te(()=>{const q=Ce.value??[];let pe=[];return pe=q==null?void 0:q.map(Ue=>{var Pe,Se;const ct={type:(Ue==null?void 0:Ue.accept_type)||"",src:Ue==null?void 0:Ue.path,id:Ue==null?void 0:Ue.id,framePerSecond:24,poster:Ue==null?void 0:Ue.thumbnail,fileType:Ue.mimetype||""};if((Ue==null?void 0:Ue.accept_type)=="video"&&(ct.fileType=="video/quicktime"&&(ct.fileType=""),ct.poster=Ue.thumbnail,Ue!=null&&Ue.metadata)){const mt=((Se=(Pe=Ue.metadata)==null?void 0:Pe.avg_frame_rate)==null?void 0:Se.split("/"))??void 0;mt&&(ct.framePerSecond=Number((Number(mt[0])/Number(mt[1])).toFixed(2)))}return ct}),pe}),ee=te(()=>{var q;return((q=k.value[y.value])==null?void 0:q.name)??""}),Q=()=>{const q=L.value;if(!q||window.innerWidth>1560)return{};const pe=q.getBoundingClientRect();return{"max-height":(window.innerHeight-pe.top-pe.height-72).toFixed(0)+"px"}},Ae=q=>{q&&(y.value=q,k.value[q]&&(k.value[q].has_new_comment=0))},be=async(q,pe=!1)=>{var ct,Pe,Se,mt;const Ue=await o(q,pe?Ae:void 0);return Ue!=null&&Ue.success&&((Pe=(ct=Ue.data)==null?void 0:ct.data)!=null&&Pe.length?(se.value=+Ue.data.meta.total,U.value=Qk.SUCCESS):Object.keys(k.value).length||(U.value=Qk.NO_DATA),O.value=Number(((mt=(Se=Ue==null?void 0:Ue.data)==null?void 0:Se.meta)==null?void 0:mt.total)??0)),Ue},Ve=q=>{var pe;(pe=k.value[q])!=null&&pe.has_new_comment&&(k.value[q].has_new_comment=0),q!==y.value&&(y.value=q,R.value=q)},Oe=async q=>{try{if(F.value=!0,!await f(q))return;O.value--;const Ue=Object.keys(k.value),ct=Ue[0],Pe=Ue[Ue.length-1];Be(ct,Pe)}catch(pe){console.error("handleDeleteRendition",pe)}finally{F.value=!1}},Be=async(q,pe)=>{if(!q){U.value=Qk.NO_DATA;return}se.value--,pe&&(fe.value=pe),ke(!0)},ke=async q=>{var pe;q||(U.value=Qk.LOADING),k.value={},await be({page:_N,per_page:Lx}),(pe=J.value)==null||pe.reset()},rt=async(q=1)=>{var ct;ve.value=!0;const pe=await be({page:q,per_page:Lx,first_item_rendition_id:fe.value}),Ue=pe==null?void 0:pe.data;G.value=Number((ct=Ue==null?void 0:Ue.meta)==null?void 0:ct.last_page),ve.value=!1},Xe=q=>{var pe;return l({renditionId:y.value,renditionName:q,description:((pe=k.value[y.value])==null?void 0:pe.description)??""})},Ke=q=>l({renditionId:y.value,renditionName:ee.value,description:q}),et=async(q,pe)=>{const Ue=k.value[y.value],ct=JSON.parse(JSON.stringify(k.value[y.value])),Pe={renditionId:y.value,renditionName:Ue.name,description:Ue.description??""},Se=pe.replace(/^<p>|<\/p>$/g,"");if(q===tOt.description){if(!pe){_s().showMessage("Update failed.","error");return}Pe.renditionName=ee.value,Pe.description=Se}else q===tOt.renditionName&&(Pe.renditionName=Se);await l(Pe)==!0?k.value[y.value].description=Pe.description:k.value[y.value].description=String(ct.description)},xe=q=>{Xe(q)},Ne=async q=>{F.value=!0,await i(q,y.value),F.value=!1},dt=q=>{const pe=d(void 0,q);pe.length?u(pe):_s().showMessage("Please select the correct file format and the same file type","error")},qe=async q=>{const pe=q.target,Ue=d(y.value,pe.files);try{if(Ue.length){P.value=!0;const ct=await a(Ue),Pe=ct.map(({name:Se,mimetype:mt,accept_type:Ut,path:Dt,thumbnail:Bt,type:an,metadata:_t})=>({name:Se,type:an,mimetype:mt,accept_type:Ut,path:Dt,thumbnail:Bt,metadata:_t}));if(ct.length){const Se={data:Pe};await s(y.value,Se)}}}catch(ct){console.error(ct)}finally{P.value=!1}},ot=async q=>{const pe=d(void 0,q);pe.length?u(pe):_s().showMessage("Please select the correct file format and the same file type","error")},wt=()=>{var q,pe;U.value===Qk.NO_DATA?(q=N.value)==null||q.clearFile():(pe=J.value)==null||pe.clearFile()},bt=async(q,pe)=>{const Ue=pe||1;try{if(U.value==Qk.NO_DATA){let ct=!1;O.value==1&&(ct=!0),await be({page:Ue,per_page:Lx},ct)}else{const ct=await m(q);ct&&(k.value={[q]:ct,...k.value})}}catch(ct){console.error("handleUploadSuccessNewRendition",ct)}finally{U.value=Qk.SUCCESS}},kt=q=>{var Ue,ct,Pe;const pe=(Ue=we.value.find(Se=>Se.id==q))==null?void 0:Ue.src;(ct=K.value)!=null&&ct.selectPreviewItem&&pe&&((Pe=K.value)==null||Pe.selectPreviewItem(pe))},Ct=q=>{Y.value=q.state.id},cn=()=>{m(y.value)},_n=q=>{_s().showMessage(q==null?void 0:q.message,"error")},nn=q=>{const pe=ny(),Ue=rh({type:"hub_rendition",config:{baseDomain:p("BASE_URL"),rendition_id:q||"",scene_id:pe||"",ws_code:dp()}}).url;fmr(Ue)},un=()=>{var pe;const q=rh({type:"review_rendition",config:{ws_code:dp(),scene_id:ny(),rendition_id:y.value,reviewDomain:p("BASE_REVIEW_URL"),take_id:((pe=x.value)==null?void 0:pe.entity_id)||""}});window.open(q.url,"_blank")};vt([()=>y.value,()=>D.value],()=>{D.value=="rendition"&&(R.value=y.value)},{immediate:!0,deep:!0}),vt(()=>{var q;return(q=$.value)==null?void 0:q.renditionConfig},()=>{}),RBe(L,iy(()=>{j.value=Q()},17)),nu(async()=>{var Ue,ct,Pe;U.value=Qk.LOADING;const q=(Ue=$==null?void 0:$.value)==null?void 0:Ue.renditionConfig;q&&q.renditionId&&(B.value=Number(q==null?void 0:q.page)||_N);const pe=await be({page:B.value,per_page:Lx,first_item_rendition_id:fe.value});pe!=null&&pe.success&&(G.value=Number((Pe=(ct=pe.data)==null?void 0:ct.meta)==null?void 0:Pe.last_page),y.value=(q==null?void 0:q.renditionId)||Object.keys(k.value)[0],r("loaded"))}),Ql(()=>{R.value=void 0}),t({handleReloadPage:ke,addFiles:q=>{dt(q)}});const wn={emits:r,getRenditions:o,upLoadFile:a,removeFile:i,updateFileRendition:s,updateInfoRendition:l,uploadNewFileInNewRendition:u,checkLengthAndTypeRendition:d,deleteRendition:f,getRenditionDetail:m,getEnvVariable:p,sceneStore:v,renditionStore:g,commentStore:w,permissionStore:S,commentRedirect:E,sceneData:x,currentIdRendition:y,currentSceneTabId:D,renditionList:k,numberOfRendition:O,commentRenditionId:R,hasOpenPermission:I,redirectConfig:$,isLoading:P,statusFetching:U,isDeleting:F,renditionPlayerRef:L,calculatedHeight:j,initPage:B,totalRenditionPage:G,childComponentRef:J,totalRendition:se,loadingMoreRendition:ve,lastRenditionIdpPayload:fe,arboMediaPlayerRef:K,noDataRenditionRef:N,currentItemPlay:Y,openReviewBtnConfig:de,currentRenditionFile:Ce,renditionFiles:we,renditionName:ee,calculateHeight:Q,callBackSetIdActive:Ae,getListRendition:be,handleChangeRendition:Ve,handleDeleteRendition:Oe,deleteRenditionSuccess:Be,handleReloadPage:ke,handleLoadMoreRendition:rt,updateRenditionNameFnc:Xe,updateRenditionDescriptionFnc:Ke,handleChangeInfoRendition:et,handleChangeName:xe,handleRemoveFile:Ne,addFileToNewRendition:dt,addNewFileToSelectedRendition:qe,handleFileChange:ot,clearFile:wt,handleUploadSuccessNewRendition:bt,handleSelectRenditionFile:kt,handleChangeItemPlay:Ct,reloadRenditionItem:cn,handleVideoError:_n,handleCopyLink:nn,handleOpenInArboReview:un,get ArboMediaPlayer(){return rMe},ModalAddRendition:KLi,RenditionFiles:nFi,RenditionList:fFi,CategoryHeader:Yse,RenditionNodata:yFi,get STATUS_FETCH(){return Qk},RenderSkeletonLoading:SFi};return Object.defineProperty(wn,"__isScriptSetup",{enumerable:!1,value:!0}),wn}}),CFi={class:"bg-white w-full h-full rendition-main min-h-full min-w-[637px] max-h-full"},xFi={class:"flex flex-1 justify-end-end"},kFi={key:1,class:"flex gap-x-[16px] px-4 pb-4 flex-1 h-[calc(100%_-_36px)] max-h-[calc(100vh_-_240px)]"},TFi={key:0,class:"rendition-media"},OFi={ref:"renditionPlayerRef",class:"rendition-preview"};function DFi(e,t,n,r,o,a){var l,u;const i=Tr("TessNonInteractiveChip"),s=Tr("ArboTooltip");return W(),me(qt,null,[$e("div",CFi,[Me(r.CategoryHeader,{title:"Renditions",onRefresh:r.handleReloadPage},{default:je(()=>[$e("div",xFi,[Me(s,{delay:[300,0],"hide-on-click":!1,content:`${String(r.numberOfRendition)} renditions`},{default:je(()=>[Me(i,{"component-styles":{background:"#F3F5F8"},icon:"Clapperboard",label:String(r.numberOfRendition)},null,8,["label"])]),_:1},8,["content"])])]),_:1}),r.statusFetching===r.STATUS_FETCH.NO_DATA?(W(),st(r.RenditionNodata,{key:0,ref:"noDataRenditionRef"},null,512)):(W(),me(qt,{key:1},[r.statusFetching===r.STATUS_FETCH.LOADING?(W(),st(r.RenderSkeletonLoading,{key:0})):Ye("v-if",!0),r.statusFetching===r.STATUS_FETCH.SUCCESS?(W(),me("div",kFi,[Me(r.RenditionList,{ref:"childComponentRef","init-page":r.initPage,class:De(["rendition-list",`${r.statusFetching===r.STATUS_FETCH.SUCCESS?"opacity-100":"opacity-0"} `]),"total-rendition-page":r.totalRenditionPage,"rendition-list":r.renditionList,"status-fetching":r.statusFetching,"current-id-rendition":r.currentIdRendition,"loading-more-rendition":r.loadingMoreRendition,onLoadNewerRendition:r.handleLoadMoreRendition,onLoadOlderRendition:r.handleLoadMoreRendition,onHandleCreateNewRendition:r.handleFileChange,onSelectRendition:r.handleChangeRendition,onCopyLink:r.handleCopyLink,onDeleteRendition:r.handleDeleteRendition},null,8,["init-page","total-rendition-page","class","rendition-list","status-fetching","current-id-rendition","loading-more-rendition"]),r.statusFetching===r.STATUS_FETCH.SUCCESS?(W(),me("div",TFi,[$e("div",OFi,[Me(r.ArboMediaPlayer,on({ref:"arboMediaPlayerRef",style:{"--media-player--width":"100%"},name:r.renditionName||"","list-items":r.renditionFiles},{openIn:r.openReviewBtnConfig},{onChangeName:r.handleChangeName,onOpenInArboReview:r.handleOpenInArboReview,onOnErrorVideo:r.reloadRenditionItem,onChange:r.handleChangeItemPlay,onOnError:r.handleVideoError}),null,16,["name","list-items"])],512),Me(r.RenditionFiles,{style:dn({...r.calculatedHeight}),description:((u=(l=r.renditionList)==null?void 0:l[r.currentIdRendition])==null?void 0:u.description)||"","is-loading":r.isLoading,"rendition-files":r.currentRenditionFile,"active-item":r.currentItemPlay,"current-id-rendition":r.currentIdRendition,"update-rendition-description-fnc":r.updateRenditionDescriptionFnc,"onUpdate:currentIdRendition":r.handleChangeRendition,onUpdateDescription:r.handleChangeInfoRendition,onAddNewFileToSelectedRendition:r.addNewFileToSelectedRendition,onHandleRemoveFile:r.handleRemoveFile,onSelectRenditionFile:r.handleSelectRenditionFile},null,8,["style","description","is-loading","rendition-files","active-item","current-id-rendition"])])):Ye("v-if",!0)])):Ye("v-if",!0)],64))]),(W(),st(DS,{to:"body"},[Me(r.ModalAddRendition,{onUploadSuccess:r.handleUploadSuccessNewRendition,onClose:r.clearFile})]))],64)}const AFi=za(EFi,[["render",DFi],["__scopeId","data-v-3734fddd"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/SceneRendition.vue"]]),$Fi=yt({__name:"SceneRenditions",emits:["loaded"],setup(e,{expose:t,emit:n}){const r=oe(),o=()=>{var m;(m=r.value)==null||m.handleReloadPage()};t({addFiles:(m,p)=>{var v;(v=r.value)==null||v.addFiles(m,p)}});const a=E1(),{currentCommentTab:i}=ia(a),s=LL(),{numberOfRendition:l}=ia(s);_ye(()=>{l.value===0&&(i.value=cu.Scene)});const u=n,f={renditionView:r,handleReload:o,commentStore:a,currentCommentTab:i,renditionStore:s,numberOfRendition:l,emits:u,handleLoaded:()=>{u("loaded")},RenditionSelect:AFi,NetworkWrapper:dDe};return Object.defineProperty(f,"__isScriptSetup",{enumerable:!1,value:!0}),f}});function IFi(e,t,n,r,o,a){return W(),st(r.NetworkWrapper,{type:"rendition","handle-reload":r.handleReload,"auto-reload":!0},{view:je(()=>[Me(r.RenditionSelect,{ref:"renditionView",onLoaded:r.handleLoaded},null,512)]),_:1})}const RFi=za($Fi,[["render",IFi],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/SceneRenditions.vue"]]),PFi={},NFi={class:"comment-skeleton-editor"};function MFi(e,t){return W(),me("div",NFi,[Ye(" Top Toolbar "),t[0]||(t[0]=d2('<div class="toolbar" data-v-fa8089b1><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div></div>',1)),Ye(" Main Content Area "),Ye(" Right Side Scrollbar "),Ye(" Bottom Right Send Button "),t[1]||(t[1]=$e("div",{class:"send-btn skeleton-animation"},null,-1))])}const LFi=za(PFi,[["render",MFi],["__scopeId","data-v-fa8089b1"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/comments/EditorSkeleton.vue"]]),FFi=yt({__name:"BodySkeleton",setup(e,{expose:t}){t();const n={CommentSkeleton:k0n,EditorSkeleton:LFi};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),BFi={"body-skeleton":"_body-skeleton_r0ior_1","menu-section":"_menu-section_r0ior_13","main-content-section":"_main-content-section_r0ior_21","main-content":"_main-content_r0ior_21",row:"_row_r0ior_39","comment-section":"_comment-section_r0ior_44","comment-section-skeleton":"_comment-section-skeleton_r0ior_51"},VFi={class:"flex flex-col align-bottom justify-end",style:{gap:"8px"}};function UFi(e,t,n,r,o,a){return W(),me("div",{class:De(e.$style["body-skeleton"])},[$e("div",{class:De(e.$style["menu-section"])},[ft(e.$slots,"menu",{},()=>[t[0]||(t[0]=d2('<div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div>',6))])],2),ft(e.$slots,"content",{},()=>[$e("div",{class:De(e.$style["main-content-section"])},[$e("div",{class:De(["white-bg flex flex-col",e.$style["main-content"]])},[...t[1]||(t[1]=[d2('<div class="flex-row justify-between"><div class="btn long-btn small-btn skeleton-animation"></div><div class="btn icon-btn small-btn skeleton-animation"></div></div><div class="grid-card-row"><div class="card skeleton-animation rounded-[0]"></div><div class="card skeleton-animation rounded-[0]"></div><div class="card skeleton-animation rounded-[0]"></div><div class="card skeleton-animation rounded-[0]"></div></div><div class="flex-row flex-1 h-full justify-end align-bottom"><div class="card card-long skeleton-animation rounded-[0]"></div></div>',3)])],2)],2)]),$e("div",{class:De(e.$style["comment-section"])},[ft(e.$slots,"comments",{},()=>[$e("div",{class:De(e.$style["comment-section-skeleton"])},[t[3]||(t[3]=$e("div",{class:"skeleton-animation"},null,-1)),t[4]||(t[4]=$e("div",{class:"flex-row justify-between"},[$e("div",{class:"skeleton-animation"}),$e("div",{class:"btn icon-btn skeleton-animation"})],-1)),$e("div",VFi,[Me(r.CommentSkeleton),Me(r.CommentSkeleton),t[2]||(t[2]=$e("div",{class:"btn small-btn skeleton-animation"},null,-1))]),Me(r.EditorSkeleton)],2)])],2)],2)}const jFi=za(FFi,[["render",UFi],["__cssModules",{$style:BFi}],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/layouts/BodySkeleton.vue"]]),lJ="home",HFi=yt({__name:"SceneTab",props:{loading:{type:Boolean,required:!0}},setup(e,{expose:t}){t();const n={ADD_RENDITION:"addRendition",MANAGE_RENDITION:"manageRendition",VIEW_ALL_ACTIVITIES:"viewAllActivities"},r=xp(),{getSceneData:o}=r,{currentSceneTabId:a}=ia(r),i=oe(!1),s=oe(!1),l=oe(),u=oe(),{permission:d}=sC(),f={info:Uga,metric:w8a,rendition:RFi,log:k_a,home:yga},m=Kb(),{dashboardActionQueue:p}=ia(m),v=E1(),g=CU(),{connectState:w,isConnect:S}=ia(g),{commentRenditionId:E,isCommentHeaderReady:x}=ia(v),y=async B=>{a.value=B,w.value.logs=S.value,w.value.rendition=S.value,w.value.metric=S.value},D=B=>{a.value=B},k=(B,G)=>{l.value.addFiles(B,G)},O=te(()=>!!(a.value==="rendition"&&d.value.createRendition)),R=(B,G)=>{var J;s.value=!1,(J=u.value)!=null&&J.addFiles&&u.value.addFiles(B,G)},I=()=>{s.value=!1},$=()=>{s.value=!0},P=()=>{s.value=!1,D("rendition")};vt(a,(B,G)=>{B=="info"&&G!="info"&&o()}),vt(a,B=>{if(B)try{const G=new URLSearchParams(window.location.search),J=Object.fromEntries(G.entries()),se=new URL(window.location.href);B&&B!==lJ?se.searchParams.set("tab",B):se.searchParams.delete("tab"),i.value&&B!=="rendition"&&(J.renditionId||J.renditionPage)?(se.searchParams.delete("renditionId"),se.searchParams.delete("renditionPage")):E.value="",window.history.replaceState({},"",se.toString())}catch(G){console.error("Error updating URL parameters:",G)}}),vt(p,B=>{if(B){switch(B){case n.ADD_RENDITION:s.value=!0;break;case n.MANAGE_RENDITION:D("rendition");break;case n.VIEW_ALL_ACTIVITIES:D("log");break;default:console.warn("Unknown dashboard action:",B)}p.value=void 0}},{deep:!0});const U={HOME:{id:"home",tooltipName:"Home",icon:"House",disable:!1},RENDITION:{id:"rendition",tooltipName:"Renditions",icon:"Clapperboard"},METRIC:{id:"metric",tooltipName:"Metrics",icon:"SquareRootVariable"},INFO:{id:"info",tooltipName:"Information",icon:"Info",disable:!1},LOG:{id:"log",tooltipName:"Activity log",icon:"Book"}};nu(()=>{try{const B=new URLSearchParams(window.location.search),G=Object.fromEntries(B.entries());if(a.value||(a.value=lJ),G.tab&&G.tab!==lJ)if(Object.values(U).map(se=>se.id).includes(G.tab)){const se=G.tab;D(se)}else console.warn("Invalid tab parameter in URL:",G.tab),a.value=lJ}catch(B){console.error("Error initializing tab from URL:",B),a.value=lJ}finally{i.value=!0}});const F=e,L={tabs:Object.values(U).map(B=>({...B,name:""})),keyLabel:"name",keyTooltip:"tooltipName",keyIcon:"icon",keyContent:"content",keyValue:"id",keyDisable:"disable",position:"left",value:""},j={DASHBOARD_ACTIONS:n,DEFAULT_TAB:lJ,sceneStore:r,getSceneData:o,currentSceneTabId:a,isMounted:i,isOpenNewRendition:s,commentRef:l,mainRef:u,permission:d,components:f,dashboardStore:m,dashboardActionQueue:p,commentStore:v,connectionStore:g,connectState:w,isConnect:S,commentRenditionId:E,isCommentHeaderReady:x,handleChangeTab:y,clickOnTab:D,handleAddFileComment:k,canDropRenditionFile:O,handleAddFileMain:R,handleCloseModal:I,handleCreateNewRendition:$,handleUploadFileRendition:P,TAB_CONFIG:U,props:F,tabProps:L,DropArea:rua,Comments:Cya,AddNewRenditionModal:Mya,get FILE_FORMAT(){return cbe},BodySkeleton:jFi};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),zFi={key:0,class:"add-rendition-button"},WFi={class:"main-content-area"};function qFi(e,t,n,r,o,a){const i=Tr("arbo-icon"),s=Tr("ArboTabs"),l=Tr("ArboButton");return W(),me(qt,null,[Me(r.BodySkeleton,null,bs({_:2},[n.loading?void 0:{name:"menu",fn:je(()=>[Me(s,on({...r.tabProps},{value:r.currentSceneTabId,onInput:r.handleChangeTab,class:"arbo-scene-body__tabs"}),{tab:je(({tab:u})=>[Me(i,{name:u.icon,size:"20px"},null,8,["name"])]),_:1},16,["value"]),r.permission.createRendition?(W(),me("div",zFi,[Me(l,on({suffixIcon:"RenditionPlus",label:"",type:"primary",class:"actions-item",color:"white"},{"suffix-tooltip":"Create rendition",onClick:r.handleCreateNewRendition}),null,16)])):Ye("v-if",!0)]),key:"0"},n.loading?void 0:{name:"content",fn:je(()=>[(W(),st(r.DropArea,{"file-type":["image/jpeg","image/png","video/mp4","video/quicktime","image/jpg"],"can-drop":r.canDropRenditionFile,"size-limit":5e7,key:r.currentSceneTabId,"allow-mixed-file-type":!1,"is-rendition-file":!0,"error-message":{SIZE:"File exceeds 50MB.",TYPE:"File format not supported.",DIFF:"Mixed file formats are not supported."},onAddFile:r.handleAddFileMain},{icon:je(()=>[Me(i,{name:"Upload",size:"84px",class:"icon"})]),text:je(()=>[...t[1]||(t[1]=[Zt("Drop review file here to create a new rendition.",-1)])]),main:je(()=>[$e("div",WFi,[r.currentSceneTabId!=null?(W(),st(lrr,{key:0},[(W(),st(Bd(r.components[r.currentSceneTabId]),{ref:"mainRef",onLoaded:t[0]||(t[0]=u=>r.isCommentHeaderReady=!0)},null,544))],1024)):Ye("v-if",!0)])]),_:1},8,["can-drop"]))]),key:"1"},n.loading?void 0:{name:"comments",fn:je(()=>[Me(r.DropArea,{"file-type":r.FILE_FORMAT,"can-drop":!!r.permission.createComment,"size-limit":5e6,"allow-mixed-file-type":!0,"is-rendition-file":!1,"error-message":{SIZE:"File exceeds 5MB.",TYPE:"File format not supported.",DIFF:"Mixed file formats are not supported."},onAddFile:r.handleAddFileComment},{icon:je(()=>[Me(i,{name:"Comments",size:"84px",class:"icon"})]),text:je(()=>[...t[2]||(t[2]=[Zt("Drop file here to attach to comment.",-1)])]),main:je(()=>[r.isCommentHeaderReady?(W(),st(r.Comments,{key:0,ref:"commentRef"},null,512)):Ye("v-if",!0)]),_:1},8,["file-type","can-drop"])]),key:"2"}]),1024),(W(),st(DS,{to:"body"},[Me(r.AddNewRenditionModal,on({opened:r.isOpenNewRendition},{onClose:r.handleCloseModal,onUpload:r.handleUploadFileRendition}),null,16)]))],64)}const KFi=za(HFi,[["render",qFi],["__scopeId","data-v-3900bb7c"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-tab/SceneTab.vue"]]),GFi=yt({__name:"ShareSnackBar",setup(e,{expose:t}){t();const n=_s(),{notifications:r}=ia(n),o=te(()=>[...r.value]),a=p=>p.trim().startsWith("<svg"),i=oe("Copy"),s=()=>{setTimeout(()=>{i.value="Copy"},3e3)},l=p=>{navigator.clipboard.writeText(p).then(()=>{i.value="Copied",s()},()=>{i.value="Copy failed",s()})},u=oe(new Set),m={notificationStore:n,notifications:r,showNotifications:o,isSvgString:a,tooltip:i,resetTooltip:s,handleCopyError:l,hoveredNotifications:u,onMouseEnter:p=>{var v;u.value.add(p),(v=n.pauseAutoDismiss)==null||v.call(n,p)},onMouseLeave:p=>{var v;u.value.delete(p),(v=n.resumeAutoDismiss)==null||v.call(n,p)},get Button(){return Gr},get Icon(){return zs}};return Object.defineProperty(m,"__isScriptSetup",{enumerable:!1,value:!0}),m}}),YFi={"notification-wrapper":"_notification-wrapper_1rhyb_1","notification-item":"_notification-item_1rhyb_15","notification--success":"_notification--success_1rhyb_30","notification--error":"_notification--error_1rhyb_36","close-btn":"_close-btn_1rhyb_42","notification--info":"_notification--info_1rhyb_45","notification--warning":"_notification--warning_1rhyb_52","notification--interactive":"_notification--interactive_1rhyb_59","snackbar-type":"_snackbar-type_1rhyb_67",snackbar__message:"_snackbar__message_1rhyb_76",message:"_message_1rhyb_89","error-message":"_error-message_1rhyb_97",snackbar__icon:"_snackbar__icon_1rhyb_103","actions-notification":"_actions-notification_1rhyb_112","icon-draw":"_icon-draw_1rhyb_120","copy-btn":"_copy-btn_1rhyb_128","arbo__icon-btn":"_arbo__icon-btn_1rhyb_137"},ZFi=["onMouseenter","onMouseleave"],XFi=["innerHTML"],JFi=["innerHTML"];function QFi(e,t,n,r,o,a){const i=Ri("contrast");return W(),st(T3e,{name:"list",tag:"div",class:De(["notification-center",e.$style["notification-wrapper"]])},{default:je(()=>[(W(!0),me(qt,null,bn(r.showNotifications,s=>{var l;return Tt((W(),me("div",{key:s.id,class:De([e.$style["notification-item"],e.$style[`notification--${s.type||"info"}`],!(s!=null&&s.actions)||((l=s==null?void 0:s.actions)==null?void 0:l.length)==0?e.$style["snackbar-type"]:""]),onMouseenter:u=>r.onMouseEnter(s.id),onMouseleave:u=>r.onMouseLeave(s.id)},[$e("p",{class:De(e.$style.snackbar__message)},[$e("span",{class:De(e.$style.snackbar__icon)},[!s.icon&&s.type=="success"?(W(),st(r.Icon,{key:0,name:"CircleCheck"})):Ye("v-if",!0),!s.icon&&s.type=="interactive"?(W(),st(r.Icon,{key:1,name:"CircleCheck"})):!s.icon&&s.type=="error"?(W(),st(r.Icon,{key:2,name:"CircleXMark"})):!s.icon&&s.type=="info"?(W(),st(r.Icon,{key:3,name:"Info"})):s.icon&&r.isSvgString(s.icon)?(W(),me("i",{key:4,class:De(e.$style["icon-draw"]),innerHTML:s.icon},null,10,XFi)):s.icon&&!r.isSvgString(s.icon)?(W(),st(r.Icon,{key:5,src:s.icon,color:"var(--primary-color)"},null,8,["src"])):Ye("v-if",!0)],2),$e("span",{class:De(e.$style["error-message"])},[$e("span",{class:De(e.$style.message),innerHTML:s.message},null,10,JFi)],2)],2),s.type!=="interactive"?(W(),st(r.Button,{key:0,type:"secondary",class:De([e.$style["copy-btn"],"copy-snackbar-btn"]),"prefix-icon":"Copy","prefix-tooltip":r.tooltip,label:"",size:"24",style:{minWidth:"24px",width:"24px",height:"24px",padding:"0"},onClick:u=>r.handleCopyError(s.message)},null,8,["class","prefix-tooltip","onClick"])):Ye("v-if",!0)],42,ZFi)),[[i]])}),128))]),_:1},8,["class"])}const e3i=za(GFi,[["render",QFi],["__cssModules",{$style:YFi}],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/snackbar/ShareSnackBar.vue"]]);var d7n=(e=>(e.LOADING="LOADING",e.LOADED="LOADED",e.ERROR="ERROR",e))(d7n||{});const f7n=3,t3i=yt({__name:"PreviewMediaModal",props:{show:{type:Boolean,required:!0}},emits:["close"],setup(e,{expose:t,emit:n}){t();const r=e,o=n,a=oe(null),i=oe("LOADING"),s=oe(null),l=oe(null),u=oe(0),d=te(()=>a.value!==null),f=te(()=>{var $;return(($=a.value)==null?void 0:$.name)??""}),m=te(()=>{var $,P,U,F;return{type:w(($=a.value)==null?void 0:$.type),src:((P=a.value)==null?void 0:P.url)??"",poster:((U=a.value)==null?void 0:U.thumbnail)??"",framePerSecond:24,fileType:((F=a.value)==null?void 0:F.fileType)||""}}),p=()=>{a.value=null,i.value="LOADING",s.value=null,u.value=0,o("close")},v=async($,P)=>{if(console.log("downloadFile",{name:$,url:P}),!$||!P){_s().showMessage("Invalid file information for download","error");return}try{const U=await fetch(P);if(!U.ok)throw new Error(`Network response was not ok: ${U.status} ${U.statusText}`);const F=await U.blob(),L=URL.createObjectURL(F),j=document.createElement("a");j.href=L,j.setAttribute("download",$),document.body.appendChild(j),j.click(),document.body.removeChild(j),URL.revokeObjectURL(L),_s().showMessage("Download started","success")}catch(U){ro(U,"downloadFile");const F=U instanceof TypeError?"Failed to download file (possible CORS restriction)":"Failed to download file";_s().showMessage(F,"error")}},g=$=>{if(!$||typeof $!="string")return!1;const P=$.toLowerCase();return P.includes("/")?P.startsWith("video/")||P.startsWith("image/")||P==="application/pdf":cbe.includes(P)},w=$=>{const P=($||"").toLowerCase();return P.includes("image")?"image":P.includes("pdf")?"pdf":"video"},S=()=>{try{if(typeof window>"u"||typeof BroadcastChannel>"u")return;const $=document.querySelector("main[id]"),P=$==null?void 0:$.getAttribute("id");if(!P)return;l.value=new BroadcastChannel(`file-upload-channel-${P}`),l.value.onmessage=async U=>{try{await k(U.data)}catch(F){ro(F,"onmessage")}},l.value.onmessageerror=U=>{ro(U,"BroadcastChannel message error"),s.value="Failed to receive message from communication channel",i.value="ERROR"}}catch($){ro($,"setupBroadcastChannel"),s.value="Failed to setup communication channel",i.value="ERROR"}},{getCommentFile:E}=pbe(),{downloadFileFromS3:x}=Kse(),y=ny(),D=async({path:$})=>{if(!$)return{message:"",url:""};try{const P=dp(),U=await x({id:P,path:$});if(U)return{url:U.url,message:U.message}}catch(P){ro(P,"fetchResourceUrl")}return{url:"",message:""}},k=async $=>{var P,U,F,L,j;try{if(!g($.mimeType)){console.log("File type not previewable, triggering download",$),v($.name,((P=$.data)==null?void 0:P.url)||$.url);return}if(i.value="LOADING",s.value=null,$.commenttype==="temporary"){const B=`${y}_${$.path}`,G=await E(B);if(!G){s.value="File not found",i.value="ERROR";return}const[J,se]=await Promise.all([G.thumbnail?D({path:G.thumbnail}).then(ve=>ve.url):"",G.url||G.path?D({path:G.url||G.path}).then(ve=>ve.url):""]);a.value={name:$.name||G.mimetype,url:se,type:G.mimetype,thumbnail:J,fileType:G.mimetype},i.value="LOADED"}else a.value={name:$.name,url:((U=$.data)==null?void 0:U.url)||$.url,type:((F=$.data)==null?void 0:F.mimetype)||$.mimeType,thumbnail:(L=$.data)==null?void 0:L.thumbnail,fileType:((j=$.data)==null?void 0:j.mimetype)||$.mimeType},i.value="LOADED"}catch(B){ro(B,"handleBroadcastMessage"),s.value="Failed to process file data",i.value="ERROR"}},O=()=>{if(u.value>=f7n){_s().showMessage("Maximum retry attempts reached","error");return}u.value++,i.value="LOADING",s.value=null,R(),S()},R=()=>{if(l.value){try{l.value.close()}catch($){ro($,"cleanupBroadcastChannel")}l.value=null}};mn(S),Ql(R),vt(d,$=>{$||(a.value=null,i.value="LOADING",s.value=null,u.value=0)}),vt(()=>r.show,$=>{$||p()});const I={LoadingState:d7n,props:r,emit:o,previewDetails:a,loading:i,errorDetails:s,broadcastChannel:l,retryCount:u,maxRetries:f7n,opened:d,fileName:f,resourceURL:m,handleCloseModal:p,downloadFile:v,isPreviewable:g,convertType:w,setupBroadcastChannel:S,getCommentFile:E,downloadFileFromS3:x,scene_id:y,fetchResourceUrl:D,handleBroadcastMessage:k,retryLoad:O,cleanupBroadcastChannel:R,get ArboMediaPlayer(){return rMe},get ArboModal(){return cQe}};return Object.defineProperty(I,"__isScriptSetup",{enumerable:!1,value:!0}),I}}),n3i={class:"flex flex-row items-center justify-center w-full"},r3i={class:"flex-1 font"},o3i={key:0,class:"h-[368px] w-[592px]"},a3i={class:"h-[368px] w-[592px] bg-black text-white p-4 flex items-center justify-center text-lg"},i3i={class:"text-center"},s3i={class:"preview-media-player"};function l3i(e,t,n,r,o,a){const i=Tr("ArboButton");return W(),st(r.ArboModal,on({show:r.opened,icon:"",class:"arbo-preview-media-modal",style:{"border-radius":"6px",overflow:"hidden"}},{width:"1000",showFooter:!1}),{header:je(()=>[$e("div",n3i,[$e("div",r3i,Et(r.fileName),1),Me(i,on({suffixIcon:"Xmark",label:"",type:"tertiary"},{class:"absolute top-[-15px] right-[-30px] font-black","aria-label":"Close",onClick:r.handleCloseModal}),null,16)])]),default:je(()=>[r.loading===r.LoadingState.LOADING?(W(),me("div",o3i,[...t[0]||(t[0]=[$e("div",{class:"skeleton animate-pulse bg-gray-200 rounded-sm white:bg-gray-700"},null,-1)])])):r.loading===r.LoadingState.ERROR?(W(),me(qt,{key:1},[Ye(" Error State "),$e("div",a3i,[$e("div",i3i,[t[1]||(t[1]=$e("p",{class:"mb-2"},"The media could not be loaded",-1)),t[2]||(t[2]=$e("p",{class:"text-sm opacity-75"}," Either the server or network failed, or the format is not supported. ",-1)),r.errorDetails?(W(),st(i,{key:0,type:"secondary",label:"Retry",class:"mt-4",onClick:r.retryLoad})):Ye("v-if",!0)])])],2112)):r.loading===r.LoadingState.LOADED?(W(),me(qt,{key:2},[Ye(" Loaded State "),$e("div",s3i,[Me(r.ArboMediaPlayer,Ti(Ks({listItems:[r.resourceURL],isReviewFile:!1,name:"",type:r.resourceURL.type})),null,16)])],2112)):Ye("v-if",!0)]),_:1},16,["show"])}const u3i=za(t3i,[["render",l3i],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/modal/PreviewMediaModal.vue"]]),c3i=yt({__name:"NoAccess",setup(e,{expose:t}){t();const{t:n}=Ux(),{getEnvVariable:r}=b1(),a={t:n,getEnvVariable:r,handleGoBack:()=>{window.location.href=r("BASE_URL")||""}};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}}),d3i={class:"w-full h-full arbo-no-access"},f3i={class:"context"};function h3i(e,t,n,r,o,a){const i=Tr("arbo-icon"),s=Tr("ArboButton");return W(),me("div",d3i,[Me(i,{name:"NoAccess1",type:"visual",class:"no-access-bg"}),$e("div",f3i,[$e("p",null,Et(r.t("no_access")),1),Me(s,{label:r.t("common.go_back"),type:"secondary",class:"go-back-button",onClick:r.handleGoBack},null,8,["label"])])])}const p3i=za(c3i,[["render",h3i],["__scopeId","data-v-b74b3eec"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/no-access/NoAccess.vue"]]),m3i=yt({__name:"MainLayout",props:{loading:{type:Boolean,required:!0,default:!1},hasAccess:{type:Boolean,required:!0,default:!0}},setup(e,{expose:t}){t();const n=e,r=te(()=>`main-layout-${Date.now()}-${Math.random().toString(36).substr(2,9)}`),o=xp(),{sceneData:a}=ia(o),i=te(()=>{var u;return((u=a.value)==null?void 0:u.property.is_locked)===1}),s=te(()=>({"scene-main":!0,"denied-access":!n.hasAccess,locked:i.value})),l={props:n,elementId:r,sceneStore:o,sceneData:a,isLocked:i,mainClasses:s,PreviewMediaModal:u3i,NoAccess:p3i};return Object.defineProperty(l,"__isScriptSetup",{enumerable:!1,value:!0}),l}}),g3i=["id","aria-busy","aria-label"],v3i={key:0,class:"no-access-container",role:"alert","aria-live":"assertive"};function y3i(e,t,n,r,o,a){return W(),me(qt,null,[$e("main",{id:r.elementId,class:De(r.mainClasses),role:"main","aria-busy":n.loading,"aria-label":n.loading?"Loading application content":"Application content"},[Ye(" Main Content "),n.hasAccess?(W(),me(qt,{key:0},[ft(e.$slots,"header",{},void 0,!0),ft(e.$slots,"body",{},void 0,!0),Ye(` <footer class="screen-footer" role="contentinfo">
1566
+ */function Uqn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function F$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uqn(Object(n),!0).forEach(function(r){LMi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uqn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oMe(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?oMe=function(t){return typeof t}:oMe=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oMe(e)}function LMi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fP(){return fP=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fP.apply(this,arguments)}function FMi(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function BMi(e,t){if(e==null)return{};var n=FMi(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var VMi="1.14.0";function hP(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var pP=hP(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),jhe=hP(/Edge/i),jqn=hP(/firefox/i),Hhe=hP(/safari/i)&&!hP(/chrome/i)&&!hP(/android/i),Hqn=hP(/iP(ad|od|hone)/i),UMi=hP(/chrome/i)&&hP(/android/i),zqn={capture:!1,passive:!1};function yc(e,t,n){e.addEventListener(t,n,!pP&&zqn)}function Fu(e,t,n){e.removeEventListener(t,n,!pP&&zqn)}function aMe(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function jMi(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function B$(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&aMe(e,t):aMe(e,t))||r&&e===n)return e;if(e===n)break}while(e=jMi(e))}return null}var Wqn=/\s+/g;function sS(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(Wqn," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(Wqn," ")}}function hs(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function nJ(e,t){var n="";if(typeof e=="string")n=e;else do{var r=hs(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function qqn(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,a=r.length;if(n)for(;o<a;o++)n(r[o],o);return r}return[]}function V$(){var e=document.scrollingElement;return e||document.documentElement}function mg(e,t,n,r,o){if(!(!e.getBoundingClientRect&&e!==window)){var a,i,s,l,u,d,f;if(e!==window&&e.parentNode&&e!==V$()?(a=e.getBoundingClientRect(),i=a.top,s=a.left,l=a.bottom,u=a.right,d=a.height,f=a.width):(i=0,s=0,l=window.innerHeight,u=window.innerWidth,d=window.innerHeight,f=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!pP))do if(o&&o.getBoundingClientRect&&(hs(o,"transform")!=="none"||n&&hs(o,"position")!=="static")){var m=o.getBoundingClientRect();i-=m.top+parseInt(hs(o,"border-top-width")),s-=m.left+parseInt(hs(o,"border-left-width")),l=i+a.height,u=s+a.width;break}while(o=o.parentNode);if(r&&e!==window){var p=nJ(o||e),v=p&&p.a,g=p&&p.d;p&&(i/=g,s/=v,f/=v,d/=g,l=i+d,u=s+f)}return{top:i,left:s,bottom:l,right:u,width:f,height:d}}}function Kqn(e,t,n){for(var r=y3(e,!0),o=mg(e)[t];r;){var a=mg(r)[n],i=void 0;if(i=o>=a,!i)return r;if(r===V$())break;r=y3(r,!1)}return!1}function rJ(e,t,n,r){for(var o=0,a=0,i=e.children;a<i.length;){if(i[a].style.display!=="none"&&i[a]!==ps.ghost&&(r||i[a]!==ps.dragged)&&B$(i[a],n.draggable,e,!1)){if(o===t)return i[a];o++}a++}return null}function Mmt(e,t){for(var n=e.lastElementChild;n&&(n===ps.ghost||hs(n,"display")==="none"||t&&!aMe(n,t));)n=n.previousElementSibling;return n||null}function fx(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==ps.clone&&(!t||aMe(e,t))&&n++;return n}function Gqn(e){var t=0,n=0,r=V$();if(e)do{var o=nJ(e),a=o.a,i=o.d;t+=e.scrollLeft*a,n+=e.scrollTop*i}while(e!==r&&(e=e.parentNode));return[t,n]}function HMi(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n)}return-1}function y3(e,t){if(!e||!e.getBoundingClientRect)return V$();var n=e,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=hs(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return V$();if(r||t)return n;r=!0}}while(n=n.parentNode);return V$()}function zMi(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Lmt(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var zhe;function Yqn(e,t){return function(){if(!zhe){var n=arguments,r=this;n.length===1?e.call(r,n[0]):e.apply(r,n),zhe=setTimeout(function(){zhe=void 0},t)}}}function WMi(){clearTimeout(zhe),zhe=void 0}function Zqn(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Xqn(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var lS="Sortable"+new Date().getTime();function qMi(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(o){if(!(hs(o,"display")==="none"||o===ps.ghost)){e.push({target:o,rect:mg(o)});var a=F$({},e[e.length-1].rect);if(o.thisAnimationDuration){var i=nJ(o,!0);i&&(a.top-=i.f,a.left-=i.e)}o.fromRect=a}})}},addAnimationState:function(r){e.push(r)},removeAnimationState:function(r){e.splice(HMi(e,{target:r}),1)},animateAll:function(r){var o=this;if(!this.options.animation){clearTimeout(t),typeof r=="function"&&r();return}var a=!1,i=0;e.forEach(function(s){var l=0,u=s.target,d=u.fromRect,f=mg(u),m=u.prevFromRect,p=u.prevToRect,v=s.rect,g=nJ(u,!0);g&&(f.top-=g.f,f.left-=g.e),u.toRect=f,u.thisAnimationDuration&&Lmt(m,f)&&!Lmt(d,f)&&(v.top-f.top)/(v.left-f.left)===(d.top-f.top)/(d.left-f.left)&&(l=GMi(v,m,p,o.options)),Lmt(f,d)||(u.prevFromRect=d,u.prevToRect=f,l||(l=o.options.animation),o.animate(u,v,f,l)),l&&(a=!0,i=Math.max(i,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(t),a?t=setTimeout(function(){typeof r=="function"&&r()},i):typeof r=="function"&&r(),e=[]},animate:function(r,o,a,i){if(i){hs(r,"transition",""),hs(r,"transform","");var s=nJ(this.el),l=s&&s.a,u=s&&s.d,d=(o.left-a.left)/(l||1),f=(o.top-a.top)/(u||1);r.animatingX=!!d,r.animatingY=!!f,hs(r,"transform","translate3d("+d+"px,"+f+"px,0)"),this.forRepaintDummy=KMi(r),hs(r,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),hs(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){hs(r,"transition",""),hs(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},i)}}}}function KMi(e){return e.offsetWidth}function GMi(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}var oJ=[],Fmt={initializeByDefault:!0},Whe={mount:function(t){for(var n in Fmt)Fmt.hasOwnProperty(n)&&!(n in t)&&(t[n]=Fmt[n]);oJ.forEach(function(r){if(r.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),oJ.push(t)},pluginEvent:function(t,n,r){var o=this;this.eventCanceled=!1,r.cancel=function(){o.eventCanceled=!0};var a=t+"Global";oJ.forEach(function(i){n[i.pluginName]&&(n[i.pluginName][a]&&n[i.pluginName][a](F$({sortable:n},r)),n.options[i.pluginName]&&n[i.pluginName][t]&&n[i.pluginName][t](F$({sortable:n},r)))})},initializePlugins:function(t,n,r,o){oJ.forEach(function(s){var l=s.pluginName;if(!(!t.options[l]&&!s.initializeByDefault)){var u=new s(t,n,t.options);u.sortable=t,u.options=t.options,t[l]=u,fP(r,u.defaults)}});for(var a in t.options)if(t.options.hasOwnProperty(a)){var i=this.modifyOption(t,a,t.options[a]);typeof i<"u"&&(t.options[a]=i)}},getEventProperties:function(t,n){var r={};return oJ.forEach(function(o){typeof o.eventProperties=="function"&&fP(r,o.eventProperties.call(n[o.pluginName],t))}),r},modifyOption:function(t,n,r){var o;return oJ.forEach(function(a){t[a.pluginName]&&a.optionListeners&&typeof a.optionListeners[n]=="function"&&(o=a.optionListeners[n].call(t[a.pluginName],r))}),o}};function YMi(e){var t=e.sortable,n=e.rootEl,r=e.name,o=e.targetEl,a=e.cloneEl,i=e.toEl,s=e.fromEl,l=e.oldIndex,u=e.newIndex,d=e.oldDraggableIndex,f=e.newDraggableIndex,m=e.originalEvent,p=e.putSortable,v=e.extraEventProperties;if(t=t||n&&n[lS],!!t){var g,w=t.options,S="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!pP&&!jhe?g=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(g=document.createEvent("Event"),g.initEvent(r,!0,!0)),g.to=i||n,g.from=s||n,g.item=o||n,g.clone=a,g.oldIndex=l,g.newIndex=u,g.oldDraggableIndex=d,g.newDraggableIndex=f,g.originalEvent=m,g.pullMode=p?p.lastPutMode:void 0;var E=F$(F$({},v),Whe.getEventProperties(r,t));for(var x in E)g[x]=E[x];n&&n.dispatchEvent(g),w[S]&&w[S].call(t,g)}}var ZMi=["evt"],Yw=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.evt,a=BMi(r,ZMi);Whe.pluginEvent.bind(ps)(t,n,F$({dragEl:Ao,parentEl:op,ghostEl:kl,rootEl:jf,nextEl:X6,lastDownEl:iMe,cloneEl:ap,cloneHidden:b3,dragStarted:Khe,putSortable:Nv,activeSortable:ps.active,originalEvent:o,oldIndex:aJ,oldDraggableIndex:qhe,newIndex:uS,newDraggableIndex:w3,hideGhostForTarget:o7n,unhideGhostForTarget:a7n,cloneNowHidden:function(){b3=!0},cloneNowShown:function(){b3=!1},dispatchSortableEvent:function(s){i0({sortable:n,name:s,originalEvent:o})}},a))};function i0(e){YMi(F$({putSortable:Nv,cloneEl:ap,targetEl:Ao,rootEl:jf,oldIndex:aJ,oldDraggableIndex:qhe,newIndex:uS,newDraggableIndex:w3},e))}var Ao,op,kl,jf,X6,iMe,ap,b3,aJ,uS,qhe,w3,sMe,Nv,iJ=!1,lMe=!1,uMe=[],J6,GT,Bmt,Vmt,Jqn,Qqn,Khe,sJ,Ghe,Yhe=!1,cMe=!1,dMe,fb,Umt=[],jmt=!1,fMe=[],hMe=typeof document<"u",pMe=Hqn,e7n=jhe||pP?"cssFloat":"float",XMi=hMe&&!UMi&&!Hqn&&"draggable"in document.createElement("div"),t7n=function(){if(hMe){if(pP)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),n7n=function(t,n){var r=hs(t),o=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),a=rJ(t,0,n),i=rJ(t,1,n),s=a&&hs(a),l=i&&hs(i),u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+mg(a).width,d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+mg(i).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&s.float&&s.float!=="none"){var f=s.float==="left"?"left":"right";return i&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return a&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||u>=o&&r[e7n]==="none"||i&&r[e7n]==="none"&&u+d>o)?"vertical":"horizontal"},JMi=function(t,n,r){var o=r?t.left:t.top,a=r?t.right:t.bottom,i=r?t.width:t.height,s=r?n.left:n.top,l=r?n.right:n.bottom,u=r?n.width:n.height;return o===s||a===l||o+i/2===s+u/2},QMi=function(t,n){var r;return uMe.some(function(o){var a=o[lS].options.emptyInsertThreshold;if(!(!a||Mmt(o))){var i=mg(o),s=t>=i.left-a&&t<=i.right+a,l=n>=i.top-a&&n<=i.bottom+a;if(s&&l)return r=o}}),r},r7n=function(t){function n(a,i){return function(s,l,u,d){var f=s.options.group.name&&l.options.group.name&&s.options.group.name===l.options.group.name;if(a==null&&(i||f))return!0;if(a==null||a===!1)return!1;if(i&&a==="clone")return a;if(typeof a=="function")return n(a(s,l,u,d),i)(s,l,u,d);var m=(i?s:l).options.group.name;return a===!0||typeof a=="string"&&a===m||a.join&&a.indexOf(m)>-1}}var r={},o=t.group;(!o||oMe(o)!="object")&&(o={name:o}),r.name=o.name,r.checkPull=n(o.pull,!0),r.checkPut=n(o.put),r.revertClone=o.revertClone,t.group=r},o7n=function(){!t7n&&kl&&hs(kl,"display","none")},a7n=function(){!t7n&&kl&&hs(kl,"display","")};hMe&&document.addEventListener("click",function(e){if(lMe)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),lMe=!1,!1},!0);var Q6=function(t){if(Ao){t=t.touches?t.touches[0]:t;var n=QMi(t.clientX,t.clientY);if(n){var r={};for(var o in t)t.hasOwnProperty(o)&&(r[o]=t[o]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[lS]._onDragOver(r)}}},eLi=function(t){Ao&&Ao.parentNode[lS]._isOutsideThisEl(t.target)};function ps(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=fP({},t),e[lS]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return n7n(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(i,s){i.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:ps.supportPointer!==!1&&"PointerEvent"in window&&!Hhe,emptyInsertThreshold:5};Whe.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);r7n(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:XMi,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?yc(e,"pointerdown",this._onTapStart):(yc(e,"mousedown",this._onTapStart),yc(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(yc(e,"dragover",this),yc(e,"dragenter",this)),uMe.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),fP(this,qMi())}ps.prototype={constructor:ps,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(sJ=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,Ao):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,r=this.el,o=this.options,a=o.preventOnFilter,i=t.type,s=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(s||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,d=o.filter;if(lLi(r),!Ao&&!(/mousedown|pointerdown/.test(i)&&t.button!==0||o.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Hhe&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=B$(l,o.draggable,r,!1),!(l&&l.animated)&&iMe!==l)){if(aJ=fx(l),qhe=fx(l,o.draggable),typeof d=="function"){if(d.call(this,t,l,this)){i0({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:r,fromEl:r}),Yw("filter",n,{evt:t}),a&&t.cancelable&&t.preventDefault();return}}else if(d&&(d=d.split(",").some(function(f){if(f=B$(u,f.trim(),r,!1),f)return i0({sortable:n,rootEl:f,name:"filter",targetEl:l,fromEl:r,toEl:r}),Yw("filter",n,{evt:t}),!0}),d)){a&&t.cancelable&&t.preventDefault();return}o.handle&&!B$(u,o.handle,r,!1)||this._prepareDragStart(t,s,l)}}},_prepareDragStart:function(t,n,r){var o=this,a=o.el,i=o.options,s=a.ownerDocument,l;if(r&&!Ao&&r.parentNode===a){var u=mg(r);if(jf=a,Ao=r,op=Ao.parentNode,X6=Ao.nextSibling,iMe=r,sMe=i.group,ps.dragged=Ao,J6={target:Ao,clientX:(n||t).clientX,clientY:(n||t).clientY},Jqn=J6.clientX-u.left,Qqn=J6.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,Ao.style["will-change"]="all",l=function(){if(Yw("delayEnded",o,{evt:t}),ps.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!jqn&&o.nativeDraggable&&(Ao.draggable=!0),o._triggerDragStart(t,n),i0({sortable:o,name:"choose",originalEvent:t}),sS(Ao,i.chosenClass,!0)},i.ignore.split(",").forEach(function(d){qqn(Ao,d.trim(),Hmt)}),yc(s,"dragover",Q6),yc(s,"mousemove",Q6),yc(s,"touchmove",Q6),yc(s,"mouseup",o._onDrop),yc(s,"touchend",o._onDrop),yc(s,"touchcancel",o._onDrop),jqn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ao.draggable=!0),Yw("delayStart",this,{evt:t}),i.delay&&(!i.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(jhe||pP))){if(ps.eventCanceled){this._onDrop();return}yc(s,"mouseup",o._disableDelayedDrag),yc(s,"touchend",o._disableDelayedDrag),yc(s,"touchcancel",o._disableDelayedDrag),yc(s,"mousemove",o._delayedDragTouchMoveHandler),yc(s,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&&yc(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,i.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ao&&Hmt(Ao),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Fu(t,"mouseup",this._disableDelayedDrag),Fu(t,"touchend",this._disableDelayedDrag),Fu(t,"touchcancel",this._disableDelayedDrag),Fu(t,"mousemove",this._delayedDragTouchMoveHandler),Fu(t,"touchmove",this._delayedDragTouchMoveHandler),Fu(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?yc(document,"pointermove",this._onTouchMove):n?yc(document,"touchmove",this._onTouchMove):yc(document,"mousemove",this._onTouchMove):(yc(Ao,"dragend",this),yc(jf,"dragstart",this._onDragStart));try{document.selection?gMe(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(iJ=!1,jf&&Ao){Yw("dragStarted",this,{evt:n}),this.nativeDraggable&&yc(document,"dragover",eLi);var r=this.options;!t&&sS(Ao,r.dragClass,!1),sS(Ao,r.ghostClass,!0),ps.active=this,t&&this._appendGhost(),i0({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(GT){this._lastX=GT.clientX,this._lastY=GT.clientY,o7n();for(var t=document.elementFromPoint(GT.clientX,GT.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(GT.clientX,GT.clientY),t!==n);)n=t;if(Ao.parentNode[lS]._isOutsideThisEl(t),n)do{if(n[lS]){var r=void 0;if(r=n[lS]._onDragOver({clientX:GT.clientX,clientY:GT.clientY,target:t,rootEl:n}),r&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);a7n()}},_onTouchMove:function(t){if(J6){var n=this.options,r=n.fallbackTolerance,o=n.fallbackOffset,a=t.touches?t.touches[0]:t,i=kl&&nJ(kl,!0),s=kl&&i&&i.a,l=kl&&i&&i.d,u=pMe&&fb&&Gqn(fb),d=(a.clientX-J6.clientX+o.x)/(s||1)+(u?u[0]-Umt[0]:0)/(s||1),f=(a.clientY-J6.clientY+o.y)/(l||1)+(u?u[1]-Umt[1]:0)/(l||1);if(!ps.active&&!iJ){if(r&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<r)return;this._onDragStart(t,!0)}if(kl){i?(i.e+=d-(Bmt||0),i.f+=f-(Vmt||0)):i={a:1,b:0,c:0,d:1,e:d,f};var m="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");hs(kl,"webkitTransform",m),hs(kl,"mozTransform",m),hs(kl,"msTransform",m),hs(kl,"transform",m),Bmt=d,Vmt=f,GT=a}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!kl){var t=this.options.fallbackOnBody?document.body:jf,n=mg(Ao,!0,pMe,!0,t),r=this.options;if(pMe){for(fb=t;hs(fb,"position")==="static"&&hs(fb,"transform")==="none"&&fb!==document;)fb=fb.parentNode;fb!==document.body&&fb!==document.documentElement?(fb===document&&(fb=V$()),n.top+=fb.scrollTop,n.left+=fb.scrollLeft):fb=V$(),Umt=Gqn(fb)}kl=Ao.cloneNode(!0),sS(kl,r.ghostClass,!1),sS(kl,r.fallbackClass,!0),sS(kl,r.dragClass,!0),hs(kl,"transition",""),hs(kl,"transform",""),hs(kl,"box-sizing","border-box"),hs(kl,"margin",0),hs(kl,"top",n.top),hs(kl,"left",n.left),hs(kl,"width",n.width),hs(kl,"height",n.height),hs(kl,"opacity","0.8"),hs(kl,"position",pMe?"absolute":"fixed"),hs(kl,"zIndex","100000"),hs(kl,"pointerEvents","none"),ps.ghost=kl,t.appendChild(kl),hs(kl,"transform-origin",Jqn/parseInt(kl.style.width)*100+"% "+Qqn/parseInt(kl.style.height)*100+"%")}},_onDragStart:function(t,n){var r=this,o=t.dataTransfer,a=r.options;if(Yw("dragStart",this,{evt:t}),ps.eventCanceled){this._onDrop();return}Yw("setupClone",this),ps.eventCanceled||(ap=Xqn(Ao),ap.draggable=!1,ap.style["will-change"]="",this._hideClone(),sS(ap,this.options.chosenClass,!1),ps.clone=ap),r.cloneId=gMe(function(){Yw("clone",r),!ps.eventCanceled&&(r.options.removeCloneOnHide||jf.insertBefore(ap,Ao),r._hideClone(),i0({sortable:r,name:"clone"}))}),!n&&sS(Ao,a.dragClass,!0),n?(lMe=!0,r._loopId=setInterval(r._emulateDragOver,50)):(Fu(document,"mouseup",r._onDrop),Fu(document,"touchend",r._onDrop),Fu(document,"touchcancel",r._onDrop),o&&(o.effectAllowed="move",a.setData&&a.setData.call(r,o,Ao)),yc(document,"drop",r),hs(Ao,"transform","translateZ(0)")),iJ=!0,r._dragStartId=gMe(r._dragStarted.bind(r,n,t)),yc(document,"selectstart",r),Khe=!0,Hhe&&hs(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,r=t.target,o,a,i,s=this.options,l=s.group,u=ps.active,d=sMe===l,f=s.sort,m=Nv||u,p,v=this,g=!1;if(jmt)return;function w(J,se){Yw(J,v,F$({evt:t,isOwner:d,axis:p?"vertical":"horizontal",revert:i,dragRect:o,targetRect:a,canSort:f,fromSortable:m,target:r,completed:E,onMove:function(fe,K){return mMe(jf,n,Ao,o,fe,mg(fe),t,K)},changed:x},se))}function S(){w("dragOverAnimationCapture"),v.captureAnimationState(),v!==m&&m.captureAnimationState()}function E(J){return w("dragOverCompleted",{insertion:J}),J&&(d?u._hideClone():u._showClone(v),v!==m&&(sS(Ao,Nv?Nv.options.ghostClass:u.options.ghostClass,!1),sS(Ao,s.ghostClass,!0)),Nv!==v&&v!==ps.active?Nv=v:v===ps.active&&Nv&&(Nv=null),m===v&&(v._ignoreWhileAnimating=r),v.animateAll(function(){w("dragOverAnimationComplete"),v._ignoreWhileAnimating=null}),v!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(r===Ao&&!Ao.animated||r===n&&!r.animated)&&(sJ=null),!s.dragoverBubble&&!t.rootEl&&r!==document&&(Ao.parentNode[lS]._isOutsideThisEl(t.target),!J&&Q6(t)),!s.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),g=!0}function x(){uS=fx(Ao),w3=fx(Ao,s.draggable),i0({sortable:v,name:"change",toEl:n,newIndex:uS,newDraggableIndex:w3,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),r=B$(r,s.draggable,n,!0),w("dragOver"),ps.eventCanceled)return g;if(Ao.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||v._ignoreWhileAnimating===r)return E(!1);if(lMe=!1,u&&!s.disabled&&(d?f||(i=op!==jf):Nv===this||(this.lastPutMode=sMe.checkPull(this,u,Ao,t))&&l.checkPut(this,u,Ao,t))){if(p=this._getDirection(t,r)==="vertical",o=mg(Ao),w("dragOverValid"),ps.eventCanceled)return g;if(i)return op=jf,S(),this._hideClone(),w("revert"),ps.eventCanceled||(X6?jf.insertBefore(Ao,X6):jf.appendChild(Ao)),E(!0);var y=Mmt(n,s.draggable);if(!y||oLi(t,p,this)&&!y.animated){if(y===Ao)return E(!1);if(y&&n===t.target&&(r=y),r&&(a=mg(r)),mMe(jf,n,Ao,o,r,a,t,!!r)!==!1)return S(),n.appendChild(Ao),op=n,x(),E(!0)}else if(y&&rLi(t,p,this)){var D=rJ(n,0,s,!0);if(D===Ao)return E(!1);if(r=D,a=mg(r),mMe(jf,n,Ao,o,r,a,t,!1)!==!1)return S(),n.insertBefore(Ao,D),op=n,x(),E(!0)}else if(r.parentNode===n){a=mg(r);var k=0,O,R=Ao.parentNode!==n,I=!JMi(Ao.animated&&Ao.toRect||o,r.animated&&r.toRect||a,p),$=p?"top":"left",P=Kqn(r,"top","top")||Kqn(Ao,"top","top"),U=P?P.scrollTop:void 0;sJ!==r&&(O=a[$],Yhe=!1,cMe=!I&&s.invertSwap||R),k=aLi(t,r,a,p,I?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,cMe,sJ===r);var F;if(k!==0){var L=fx(Ao);do L-=k,F=op.children[L];while(F&&(hs(F,"display")==="none"||F===kl))}if(k===0||F===r)return E(!1);sJ=r,Ghe=k;var j=r.nextElementSibling,B=!1;B=k===1;var G=mMe(jf,n,Ao,o,r,a,t,B);if(G!==!1)return(G===1||G===-1)&&(B=G===1),jmt=!0,setTimeout(nLi,30),S(),B&&!j?n.appendChild(Ao):r.parentNode.insertBefore(Ao,B?j:r),P&&Zqn(P,0,U-P.scrollTop),op=Ao.parentNode,O!==void 0&&!cMe&&(dMe=Math.abs(O-mg(r)[$])),x(),E(!0)}if(n.contains(Ao))return E(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){Fu(document,"mousemove",this._onTouchMove),Fu(document,"touchmove",this._onTouchMove),Fu(document,"pointermove",this._onTouchMove),Fu(document,"dragover",Q6),Fu(document,"mousemove",Q6),Fu(document,"touchmove",Q6)},_offUpEvents:function(){var t=this.el.ownerDocument;Fu(t,"mouseup",this._onDrop),Fu(t,"touchend",this._onDrop),Fu(t,"pointerup",this._onDrop),Fu(t,"touchcancel",this._onDrop),Fu(document,"selectstart",this)},_onDrop:function(t){var n=this.el,r=this.options;if(uS=fx(Ao),w3=fx(Ao,r.draggable),Yw("drop",this,{evt:t}),op=Ao&&Ao.parentNode,uS=fx(Ao),w3=fx(Ao,r.draggable),ps.eventCanceled){this._nulling();return}iJ=!1,cMe=!1,Yhe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),zmt(this.cloneId),zmt(this._dragStartId),this.nativeDraggable&&(Fu(document,"drop",this),Fu(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Hhe&&hs(document.body,"user-select",""),hs(Ao,"transform",""),t&&(Khe&&(t.cancelable&&t.preventDefault(),!r.dropBubble&&t.stopPropagation()),kl&&kl.parentNode&&kl.parentNode.removeChild(kl),(jf===op||Nv&&Nv.lastPutMode!=="clone")&&ap&&ap.parentNode&&ap.parentNode.removeChild(ap),Ao&&(this.nativeDraggable&&Fu(Ao,"dragend",this),Hmt(Ao),Ao.style["will-change"]="",Khe&&!iJ&&sS(Ao,Nv?Nv.options.ghostClass:this.options.ghostClass,!1),sS(Ao,this.options.chosenClass,!1),i0({sortable:this,name:"unchoose",toEl:op,newIndex:null,newDraggableIndex:null,originalEvent:t}),jf!==op?(uS>=0&&(i0({rootEl:op,name:"add",toEl:op,fromEl:jf,originalEvent:t}),i0({sortable:this,name:"remove",toEl:op,originalEvent:t}),i0({rootEl:op,name:"sort",toEl:op,fromEl:jf,originalEvent:t}),i0({sortable:this,name:"sort",toEl:op,originalEvent:t})),Nv&&Nv.save()):uS!==aJ&&uS>=0&&(i0({sortable:this,name:"update",toEl:op,originalEvent:t}),i0({sortable:this,name:"sort",toEl:op,originalEvent:t})),ps.active&&((uS==null||uS===-1)&&(uS=aJ,w3=qhe),i0({sortable:this,name:"end",toEl:op,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Yw("nulling",this),jf=Ao=op=kl=X6=ap=iMe=b3=J6=GT=Khe=uS=w3=aJ=qhe=sJ=Ghe=Nv=sMe=ps.dragged=ps.ghost=ps.clone=ps.active=null,fMe.forEach(function(t){t.checked=!0}),fMe.length=Bmt=Vmt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Ao&&(this._onDragOver(t),tLi(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,r=this.el.children,o=0,a=r.length,i=this.options;o<a;o++)n=r[o],B$(n,i.draggable,this.el,!1)&&t.push(n.getAttribute(i.dataIdAttr)||sLi(n));return t},sort:function(t,n){var r={},o=this.el;this.toArray().forEach(function(a,i){var s=o.children[i];B$(s,this.options.draggable,o,!1)&&(r[a]=s)},this),n&&this.captureAnimationState(),t.forEach(function(a){r[a]&&(o.removeChild(r[a]),o.appendChild(r[a]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return B$(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var r=this.options;if(n===void 0)return r[t];var o=Whe.modifyOption(this,t,n);typeof o<"u"?r[t]=o:r[t]=n,t==="group"&&r7n(r)},destroy:function(){Yw("destroy",this);var t=this.el;t[lS]=null,Fu(t,"mousedown",this._onTapStart),Fu(t,"touchstart",this._onTapStart),Fu(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Fu(t,"dragover",this),Fu(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),uMe.splice(uMe.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!b3){if(Yw("hideClone",this),ps.eventCanceled)return;hs(ap,"display","none"),this.options.removeCloneOnHide&&ap.parentNode&&ap.parentNode.removeChild(ap),b3=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(b3){if(Yw("showClone",this),ps.eventCanceled)return;Ao.parentNode==jf&&!this.options.group.revertClone?jf.insertBefore(ap,Ao):X6?jf.insertBefore(ap,X6):jf.appendChild(ap),this.options.group.revertClone&&this.animate(Ao,ap),hs(ap,"display",""),b3=!1}}};function tLi(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function mMe(e,t,n,r,o,a,i,s){var l,u=e[lS],d=u.options.onMove,f;return window.CustomEvent&&!pP&&!jhe?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=o||t,l.relatedRect=a||mg(t),l.willInsertAfter=s,l.originalEvent=i,e.dispatchEvent(l),d&&(f=d.call(u,l,i)),f}function Hmt(e){e.draggable=!1}function nLi(){jmt=!1}function rLi(e,t,n){var r=mg(rJ(n.el,0,n.options,!0)),o=10;return t?e.clientX<r.left-o||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-o||e.clientY<r.bottom&&e.clientX<r.left}function oLi(e,t,n){var r=mg(Mmt(n.el,n.options.draggable)),o=10;return t?e.clientX>r.right+o||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+o}function aLi(e,t,n,r,o,a,i,s){var l=r?e.clientY:e.clientX,u=r?n.height:n.width,d=r?n.top:n.left,f=r?n.bottom:n.right,m=!1;if(!i){if(s&&dMe<u*o){if(!Yhe&&(Ghe===1?l>d+u*a/2:l<f-u*a/2)&&(Yhe=!0),Yhe)m=!0;else if(Ghe===1?l<d+dMe:l>f-dMe)return-Ghe}else if(l>d+u*(1-o)/2&&l<f-u*(1-o)/2)return iLi(t)}return m=m||i,m&&(l<d+u*a/2||l>f-u*a/2)?l>d+u/2?1:-1:0}function iLi(e){return fx(Ao)<fx(e)?1:-1}function sLi(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function lLi(e){fMe.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&fMe.push(r)}}function gMe(e){return setTimeout(e,0)}function zmt(e){return clearTimeout(e)}hMe&&yc(document,"touchmove",function(e){(ps.active||iJ)&&e.cancelable&&e.preventDefault()}),ps.utils={on:yc,off:Fu,css:hs,find:qqn,is:function(t,n){return!!B$(t,n,t,!1)},extend:zMi,throttle:Yqn,closest:B$,toggleClass:sS,clone:Xqn,index:fx,nextTick:gMe,cancelNextTick:zmt,detectDirection:n7n,getChild:rJ},ps.get=function(e){return e[lS]},ps.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(ps.utils=F$(F$({},ps.utils),r.utils)),Whe.mount(r)})},ps.create=function(e,t){return new ps(e,t)},ps.version=VMi;var Sm=[],Zhe,Wmt,qmt=!1,Kmt,Gmt,vMe,Xhe;function uLi(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var r=n.originalEvent;this.sortable.nativeDraggable?yc(document,"dragover",this._handleAutoScroll):this.options.supportPointer?yc(document,"pointermove",this._handleFallbackAutoScroll):r.touches?yc(document,"touchmove",this._handleFallbackAutoScroll):yc(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var r=n.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?Fu(document,"dragover",this._handleAutoScroll):(Fu(document,"pointermove",this._handleFallbackAutoScroll),Fu(document,"touchmove",this._handleFallbackAutoScroll),Fu(document,"mousemove",this._handleFallbackAutoScroll)),i7n(),yMe(),WMi()},nulling:function(){vMe=Wmt=Zhe=qmt=Xhe=Kmt=Gmt=null,Sm.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,r){var o=this,a=(n.touches?n.touches[0]:n).clientX,i=(n.touches?n.touches[0]:n).clientY,s=document.elementFromPoint(a,i);if(vMe=n,r||this.options.forceAutoScrollFallback||jhe||pP||Hhe){Ymt(n,this.options,s,r);var l=y3(s,!0);qmt&&(!Xhe||a!==Kmt||i!==Gmt)&&(Xhe&&i7n(),Xhe=setInterval(function(){var u=y3(document.elementFromPoint(a,i),!0);u!==l&&(l=u,yMe()),Ymt(n,o.options,u,r)},10),Kmt=a,Gmt=i)}else{if(!this.options.bubbleScroll||y3(s,!0)===V$()){yMe();return}Ymt(n,this.options,y3(s,!1),!1)}}},fP(e,{pluginName:"scroll",initializeByDefault:!0})}function yMe(){Sm.forEach(function(e){clearInterval(e.pid)}),Sm=[]}function i7n(){clearInterval(Xhe)}var Ymt=Yqn(function(e,t,n,r){if(t.scroll){var o=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,i=t.scrollSensitivity,s=t.scrollSpeed,l=V$(),u=!1,d;Wmt!==n&&(Wmt=n,yMe(),Zhe=t.scroll,d=t.scrollFn,Zhe===!0&&(Zhe=y3(n,!0)));var f=0,m=Zhe;do{var p=m,v=mg(p),g=v.top,w=v.bottom,S=v.left,E=v.right,x=v.width,y=v.height,D=void 0,k=void 0,O=p.scrollWidth,R=p.scrollHeight,I=hs(p),$=p.scrollLeft,P=p.scrollTop;p===l?(D=x<O&&(I.overflowX==="auto"||I.overflowX==="scroll"||I.overflowX==="visible"),k=y<R&&(I.overflowY==="auto"||I.overflowY==="scroll"||I.overflowY==="visible")):(D=x<O&&(I.overflowX==="auto"||I.overflowX==="scroll"),k=y<R&&(I.overflowY==="auto"||I.overflowY==="scroll"));var U=D&&(Math.abs(E-o)<=i&&$+x<O)-(Math.abs(S-o)<=i&&!!$),F=k&&(Math.abs(w-a)<=i&&P+y<R)-(Math.abs(g-a)<=i&&!!P);if(!Sm[f])for(var L=0;L<=f;L++)Sm[L]||(Sm[L]={});(Sm[f].vx!=U||Sm[f].vy!=F||Sm[f].el!==p)&&(Sm[f].el=p,Sm[f].vx=U,Sm[f].vy=F,clearInterval(Sm[f].pid),(U!=0||F!=0)&&(u=!0,Sm[f].pid=setInterval((function(){r&&this.layer===0&&ps.active._onTouchMove(vMe);var j=Sm[this.layer].vy?Sm[this.layer].vy*s:0,B=Sm[this.layer].vx?Sm[this.layer].vx*s:0;typeof d=="function"&&d.call(ps.dragged.parentNode[lS],B,j,e,vMe,Sm[this.layer].el)!=="continue"||Zqn(Sm[this.layer].el,B,j)}).bind({layer:f}),24))),f++}while(t.bubbleScroll&&m!==l&&(m=y3(m,!1)));qmt=u}},30),s7n=function(t){var n=t.originalEvent,r=t.putSortable,o=t.dragEl,a=t.activeSortable,i=t.dispatchSortableEvent,s=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(n){var u=r||a;s();var d=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,f=document.elementFromPoint(d.clientX,d.clientY);l(),u&&!u.el.contains(f)&&(i("spill"),this.onSpill({dragEl:o,putSortable:r}))}};function Zmt(){}Zmt.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,r=t.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var o=rJ(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),r&&r.animateAll()},drop:s7n},fP(Zmt,{pluginName:"revertOnSpill"});function Xmt(){}Xmt.prototype={onSpill:function(t){var n=t.dragEl,r=t.putSortable,o=r||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:s7n},fP(Xmt,{pluginName:"removeOnSpill"}),ps.mount(new uLi),ps.mount(Xmt,Zmt);function cLi(e,t){return Object.values(e).indexOf(t)}function dLi(e,t,n,r){if(!e)return[];const o=Object.values(e),a=t.length-r;return[...t].map((s,l)=>l>=a?o.length:o.indexOf(s))}function fLi(e){return["transition-group","TransitionGroup"].includes(e)}function l7n(e){if(!e||e.length!==1)return!1;const[{type:t}]=e;return t?fLi(t.name):!1}function hLi(e,t){return t?{...t.props,...t.attrs}:e}const Jmt=["Start","Add","Remove","Update","End"],Qmt=["Choose","Unchoose","Sort","Filter","Clone"],pLi=["Move",...Jmt,...Qmt].map(e=>"on"+e);let egt=null;const u7n=yt({name:"VueDraggableNext",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},emits:["update:modelValue","move","change",...Jmt.map(e=>e.toLowerCase()),...Qmt.map(e=>e.toLowerCase())],setup(e,{emit:t,slots:n,attrs:r}){const o=oe(!1),a=oe(!1),i=oe(0),s=oe(0),l=oe([]),u=oe(null),d=oe(null),f=te(()=>e.list?e.list:e.modelValue),m=Ha();function p(){return e.component?Tr(e.component):e.tag}function v(N){if(d.value)for(const Y in N){const de=Bqn(Y);pLi.indexOf(de)===-1&&d.value.option(de,N[Y])}}function g(){var N;return((N=m==null?void 0:m.proxy)==null?void 0:N.$el.children)||[]}async function w(){var N;await It(),l.value=dLi(g(),((N=m==null?void 0:m.proxy)==null?void 0:N.$el.children)||[],o.value,s.value)}function S(N){const Y=cLi(g()||[],N);if(Y===-1)return null;const de=f.value?f.value[Y]:null;return{index:Y,element:de}}function E(N){It(()=>t("change",N))}function x(N){if(e.list){N(e.list);return}const Y=[...e.modelValue||[]];N(Y),t("update:modelValue",Y)}function y(...N){x(de=>de.splice(...N))}function D(N,Y){x(Ce=>Ce.splice(Y,0,Ce.splice(N,1)[0]))}function k(N){const Y=l.value,de=Y.length;return N>de-1?de:Y[N]}function O(){var Y,de;return n.default&&((de=(Y=n.default()[0])==null?void 0:Y.component)==null?void 0:de.proxy)||null}function R(N){if(!e.noTransitionOnDrag||!o.value)return;const Y=g();Y[N]&&(Y[N].data=null);const de=O();de&&(de.children=[],de.kept=void 0)}function I(N){w(),u.value=S(N.item),u.value&&(N.item._underlying_vm_=e.clone(u.value.element),egt=N.item)}function $(N){const Y=N.item._underlying_vm_;if(Y===void 0)return;Nmt(N.item);const de=k(N.newIndex);y(de,0,Y),w(),E({added:{element:Y,newIndex:de}})}function P(N){var de;if(Vqn((de=m==null?void 0:m.proxy)==null?void 0:de.$el,N.item,N.oldIndex),N.pullMode==="clone"){Nmt(N.clone);return}if(!u.value)return;const Y=u.value.index;y(Y,1),R(Y),E({removed:{element:u.value.element,oldIndex:Y}})}function U(N){var Ce,we;Nmt(N.item),Vqn(N.from,N.item,N.oldIndex);const Y=(Ce=u.value)==null?void 0:Ce.index,de=k(N.newIndex);D(Y,de),E({moved:{element:(we=u.value)==null?void 0:we.element,oldIndex:Y,newIndex:de}})}function F(N,Y){Object.prototype.hasOwnProperty.call(N,Y)&&(N[Y]+=i.value)}function L(N){return N.__draggable_component__}function j({to:N,related:Y}){const de=L(N);if(!de)return{component:de};const Ce=de.realList,we={list:Ce,component:de};if(N!==Y&&Ce&&de.getUnderlyingVm){const ee=de.getUnderlyingVm(Y);if(ee)return Object.assign(ee,we)}return we}function B(N,Y){const de=[...Y.to.children].filter(Q=>Q.style.display!=="none");if(de.length===0)return 0;const Ce=de.indexOf(Y.related),we=N.component.getVmIndex(Ce);return de.indexOf(egt)!==-1||!Y.willInsertAfter?we:we+1}const G=()=>{var we,ee;const N={};Jmt.forEach(Q=>{N["on"+Q]=se(Q)}),Qmt.forEach(Q=>{N["on"+Q]=J.bind(null,Q)});const Y=Object.keys(r).reduce((Q,Ae)=>(Q[Bqn(Ae)]=r[Ae],Q),{}),de=Object.assign({},Y,N,{onMove:(Q,Ae)=>ve(Q,Ae)});"draggable"in de||(de.draggable=">*");const Ce=((we=m==null?void 0:m.proxy)==null?void 0:we.$el.nodeType)===1?m.proxy.$el:((ee=m==null?void 0:m.proxy)==null?void 0:ee.$el.parentElement)||null;Ce&&(d.value=new ps(Ce,de),Ce.__draggable_component__=m==null?void 0:m.proxy,w())};function J(N,Y){It(()=>t(N.toLowerCase(),Y))}function se(N){return Y=>{if(f.value!==null){const de="onDrag"+N,Ce=K[de];Ce&&Ce(Y)}J(N,Y)}}function ve(N,Y){const de=e.move;if(!de||!f.value)return!0;const Ce=j(N),we=u.value,ee=B(Ce,N);we&&Object.assign(we,{futureIndex:ee});const Q=Object.assign({},N,{relatedContext:Ce,draggedContext:we});return de(Q,Y)}function fe(){w(),egt=null}const K={onDragStart:I,onDragAdd:$,onDragRemove:P,onDragUpdate:U,onDragMove:ve,onDragEnd:fe};return mn(()=>{G()}),e.list!==null&&e.modelValue!==null&&PMi.error("list props are mutually exclusive! Please set one."),{getTag:p,realList:f,visibleIndexes:l,noneFunctionalComponentMode:a,headerOffset:i,footerOffset:s,transitionMode:o,computeIndexes:w,updateOptions:v,getChildrenNodes:g,getUnderlyingVm:S,emitChanges:E,alterList:x,spliceList:y,updatePosition:D,getVmIndex:k,getComponent:O,resetTransitionData:R,onDragStart:I,onDragAdd:$,onDragRemove:P,onDragUpdate:U,updateProperty:F,onDragMove:ve,onDragEnd:fe,mounted:G,context:u,sortableInstance:d,getRelatedContextFromMoveEvent:j,getTargetedComponent:L,computeFutureIndex:B}},render(){const e=this.getTag(),t=hLi(this.$attrs,this.componentData);if(typeof e=="string"){const r=this.$slots.default&&typeof this.$slots.default=="function"?this.$slots.default():null;return r?(this.transitionMode=l7n(r),Pi(e,t,r)):Pi(e,t,[])}const n=this.$slots.default?{default:this.$slots.default}:{};if(this.$slots.default){const r=typeof this.$slots.default=="function"?this.$slots.default():null;this.transitionMode=l7n(r||[])}return Pi(e,t,n)}}),mLi=yt({__name:"VisualWrapper",props:{name:{type:String,required:!0},h:{type:[Number,String],required:!1,default:180},w:{type:[Number,String],required:!1,default:180}},setup(e,{expose:t}){t();const n=e,r=te(()=>({height:typeof n.h=="number"?`${n.h}px`:n.h,width:typeof n.w=="number"?`${n.w}px`:n.w})),o={props:n,styles:r};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}});function gLi(e,t,n,r,o,a){const i=Tr("ArboIcon");return W(),me("div",{class:"visual-wrapper flex items-center justify-center",style:dn(r.styles)},[Me(i,{name:n.name,type:"visual"},null,8,["name"])],4)}const vLi=za(mLi,[["render",gLi],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/common/VisualWrapper.vue"]]),bMe=250;var c7n=(e=>(e[e.UPLOAD_FILE=0]="UPLOAD_FILE",e[e.UPLOAD_IN_PROGRESS=1]="UPLOAD_IN_PROGRESS",e[e.UPLOAD_SUCCESS=2]="UPLOAD_SUCCESS",e[e.UPLOAD_FAILED=3]="UPLOAD_FAILED",e))(c7n||{});const yLi=yt({__name:"ModalAddRendition",emits:["upload-success","close"],setup(e,{expose:t,emit:n}){t();const{t:r}=Ux(),{upLoadFile:o,createNewRendition:a,uploadNewFileInNewRendition:i,checkLengthAndTypeRendition:s}=hDe(),l=n,u=LL(),d=xp(),{updateSceneAPI:f}=AO(),{allStatus:m,status:p}=ia(d),{fileReference:v,numberOfRendition:g}=ia(u),w=hr({name:`Rendition ${g.value+1}`,description:""});vt(g,Q=>{w.name=`Rendition ${Q+1}`},{immediate:!0});const S=oe(0),E=oe(),x=oe(!1),y=oe(xya),D=oe(!0),k=te(()=>{let Q=!1;switch(S.value){case 0:Q=!w.name.trim()||!v.value.length||v.value.length>5||v.value.length==0;break;case 1:Q=!0;break;case 2:Q=!L.value;break}return Q}),O=oe(!1),R=oe(),I=te({get:()=>v.value??[],set:Q=>{v.value&&(v.value=Q)}}),$=te(()=>d.allStatus),P=oe($.value),U=async Q=>{Q?P.value=$.value.filter(Ae=>Ae.name.toLowerCase().includes(Q.toLowerCase())):P.value=$.value},{permission:F}=sC(),L=te(()=>F.value.updateStatus),{getSceneData:j}=d,B=async Q=>{var be;if(!L.value)return;const Ae=(be=m==null?void 0:m.value)==null?void 0:be.find(Ve=>Ve.id===Q);Ae&&((await f({template_flow_status_id:Ae.id})).success?(R.value=Q,setTimeout(async()=>{await j()},1e3)):R.value=p.value),l("close")},G=()=>{O.value=!0};vt(I,Q=>{S.value>1||Q.length>0&&G()},{deep:!0,immediate:!0}),vt(O,Q=>{Q&&(w.name=`Rendition ${g.value+1}`)},{immediate:!0});const J=async()=>{var Q;try{S.value=1;const Ae=v.value.map(rt=>rt.originFile),be=await o(Ae);if(!be.length)throw new Error("Upload failed");const Ve=be.map(rt=>({name:rt.name,type:rt.type,mimetype:rt.mimetype,accept_type:rt.accept_type,path:rt.path,thumbnail:rt.thumbnail}));let Oe=[];Oe=[{...w,attachments:Ve}];const Be=await a(Oe),ke=Be.success?{textCancelBtn:"No, thanks",textConfirmBtn:"Update status"}:{textCancelBtn:"",textConfirmBtn:"Try again"};y.value.splice(2,1,ke),Be.success?(D.value=!0,S.value=2,l("upload-success",(Q=Be.data)==null?void 0:Q.data.map(rt=>rt.id))):(D.value=!1,S.value=3)}catch{S.value=3}},se=async()=>{switch(S.value){case 0:J();break;case 1:break;case 2:await B(R.value),ve();break;case 3:ve();break}},ve=()=>{v.value=[],O.value=!1,S.value=0,w.name="",O.value=!1},fe=Q=>{const Ae=v.value.findIndex(be=>be.url===Q);Ae>-1&&v.value.splice(Ae,1)},K=async Q=>{var Oe,Be;const Ae=(Oe=v.value[0])==null?void 0:Oe.originFile.type,be=Q.target;if(!((Be=be.files)!=null&&Be.length))return;const Ve=s(void 0,be.files,Ae,v.value.length);i(Ve)},N=async Q=>{const Ae=["Backspace","ArrowLeft","ArrowRight"];w.name.length>=bMe&&!Ae.includes(Q.key)&&(Q.preventDefault(),Q.stopPropagation())},Y=()=>{w.name.length>bMe&&(w.name=w.name.slice(0,bMe))},de=async Q=>{if(R.value=Q,L.value)R.value=Q;else throw new Error("Permission denied")},Ce=()=>{ve(),l("close")},we=()=>{E.value.click()};vt(p,()=>{R.value=p.value},{immediate:!0}),_o(()=>{ve()});const ee={t:r,upLoadFile:o,createNewRendition:a,uploadNewFileInNewRendition:i,checkLengthAndTypeRendition:s,emits:l,maxLengthNameRendition:bMe,renditionStore:u,sceneStore:d,updateSceneAPI:f,allStatus:m,status:p,fileReference:v,numberOfRendition:g,formState:w,UploadStep:c7n,currentStep:S,fileInput:E,isLoading:x,textButton:y,isUploadSuccess:D,isBtnDisable:k,isShow:O,_status:R,listFileRendition:I,_allStatus:$,listStatus:P,handleSearch:U,permission:F,canUpdate:L,getSceneData:j,handleUpdateStatus:B,show:G,handleUploadStep:J,handleNextStep:se,reset:ve,removeFile:fe,handleFileChange:K,handleChangeNameRendition:N,handleInput:Y,handleSelectStatus:de,closeModal:Ce,triggerFileUpload:we,get VueDraggableNext(){return u7n},get STEPS(){return kya},VisualWrapper:vLi};return Object.defineProperty(ee,"__isScriptSetup",{enumerable:!1,value:!0}),ee}}),bLi={class:"flex justify-center relative w-full"},wLi={class:"text-[24px] font-bold"},_Li={class:"-mt-6"},SLi={class:"flex justify-center w-full"},ELi={class:"stepper"},CLi={key:0,class:"check"},xLi={key:1,class:"text-[12px]"},kLi={key:0,class:"line"},TLi={key:0,class:"mt-4"},OLi={class:"flex gap-2"},DLi={class:"relative w-[40%] shadow-md bg-cover aspect-ratio rounded-md overflow-hidden"},ALi=["src"],$Li={class:"flex-1"},ILi={class:"text-center text-sm"},RLi={class:"overflow-auto"},PLi={class:"flex justify-center"},NLi={key:0,class:"loader"},MLi={class:"text-start"},LLi={key:1},FLi={class:"text-lg font-bold text-center mt-3"},BLi={class:"h-[220px] p-4 flex justify-center"},VLi={class:"text sx text-center"},ULi={key:2},jLi={class:"text-lg font-bold text-center mt-3"},HLi={class:"h-[220px] p-4 flex justify-center"},zLi={class:"text sx text-center"},WLi={key:0,class:"relative"};function qLi(e,t,n,r,o,a){const i=Tr("arbo-button"),s=Tr("ArboInput"),l=Tr("TessReviewFileCard"),u=Tr("TessStatusSelect"),d=Tr("ArboTooltip"),f=Tr("arbo-modal");return W(),st(f,on({show:r.isShow},{...r.textButton[r.currentStep]},{disable:r.isBtnDisable,icon:"''",class:"modal-add-rendition",onConfirmed:r.handleNextStep,onHidden:r.closeModal}),{header:je(()=>[$e("div",bLi,[$e("p",wLi,Et(r.t("rendition.create_rendition")),1),$e("div",{class:"absolute -right-8 -top-4",onClick:r.closeModal},[Me(i,{"prefix-tooltip":"Close","prefix-icon":"Xmark",type:"tertiary",label:""})])])]),"main-icon":je(()=>[...t[3]||(t[3]=[$e("div",null,null,-1)])]),default:je(()=>[ft(e.$slots,"default",{},()=>[$e("div",_Li,[$e("div",SLi,[$e("div",ELi,[(W(!0),me(qt,null,bn(r.STEPS,(m,p)=>(W(),me("div",{key:p,class:"step"},[$e("div",{class:De(["circle",{active:p<=r.currentStep}])},[p<r.currentStep?(W(),me("span",CLi,"✓")):(W(),me("span",xLi,Et(p+1),1))],2),p<r.STEPS.length-1?(W(),me("div",kLi)):Ye("v-if",!0)]))),128))])])]),$e("div",null,[r.currentStep===0?(W(),me("div",TLi,[$e("div",OLi,[$e("div",DLi,[r.fileReference[0]?(W(),me("img",{key:0,loading:"lazy",class:"absolute top-0 left-0 w-full h-full object-cover",src:r.fileReference[0].url,alt:""},null,8,ALi)):Ye("v-if",!0)]),$e("div",$Li,[Me(s,{modelValue:r.formState.name,"onUpdate:modelValue":t[0]||(t[0]=m=>r.formState.name=m),placeholder:r.t("rendition.placeHolder"),class:"rendition-name-input","onInput:keyDown":r.handleChangeNameRendition,"onInput:change":r.handleInput},null,8,["modelValue","placeholder"])])]),$e("p",ILi,Et(r.t("rendition.drag_files")),1),$e("div",RLi,[Me(r.VueDraggableNext,{modelValue:r.listFileRendition,"onUpdate:modelValue":t[1]||(t[1]=m=>r.listFileRendition=m),class:"dragArea list-group w-full flex flex-col gap-2"},{default:je(()=>[(W(!0),me(qt,null,bn(r.listFileRendition,(m,p)=>(W(),me("div",{key:p,class:"w-full"},[Me(l,{"ready-only":!1,"thumbnail-url":m.url,"thumbnail-name":m.name,"is-unaccepted":!1,class:"rendition-review-card",onDeleteCard:()=>{r.removeFile(m.url)}},null,8,["thumbnail-url","thumbnail-name","onDeleteCard"])]))),128))]),_:1},8,["modelValue"])]),$e("div",PLi,[r.isLoading?(W(),me("div",NLi)):Ye("v-if",!0)]),$e("div",MLi,[$e("span",{class:De(`text-[#3C9BFA] text-sm mt-2 cursor-pointer ${r.fileReference.length>=5?"pointer-events-none text-gray-600":""}`),onClick:r.triggerFileUpload},Et(r.t("rendition.upload_more")),3),$e("input",{ref:"fileInput",type:"file",class:"hidden",multiple:"",onChange:r.handleFileChange},null,544)])])):r.currentStep===1?(W(),me("div",LLi,[$e("div",FLi,Et(r.t("rendition.upload_in_progress")),1),$e("div",BLi,[Me(r.VisualWrapper,{name:"UploadInProgress"})]),$e("p",VLi,[Zt(Et(r.t("rendition.keep_open_the_modal")),1),t[4]||(t[4]=$e("br",null,null,-1)),Zt(" "+Et(r.t("rendition.uploading_background")),1)])])):r.currentStep===2?(W(),me("div",ULi,[$e("div",jLi,Et(r.isUploadSuccess?r.t("rendition.upload_successful"):r.t("rendition.upload_ failed")),1),$e("div",HLi,[Me(r.VisualWrapper,{name:r.isUploadSuccess?"Successful1":"Unsuccessful1"},null,8,["name"])]),$e("p",zLi,Et(r.isUploadSuccess?r.t("rendition.update_status_char"):r.t("rendition.update_fail")),1),r.isUploadSuccess?(W(),me("div",WLi,[Me(d,{content:r.canUpdate?"":"Uh Oh! You don't have access.",class:"!w-full","hide-on-click":!1},{default:je(()=>[Me(u,{modelValue:r._status,"onUpdate:modelValue":[t[2]||(t[2]=m=>r._status=m),r.handleSelectStatus],options:r.allStatus,"is-unaccepted":!1,class:"rendition-change-status","is-clearable":!1,onSearch:r.handleSearch},null,8,["modelValue","options"])]),_:1},8,["content"])])):Ye("v-if",!0)])):Ye("v-if",!0)])],!0)]),_:3},16,["show","disable"])}const KLi=za(yLi,[["render",qLi],["__scopeId","data-v-bd8166b7"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/ModalAddRendition.vue"]]),GLi=yt({__name:"RenditionFiles",props:{isLoading:{type:Boolean,required:!0},description:{type:String,required:!0},currentIdRendition:{type:String,required:!0},activeItem:{type:String,required:!0},renditionFiles:{type:Array,required:!0},updateRenditionDescriptionFnc:{type:Function,required:!0}},emits:["triggerFileUpload","addNewFileToSelectedRendition","handleRemoveFile","update:currentIdRendition","updateDescription","selectRenditionFile"],setup(e,{expose:t,emit:n}){t();const{changeSortOrderApi:r}=Wet(),o=e,a=n,i=oe(o.description||""),{permission:s}=sC(),l=oe(!1),u=b1().getEnvVariable("DELAY_SAVE")||3e3;vt(i,iy(async y=>{if(l.value){l.value=!1;return}await o.updateRenditionDescriptionFnc(y)||(l.value=!0,i.value=o.description)},Number(u)),{immediate:!1});const d=()=>{const y=document.createElement("input");y.type="file",y.multiple=!0,y.accept=["jpeg","png","mov","mp4","jpg"].join(","),y.style.display="none",y.addEventListener("change",w),y.click()},f=oe([]),m=te(()=>(o.renditionFiles??[]).reduce((k,O)=>(k[O.id]=O,k),{})),{getRenditionDetail:p}=hDe(),v=te(()=>{var y;return((y=f.value)==null?void 0:y.length)??0});vt(()=>o.renditionFiles,()=>{var y;f.value=((y=o.renditionFiles)==null?void 0:y.map(D=>D.id))??[],o.renditionFiles.forEach(D=>{m.value[D.id]=D})},{immediate:!0,deep:!0});const g=async()=>{try{const y=Array.from(new Set(f.value));if(o.currentIdRendition)if(await r(o.currentIdRendition,y))p(o.currentIdRendition);else throw new Error("Update failed.")}catch{_s().showMessage("Update failed.","error")}},w=y=>{a("addNewFileToSelectedRendition",y)},x={changeSortOrderApi:r,props:o,emits:a,description:i,permission:s,revertDescription:l,DELAY_MS:u,triggerFileUpload:d,renditionAttachmentIds:f,renditionAttachments:m,getRenditionDetail:p,numberOfFiles:v,updateSorting:g,handleChangeFile:w,handleRemoveFile:y=>{var D;((D=Object.keys(m.value))==null?void 0:D.length)<2?_s().showMessage("Cannot be deleted. Each rendition must have at least one file","error"):a("handleRemoveFile",y)},handleClickCard:y=>{const D=String(y);a("selectRenditionFile",D)},get ArboTextArea(){return Gvn},get VueDraggableNext(){return u7n}};return Object.defineProperty(x,"__isScriptSetup",{enumerable:!1,value:!0}),x}}),YLi={class:"rendition-files"},ZLi={class:"my-2 flex justify-between"},XLi={class:"w-max"},JLi={class:"list-file overflow-auto"},QLi={class:"flex justify-center mt-2"},eFi={key:0,class:"loader"};function tFi(e,t,n,r,o,a){const i=Tr("TessNonInteractiveChip"),s=Tr("ArboTooltip"),l=Tr("TessReviewFileCard"),u=Tr("ArboButton");return W(),me("div",YLi,[Me(r.ArboTextArea,{modelValue:r.description,"onUpdate:modelValue":t[0]||(t[0]=d=>r.description=d),"max-height":"64px",placeholder:"Enter description",disabled:!r.permission.editRendition},null,8,["modelValue","disabled"]),$e("div",ZLi,[t[2]||(t[2]=$e("div",{class:"flex items-center justify-between flex-1"},[$e("span",{class:"font-lato text-[14px] font-bold leading-[18px] flex-1"},"Review files")],-1)),$e("div",XLi,[Me(s,{delay:[300,0],"hide-on-click":!1,content:`${r.numberOfFiles} review files`},{default:je(()=>[Me(i,{"component-styles":{background:"#F3F5F8"},icon:"File",label:String(r.numberOfFiles)},null,8,["label"])]),_:1},8,["content"])])]),$e("div",JLi,[Me(r.VueDraggableNext,{modelValue:r.renditionAttachmentIds,"onUpdate:modelValue":t[1]||(t[1]=d=>r.renditionAttachmentIds=d),"item-key":"id",class:"flex flex-col gap-2",disabled:!r.permission.addReviewFiles,onChange:r.updateSorting},{default:je(()=>[(W(!0),me(qt,null,bn(r.renditionAttachmentIds,d=>{var f,m;return W(),me("div",{key:d},[Me(l,{"disable-drag":!r.permission.addReviewFiles,"ready-only":!r.permission.deleteReviewFiles,class:De({selected:r.renditionAttachments[d].id==n.activeItem}),"thumbnail-url":(f=r.renditionAttachments[d])==null?void 0:f.thumbnail,"thumbnail-name":(m=r.renditionAttachments[d])==null?void 0:m.name,"is-unaccepted":!1,"shared-styles":{"--review-card--background":"#F3F5F8"},onClick:p=>r.handleClickCard(d),onDeleteCard:()=>{r.handleRemoveFile(d)}},null,8,["disable-drag","ready-only","class","thumbnail-url","thumbnail-name","onClick","onDeleteCard"])])}),128))]),_:1},8,["modelValue","disabled"])]),$e("div",QLi,[n.isLoading?(W(),me("div",eFi)):Ye("v-if",!0)]),r.permission.addReviewFiles?(W(),st(u,on({key:0},{prefixIcon:"Plus",type:"secondary",class:"actions-item",label:"Add more review files"},{disable:r.numberOfFiles>=5,class:"w-full",onClick:r.triggerFileUpload}),null,16,["disable"])):Ye("v-if",!0)])}const nFi=za(GLi,[["render",tFi],["__scopeId","data-v-e25366db"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/RenditionFiles.vue"]]),rFi=yt({__name:"RenditionList",props:{statusFetching:{type:String,required:!0},currentIdRendition:{type:String,required:!0},loadingMoreRendition:{type:Boolean,required:!0},totalRenditionPage:{type:Number,required:!0},initPage:{type:Number,required:!1}},emits:["handleCreateNewRendition","selectRendition","copyLink","deleteRendition","loadOlderRendition","loadNewerRendition"],setup(e,{expose:t,emit:n}){const r=LL(),{renditionList:o}=ia(r),a=n,{permission:i}=sC(),s=e,l=oe(),u=oe(null),d=k=>{a("copyLink",k)},f=k=>{a("deleteRendition",k)},m=k=>{var O;l!=null&&l.value&&((O=l.value)==null||O.clearFile()),a("handleCreateNewRendition",k)},p=k=>{a("selectRendition",k)},v=te(()=>{const k=Object.keys(o.value).map(O=>o.value[O]);return k.sort((O,R)=>new Date(R.created_at).getTime()-new Date(O.created_at).getTime()),k.map(O=>O.id)}),g=()=>{var k;(k=l.value)==null||k.clearFile()},w=hr({start:(s==null?void 0:s.initPage)||_N,end:(s==null?void 0:s.initPage)||_N,total:1,loading:!1});vt(()=>s.totalRenditionPage,k=>{w.total=k});const S=async(k,O)=>{const R=document.getElementById(`rendition_${k}`);R&&It(()=>{setTimeout(()=>{R==null||R.scrollIntoView(),O&&(R==null||R.classList.add("highlight"),setTimeout(()=>{R==null||R.classList.remove("highlight")},3e3))},1e3)})},E=fDe(),{redirectConfig:x}=ia(E);vt(()=>s.currentIdRendition,()=>{var k,O,R;(k=x.value)!=null&&k.renditionConfig&&((R=(O=x.value)==null?void 0:O.renditionConfig)==null?void 0:R.renditionId)===s.currentIdRendition&&It(()=>{var I;(I=s.currentIdRendition)!=null&&I.trim()&&S(s.currentIdRendition,!0)})},{immediate:!0}),mn(()=>{_ee(u.value,async()=>{w.loading||w.start<=1||(w.start=w.start-1,w.loading=!0,a("loadNewerRendition",w.start),w.loading=!1)},{distance:10,direction:"top",canLoadMore:()=>w.start>1&&!w.loading}),_ee(u.value,async()=>{w.loading&&w.end>=w.total||(w.end=w.end+1,w.loading=!0,a("loadOlderRendition",w.end),w.loading=!1)},{distance:10,direction:"bottom",canLoadMore:()=>w.end<w.total&&!w.loading})});const y=()=>{w.start=_N,w.end=_N,w.total=_N};t({elementRef:u,clearFile:g,reset:y});const D={renditionStore:r,renditionList:o,emits:a,permission:i,props:s,uploadRef:l,elementRef:u,handleCopyLink:d,handleDeleteRendition:f,handleCreateNewRendition:m,handleSelectKey:p,renditionIds:v,clearFile:g,page:w,gotoRendition:S,redirectStore:E,redirectConfig:x,handleResetList:y,UploadRenditionFiles:qet,get STATUS_FETCH(){return Qk}};return Object.defineProperty(D,"__isScriptSetup",{enumerable:!1,value:!0}),D}}),oFi={class:"flex flex-col justify-between rendition-list"},aFi={key:0,class:"rendition-upload-new"},iFi={ref:"elementRef",class:"flex-1 overflow-y-auto overflow-x-hidden"},sFi={key:0,class:"flex flex-col gap-y-2"},lFi=["id","onClick"],uFi={key:1,class:"flex flex-col gap-y-2"},cFi={key:2,class:"h-10 flex justify-center items-center"};function dFi(e,t,n,r,o,a){const i=Tr("TessRenditionCard"),s=Tr("ArboSkeletonLoading");return W(),me("div",oFi,[r.permission.createRendition?(W(),me("div",aFi,[Me(r.UploadRenditionFiles,{ref:"uploadRef","rendition-id":void 0,type:"small",onHandleCreateNewRendition:r.handleCreateNewRendition},null,512)])):Ye("v-if",!0),$e("div",iFi,[n.statusFetching!==r.STATUS_FETCH.LOADING?(W(),me("div",sFi,[(W(!0),me(qt,null,bn(r.renditionIds,l=>(W(),me("div",{id:`rendition_${l}`,key:l,class:"rendition-item",onClick:()=>r.handleSelectKey(l)},[Me(i,{active:l===n.currentIdRendition,"rendition-data":r.renditionList[l],"is-deletable":r.permission.deleteRendition,"has-new-comment":!!r.renditionList[l].has_new_comment,"is-read-only":!1,tooltip:r.renditionList[l].name||"",disabled:!1,onCopy:r.handleCopyLink,onDelete:r.handleDeleteRendition,onOnClick:r.handleSelectKey},null,8,["active","rendition-data","is-deletable","has-new-comment","tooltip"])],8,lFi))),128))])):(W(),me("div",uFi,[(W(),me(qt,null,bn(5,l=>$e("div",{key:l},[Me(s,{width:"144px"})])),64))])),n.loadingMoreRendition?(W(),me("div",cFi,[...t[0]||(t[0]=[$e("div",{class:"loader"},null,-1)])])):Ye("v-if",!0)],512)])}const fFi=za(rFi,[["render",dFi],["__scopeId","data-v-fecfea63"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/RenditionList.vue"]]),hFi=yt({__name:"RenditionNodata",setup(e,{expose:t}){const{t:n}=Ux(),r=xp(),{sceneData:o}=ia(r),{getEnvVariable:a}=b1(),i=()=>{if(!o.value)return;const{entity_id:p,id:v}=o.value,g=a("BASE_REVIEW_URL"),w=rh({type:"review_scene",config:{reviewDomain:g,ws_code:dp(),scene_id:v,take_id:p}});window.open(w.url,"_blank")},s=oe(),l=()=>{var p;(p=s.value)==null||p.clearFile()},u=vK(),{hasOpenPermission:d}=ia(u),f=te(()=>d.value.review);t({clearFile:l});const m={t:n,sceneStore:r,sceneData:o,getEnvVariable:a,redirectToArboReview:i,uploadRef:s,clearFile:l,permissionStore:u,hasOpenPermission:d,canOpenRendition:f,EmptyData:Cle,UploadRenditionFiles:qet};return Object.defineProperty(m,"__isScriptSetup",{enumerable:!1,value:!0}),m}}),pFi={class:"rendition-no-data"},mFi={class:"flex justify-center items-center"},gFi={class:"upload"};function vFi(e,t,n,r,o,a){const i=Tr("ArboButton");return W(),me("div",pFi,[$e("div",{class:De(["rendition-no-data-container",{"no-open-in":!r.canOpenRendition}])},[r.canOpenRendition?(W(),st(i,{key:0,label:r.t("common.open_in_new_review"),class:"w-ful",style:{width:"100%"},type:"secondary",onClick:r.redirectToArboReview},null,8,["label"])):Ye("v-if",!0),$e("div",mFi,[Me(r.EmptyData,{type:"rendition",class:"max-w-[600px]"})]),$e("div",gFi,[Me(r.UploadRenditionFiles,{ref:"uploadRef",type:"default"},null,512)])],2)])}const yFi=za(hFi,[["render",vFi],["__scopeId","data-v-51d1de48"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/empty-data/RenditionNodata.vue"]]),bFi={},wFi={class:"flex-col h-full w-full"};function _Fi(e,t){return W(),me("div",wFi,[...t[0]||(t[0]=[d2('<div class="flex flex-row w-full px-4 gap-x-[16px] h-full" data-v-6fa8c2fc><div class="w-[197px] flex flex-col mr-4" data-v-6fa8c2fc><div class="h-[62px] frame white:bg-gray-700 w-[197px] mb-2" data-v-6fa8c2fc></div><div class="flex-1" data-v-6fa8c2fc><div class="h-[172px] frame white:bg-gray-700 w-[197px] mb-2" data-v-6fa8c2fc></div><div class="h-[172px] frame white:bg-gray-700 w-[197px] mb-2" data-v-6fa8c2fc></div><div class="h-[172px] frame white:bg-gray-700 w-[197px] mb-2" data-v-6fa8c2fc></div></div></div><div class="flex flex-col gap-4 flex-1" data-v-6fa8c2fc><div class="flex w-full flex-col gap-[2px]" data-v-6fa8c2fc><div class="h-[36px] frame white:bg-gray-700 w-full border-b" data-v-6fa8c2fc></div><div class="flex items-center justify-center w-full frame white:bg-gray-700 animate-pulse aspect-[16/9]" data-v-6fa8c2fc><svg class="w-20 h-24 text-gray-400 white:text-gray-600" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 18" data-v-6fa8c2fc><path d="M18 0H2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2Zm-5.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm4.376 10.481A1 1 0 0 1 16 15H4a1 1 0 0 1-.895-1.447l3.5-7A1 1 0 0 1 7.468 6a.965.965 0 0 1 .9.5l2.775 4.757 1.546-1.887a1 1 0 0 1 1.618.1l2.541 4a1 1 0 0 1 .028 1.011Z" data-v-6fa8c2fc></path></svg></div></div><div class="flex flex-col" data-v-6fa8c2fc><div class="h-[68px] frame white:bg-gray-700 w-full mb-2" data-v-6fa8c2fc></div><div class="flex flex-row justify-between items-center" data-v-6fa8c2fc><div class="h-5 frame white:bg-gray-700 w-44 mb-2 max-w-[50%]" data-v-6fa8c2fc></div><div class="h-8 frame white:bg-gray-700 w-[104px] mb-2" data-v-6fa8c2fc></div></div><div class="h-9 frame white:bg-gray-700 w-full mb-2" data-v-6fa8c2fc></div><div class="h-9 frame white:bg-gray-700 w-full mb-2" data-v-6fa8c2fc></div><div class="h-9 frame white:bg-gray-700 w-full mb-2" data-v-6fa8c2fc></div></div></div></div><span class="sr-only" data-v-6fa8c2fc>Loading...</span>',2)])])}const SFi=za(bFi,[["render",_Fi],["__scopeId","data-v-6fa8c2fc"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/empty-data/RenditionSkeletonLoading.vue"]]),EFi=yt({__name:"SceneRendition",emits:["loaded"],setup(e,{expose:t,emit:n}){const r=n,{getRenditions:o,upLoadFile:a,removeFile:i,updateFileRendition:s,updateInfoRendition:l,uploadNewFileInNewRendition:u,checkLengthAndTypeRendition:d,deleteRendition:f,getRenditionDetail:m}=hDe(),{getEnvVariable:p}=b1(),v=xp(),g=LL(),w=E1(),S=vK(),E=fDe(),{sceneData:x,currentIdRendition:y,currentSceneTabId:D}=ia(v),{renditionList:k,numberOfRendition:O}=ia(g),{commentRenditionId:R}=ia(w),{hasOpenPermission:I}=ia(S),{redirectConfig:$}=ia(E),P=oe(!1),U=oe(Qk.LOADING),F=oe(!1),L=oe(),j=oe(),B=oe(_N),G=oe(0),J=oe(),se=oe(0),ve=oe(!1),fe=oe(),K=oe(),N=oe(),Y=oe(""),de=te(()=>{if(I.value.review)return{label:"Open Review",icon:"PenRuler",tooltip:"Open current rendition in Review"}}),Ce=te(()=>{var pe;return((pe=k.value[y.value])==null?void 0:pe.attachments.map(Ue=>({...Ue})))??[]}),we=te(()=>{const q=Ce.value??[];let pe=[];return pe=q==null?void 0:q.map(Ue=>{var Pe,Se;const ct={type:(Ue==null?void 0:Ue.accept_type)||"",src:Ue==null?void 0:Ue.path,id:Ue==null?void 0:Ue.id,framePerSecond:24,poster:Ue==null?void 0:Ue.thumbnail,fileType:Ue.mimetype||""};if((Ue==null?void 0:Ue.accept_type)=="video"&&(ct.fileType=="video/quicktime"&&(ct.fileType=""),ct.poster=Ue.thumbnail,Ue!=null&&Ue.metadata)){const mt=((Se=(Pe=Ue.metadata)==null?void 0:Pe.avg_frame_rate)==null?void 0:Se.split("/"))??void 0;mt&&(ct.framePerSecond=Number((Number(mt[0])/Number(mt[1])).toFixed(2)))}return ct}),pe}),ee=te(()=>{var q;return((q=k.value[y.value])==null?void 0:q.name)??""}),Q=()=>{const q=L.value;if(!q||window.innerWidth>1560)return{};const pe=q.getBoundingClientRect();return{"max-height":(window.innerHeight-pe.top-pe.height-72).toFixed(0)+"px"}},Ae=q=>{q&&(y.value=q,k.value[q]&&(k.value[q].has_new_comment=0))},be=async(q,pe=!1)=>{var ct,Pe,Se,mt;const Ue=await o(q,pe?Ae:void 0);return Ue!=null&&Ue.success&&((Pe=(ct=Ue.data)==null?void 0:ct.data)!=null&&Pe.length?(se.value=+Ue.data.meta.total,U.value=Qk.SUCCESS):Object.keys(k.value).length||(U.value=Qk.NO_DATA),O.value=Number(((mt=(Se=Ue==null?void 0:Ue.data)==null?void 0:Se.meta)==null?void 0:mt.total)??0)),Ue},Ve=q=>{var pe;(pe=k.value[q])!=null&&pe.has_new_comment&&(k.value[q].has_new_comment=0),q!==y.value&&(y.value=q,R.value=q)},Oe=async q=>{try{if(F.value=!0,!await f(q))return;O.value--;const Ue=Object.keys(k.value),ct=Ue[0],Pe=Ue[Ue.length-1];Be(ct,Pe)}catch(pe){console.error("handleDeleteRendition",pe)}finally{F.value=!1}},Be=async(q,pe)=>{if(!q){U.value=Qk.NO_DATA;return}se.value--,pe&&(fe.value=pe),ke(!0)},ke=async q=>{var pe;q||(U.value=Qk.LOADING),k.value={},await be({page:_N,per_page:Lx}),(pe=J.value)==null||pe.reset()},rt=async(q=1)=>{var ct;ve.value=!0;const pe=await be({page:q,per_page:Lx,first_item_rendition_id:fe.value}),Ue=pe==null?void 0:pe.data;G.value=Number((ct=Ue==null?void 0:Ue.meta)==null?void 0:ct.last_page),ve.value=!1},Xe=q=>{var pe;return l({renditionId:y.value,renditionName:q,description:((pe=k.value[y.value])==null?void 0:pe.description)??""})},Ke=q=>l({renditionId:y.value,renditionName:ee.value,description:q}),et=async(q,pe)=>{const Ue=k.value[y.value],ct=JSON.parse(JSON.stringify(k.value[y.value])),Pe={renditionId:y.value,renditionName:Ue.name,description:Ue.description??""},Se=pe.replace(/^<p>|<\/p>$/g,"");if(q===tOt.description){if(!pe){_s().showMessage("Update failed.","error");return}Pe.renditionName=ee.value,Pe.description=Se}else q===tOt.renditionName&&(Pe.renditionName=Se);await l(Pe)==!0?k.value[y.value].description=Pe.description:k.value[y.value].description=String(ct.description)},xe=q=>{Xe(q)},Ne=async q=>{F.value=!0,await i(q,y.value),F.value=!1},dt=q=>{const pe=d(void 0,q);pe.length?u(pe):_s().showMessage("Please select the correct file format and the same file type","error")},qe=async q=>{const pe=q.target,Ue=d(y.value,pe.files);try{if(Ue.length){P.value=!0;const ct=await a(Ue),Pe=ct.map(({name:Se,mimetype:mt,accept_type:Ut,path:Dt,thumbnail:Bt,type:an,metadata:_t})=>({name:Se,type:an,mimetype:mt,accept_type:Ut,path:Dt,thumbnail:Bt,metadata:_t}));if(ct.length){const Se={data:Pe};await s(y.value,Se)}}}catch(ct){console.error(ct)}finally{P.value=!1}},ot=async q=>{const pe=d(void 0,q);pe.length?u(pe):_s().showMessage("Please select the correct file format and the same file type","error")},wt=()=>{var q,pe;U.value===Qk.NO_DATA?(q=N.value)==null||q.clearFile():(pe=J.value)==null||pe.clearFile()},bt=async(q,pe)=>{const Ue=pe||1;try{if(U.value==Qk.NO_DATA){let ct=!1;O.value==1&&(ct=!0),await be({page:Ue,per_page:Lx},ct)}else{const ct=await m(q);ct&&(k.value={[q]:ct,...k.value})}}catch(ct){console.error("handleUploadSuccessNewRendition",ct)}finally{U.value=Qk.SUCCESS}},kt=q=>{var Ue,ct,Pe;const pe=(Ue=we.value.find(Se=>Se.id==q))==null?void 0:Ue.src;(ct=K.value)!=null&&ct.selectPreviewItem&&pe&&((Pe=K.value)==null||Pe.selectPreviewItem(pe))},Ct=q=>{Y.value=q.state.id},cn=()=>{m(y.value)},_n=q=>{_s().showMessage(q==null?void 0:q.message,"error")},nn=q=>{const pe=ny(),Ue=rh({type:"hub_rendition",config:{baseDomain:p("BASE_URL"),rendition_id:q||"",scene_id:pe||"",ws_code:dp()}}).url;fmr(Ue)},un=()=>{var pe;const q=rh({type:"review_rendition",config:{ws_code:dp(),scene_id:ny(),rendition_id:y.value,reviewDomain:p("BASE_REVIEW_URL"),take_id:((pe=x.value)==null?void 0:pe.entity_id)||""}});window.open(q.url,"_blank")};vt([()=>y.value,()=>D.value],()=>{D.value=="rendition"&&(R.value=y.value)},{immediate:!0,deep:!0}),vt(()=>{var q;return(q=$.value)==null?void 0:q.renditionConfig},()=>{}),RBe(L,iy(()=>{j.value=Q()},17)),nu(async()=>{var Ue,ct,Pe;U.value=Qk.LOADING;const q=(Ue=$==null?void 0:$.value)==null?void 0:Ue.renditionConfig;q&&q.renditionId&&(B.value=Number(q==null?void 0:q.page)||_N);const pe=await be({page:B.value,per_page:Lx,first_item_rendition_id:fe.value});pe!=null&&pe.success&&(G.value=Number((Pe=(ct=pe.data)==null?void 0:ct.meta)==null?void 0:Pe.last_page),y.value=(q==null?void 0:q.renditionId)||Object.keys(k.value)[0],r("loaded"))}),Ql(()=>{R.value=void 0}),t({handleReloadPage:ke,addFiles:q=>{dt(q)}});const wn={emits:r,getRenditions:o,upLoadFile:a,removeFile:i,updateFileRendition:s,updateInfoRendition:l,uploadNewFileInNewRendition:u,checkLengthAndTypeRendition:d,deleteRendition:f,getRenditionDetail:m,getEnvVariable:p,sceneStore:v,renditionStore:g,commentStore:w,permissionStore:S,commentRedirect:E,sceneData:x,currentIdRendition:y,currentSceneTabId:D,renditionList:k,numberOfRendition:O,commentRenditionId:R,hasOpenPermission:I,redirectConfig:$,isLoading:P,statusFetching:U,isDeleting:F,renditionPlayerRef:L,calculatedHeight:j,initPage:B,totalRenditionPage:G,childComponentRef:J,totalRendition:se,loadingMoreRendition:ve,lastRenditionIdpPayload:fe,arboMediaPlayerRef:K,noDataRenditionRef:N,currentItemPlay:Y,openReviewBtnConfig:de,currentRenditionFile:Ce,renditionFiles:we,renditionName:ee,calculateHeight:Q,callBackSetIdActive:Ae,getListRendition:be,handleChangeRendition:Ve,handleDeleteRendition:Oe,deleteRenditionSuccess:Be,handleReloadPage:ke,handleLoadMoreRendition:rt,updateRenditionNameFnc:Xe,updateRenditionDescriptionFnc:Ke,handleChangeInfoRendition:et,handleChangeName:xe,handleRemoveFile:Ne,addFileToNewRendition:dt,addNewFileToSelectedRendition:qe,handleFileChange:ot,clearFile:wt,handleUploadSuccessNewRendition:bt,handleSelectRenditionFile:kt,handleChangeItemPlay:Ct,reloadRenditionItem:cn,handleVideoError:_n,handleCopyLink:nn,handleOpenInArboReview:un,get ArboMediaPlayer(){return rMe},ModalAddRendition:KLi,RenditionFiles:nFi,RenditionList:fFi,CategoryHeader:Yse,RenditionNodata:yFi,get STATUS_FETCH(){return Qk},RenderSkeletonLoading:SFi};return Object.defineProperty(wn,"__isScriptSetup",{enumerable:!1,value:!0}),wn}}),CFi={class:"bg-white w-full h-full rendition-main min-h-full min-w-[637px] max-h-full"},xFi={class:"flex flex-1 justify-end-end"},kFi={key:1,class:"flex gap-x-[16px] px-4 pb-4 flex-1 h-[calc(100%_-_36px)] max-h-[calc(100vh_-_240px)]"},TFi={key:0,class:"rendition-media"},OFi={ref:"renditionPlayerRef",class:"rendition-preview"};function DFi(e,t,n,r,o,a){var l,u;const i=Tr("TessNonInteractiveChip"),s=Tr("ArboTooltip");return W(),me(qt,null,[$e("div",CFi,[Me(r.CategoryHeader,{title:"Renditions",onRefresh:r.handleReloadPage},{default:je(()=>[$e("div",xFi,[Me(s,{delay:[300,0],"hide-on-click":!1,content:`${String(r.numberOfRendition)} renditions`},{default:je(()=>[Me(i,{"component-styles":{background:"#F3F5F8"},icon:"Clapperboard",label:String(r.numberOfRendition)},null,8,["label"])]),_:1},8,["content"])])]),_:1}),r.statusFetching===r.STATUS_FETCH.NO_DATA?(W(),st(r.RenditionNodata,{key:0,ref:"noDataRenditionRef"},null,512)):(W(),me(qt,{key:1},[r.statusFetching===r.STATUS_FETCH.LOADING?(W(),st(r.RenderSkeletonLoading,{key:0})):Ye("v-if",!0),r.statusFetching===r.STATUS_FETCH.SUCCESS?(W(),me("div",kFi,[Me(r.RenditionList,{ref:"childComponentRef","init-page":r.initPage,class:De(["rendition-list",`${r.statusFetching===r.STATUS_FETCH.SUCCESS?"opacity-100":"opacity-0"} `]),"total-rendition-page":r.totalRenditionPage,"rendition-list":r.renditionList,"status-fetching":r.statusFetching,"current-id-rendition":r.currentIdRendition,"loading-more-rendition":r.loadingMoreRendition,onLoadNewerRendition:r.handleLoadMoreRendition,onLoadOlderRendition:r.handleLoadMoreRendition,onHandleCreateNewRendition:r.handleFileChange,onSelectRendition:r.handleChangeRendition,onCopyLink:r.handleCopyLink,onDeleteRendition:r.handleDeleteRendition},null,8,["init-page","total-rendition-page","class","rendition-list","status-fetching","current-id-rendition","loading-more-rendition"]),r.statusFetching===r.STATUS_FETCH.SUCCESS?(W(),me("div",TFi,[$e("div",OFi,[Me(r.ArboMediaPlayer,on({ref:"arboMediaPlayerRef",style:{"--media-player--width":"100%"},name:r.renditionName||"","list-items":r.renditionFiles},{openIn:r.openReviewBtnConfig},{onChangeName:r.handleChangeName,onOpenInArboReview:r.handleOpenInArboReview,onOnErrorVideo:r.reloadRenditionItem,onChange:r.handleChangeItemPlay,onOnError:r.handleVideoError}),null,16,["name","list-items"])],512),Me(r.RenditionFiles,{style:dn({...r.calculatedHeight}),description:((u=(l=r.renditionList)==null?void 0:l[r.currentIdRendition])==null?void 0:u.description)||"","is-loading":r.isLoading,"rendition-files":r.currentRenditionFile,"active-item":r.currentItemPlay,"current-id-rendition":r.currentIdRendition,"update-rendition-description-fnc":r.updateRenditionDescriptionFnc,"onUpdate:currentIdRendition":r.handleChangeRendition,onUpdateDescription:r.handleChangeInfoRendition,onAddNewFileToSelectedRendition:r.addNewFileToSelectedRendition,onHandleRemoveFile:r.handleRemoveFile,onSelectRenditionFile:r.handleSelectRenditionFile},null,8,["style","description","is-loading","rendition-files","active-item","current-id-rendition"])])):Ye("v-if",!0)])):Ye("v-if",!0)],64))]),(W(),st(DS,{to:"body"},[Me(r.ModalAddRendition,{onUploadSuccess:r.handleUploadSuccessNewRendition,onClose:r.clearFile})]))],64)}const AFi=za(EFi,[["render",DFi],["__scopeId","data-v-3734fddd"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/SceneRendition.vue"]]),$Fi=yt({__name:"SceneRenditions",emits:["loaded"],setup(e,{expose:t,emit:n}){const r=oe(),o=()=>{var m;(m=r.value)==null||m.handleReloadPage()};t({addFiles:(m,p)=>{var v;(v=r.value)==null||v.addFiles(m,p)}});const a=E1(),{currentCommentTab:i}=ia(a),s=LL(),{numberOfRendition:l}=ia(s);_ye(()=>{l.value===0&&(i.value=cu.Scene)});const u=n,f={renditionView:r,handleReload:o,commentStore:a,currentCommentTab:i,renditionStore:s,numberOfRendition:l,emits:u,handleLoaded:()=>{u("loaded")},RenditionSelect:AFi,NetworkWrapper:dDe};return Object.defineProperty(f,"__isScriptSetup",{enumerable:!1,value:!0}),f}});function IFi(e,t,n,r,o,a){return W(),st(r.NetworkWrapper,{type:"rendition","handle-reload":r.handleReload,"auto-reload":!0},{view:je(()=>[Me(r.RenditionSelect,{ref:"renditionView",onLoaded:r.handleLoaded},null,512)]),_:1})}const RFi=za($Fi,[["render",IFi],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-renditions/SceneRenditions.vue"]]),PFi={},NFi={class:"comment-skeleton-editor"};function MFi(e,t){return W(),me("div",NFi,[Ye(" Top Toolbar "),t[0]||(t[0]=d2('<div class="toolbar" data-v-fa8089b1><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div><div class="toolbar-icon skeleton-animation" data-v-fa8089b1></div></div>',1)),Ye(" Main Content Area "),Ye(" Right Side Scrollbar "),Ye(" Bottom Right Send Button "),t[1]||(t[1]=$e("div",{class:"send-btn skeleton-animation"},null,-1))])}const LFi=za(PFi,[["render",MFi],["__scopeId","data-v-fa8089b1"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/comments/EditorSkeleton.vue"]]),FFi=yt({__name:"BodySkeleton",setup(e,{expose:t}){t();const n={CommentSkeleton:k0n,EditorSkeleton:LFi};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),BFi={"body-skeleton":"_body-skeleton_r0ior_1","menu-section":"_menu-section_r0ior_13","main-content-section":"_main-content-section_r0ior_21","main-content":"_main-content_r0ior_21",row:"_row_r0ior_39","comment-section":"_comment-section_r0ior_44","comment-section-skeleton":"_comment-section-skeleton_r0ior_51"},VFi={class:"flex flex-col align-bottom justify-end",style:{gap:"8px"}};function UFi(e,t,n,r,o,a){return W(),me("div",{class:De(e.$style["body-skeleton"])},[$e("div",{class:De(e.$style["menu-section"])},[ft(e.$slots,"menu",{},()=>[t[0]||(t[0]=d2('<div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div><div class="btn icon-btn skeleton-animation rounded-[0]"></div>',6))])],2),ft(e.$slots,"content",{},()=>[$e("div",{class:De(e.$style["main-content-section"])},[$e("div",{class:De(["white-bg flex flex-col",e.$style["main-content"]])},[...t[1]||(t[1]=[d2('<div class="flex-row justify-between"><div class="btn long-btn small-btn skeleton-animation"></div><div class="btn icon-btn small-btn skeleton-animation"></div></div><div class="grid-card-row"><div class="card skeleton-animation rounded-[0]"></div><div class="card skeleton-animation rounded-[0]"></div><div class="card skeleton-animation rounded-[0]"></div><div class="card skeleton-animation rounded-[0]"></div></div><div class="flex-row flex-1 h-full justify-end align-bottom"><div class="card card-long skeleton-animation rounded-[0]"></div></div>',3)])],2)],2)]),$e("div",{class:De(e.$style["comment-section"])},[ft(e.$slots,"comments",{},()=>[$e("div",{class:De(e.$style["comment-section-skeleton"])},[t[3]||(t[3]=$e("div",{class:"skeleton-animation"},null,-1)),t[4]||(t[4]=$e("div",{class:"flex-row justify-between"},[$e("div",{class:"skeleton-animation"}),$e("div",{class:"btn icon-btn skeleton-animation"})],-1)),$e("div",VFi,[Me(r.CommentSkeleton),Me(r.CommentSkeleton),t[2]||(t[2]=$e("div",{class:"btn small-btn skeleton-animation"},null,-1))]),Me(r.EditorSkeleton)],2)])],2)],2)}const jFi=za(FFi,[["render",UFi],["__cssModules",{$style:BFi}],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/layouts/BodySkeleton.vue"]]),lJ="home",HFi=yt({__name:"SceneTab",props:{loading:{type:Boolean,required:!0}},setup(e,{expose:t}){t();const n={ADD_RENDITION:"addRendition",MANAGE_RENDITION:"manageRendition",VIEW_ALL_ACTIVITIES:"viewAllActivities"},r=xp(),{getSceneData:o}=r,{currentSceneTabId:a}=ia(r),i=oe(!1),s=oe(!1),l=oe(),u=oe(),{permission:d}=sC(),f={info:Uga,metric:w8a,rendition:RFi,log:k_a,home:yga},m=Kb(),{dashboardActionQueue:p}=ia(m),v=E1(),g=CU(),{connectState:w,isConnect:S}=ia(g),{commentRenditionId:E,isCommentHeaderReady:x}=ia(v),y=async B=>{a.value=B,w.value.logs=S.value,w.value.rendition=S.value,w.value.metric=S.value},D=B=>{a.value=B},k=(B,G)=>{l.value.addFiles(B,G)},O=te(()=>!!(a.value==="rendition"&&d.value.createRendition)),R=(B,G)=>{var J;s.value=!1,(J=u.value)!=null&&J.addFiles&&u.value.addFiles(B,G)},I=()=>{s.value=!1},$=()=>{s.value=!0},P=()=>{s.value=!1,D("rendition")};vt(a,(B,G)=>{B=="info"&&G!="info"&&o()}),vt(a,B=>{if(B)try{const G=new URLSearchParams(window.location.search),J=Object.fromEntries(G.entries()),se=new URL(window.location.href);B&&B!==lJ?se.searchParams.set("tab",B):se.searchParams.delete("tab"),i.value&&B!=="rendition"&&(J.renditionId||J.renditionPage)?(se.searchParams.delete("renditionId"),se.searchParams.delete("renditionPage")):E.value="",window.history.replaceState({},"",se.toString())}catch(G){console.error("Error updating URL parameters:",G)}}),vt(p,B=>{if(B){switch(B){case n.ADD_RENDITION:s.value=!0;break;case n.MANAGE_RENDITION:D("rendition");break;case n.VIEW_ALL_ACTIVITIES:D("log");break;default:console.warn("Unknown dashboard action:",B)}p.value=void 0}},{deep:!0});const U={HOME:{id:"home",tooltipName:"Home",icon:"House",disable:!1},RENDITION:{id:"rendition",tooltipName:"Renditions",icon:"Clapperboard"},METRIC:{id:"metric",tooltipName:"Metrics",icon:"SquareRootVariable"},INFO:{id:"info",tooltipName:"Information",icon:"Info",disable:!1},LOG:{id:"log",tooltipName:"Activity log",icon:"Book"}};nu(()=>{try{const B=new URLSearchParams(window.location.search),G=Object.fromEntries(B.entries());if(a.value||(a.value=lJ),G.tab&&G.tab!==lJ)if(Object.values(U).map(se=>se.id).includes(G.tab)){const se=G.tab;D(se)}else console.warn("Invalid tab parameter in URL:",G.tab),a.value=lJ}catch(B){console.error("Error initializing tab from URL:",B),a.value=lJ}finally{i.value=!0}});const F=e,L={tabs:Object.values(U).map(B=>({...B,name:""})),keyLabel:"name",keyTooltip:"tooltipName",keyIcon:"icon",keyContent:"content",keyValue:"id",keyDisable:"disable",position:"left",value:""},j={DASHBOARD_ACTIONS:n,DEFAULT_TAB:lJ,sceneStore:r,getSceneData:o,currentSceneTabId:a,isMounted:i,isOpenNewRendition:s,commentRef:l,mainRef:u,permission:d,components:f,dashboardStore:m,dashboardActionQueue:p,commentStore:v,connectionStore:g,connectState:w,isConnect:S,commentRenditionId:E,isCommentHeaderReady:x,handleChangeTab:y,clickOnTab:D,handleAddFileComment:k,canDropRenditionFile:O,handleAddFileMain:R,handleCloseModal:I,handleCreateNewRendition:$,handleUploadFileRendition:P,TAB_CONFIG:U,props:F,tabProps:L,DropArea:rua,Comments:Cya,AddNewRenditionModal:Mya,get FILE_FORMAT(){return cbe},BodySkeleton:jFi};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),zFi={key:0,class:"add-rendition-button"},WFi={class:"main-content-area"};function qFi(e,t,n,r,o,a){const i=Tr("arbo-icon"),s=Tr("ArboTabs"),l=Tr("ArboButton");return W(),me(qt,null,[Me(r.BodySkeleton,null,bs({_:2},[n.loading?void 0:{name:"menu",fn:je(()=>[Me(s,on({...r.tabProps},{value:r.currentSceneTabId,onInput:r.handleChangeTab,class:"arbo-scene-body__tabs"}),{tab:je(({tab:u})=>[Me(i,{name:u.icon,size:"20px"},null,8,["name"])]),_:1},16,["value"]),r.permission.createRendition?(W(),me("div",zFi,[Me(l,on({suffixIcon:"RenditionPlus",label:"",type:"primary",class:"actions-item",color:"white"},{"suffix-tooltip":"Create rendition",onClick:r.handleCreateNewRendition}),null,16)])):Ye("v-if",!0)]),key:"0"},n.loading?void 0:{name:"content",fn:je(()=>[(W(),st(r.DropArea,{"file-type":["image/jpeg","image/png","video/mp4","video/quicktime","image/jpg"],"can-drop":r.canDropRenditionFile,"size-limit":5e7,key:r.currentSceneTabId,"allow-mixed-file-type":!1,"is-rendition-file":!0,"error-message":{SIZE:"File exceeds 50MB.",TYPE:"File format not supported.",DIFF:"Mixed file formats are not supported."},onAddFile:r.handleAddFileMain},{icon:je(()=>[Me(i,{name:"Upload",size:"84px",class:"icon"})]),text:je(()=>[...t[1]||(t[1]=[Zt("Drop review file here to create a new rendition.",-1)])]),main:je(()=>[$e("div",WFi,[r.currentSceneTabId!=null?(W(),st(lrr,{key:0},[(W(),st(Bd(r.components[r.currentSceneTabId]),{ref:"mainRef",onLoaded:t[0]||(t[0]=u=>r.isCommentHeaderReady=!0)},null,544))],1024)):Ye("v-if",!0)])]),_:1},8,["can-drop"]))]),key:"1"},n.loading?void 0:{name:"comments",fn:je(()=>[Me(r.DropArea,{"file-type":r.FILE_FORMAT,"can-drop":!!r.permission.createComment,"size-limit":5e6,"allow-mixed-file-type":!0,"is-rendition-file":!1,"error-message":{SIZE:"File exceeds 5MB.",TYPE:"File format not supported.",DIFF:"Mixed file formats are not supported."},onAddFile:r.handleAddFileComment},{icon:je(()=>[Me(i,{name:"Comments",size:"84px",class:"icon"})]),text:je(()=>[...t[2]||(t[2]=[Zt("Drop file here to attach to comment.",-1)])]),main:je(()=>[r.isCommentHeaderReady?(W(),st(r.Comments,{key:0,ref:"commentRef"},null,512)):Ye("v-if",!0)]),_:1},8,["file-type","can-drop"])]),key:"2"}]),1024),(W(),st(DS,{to:"body"},[Me(r.AddNewRenditionModal,on({opened:r.isOpenNewRendition},{onClose:r.handleCloseModal,onUpload:r.handleUploadFileRendition}),null,16)]))],64)}const KFi=za(HFi,[["render",qFi],["__scopeId","data-v-3900bb7c"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/scene-tab/SceneTab.vue"]]),GFi=yt({__name:"ShareSnackBar",setup(e,{expose:t}){t();const n=_s(),{notifications:r}=ia(n),o=te(()=>[...r.value]),a=p=>p.trim().startsWith("<svg"),i=oe("Copy"),s=()=>{setTimeout(()=>{i.value="Copy"},3e3)},l=p=>{navigator.clipboard.writeText(p).then(()=>{i.value="Copied",s()},()=>{i.value="Copy failed",s()})},u=oe(new Set),m={notificationStore:n,notifications:r,showNotifications:o,isSvgString:a,tooltip:i,resetTooltip:s,handleCopyError:l,hoveredNotifications:u,onMouseEnter:p=>{var v;u.value.add(p),(v=n.pauseAutoDismiss)==null||v.call(n,p)},onMouseLeave:p=>{var v;u.value.delete(p),(v=n.resumeAutoDismiss)==null||v.call(n,p)},get Button(){return Gr},get Icon(){return zs}};return Object.defineProperty(m,"__isScriptSetup",{enumerable:!1,value:!0}),m}}),YFi={"notification-wrapper":"_notification-wrapper_1rhyb_1","notification-item":"_notification-item_1rhyb_15","notification--success":"_notification--success_1rhyb_30","notification--error":"_notification--error_1rhyb_36","close-btn":"_close-btn_1rhyb_42","notification--info":"_notification--info_1rhyb_45","notification--warning":"_notification--warning_1rhyb_52","notification--interactive":"_notification--interactive_1rhyb_59","snackbar-type":"_snackbar-type_1rhyb_67",snackbar__message:"_snackbar__message_1rhyb_76",message:"_message_1rhyb_89","error-message":"_error-message_1rhyb_97",snackbar__icon:"_snackbar__icon_1rhyb_103","actions-notification":"_actions-notification_1rhyb_112","icon-draw":"_icon-draw_1rhyb_120","copy-btn":"_copy-btn_1rhyb_128","arbo__icon-btn":"_arbo__icon-btn_1rhyb_137"},ZFi=["onMouseenter","onMouseleave"],XFi=["innerHTML"],JFi=["innerHTML"];function QFi(e,t,n,r,o,a){const i=Ri("contrast");return W(),st(T3e,{name:"list",tag:"div",class:De(["notification-center",e.$style["notification-wrapper"]])},{default:je(()=>[(W(!0),me(qt,null,bn(r.showNotifications,s=>{var l;return Tt((W(),me("div",{key:s.id,class:De([e.$style["notification-item"],e.$style[`notification--${s.type||"info"}`],!(s!=null&&s.actions)||((l=s==null?void 0:s.actions)==null?void 0:l.length)==0?e.$style["snackbar-type"]:""]),onMouseenter:u=>r.onMouseEnter(s.id),onMouseleave:u=>r.onMouseLeave(s.id)},[$e("p",{class:De(e.$style.snackbar__message)},[$e("span",{class:De(e.$style.snackbar__icon)},[!s.icon&&s.type=="success"?(W(),st(r.Icon,{key:0,name:"CircleCheck"})):Ye("v-if",!0),!s.icon&&s.type=="interactive"?(W(),st(r.Icon,{key:1,name:"CircleCheck"})):!s.icon&&s.type=="error"?(W(),st(r.Icon,{key:2,name:"CircleXMark"})):!s.icon&&s.type=="info"?(W(),st(r.Icon,{key:3,name:"Info"})):s.icon&&r.isSvgString(s.icon)?(W(),me("i",{key:4,class:De(e.$style["icon-draw"]),innerHTML:s.icon},null,10,XFi)):s.icon&&!r.isSvgString(s.icon)?(W(),st(r.Icon,{key:5,src:s.icon,color:"var(--primary-color)"},null,8,["src"])):Ye("v-if",!0)],2),$e("span",{class:De(e.$style["error-message"])},[$e("span",{class:De(e.$style.message),innerHTML:s.message},null,10,JFi)],2)],2),s.type!=="interactive"?(W(),st(r.Button,{key:0,type:"secondary",class:De([e.$style["copy-btn"],"copy-snackbar-btn"]),"prefix-icon":"Copy","prefix-tooltip":r.tooltip,label:"",size:"24",style:{minWidth:"24px",width:"24px",height:"24px",padding:"0"},onClick:u=>r.handleCopyError(s.message)},null,8,["class","prefix-tooltip","onClick"])):Ye("v-if",!0)],42,ZFi)),[[i]])}),128))]),_:1},8,["class"])}const e3i=za(GFi,[["render",QFi],["__cssModules",{$style:YFi}],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/snackbar/ShareSnackBar.vue"]]);var d7n=(e=>(e.LOADING="LOADING",e.LOADED="LOADED",e.ERROR="ERROR",e))(d7n||{});const f7n=3,t3i=yt({__name:"PreviewMediaModal",props:{show:{type:Boolean,required:!0}},emits:["close"],setup(e,{expose:t,emit:n}){t();const r=e,o=n,a=oe(null),i=oe("LOADING"),s=oe(null),l=oe(null),u=oe(0),d=te(()=>a.value!==null),f=te(()=>{var $;return(($=a.value)==null?void 0:$.name)??""}),m=te(()=>{var $,P,U,F,L;return{type:w(($=a.value)==null?void 0:$.type),src:((P=a.value)==null?void 0:P.url)??"",poster:((U=a.value)==null?void 0:U.thumbnail)??"",framePerSecond:24,fileType:((F=a.value)==null?void 0:F.fileType)||"",name:((L=a.value)==null?void 0:L.name)??""}}),p=()=>{a.value=null,i.value="LOADING",s.value=null,u.value=0,o("close")},v=async($,P)=>{if(console.log("downloadFile",{name:$,url:P}),!$||!P){_s().showMessage("Invalid file information for download","error");return}try{const U=await fetch(P);if(!U.ok)throw new Error(`Network response was not ok: ${U.status} ${U.statusText}`);const F=await U.blob(),L=URL.createObjectURL(F),j=document.createElement("a");j.href=L,j.setAttribute("download",$),document.body.appendChild(j),j.click(),document.body.removeChild(j),URL.revokeObjectURL(L),_s().showMessage("Download started","success")}catch(U){ro(U,"downloadFile");const F=U instanceof TypeError?"Failed to download file (possible CORS restriction)":"Failed to download file";_s().showMessage(F,"error")}},g=$=>{if(!$||typeof $!="string")return!1;const P=$.toLowerCase();return P.includes("/")?P.startsWith("video/")||P.startsWith("image/")||P==="application/pdf":cbe.includes(P)},w=$=>{const P=($||"").toLowerCase();return P.includes("image")?"image":P.includes("pdf")?"pdf":"video"},S=()=>{try{if(typeof window>"u"||typeof BroadcastChannel>"u")return;const $=document.querySelector("main[id]"),P=$==null?void 0:$.getAttribute("id");if(!P)return;l.value=new BroadcastChannel(`file-upload-channel-${P}`),l.value.onmessage=async U=>{try{await k(U.data)}catch(F){ro(F,"onmessage")}},l.value.onmessageerror=U=>{ro(U,"BroadcastChannel message error"),s.value="Failed to receive message from communication channel",i.value="ERROR"}}catch($){ro($,"setupBroadcastChannel"),s.value="Failed to setup communication channel",i.value="ERROR"}},{getCommentFile:E}=pbe(),{downloadFileFromS3:x}=Kse(),y=ny(),D=async({path:$})=>{if(!$)return{message:"",url:""};try{const P=dp(),U=await x({id:P,path:$});if(U)return{url:U.url,message:U.message}}catch(P){ro(P,"fetchResourceUrl")}return{url:"",message:""}},k=async $=>{var P,U,F,L,j;try{if(!g($.mimeType)){console.log("File type not previewable, triggering download",$),v($.name,((P=$.data)==null?void 0:P.url)||$.url);return}if(i.value="LOADING",s.value=null,$.commenttype==="temporary"){const B=`${y}_${$.path}`,G=await E(B);if(!G){s.value="File not found",i.value="ERROR";return}const[J,se]=await Promise.all([G.thumbnail?D({path:G.thumbnail}).then(ve=>ve.url):"",G.url||G.path?D({path:G.url||G.path}).then(ve=>ve.url):""]);a.value={name:$.name||G.mimetype,url:se,type:G.mimetype,thumbnail:J,fileType:G.mimetype},i.value="LOADED"}else a.value={name:$.name,url:((U=$.data)==null?void 0:U.url)||$.url,type:((F=$.data)==null?void 0:F.mimetype)||$.mimeType,thumbnail:(L=$.data)==null?void 0:L.thumbnail,fileType:((j=$.data)==null?void 0:j.mimetype)||$.mimeType},i.value="LOADED"}catch(B){ro(B,"handleBroadcastMessage"),s.value="Failed to process file data",i.value="ERROR"}},O=()=>{if(u.value>=f7n){_s().showMessage("Maximum retry attempts reached","error");return}u.value++,i.value="LOADING",s.value=null,R(),S()},R=()=>{if(l.value){try{l.value.close()}catch($){ro($,"cleanupBroadcastChannel")}l.value=null}};mn(S),Ql(R),vt(d,$=>{$||(a.value=null,i.value="LOADING",s.value=null,u.value=0)}),vt(()=>r.show,$=>{$||p()});const I={LoadingState:d7n,props:r,emit:o,previewDetails:a,loading:i,errorDetails:s,broadcastChannel:l,retryCount:u,maxRetries:f7n,opened:d,fileName:f,resourceURL:m,handleCloseModal:p,downloadFile:v,isPreviewable:g,convertType:w,setupBroadcastChannel:S,getCommentFile:E,downloadFileFromS3:x,scene_id:y,fetchResourceUrl:D,handleBroadcastMessage:k,retryLoad:O,cleanupBroadcastChannel:R,get ArboMediaPlayer(){return rMe},get ArboModal(){return cQe}};return Object.defineProperty(I,"__isScriptSetup",{enumerable:!1,value:!0}),I}}),n3i={class:"flex flex-row items-center justify-center w-full"},r3i={class:"flex-1 font"},o3i={key:0,class:"h-[368px] w-[592px]"},a3i={class:"h-[368px] w-[592px] bg-black text-white p-4 flex items-center justify-center text-lg"},i3i={class:"text-center"},s3i={class:"preview-media-player"};function l3i(e,t,n,r,o,a){const i=Tr("ArboButton");return W(),st(r.ArboModal,on({show:r.opened,icon:"",class:"arbo-preview-media-modal",style:{"border-radius":"6px",overflow:"hidden"}},{width:"1000",showFooter:!1}),{header:je(()=>[$e("div",n3i,[$e("div",r3i,Et(r.fileName),1),Me(i,on({suffixIcon:"Xmark",label:"",type:"tertiary"},{class:"absolute top-[-15px] right-[-30px] font-black","aria-label":"Close",onClick:r.handleCloseModal}),null,16)])]),default:je(()=>[r.loading===r.LoadingState.LOADING?(W(),me("div",o3i,[...t[0]||(t[0]=[$e("div",{class:"skeleton animate-pulse bg-gray-200 rounded-sm white:bg-gray-700"},null,-1)])])):r.loading===r.LoadingState.ERROR?(W(),me(qt,{key:1},[Ye(" Error State "),$e("div",a3i,[$e("div",i3i,[t[1]||(t[1]=$e("p",{class:"mb-2"},"The media could not be loaded",-1)),t[2]||(t[2]=$e("p",{class:"text-sm opacity-75"}," Either the server or network failed, or the format is not supported. ",-1)),r.errorDetails?(W(),st(i,{key:0,type:"secondary",label:"Retry",class:"mt-4",onClick:r.retryLoad})):Ye("v-if",!0)])])],2112)):r.loading===r.LoadingState.LOADED?(W(),me(qt,{key:2},[Ye(" Loaded State "),$e("div",s3i,[Me(r.ArboMediaPlayer,Ti(Ks({listItems:[r.resourceURL],isReviewFile:!1,name:r.fileName,type:r.resourceURL.type})),null,16)])],2112)):Ye("v-if",!0)]),_:1},16,["show"])}const u3i=za(t3i,[["render",l3i],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/modal/PreviewMediaModal.vue"]]),c3i=yt({__name:"NoAccess",setup(e,{expose:t}){t();const{t:n}=Ux(),{getEnvVariable:r}=b1(),a={t:n,getEnvVariable:r,handleGoBack:()=>{window.location.href=r("BASE_URL")||""}};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}}),d3i={class:"w-full h-full arbo-no-access"},f3i={class:"context"};function h3i(e,t,n,r,o,a){const i=Tr("arbo-icon"),s=Tr("ArboButton");return W(),me("div",d3i,[Me(i,{name:"NoAccess1",type:"visual",class:"no-access-bg"}),$e("div",f3i,[$e("p",null,Et(r.t("no_access")),1),Me(s,{label:r.t("common.go_back"),type:"secondary",class:"go-back-button",onClick:r.handleGoBack},null,8,["label"])])])}const p3i=za(c3i,[["render",h3i],["__scopeId","data-v-b74b3eec"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/components/no-access/NoAccess.vue"]]),m3i=yt({__name:"MainLayout",props:{loading:{type:Boolean,required:!0,default:!1},hasAccess:{type:Boolean,required:!0,default:!0}},setup(e,{expose:t}){t();const n=e,r=te(()=>`main-layout-${Date.now()}-${Math.random().toString(36).substr(2,9)}`),o=xp(),{sceneData:a}=ia(o),i=te(()=>{var u;return((u=a.value)==null?void 0:u.property.is_locked)===1}),s=te(()=>({"scene-main":!0,"denied-access":!n.hasAccess,locked:i.value})),l={props:n,elementId:r,sceneStore:o,sceneData:a,isLocked:i,mainClasses:s,PreviewMediaModal:u3i,NoAccess:p3i};return Object.defineProperty(l,"__isScriptSetup",{enumerable:!1,value:!0}),l}}),g3i=["id","aria-busy","aria-label"],v3i={key:0,class:"no-access-container",role:"alert","aria-live":"assertive"};function y3i(e,t,n,r,o,a){return W(),me(qt,null,[$e("main",{id:r.elementId,class:De(r.mainClasses),role:"main","aria-busy":n.loading,"aria-label":n.loading?"Loading application content":"Application content"},[Ye(" Main Content "),n.hasAccess?(W(),me(qt,{key:0},[ft(e.$slots,"header",{},void 0,!0),ft(e.$slots,"body",{},void 0,!0),Ye(` <footer class="screen-footer" role="contentinfo">
1567
1567
  <slot name="footer" />
1568
1568
  </footer> `)],64)):Ye("v-if",!0)],10,g3i),Me(Vd,{name:"fade",mode:"out-in"},{default:je(()=>[n.hasAccess?Ye("v-if",!0):(W(),me("div",v3i,[Me(r.NoAccess)]))]),_:1}),Me(r.PreviewMediaModal,{show:!0})],64)}const b3i=za(m3i,[["render",y3i],["__scopeId","data-v-22686b16"],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/layouts/MainLayout.vue"]]),w3i=yt({__name:"MainScene",props:{ws_code:{type:String,required:!1},scene_id:{type:String,required:!1}},emits:["click"],setup(e,{expose:t}){t();const n=oe(!1),r=oe(!1),o=oe(!0),a=oe(null),i=xp(),{getSceneData:s}=i,{currentSceneTabId:l,currentIdRendition:u}=ia(i),d=fDe(),{checkRedirectConfiguration:f}=d,m=E1(),{currentCommentTab:p,commentRenditionId:v,resolvedOnly:g}=ia(m),w=CU(),{checkConnection:S}=w,E=e,x=async()=>{n.value=!0,a.value=new AbortController;try{const{success:$}=await s();o.value=$}catch($){console.error("Failed to load scene data:",$),o.value=!1}finally{n.value=!1}},y=oe(Ha()),D=async()=>{var $,P,U;r.value=!1;try{const F=($=y.value)==null?void 0:$.appContext.config.globalProperties,L=(F==null?void 0:F.IS_DETACH)==="true",j=F==null?void 0:F.id,B=(F==null?void 0:F.renditionId)||"",G=(F==null?void 0:F.commentId)||"",se=await f(L&&j?{sceneId:j,commentId:G,renditionId:B}:void 0);(P=se==null?void 0:se.renditionConfig)!=null&&P.renditionId?(l.value=cu.Rendition,p.value=cu.Rendition,u.value=se.renditionConfig.renditionId,v.value=se.renditionConfig.renditionId,g.value=!!((U=se.commentConfig)!=null&&U.resolved)):F.tab&&(l.value=F.tab,p.value=cu.Scene)}catch(F){console.error("Failed to apply redirect configuration:",F)}finally{r.value=!0}};nu(async()=>{try{console.warn("Open scene with params:",E),await x(),await D(),window.addEventListener("offline",S),window.addEventListener("online",S)}catch($){console.error("Failed to load scene data:",$)}}),_o(()=>{window.removeEventListener("offline",S),window.removeEventListener("online",S),a.value&&a.value.abort()});const{getUserBasicInforAPI:k}=AO();nu(()=>{const $=Ha();if($){const P=async U=>{try{return await k(U)}catch(F){return console.error("Error fetching user basic info:",F),null}};$.appContext.config.globalProperties.$getUserBasicInfo=P}});const O=te(()=>sessionStorage.getItem("user.ws_user_role_id")||"");xb("currentUserId",()=>O.value);const R=oe(!1),I={loading:n,ready:r,hasAccess:o,sceneDataAbortController:a,sceneStore:i,getSceneData:s,currentSceneTabId:l,currentIdRendition:u,commentRedirectStore:d,checkRedirectConfiguration:f,commentStore:m,currentCommentTab:p,commentRenditionId:v,resolvedOnly:g,connectionStore:w,checkConnection:S,props:E,loadSceneData:x,currentInstance:y,applyRedirectConfiguration:D,getUserBasicInforAPI:k,userId:O,flipLoading:R,HeaderScene:Jla,SceneTabs:KFi,ShareSnackBar:e3i,MainLayout:b3i};return Object.defineProperty(I,"__isScriptSetup",{enumerable:!1,value:!0}),I}});function _3i(e,t,n,r,o,a){return W(),me(qt,null,[Me(r.MainLayout,{loading:r.loading,"has-access":r.hasAccess},{header:je(()=>[Me(r.HeaderScene)]),body:je(()=>[Me(r.SceneTabs,{loading:r.loading||r.flipLoading},null,8,["loading"])]),_:1},8,["loading","has-access"]),Me(r.ShareSnackBar)],64)}const S3i=za(w3i,[["render",_3i],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/views/MainScene.vue"]]),E3i=yt({__name:"App",setup(e,{expose:t}){t(),console.warn(`%cThis version is ${Qsr}`,"color: red; font-family:sans-serif; font-size: 20px",elr);const{optimizeDatabase:n}=pbe(),{getUser:r}=xmr();nu(async()=>{var a;try{await r(),await n();const i=(a=Ha())==null?void 0:a.appContext.config.globalProperties,s=sessionStorage.getItem("scene_id");i!=null&&i.id&&!(s!=null&&s.trim())?sessionStorage.setItem("scene_id",i.id):console.warn("Scene ID already exists or is invalid:",s)}catch(i){console.error("Error during app initialization:",i)}});const o={optimizeDatabase:n,getUser:r,ErrorBoundary:Rmr,MainScene:S3i};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}});function C3i(e,t,n,r,o,a){return W(),st(r.ErrorBoundary,null,{default:je(()=>[Me(r.MainScene)]),_:1})}const x3i=za(E3i,[["render",C3i],["__file","/home/mor-ubuntu/arbo/arbo-web-scene/src/App.vue"]]),k3i={no_rendition:`Looks like there’s no Rendition available yet.
1569
1569
  Be the first to upload a review file.`,no_data:"Looks like there’s no data available yet",no_access:`Uh oh,