@clickview/lite 0.33.0 → 0.33.1

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.
Files changed (33) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{lite-app-14ad0170f5.css → lite-app-35aebe39bd.css} +1 -1
  3. package/dist/scripts/{4441-4f4ac51a39-lite.chunk.js → 4441-4977f5f51d-lite.chunk.js} +2 -2
  4. package/dist/scripts/{4617-462a715dec-lite.chunk.js → 4617-0aae0a231d-lite.chunk.js} +1 -1
  5. package/dist/scripts/5271-1df4d9d742-lite.chunk.js +1 -1
  6. package/dist/scripts/5823-2e5bd3a90c-lite.chunk.js +1 -0
  7. package/dist/scripts/{6801-fb5064f563-lite.chunk.js → 6801-d3cf047fb8-lite.chunk.js} +1 -1
  8. package/dist/scripts/{7422-b525ec20d3-lite.chunk.js → 7422-164d07dc57-lite.chunk.js} +2 -2
  9. package/dist/scripts/754-ab93865a0a-lite.chunk.js +1 -0
  10. package/dist/scripts/9338-7a528773b5-lite.chunk.js +1 -0
  11. package/dist/scripts/bundle-d6a60c228f.min.js +2 -0
  12. package/jest.config.js +11 -11
  13. package/package.json +61 -61
  14. package/typings/libs/CVEvents.d.ts +12 -12
  15. package/typings/libs/CVLanguages.d.ts +24 -24
  16. package/typings/libs/cloneDeep.d.ts +4 -4
  17. package/typings/libs/cookiesjs.d.ts +25 -25
  18. package/typings/libs/draft-convert.d.ts +3 -3
  19. package/typings/libs/google-api.d.ts +93 -93
  20. package/typings/libs/intersection-observer.d.ts +82 -82
  21. package/typings/libs/microsoft-teams.d.ts +2 -2
  22. package/typings/libs/react-table-config.d.ts +138 -138
  23. package/typings/libs/trackjs.d.ts +2 -2
  24. package/typings/libs/videojs-contrib-quality-levels.d.ts +28 -28
  25. package/typings/utils/imports.d.ts +13 -13
  26. package/dist/scripts/5823-480e485fdb-lite.chunk.js +0 -1
  27. package/dist/scripts/754-b54addb690-lite.chunk.js +0 -1
  28. package/dist/scripts/9338-4031d1e31d-lite.chunk.js +0 -1
  29. package/dist/scripts/bundle-507ffe47c4.min.js +0 -2
  30. /package/dist/scripts/{2452-446607a894-lite.chunk.js → 2452-f96e548d17-lite.chunk.js} +0 -0
  31. /package/dist/scripts/{4441-4f4ac51a39-lite.chunk.js.LICENSE.txt → 4441-4977f5f51d-lite.chunk.js.LICENSE.txt} +0 -0
  32. /package/dist/scripts/{7422-b525ec20d3-lite.chunk.js.LICENSE.txt → 7422-164d07dc57-lite.chunk.js.LICENSE.txt} +0 -0
  33. /package/dist/scripts/{bundle-507ffe47c4.min.js.LICENSE.txt → bundle-d6a60c228f.min.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[754],{20455:(e,t,n)=>{n.d(t,{LB:()=>He,y9:()=>ct,g4:()=>te,Lg:()=>ae,we:()=>de,pE:()=>E,ey:()=>S,VK:()=>A,_8:()=>R,hI:()=>B,Cj:()=>Ge,O1:()=>_e,Zj:()=>Ze,VT:()=>h,Dy:()=>p});var r=n(32735),o=n(12788),i=n(17592);const a={display:"none"};function l(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:a},n)}function s(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;return r.createElement("div",{id:t,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":o,"aria-atomic":!0},n)}const c=(0,r.createContext)(null),u={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},d={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function f(e){let{announcements:t=d,container:n,hiddenTextDescribedById:a,screenReaderInstructions:f=u}=e;const{announce:v,announcement:g}=function(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),h=(0,i.Ld)("DndLiveRegion"),[p,b]=(0,r.useState)(!1);if((0,r.useEffect)((()=>{b(!0)}),[]),function(e){const t=(0,r.useContext)(c);(0,r.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}((0,r.useMemo)((()=>({onDragStart(e){let{active:n}=e;v(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&v(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;v(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;v(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;v(t.onDragCancel({active:n,over:r}))}})),[v,t])),!p)return null;const m=r.createElement(r.Fragment,null,r.createElement(l,{id:a,value:f.draggable}),r.createElement(s,{id:h,announcement:g}));return n?(0,o.createPortal)(m,n):m}var v;function g(){}function h(e,t){return(0,r.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function p(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>[...t].filter((e=>null!=e))),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(v||(v={}));const b=Object.freeze({x:0,y:0});function m(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function y(e,t){const n=(0,i.DC)(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function w(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function x(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function C(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function R(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function D(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const E=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=D(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=m(D(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(w)},S=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=C(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=C(r),a=o.reduce(((e,t,r)=>e+m(n[r],t)),0),l=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:l}})}}return i.sort(w)};function I(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*l;return Number((o/(n+r-o)).toFixed(4))}return 0}const N=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=I(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(x)};function M(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:b}function k(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const O=k(1);function L(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const T={ignoreTransform:!1};function A(e,t){void 0===t&&(t=T);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:t}=(0,i.Jj)(e),{transform:r,transformOrigin:o}=t(e);r&&(n=function(e,t,n){const r=L(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,s=e.left-a-(1-o)*parseFloat(n),c=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s}}(n,r,o))}const{top:r,left:o,width:a,height:l,bottom:s,right:c}=n;return{top:r,left:o,width:a,height:l,bottom:s,right:c}}function j(e){return A(e,{ignoreTransform:!0})}function B(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if((0,i.qk)(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!(0,i.Re)(o)||(0,i.vZ)(o))return n;if(n.includes(o))return n;const{getComputedStyle:a}=(0,i.Jj)(o),l=a(o);return o!==e&&function(e,t){void 0===t&&(t=(0,i.Jj)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,l)&&n.push(o),function(e,t){return void 0===t&&(t=(0,i.Jj)(e).getComputedStyle(e)),"fixed"===t.position}(o,l)?n:r(o.parentNode)}(e):n}function z(e){const[t]=B(e,1);return null!=t?t:null}function X(e){return i.Nq&&e?(0,i.FJ)(e)?e:(0,i.UG)(e)?(0,i.qk)(e)||e===(0,i.r3)(e).scrollingElement?window:(0,i.Re)(e)?e:null:null:null}function F(e){return(0,i.FJ)(e)?e.scrollX:e.scrollLeft}function P(e){return(0,i.FJ)(e)?e.scrollY:e.scrollTop}function Y(e){return{x:F(e),y:P(e)}}var J;function U(e){return!(!i.Nq||!e)&&e===document.scrollingElement}function H(e){const t={x:0,y:0},n=U(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(J||(J={}));const K={x:.2,y:.2};function q(e,t,n,r,o){let{top:i,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===o&&(o=K);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=H(e),v={x:0,y:0},g={x:0,y:0},h=t.height*o.y,p=t.width*o.x;return!c&&i<=t.top+h?(v.y=J.Backward,g.y=r*Math.abs((t.top+h-i)/h)):!u&&s>=t.bottom-h&&(v.y=J.Forward,g.y=r*Math.abs((t.bottom-h-s)/h)),!f&&l>=t.right-p?(v.x=J.Forward,g.x=r*Math.abs((t.right-p-l)/p)):!d&&a<=t.left+p&&(v.x=J.Backward,g.x=r*Math.abs((t.left+p-a)/p)),{direction:v,speed:g}}function W(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function _(e){return e.reduce(((e,t)=>(0,i.IH)(e,Y(t))),b)}function G(e,t){if(void 0===t&&(t=A),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);z(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const V=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+F(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+P(t)),0)}]];class ${constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=B(t),r=_(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of V)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Z{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Q(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var ee,te;function ne(e){e.preventDefault()}function re(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(ee||(ee={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(te||(te={}));const oe={start:[te.Space,te.Enter],cancel:[te.Esc],end:[te.Space,te.Enter]},ie=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case te.Right:return{...n,x:n.x+25};case te.Left:return{...n,x:n.x-25};case te.Down:return{...n,y:n.y+25};case te.Up:return{...n,y:n.y-25}}};class ae{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Z((0,i.r3)(t)),this.windowListeners=new Z((0,i.Jj)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ee.Resize,this.handleCancel),this.windowListeners.add(ee.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(ee.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&G(n),t(b)}handleKeyDown(e){if((0,i.vd)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=oe,coordinateGetter:a=ie,scrollBehavior:l="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:b;this.referenceCoordinates||(this.referenceCoordinates=u);const d=a(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=(0,i.$X)(d,u),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:a,isLeft:s,isBottom:c,maxScroll:u,minScroll:f}=H(n),v=W(n),g={x:Math.min(o===te.Right?v.right-v.width/2:v.right,Math.max(o===te.Right?v.left:v.left+v.width/2,d.x)),y:Math.min(o===te.Down?v.bottom-v.height/2:v.bottom,Math.max(o===te.Down?v.top:v.top+v.height/2,d.y))},h=o===te.Right&&!a||o===te.Left&&!s,p=o===te.Down&&!c||o===te.Up&&!i;if(h&&g.x!==d.x){const e=n.scrollLeft+t.x,i=o===te.Right&&e<=u.x||o===te.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:l});r.x=i?n.scrollLeft-e:o===te.Right?n.scrollLeft-u.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:l});break}if(p&&g.y!==d.y){const e=n.scrollTop+t.y,i=o===te.Down&&e<=u.y||o===te.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:l});r.y=i?n.scrollTop-e:o===te.Down?n.scrollTop-u.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:l});break}}this.handleMove(e,(0,i.IH)((0,i.$X)(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function le(e){return Boolean(e&&"distance"in e)}function se(e){return Boolean(e&&"delay"in e)}ae.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=oe,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class ce{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,i.Jj)(e);return e instanceof t?e:(0,i.r3)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:a}=o;this.props=e,this.events=t,this.document=(0,i.r3)(a),this.documentListeners=new Z(this.document),this.listeners=new Z(n),this.windowListeners=new Z((0,i.Jj)(a)),this.initialCoordinates=null!=(r=(0,i.DC)(o))?r:b,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(ee.Resize,this.handleCancel),this.windowListeners.add(ee.DragStart,ne),this.windowListeners.add(ee.VisibilityChange,this.handleCancel),this.windowListeners.add(ee.ContextMenu,ne),this.documentListeners.add(ee.Keydown,this.handleKeydown),t){if(le(t))return;if(se(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ee.Click,re,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ee.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:a,options:{activationConstraint:l}}=o;if(!r)return;const s=null!=(t=(0,i.DC)(e))?t:b,c=(0,i.$X)(r,s);if(!n&&l){if(se(l))return Q(c,l.tolerance)?this.handleCancel():void 0;if(le(l))return null!=l.tolerance&&Q(c,l.tolerance)?this.handleCancel():Q(c,l.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),a(s)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===te.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const ue={move:{name:"pointermove"},end:{name:"pointerup"}};class de extends ce{constructor(e){const{event:t}=e,n=(0,i.r3)(t.target);super(e,ue,n)}}de.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const fe={move:{name:"mousemove"},end:{name:"mouseup"}};var ve;!function(e){e[e.RightClick=2]="RightClick"}(ve||(ve={})),class extends ce{constructor(e){super(e,fe,(0,i.r3)(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==ve.RightClick&&(null==r||r({event:n}),!0)}}];const ge={move:{name:"touchmove"},end:{name:"touchend"}};var he,pe;(class extends ce{constructor(e){super(e,ge)}static setup(){return window.addEventListener(ge.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(ge.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(he||(he={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(pe||(pe={}));const be={x:{[J.Backward]:!1,[J.Forward]:!1},y:{[J.Backward]:!1,[J.Forward]:!1}};var me,ye;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(me||(me={})),function(e){e.Optimized="optimized"}(ye||(ye={}));const we=new Map;function xe(e,t){return(0,i.Gj)((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Ce(e){let{callback:t,disabled:n}=e;const o=(0,i.zX)(t),a=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)}),[n]);return(0,r.useEffect)((()=>()=>null==a?void 0:a.disconnect()),[a]),a}function Re(e){return new $(A(e),e)}function De(e,t,n){void 0===t&&(t=Re);const[o,a]=(0,r.useReducer)((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}),null),l=function(e){let{callback:t,disabled:n}=e;const o=(0,i.zX)(t),a=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)}),[o,n]);return(0,r.useEffect)((()=>()=>null==a?void 0:a.disconnect()),[a]),a}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=Ce({callback:a});return(0,i.LI)((()=>{a(),e?(null==s||s.observe(e),null==l||l.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==l||l.disconnect())}),[e]),o}const Ee=[];function Se(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{n.current=null}),t),(0,r.useEffect)((()=>{const t=e!==b;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?(0,i.$X)(e,n.current):b}function Ie(e){return(0,r.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Ne=[];function Me(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,i.Re)(t)?t:e}const ke=[{sensor:de,options:{}},{sensor:ae,options:{}}],Oe={current:{}},Le={draggable:{measure:j},droppable:{measure:j,strategy:me.WhileDragging,frequency:ye.Optimized},dragOverlay:{measure:A}};class Te extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Ae={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Te,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:g},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Le,measureDroppableContainers:g,windowRect:null,measuringScheduled:!1},je={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:g,draggableNodes:new Map,over:null,measureDroppableContainers:g},Be=(0,r.createContext)(je),ze=(0,r.createContext)(Ae);function Xe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Te}}}function Fe(e,t){switch(t.type){case v.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case v.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case v.DragEnd:case v.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case v.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Te(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case v.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Te(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case v.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Te(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Pe(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:a}=(0,r.useContext)(Be),l=(0,i.D9)(o),s=(0,i.D9)(null==n?void 0:n.id);return(0,r.useEffect)((()=>{if(!t&&!o&&l&&null!=s){if(!(0,i.vd)(l))return;if(document.activeElement===l.target)return;const e=a.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,i.so)(e);if(t){t.focus();break}}}))}}),[o,t,a,s,l]),null}function Ye(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}const Je=(0,r.createContext)({...b,scaleX:1,scaleY:1});var Ue;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Ue||(Ue={}));const He=(0,r.memo)((function(e){var t,n,a,l;let{id:s,accessibility:u,autoScroll:d=!0,children:g,sensors:h=ke,collisionDetection:p=N,measuring:m,modifiers:y,...w}=e;const x=(0,r.useReducer)(Fe,void 0,Xe),[C,D]=x,[E,S]=function(){const[e]=(0,r.useState)((()=>new Set)),t=(0,r.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,r.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[I,k]=(0,r.useState)(Ue.Uninitialized),L=I===Ue.Initialized,{draggable:{active:T,nodes:j,translate:F},droppable:{containers:P}}=C,H=T?j.get(T):null,K=(0,r.useRef)({initial:null,translated:null}),W=(0,r.useMemo)((()=>{var e;return null!=T?{id:T,data:null!=(e=null==H?void 0:H.data)?e:Oe,rect:K}:null}),[T,H]),G=(0,r.useRef)(null),[V,Z]=(0,r.useState)(null),[Q,ee]=(0,r.useState)(null),te=(0,i.Ey)(w,Object.values(w)),ne=(0,i.Ld)("DndDescribedBy",s),re=(0,r.useMemo)((()=>P.getEnabled()),[P]),oe=(ie=m,(0,r.useMemo)((()=>({draggable:{...Le.draggable,...null==ie?void 0:ie.draggable},droppable:{...Le.droppable,...null==ie?void 0:ie.droppable},dragOverlay:{...Le.dragOverlay,...null==ie?void 0:ie.dragOverlay}})),[null==ie?void 0:ie.draggable,null==ie?void 0:ie.droppable,null==ie?void 0:ie.dragOverlay]));var ie;const{droppableRects:ae,measureDroppableContainers:le,measuringScheduled:se}=function(e,t){let{dragging:n,dependencies:o,config:a}=t;const[l,s]=(0,r.useState)(null),c=null!=l,{frequency:u,measure:d,strategy:f}=a,v=(0,r.useRef)(e),g=function(){switch(f){case me.Always:return!1;case me.BeforeDragging:return n;default:return!n}}(),h=(0,i.Ey)(g),p=(0,r.useCallback)((function(e){void 0===e&&(e=[]),h.current||s((t=>t?t.concat(e):e))}),[h]),b=(0,r.useRef)(null),m=(0,i.Gj)((t=>{if(g&&!n)return we;const r=l;if(!t||t===we||v.current!==e||null!=r){const t=new Map;for(let n of e){if(!n)continue;if(r&&r.length>0&&!r.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new $(d(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t}),[e,l,n,g,d]);return(0,r.useEffect)((()=>{v.current=e}),[e]),(0,r.useEffect)((()=>{g||requestAnimationFrame((()=>p()))}),[n,g]),(0,r.useEffect)((()=>{c&&s(null)}),[c]),(0,r.useEffect)((()=>{g||"number"!=typeof u||null!==b.current||(b.current=setTimeout((()=>{p(),b.current=null}),u))}),[u,g,p,...o]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:c}}(re,{dragging:L,dependencies:[F.x,F.y],config:oe.droppable}),ce=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return(0,i.Gj)((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(j,T),ue=(0,r.useMemo)((()=>Q?(0,i.DC)(Q):null),[Q]),de=function(){const e=!1===(null==V?void 0:V.autoScrollEnabled),t="object"==typeof d?!1===d.enabled:!1===d,n=L&&!e&&!t;return"object"==typeof d?{...d,enabled:n}:{enabled:n}}(),fe=function(e,t){return xe(e,t)}(ce,oe.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:a=!0}=e;const l=(0,r.useRef)(!1),{x:s,y:c}="boolean"==typeof a?{x:a,y:a}:a;(0,i.LI)((()=>{if(!s&&!c||!t)return void(l.current=!1);if(l.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=M(n(e),o);if(s||(r.x=0),c||(r.y=0),l.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=z(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,s,c,o,n])}({activeNode:T?j.get(T):null,config:de.layoutShiftCompensation,initialRect:fe,measure:oe.draggable.measure});const ve=De(ce,oe.draggable.measure,fe),ge=De(ce?ce.parentElement:null),ye=(0,r.useRef)({activatorEvent:null,active:null,activeNode:ce,collisionRect:null,collisions:null,droppableRects:ae,draggableNodes:j,draggingNode:null,draggingNodeRect:null,droppableContainers:P,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Re=P.getNodeFor(null==(t=ye.current.over)?void 0:t.id),Te=function(e){let{measure:t}=e;const[n,o]=(0,r.useState)(null),a=Ce({callback:(0,r.useCallback)((e=>{for(const{target:n}of e)if((0,i.Re)(n)){o((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),l=(0,r.useCallback)((e=>{const n=Me(e);null==a||a.disconnect(),n&&(null==a||a.observe(n)),o(n?t(n):null)}),[t,a]),[s,c]=(0,i.wm)(l);return(0,r.useMemo)((()=>({nodeRef:s,rect:n,setRef:c})),[n,s,c])}({measure:oe.dragOverlay.measure}),Ae=null!=(n=Te.nodeRef.current)?n:ce,je=L?null!=(a=Te.rect)?a:ve:null,He=Boolean(Te.nodeRef.current&&Te.rect),Ke=M(qe=He?null:ve,xe(qe));var qe;const We=Ie(Ae?(0,i.Jj)(Ae):null),_e=function(e){const t=(0,r.useRef)(e),n=(0,i.Gj)((n=>e?n&&n!==Ee&&e&&t.current&&e.parentNode===t.current.parentNode?n:B(e):Ee),[e]);return(0,r.useEffect)((()=>{t.current=e}),[e]),n}(L?null!=Re?Re:ce:null),Ge=function(e,t){void 0===t&&(t=A);const[n]=e,o=Ie(n?(0,i.Jj)(n):null),[a,l]=(0,r.useReducer)((function(){return e.length?e.map((e=>U(e)?o:new $(t(e),e))):Ne}),Ne),s=Ce({callback:l});return e.length>0&&a===Ne&&l(),(0,i.LI)((()=>{e.length?e.forEach((e=>null==s?void 0:s.observe(e))):(null==s||s.disconnect(),l())}),[e]),a}(_e),Ve=Ye(y,{transform:{x:F.x-Ke.x,y:F.y-Ke.y,scaleX:1,scaleY:1},activatorEvent:Q,active:W,activeNodeRect:ve,containerNodeRect:ge,draggingNodeRect:je,over:ye.current.over,overlayNodeRect:Te.rect,scrollableAncestors:_e,scrollableAncestorRects:Ge,windowRect:We}),$e=ue?(0,i.IH)(ue,F):null,Ze=function(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(e),a=(0,r.useCallback)((e=>{const t=X(e.target);t&&n((e=>e?(e.set(t,Y(t)),new Map(e)):null))}),[]);return(0,r.useEffect)((()=>{const t=o.current;if(e!==t){r(t);const i=e.map((e=>{const t=X(e);return t?(t.addEventListener("scroll",a,{passive:!0}),[t,Y(t)]):null})).filter((e=>null!=e));n(i.length?new Map(i):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=X(e);null==t||t.removeEventListener("scroll",a)}))}}),[a,e]),(0,r.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,i.IH)(e,t)),b):_(e):b),[e,t])}(_e),Qe=Se(Ze),et=Se(Ze,[ve]),tt=(0,i.IH)(Ve,Qe),nt=je?O(je,Ve):null,rt=W&&nt?p({active:W,collisionRect:nt,droppableRects:ae,droppableContainers:re,pointerCoordinates:$e}):null,ot=R(rt,"id"),[it,at]=(0,r.useState)(null),lt=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(He?Ve:(0,i.IH)(Ve,et),null!=(l=null==it?void 0:it.rect)?l:null,ve),st=(0,r.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==G.current)return;const i=j.get(G.current);if(!i)return;const a=e.nativeEvent,l=new n({active:G.current,activeNode:i,event:a,options:r,context:ye,onStart(e){const t=G.current;if(null==t)return;const n=j.get(t);if(!n)return;const{onDragStart:r}=te.current,i={active:{id:t,data:n.data,rect:K}};(0,o.unstable_batchedUpdates)((()=>{null==r||r(i),k(Ue.Initializing),D({type:v.DragStart,initialCoordinates:e,active:t}),E({type:"onDragStart",event:i})}))},onMove(e){D({type:v.DragMove,coordinates:e})},onEnd:s(v.DragEnd),onCancel:s(v.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ye.current;let l=null;if(t&&i){const{cancelDrop:o}=te.current;l={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===v.DragEnd&&"function"==typeof o&&await Promise.resolve(o(l))&&(e=v.DragCancel)}G.current=null,(0,o.unstable_batchedUpdates)((()=>{D({type:e}),k(Ue.Uninitialized),at(null),Z(null),ee(null);const t=e===v.DragEnd?"onDragEnd":"onDragCancel";if(l){const e=te.current[t];null==e||e(l),E({type:t,event:l})}}))}}(0,o.unstable_batchedUpdates)((()=>{Z(l),ee(e.nativeEvent)}))}),[j]),ct=(0,r.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=j.get(r);if(null!==G.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},G.current=r,st(n,t))}),[j,st]),ut=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(h,ct);!function(e){(0,r.useEffect)((()=>{if(!i.Nq)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(h),(0,i.LI)((()=>{ve&&I===Ue.Initializing&&k(Ue.Initialized)}),[ve,I]),(0,r.useEffect)((()=>{const{onDragMove:e}=te.current,{active:t,activatorEvent:n,collisions:r,over:i}=ye.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:tt.x,y:tt.y},over:i};(0,o.unstable_batchedUpdates)((()=>{null==e||e(a),E({type:"onDragMove",event:a})}))}),[tt.x,tt.y]),(0,r.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ye.current;if(!e||null==G.current||!t||!i)return;const{onDragOver:a}=te.current,l=r.get(ot),s=l&&l.rect.current?{id:l.id,rect:l.rect.current,data:l.data,disabled:l.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,o.unstable_batchedUpdates)((()=>{at(s),null==a||a(c),E({type:"onDragOver",event:c})}))}),[ot]),(0,i.LI)((()=>{ye.current={activatorEvent:Q,active:W,activeNode:ce,collisionRect:nt,collisions:rt,droppableRects:ae,draggableNodes:j,draggingNode:Ae,draggingNodeRect:je,droppableContainers:P,over:it,scrollableAncestors:_e,scrollAdjustedTranslate:tt},K.current={initial:je,translated:nt}}),[W,ce,rt,nt,j,Ae,je,ae,P,it,_e,tt]),function(e){let{acceleration:t,activator:n=he.Pointer,canScroll:o,draggingRect:a,enabled:l,interval:s=5,order:c=pe.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:f,delta:v,threshold:g}=e;const h=function(e){let{delta:t,disabled:n}=e;const r=(0,i.D9)(t);return(0,i.Gj)((e=>{if(n||!r||!e)return be;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[J.Backward]:e.x[J.Backward]||-1===o,[J.Forward]:e.x[J.Forward]||1===o},y:{[J.Backward]:e.y[J.Backward]||-1===i,[J.Forward]:e.y[J.Forward]||1===i}}}),[n,t,r])}({delta:v,disabled:!l}),[p,b]=(0,i.Yz)(),m=(0,r.useRef)({x:0,y:0}),y=(0,r.useRef)({x:0,y:0}),w=(0,r.useMemo)((()=>{switch(n){case he.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case he.DraggableRect:return a}}),[n,a,u]),x=(0,r.useRef)(null),C=(0,r.useCallback)((()=>{const e=x.current;if(!e)return;const t=m.current.x*y.current.x,n=m.current.y*y.current.y;e.scrollBy(t,n)}),[]),R=(0,r.useMemo)((()=>c===pe.TreeOrder?[...d].reverse():d),[c,d]);(0,r.useEffect)((()=>{if(l&&d.length&&w){for(const e of R){if(!1===(null==o?void 0:o(e)))continue;const n=d.indexOf(e),r=f[n];if(!r)continue;const{direction:i,speed:a}=q(e,r,w,t,g);for(const e of["x","y"])h[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return b(),x.current=e,p(C,s),m.current=a,void(y.current=i)}m.current={x:0,y:0},y.current={x:0,y:0},b()}else b()}),[t,C,o,b,l,s,JSON.stringify(w),JSON.stringify(h),p,d,R,f,JSON.stringify(g)])}({...de,delta:F,draggingRect:nt,pointerCoordinates:$e,scrollableAncestors:_e,scrollableAncestorRects:Ge});const dt=(0,r.useMemo)((()=>({active:W,activeNode:ce,activeNodeRect:ve,activatorEvent:Q,collisions:rt,containerNodeRect:ge,dragOverlay:Te,draggableNodes:j,droppableContainers:P,droppableRects:ae,over:it,measureDroppableContainers:le,scrollableAncestors:_e,scrollableAncestorRects:Ge,measuringConfiguration:oe,measuringScheduled:se,windowRect:We})),[W,ce,ve,Q,rt,ge,Te,j,P,ae,it,le,_e,Ge,oe,se,We]),ft=(0,r.useMemo)((()=>({activatorEvent:Q,activators:ut,active:W,activeNodeRect:ve,ariaDescribedById:{draggable:ne},dispatch:D,draggableNodes:j,over:it,measureDroppableContainers:le})),[Q,ut,W,ve,D,ne,j,it,le]);return r.createElement(c.Provider,{value:S},r.createElement(Be.Provider,{value:ft},r.createElement(ze.Provider,{value:dt},r.createElement(Je.Provider,{value:lt},g)),r.createElement(Pe,{disabled:!1===(null==u?void 0:u.restoreFocus)})),r.createElement(f,{...u,hiddenTextDescribedById:ne}))})),Ke=(0,r.createContext)(null),qe="button",We="Droppable";function _e(e){let{id:t,data:n,disabled:o=!1,attributes:a}=e;const l=(0,i.Ld)(We),{activators:s,activatorEvent:c,active:u,activeNodeRect:d,ariaDescribedById:f,draggableNodes:v,over:g}=(0,r.useContext)(Be),{role:h=qe,roleDescription:p="draggable",tabIndex:b=0}=null!=a?a:{},m=(null==u?void 0:u.id)===t,y=(0,r.useContext)(m?Je:Ke),[w,x]=(0,i.wm)(),[C,R]=(0,i.wm)(),D=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(s,t),E=(0,i.Ey)(n);return(0,i.LI)((()=>(v.set(t,{id:t,key:l,node:w,activatorNode:C,data:E}),()=>{const e=v.get(t);e&&e.key===l&&v.delete(t)})),[v,t]),{active:u,activatorEvent:c,activeNodeRect:d,attributes:(0,r.useMemo)((()=>({role:h,tabIndex:b,"aria-disabled":o,"aria-pressed":!(!m||h!==qe)||void 0,"aria-roledescription":p,"aria-describedby":f.draggable})),[o,h,b,m,p,f.draggable]),isDragging:m,listeners:o?void 0:D,node:w,over:g,setNodeRef:x,setActivatorNodeRef:R,transform:y}}function Ge(){return(0,r.useContext)(ze)}const Ve="Droppable",$e={timeout:25};function Ze(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:a}=e;const l=(0,i.Ld)(Ve),{active:s,dispatch:c,over:u,measureDroppableContainers:d}=(0,r.useContext)(Be),f=(0,r.useRef)({disabled:n}),g=(0,r.useRef)(!1),h=(0,r.useRef)(null),p=(0,r.useRef)(null),{disabled:b,updateMeasurementsFor:m,timeout:y}={...$e,...a},w=(0,i.Ey)(null!=m?m:o),x=Ce({callback:(0,r.useCallback)((()=>{g.current?(null!=p.current&&clearTimeout(p.current),p.current=setTimeout((()=>{d(Array.isArray(w.current)?w.current:[w.current]),p.current=null}),y)):g.current=!0}),[y]),disabled:b||!s}),C=(0,r.useCallback)(((e,t)=>{x&&(t&&(x.unobserve(t),g.current=!1),e&&x.observe(e))}),[x]),[R,D]=(0,i.wm)(C),E=(0,i.Ey)(t);return(0,r.useEffect)((()=>{x&&R.current&&(x.disconnect(),g.current=!1,x.observe(R.current))}),[R,x]),(0,i.LI)((()=>(c({type:v.RegisterDroppable,element:{id:o,key:l,disabled:n,node:R,rect:h,data:E}}),()=>c({type:v.UnregisterDroppable,key:l,id:o}))),[o]),(0,r.useEffect)((()=>{n!==f.current.disabled&&(c({type:v.SetDroppableDisabled,id:o,key:l,disabled:n}),f.current.disabled=n)}),[o,l,n,c]),{active:s,rect:h,isOver:(null==u?void 0:u.id)===o,node:R,over:u,setNodeRef:D}}function Qe(e){let{animation:t,children:n}=e;const[o,a]=(0,r.useState)(null),[l,s]=(0,r.useState)(null),c=(0,i.D9)(n);return n||o||!c||a(c),(0,i.LI)((()=>{if(!l)return;const e=null==o?void 0:o.key,n=null==o?void 0:o.props.id;null!=e&&null!=n?Promise.resolve(t(n,l)).then((()=>{a(null)})):a(null)}),[t,o,l]),r.createElement(r.Fragment,null,n,o?(0,r.cloneElement)(o,{ref:s}):null)}const et={x:0,y:0,scaleX:1,scaleY:1};function tt(e){let{children:t}=e;return r.createElement(Be.Provider,{value:je},r.createElement(Je.Provider,{value:et},t))}const nt={position:"fixed",touchAction:"none"},rt=e=>(0,i.vd)(e)?"transform 250ms ease":void 0,ot=(0,r.forwardRef)(((e,t)=>{let{as:n,activatorEvent:o,adjustScale:a,children:l,className:s,rect:c,style:u,transform:d,transition:f=rt}=e;if(!c)return null;const v=a?d:{...d,scaleX:1,scaleY:1},g={...nt,width:c.width,height:c.height,top:c.top,left:c.left,transform:i.ux.Transform.toString(v),transformOrigin:a&&o?y(o,c):void 0,transition:"function"==typeof f?f(o):f,...u};return r.createElement(n,{className:s,style:g,ref:t},l)})),it=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:a}=e;if(null!=i&&i.active)for(const[e,t]of Object.entries(i.active))void 0!==t&&(o[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=i&&i.dragOverlay)for(const[e,t]of Object.entries(i.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(o))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},at={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:i.ux.Transform.toString(t)},{transform:i.ux.Transform.toString(n)}]},sideEffects:it({styles:{active:{opacity:"0"}}})};let lt=0;function st(e){return(0,r.useMemo)((()=>{if(null!=e)return lt++,lt}),[e])}const ct=r.memo((e=>{let{adjustScale:t=!1,children:n,dropAnimation:o,style:a,transition:l,modifiers:s,wrapperElement:c="div",className:u,zIndex:d=999}=e;const{activatorEvent:f,active:v,activeNodeRect:g,containerNodeRect:h,draggableNodes:p,droppableContainers:b,dragOverlay:m,over:y,measuringConfiguration:w,scrollableAncestors:x,scrollableAncestorRects:C,windowRect:R}=Ge(),D=(0,r.useContext)(Je),E=st(null==v?void 0:v.id),S=Ye(s,{activatorEvent:f,active:v,activeNodeRect:g,containerNodeRect:h,draggingNodeRect:m.rect,over:y,overlayNodeRect:m.rect,scrollableAncestors:x,scrollableAncestorRects:C,transform:D,windowRect:R}),I=xe(g),N=function(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return(0,i.zX)(((e,a)=>{if(null===t)return;const l=n.get(e);if(!l)return;const s=l.node.current;if(!s)return;const c=Me(a);if(!c)return;const{transform:u}=(0,i.Jj)(a).getComputedStyle(a),d=L(u);if(!d)return;const f="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...at,...e};return e=>{let{active:i,dragOverlay:a,transform:l,...s}=e;if(!t)return;const c=a.rect.left-i.rect.left,u=a.rect.top-i.rect.top,d={scaleX:1!==l.scaleX?i.rect.width*l.scaleX/a.rect.width:1,scaleY:1!==l.scaleY?i.rect.height*l.scaleY/a.rect.height:1},f={x:l.x-c,y:l.y-u,...d},v=o({...s,active:i,dragOverlay:a,transform:{initial:l,final:f}}),[g]=v,h=v[v.length-1];if(JSON.stringify(g)===JSON.stringify(h))return;const p=null==r?void 0:r({active:i,dragOverlay:a,...s}),b=a.node.animate(v,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{b.onfinish=()=>{null==p||p(),e()}}))}}(t);return G(s,o.draggable.measure),f({active:{id:e,data:l.data,node:s,rect:o.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:o.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:o,transform:d})}))}({config:o,draggableNodes:p,droppableContainers:b,measuringConfiguration:w}),M=I?m.setRef:void 0;return r.createElement(tt,null,r.createElement(Qe,{animation:N},v&&E?r.createElement(ot,{key:E,id:v.id,ref:M,as:c,activatorEvent:f,adjustScale:t,className:u,transition:l,rect:I,style:{zIndex:d,...a},transform:S},n):null))}))},95339:(e,t,n)=>{n.d(t,{DL:()=>r}),n(17592);const r=({transform:e})=>({...e,x:0})},67445:(e,t,n)=>{n.d(t,{Fo:()=>g,U2:()=>c,is:()=>D,nB:()=>x,qw:()=>d});var r=n(32735),o=n(20455),i=n(17592);function a(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function l(e,t){return e.reduce(((e,n,r)=>{const o=t.get(n);return o&&(e[r]=o),e}),Array(e.length))}function s(e){return null!==e&&e>=0}const c=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const i=a(t,r,n),l=t[o],s=i[o];return s&&l?{x:s.left-l.left,y:s.top-l.top,scaleX:s.width/l.width,scaleY:s.height/l.height}:null},u={scaleX:1,scaleY:1},d=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:i,overIndex:a}=e;const l=null!=(t=i[n])?t:r;if(!l)return null;if(o===n){const e=i[a];return e?{x:0,y:n<a?e.top+e.height-(l.top+l.height):e.top-l.top,...u}:null}const s=function(e,t,n){const r=e[t],o=e[t-1],i=e[t+1];return r?n<t?o?r.top-(o.top+o.height):i?i.top-(r.top+r.height):0:i?i.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}(i,o,n);return o>n&&o<=a?{x:0,y:-l.height-s,...u}:o<n&&o>=a?{x:0,y:l.height+s,...u}:{x:0,y:0,...u}},f="Sortable",v=r.createContext({activeIndex:-1,containerId:f,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:c,disabled:{draggable:!1,droppable:!1}});function g(e){let{children:t,id:n,items:a,strategy:s=c,disabled:u=!1}=e;const{active:d,dragOverlay:g,droppableRects:h,over:p,measureDroppableContainers:b,measuringScheduled:m}=(0,o.Cj)(),y=(0,i.Ld)(f,n),w=Boolean(null!==g.rect),x=(0,r.useMemo)((()=>a.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[a]),C=null!=d,R=d?x.indexOf(d.id):-1,D=p?x.indexOf(p.id):-1,E=(0,r.useRef)(x),S=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(x,E.current),I=-1!==D&&-1===R||S,N=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);(0,i.LI)((()=>{S&&C&&!m&&b(x)}),[S,x,C,b,m]),(0,r.useEffect)((()=>{E.current=x}),[x]);const M=(0,r.useMemo)((()=>({activeIndex:R,containerId:y,disabled:N,disableTransforms:I,items:x,overIndex:D,useDragOverlay:w,sortedRects:l(x,h),strategy:s})),[R,y,N.draggable,N.droppable,I,x,D,h,w,s]);return r.createElement(v.Provider,{value:M},t)}const h=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return a(n,r,o).indexOf(t)},p=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:i,newIndex:a,previousItems:l,previousContainerId:s,transition:c}=e;return!(!c||!r||l!==i&&o===a||!n&&(a===o||t!==s))},b={duration:200,easing:"ease"},m="transform",y=i.ux.Transition.toString({property:m,duration:0,easing:"linear"}),w={roleDescription:"sortable"};function x(e){let{animateLayoutChanges:t=p,attributes:n,disabled:a,data:l,getNewIndex:c=h,id:u,strategy:d,resizeObserverConfig:f,transition:g=b}=e;const{items:x,containerId:C,activeIndex:R,disabled:D,disableTransforms:E,sortedRects:S,overIndex:I,useDragOverlay:N,strategy:M}=(0,r.useContext)(v),k=function(e,t){var n,r;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(r=null==e?void 0:e.droppable)?r:t.droppable}}(a,D),O=x.indexOf(u),L=(0,r.useMemo)((()=>({sortable:{containerId:C,index:O,items:x},...l})),[C,l,O,x]),T=(0,r.useMemo)((()=>x.slice(x.indexOf(u))),[x,u]),{rect:A,node:j,isOver:B,setNodeRef:z}=(0,o.Zj)({id:u,data:L,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...f}}),{active:X,activatorEvent:F,activeNodeRect:P,attributes:Y,setNodeRef:J,listeners:U,isDragging:H,over:K,setActivatorNodeRef:q,transform:W}=(0,o.O1)({id:u,data:L,attributes:{...w,...n},disabled:k.draggable}),_=(0,i.HB)(z,J),G=Boolean(X),V=G&&!E&&s(R)&&s(I),$=!N&&H,Z=$&&V?W:null,Q=V?null!=Z?Z:(null!=d?d:M)({rects:S,activeNodeRect:P,activeIndex:R,overIndex:I,index:O}):null,ee=s(R)&&s(I)?c({id:u,items:x,activeIndex:R,overIndex:I}):O,te=null==X?void 0:X.id,ne=(0,r.useRef)({activeId:te,items:x,newIndex:ee,containerId:C}),re=x!==ne.current.items,oe=t({active:X,containerId:C,isDragging:H,isSorting:G,id:u,index:O,items:x,newIndex:ne.current.newIndex,previousItems:ne.current.items,previousContainerId:ne.current.containerId,transition:g,wasDragging:null!=ne.current.activeId}),ie=function(e){let{disabled:t,index:n,node:a,rect:l}=e;const[s,c]=(0,r.useState)(null),u=(0,r.useRef)(n);return(0,i.LI)((()=>{if(!t&&n!==u.current&&a.current){const e=l.current;if(e){const t=(0,o.VK)(a.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&c(n)}}n!==u.current&&(u.current=n)}),[t,n,a,l]),(0,r.useEffect)((()=>{s&&requestAnimationFrame((()=>{c(null)}))}),[s]),s}({disabled:!oe,index:O,node:j,rect:A});return(0,r.useEffect)((()=>{G&&ne.current.newIndex!==ee&&(ne.current.newIndex=ee),C!==ne.current.containerId&&(ne.current.containerId=C),x!==ne.current.items&&(ne.current.items=x)}),[G,ee,C,x]),(0,r.useEffect)((()=>{if(te===ne.current.activeId)return;if(te&&!ne.current.activeId)return void(ne.current.activeId=te);const e=setTimeout((()=>{ne.current.activeId=te}),50);return()=>clearTimeout(e)}),[te]),{active:X,activeIndex:R,attributes:Y,data:L,rect:A,index:O,newIndex:ee,items:x,isOver:B,isSorting:G,isDragging:H,listeners:U,node:j,overIndex:I,over:K,setNodeRef:_,setActivatorNodeRef:q,setDroppableNodeRef:z,setDraggableNodeRef:J,transform:null!=ie?ie:Q,transition:ie||re&&ne.current.newIndex===O?y:$&&!(0,i.vd)(F)||!g?void 0:G||oe?i.ux.Transition.toString({...g,property:m}):void 0}}function C(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const R=[o.g4.Down,o.g4.Right,o.g4.Up,o.g4.Left],D=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:a,droppableContainers:l,over:s,scrollableAncestors:c}}=t;if(R.includes(e.code)){if(e.preventDefault(),!n||!r)return;const t=[];l.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const i=a.get(n.id);if(i)switch(e.code){case o.g4.Down:r.top<i.top&&t.push(n);break;case o.g4.Up:r.top>i.top&&t.push(n);break;case o.g4.Left:r.left>i.left&&t.push(n);break;case o.g4.Right:r.left<i.left&&t.push(n)}}));const f=(0,o.ey)({active:n,collisionRect:r,droppableRects:a,droppableContainers:t,pointerCoordinates:null});let v=(0,o._8)(f,"id");if(v===(null==s?void 0:s.id)&&f.length>1&&(v=f[1].id),null!=v){const e=l.get(n.id),t=l.get(v),s=t?a.get(t.id):null,f=null==t?void 0:t.node.current;if(f&&s&&e&&t){const n=(0,o.hI)(f).some(((e,t)=>c[t]!==e)),a=E(e,t),l=(d=t,!(!C(u=e)||!C(d))&&!!E(u,d)&&u.data.current.sortable.index<d.data.current.sortable.index),v=n||!a?{x:0,y:0}:{x:l?r.width-s.width:0,y:l?r.height-s.height:0},g={x:s.left,y:s.top};return v.x&&v.y?g:(0,i.$X)(g,v)}}}var u,d};function E(e,t){return!(!C(e)||!C(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}},17592:(e,t,n)=>{n.d(t,{$X:()=>D,D9:()=>y,DC:()=>S,Ey:()=>p,FJ:()=>a,Gj:()=>b,HB:()=>o,IH:()=>R,Jj:()=>s,LI:()=>v,Ld:()=>x,Nq:()=>i,Re:()=>u,UG:()=>l,Yz:()=>h,qk:()=>c,r3:()=>f,so:()=>M,ux:()=>I,vZ:()=>d,vd:()=>E,wm:()=>m,zX:()=>g});var r=n(32735);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>e=>{t.forEach((t=>t(e)))}),t)}const i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function l(e){return"nodeType"in e}function s(e){var t,n;return e?a(e)?e:l(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function c(e){const{Document:t}=s(e);return e instanceof t}function u(e){return!a(e)&&e instanceof s(e).HTMLElement}function d(e){return e instanceof s(e).SVGElement}function f(e){return e?a(e)?e.document:l(e)?c(e)?e:u(e)||d(e)?e.ownerDocument:document:document:document}const v=i?r.useLayoutEffect:r.useEffect;function g(e){const t=(0,r.useRef)(e);return v((()=>{t.current=e})),(0,r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function h(){const e=(0,r.useRef)(null);return[(0,r.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,r.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}function p(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return v((()=>{n.current!==e&&(n.current=e)}),t),n}function b(e,t){const n=(0,r.useRef)();return(0,r.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function m(e){const t=g(e),n=(0,r.useRef)(null),o=(0,r.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function y(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}let w={};function x(e,t){return(0,r.useMemo)((()=>{if(t)return t;const n=null==w[e]?0:w[e]+1;return w[e]=n,e+"-"+n}),[e,t])}function C(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const R=C(1),D=C(-1);function E(e){if(!e)return!1;const{KeyboardEvent:t}=s(e.target);return t&&e instanceof t}function S(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=s(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const I=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[I.Translate.toString(e),I.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),N="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function M(e){return e.matches(N)?e:e.querySelector(N)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[9338],{73758:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,a=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===r(a)?a:String(a)),i)}var a}n.d(t,{n:()=>a});var a=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.listeners={}}var t,n;return t=e,n=[{key:"subscribe",value:function(e,t){this.registerListener(e,t)}},{key:"subscribeOnce",value:function(e,t){this.registerListener(e,t,1)}},{key:"unsubscribe",value:function(e,t){this.deregisterListener(e,t)}},{key:"trigger",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.triggerCallbacks(e,n)}},{key:"registerListener",value:function(e,t,n){var r;if("string"!=typeof e)throw new Error("Event name must be a string");if("function"!=typeof t)throw new Error("Event callback must be a function");if(n&&"number"!=typeof n)throw new Error("Execution limit must be a number or undefined");this.listeners[e]=null!==(r=this.listeners[e])&&void 0!==r?r:[],this.listeners[e].push({callback:t,executionLimit:n})}},{key:"deregisterListener",value:function(e,t){var n;if("string"!=typeof e)throw new Error("Event name must be a string");if(t&&"function"!=typeof t)throw new Error("Event callback must be a function");if(t){var r=null===(n=this.listeners[e])||void 0===n?void 0:n.findIndex((function(e){return e.callback===t}));"number"==typeof r&&-1!==r&&(this.listeners[e].splice(r,1),0===this.listeners[e].length&&delete this.listeners[e])}else this.listeners[e]=[]}},{key:"triggerCallbacks",value:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.listeners[e]){var a=[];this.listeners[e].forEach((function(e){var t,n;"number"==typeof e.executionLimit&&(e.executionCount=null!==(n=e.executionCount)&&void 0!==n?n:0,e.executionCount++,e.executionCount===e.executionLimit&&a.push(e.callback)),(t=e.callback).apply.apply(t,[null].concat(r))})),a.length&&a.forEach((function(n){return t.deregisterListener(e,n)}))}}}],n&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}())},91053:(e,t,n)=>{n.d(t,{B:()=>a});var r=n(32735),i=2;function a(e){var t;return(null===(t=e.availableCurriculums)||void 0===t?void 0:t.length)<i||!e.selectedCurriculum?r.createElement(r.Fragment,null):r.createElement("select",{className:"mb-3 form-select ".concat(e.className),onChange:e.onChangeCurriculum,value:e.selectedCurriculum.id},e.availableCurriculums.map((function(e){return r.createElement("option",{key:e.id,id:e.id,value:e.id},e.name)})))}},28907:(e,t,n)=>{n.d(t,{r:()=>a});var r=n(99940),i=n(97395),a={theme:function(e){return{url:"/api/domain/v1/themes/".concat(e),key:"themes:".concat(e)}},themeImages:function(e,t){return{url:i._.urlBuilder("/api/domain/v1/themes",{name:e,type:t}),key:"themes:".concat(e,":").concat(t)}},themes:function(e){var t="/api/domain/v1/themes",n="themes";return e&&(t+="?type=".concat(e),n+=":type:".concat(e)),{url:t,key:n,formatData:function(e){return e.sort((function(e,t){return e.name.localeCompare(t.name)}))}}},createTheme:function(e,t,n,i){return{url:"/api/domain/v1/themes",key:"theme",data:e,type:r.k.POST,invalidationKeys:"themes",success:t,error:n,always:i}},updateTheme:function(e,t,n,i,a){return{url:"/api/domain/v1/themes/".concat(e),key:"update:theme:".concat(e),data:t,type:r.k.PUT,success:n,error:i,always:a}},deleteTheme:function(e,t,n,i){return{url:"/api/domain/v1/themes/".concat(e),key:"delete:theme:".concat(e),type:r.k.DELETE,invalidationKeys:"themes",success:t,error:n,always:i}}}},90046:(e,t,n)=>{n.d(t,{j:()=>je});var r=n(32735),i=n(23481),a=n(79014),o=n(28400),c=n(65858),l=n(83657),u=n(40955),s=n(76246),d=n(17464),m=n(42029),v=n(83345),f=n(49439);const p={copyrightDisclaimer:"z8YoI",overlayContainer:"eJDbJ"};function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var g="shared.copyrightDisclaimer",y=150;function b(e){var t,n,i,a=(n=(0,f.L)({}),i=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(n,i)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=a[0],c=a[1];return r.createElement("div",{ref:o,className:e.className},r.createElement("p",{className:"".concat(p.copyrightDisclaimer," mb-1")},r.createElement(v.x,{namespace:g,phrase:"copyrightDisclaimer"})),r.createElement(m.Z,{target:o.current,show:c,placement:e.overflowPlacement&&document.documentElement.clientHeight-(null===(t=o.current)||void 0===t?void 0:t.getBoundingClientRect().bottom)<y?e.overflowPlacement:e.placement},r.createElement("div",{className:"".concat(p.overlayContainer," mw-100 bg-white border rounded-3 p-2")},r.createElement("p",null,r.createElement(v.x,{namespace:g,phrase:"warning"})),r.createElement("p",{className:"fw-semibold mb-0"},r.createElement(v.x,{namespace:g,phrase:"sharing"})))))}var E=n(98495),w=n(75896),k=n(69883),C=n(44599),A=n(91053),I=n(45261),S=n(22161);function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var x="shared.curriculumLinks",T=i.T.encloseNamespace(x);function P(e){var t=e.curriculums,n=t.hasLoaded,i=t.activeCurriculum,a=t.availableCurriculums,o=t.curriculumLinks,c=t.updateCurriculum,l=L(r.useState(!n),2),u=l[0],s=l[1],d=L(r.useState(),2),m=d[0],f=d[1],p=(0,k.Z)();r.useEffect((function(){n&&(m||f(null!=i?i:w.m.first(a)),s(!1))}),[null==i?void 0:i.id,n]);var h="function"==typeof e.onClickClose;return r.createElement("div",{className:"rounded border mb-3 position-relative"},r.createElement(E.ZP,{autoHeight:!0,autoHeightMax:e.height},r.createElement("div",{className:"p-3"},r.createElement("h2",{className:"h6 me-2 h-100"},r.createElement(v.x,{namespace:x,phrase:"heading"})),r.createElement(A.B,{availableCurriculums:a,onChangeCurriculum:function(e){var t,n,r=e.target.value,i=a.find((function(e){return e.id.toString()===r}));(null==i?void 0:i.id)&&(null===(t=null==m?void 0:m.id)||void 0===t?void 0:t.toString())!==(null===(n=null==i?void 0:i.id)||void 0===n?void 0:n.toString())&&(f(i),s(!0),c(i,null,(function(){f(m),s(!1),p.error(T("updateFailed"))})))},selectedCurriculum:m,className:S.Z.dropdown}),u?r.createElement(C.Z,null):r.createElement(I.h,{curriculumLinks:o,emptyStateUrl:e.emptyStateUrl}))),h&&r.createElement("button",{type:"button",className:"btn-close ".concat(S.Z.closeButton),"aria-label":"Close",onClick:e.onClickClose}))}var V=n(96022),j=n(1048),O=n(11607),R=n(87311),U=n(91743),D=n(54610),F=n(67453),M=n(16367),B=n(73758);function _(e,t,n,i){var a=function(){B.n.unsubscribe(e,t)};return(0,r.useEffect)((function(){if(i)return n?B.n.subscribeOnce(e,t):B.n.subscribe(e,t),function(){a()}}),[]),a}var G=n(93264);const H={container:"BImYH",background:"aAY0j",topLeft:"azcIT",bottomLeft:"mBkCx",topRight:"tcN5n",bottomRight:"sHsOr",detailsBtn:"jyxT7",content:"PeWbM",highlightPoi:"un8Q0"};function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Z=/(\[.*\]\(cv:\/\/poi\?id=[0-9]+\))/g,W=/[0-9]+/,z=/\[.*\]/,q=/[\[\]]/g;function K(e,t){var n,r;return t&&(null===(n=e.glance)||void 0===n?void 0:n.content)&&"text/markdown"===(null===(r=e.glance)||void 0===r?void 0:r.format)}var Q="shared.videoAtAGlance";function $(e){var t=K(e.video,e.theme),n=function(e,t,n,i){var a,o,c,l=(o=(0,r.useState)(""),c=2,function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(o,c)||function(e,t){if(e){if("string"==typeof e)return Y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(e,t):void 0}}(o,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=l[0],s=l[1];return(0,r.useEffect)((function(){if(n){var r=function(e,t,n){var r=function(e,t,n){return(null==t?void 0:t.length)?e.content.replace(Z,(function(e){var r=e.match(W);if(!(null==r?void 0:r.length))return e;var i=t.find((function(e){return e.id.toString()===r[0]})),a=e.match(z);if(!i||!(null==a?void 0:a.length))return e;var o='<span class="me-2">'.concat(G.T.ToDisplayDuration(1e3*i.startTime),"</span>"),c=a[0];return c=(c=c.replace(q,""))||i.description,c="".concat(o," ").concat(c),n?'<span class="d-flex">'.concat(c,"</span>"):e.replace(z,"[".concat(c,"]"))})):e.content}(e,t,n);return M(r).split('a href="cv://poi').join('a class="d-flex" href="cv://poi')}(e.glance,t,i);s(r)}}),[null===(a=e.glance)||void 0===a?void 0:a.content,null==t?void 0:t.length,n]),u}(e.video,e.pointsOfInterest,t,e.suppressInteractivity),i=function(e,t){var n=(0,r.useRef)();function i(){var t=this.getAttribute("href");if((null==t?void 0:t.includes("cv://poi"))&&(null==e?void 0:e.length)){var n=t.split("cv://poi?id=")[1];if(n){var r=e.find((function(e){return e.id.toString()===n}));r&&B.n.trigger("glance:poi:mouseover",r)}}}function a(){B.n.trigger("glance:poi:mouseleave")}function o(){var e;return null===(e=n.current)||void 0===e?void 0:e.querySelectorAll('[href*="cv://poi"]')}return _("player:poi:mouseover",(function(e){var t,r=null==e?void 0:e.id;r&&(null===(t=function(e){var t;return null===(t=n.current)||void 0===t?void 0:t.querySelector('[href="cv://poi?id='.concat(e,'"]'))}(r))||void 0===t||t.classList.add(H.highlightPoi))}),null,t),_("player:poi:mouseleave",(function(){var e;null===(e=o())||void 0===e||e.forEach((function(e){return e.classList.remove(H.highlightPoi)}))}),null,t),(0,r.useEffect)((function(){if(n.current&&t){var e=o();return e.forEach((function(e){return e.addEventListener("mouseover",i)})),e.forEach((function(e){return e.addEventListener("mouseleave",a)})),function(){e.forEach((function(e){return e.removeEventListener("mouseover",i)})),e.forEach((function(e){return e.removeEventListener("mouseleave",a)}))}}}),[n.current]),n}(e.pointsOfInterest,t);if(!t)return r.createElement(r.Fragment,null);var a,o,c,l,u,s=(null===(c=null===(o=null==(a=e.theme)?void 0:a.data)||void 0===o?void 0:o.colours)||void 0===c?void 0:c.primary)&&(null===(u=null===(l=null==a?void 0:a.data)||void 0===l?void 0:l.colours)||void 0===u?void 0:u.secondary)?a.data.colours:{primary:"#F5F4FF",secondary:"#9294FF"},d="function"==typeof e.onClickShowDescription,m="function"==typeof e.onClickShowCurriculumLinks;return r.createElement("div",{className:"rounded border px-3 px-sm-5 py-3 mb-3 position-relative d-flex justify-content-center ".concat(H.container),style:{backgroundColor:s.primary}},r.createElement("div",{className:"".concat(H.content," d-flex align-items-center pt-4 pt-sm-0")},r.createElement("div",null,r.createElement("h2",{className:"h4"},r.createElement(v.x,{namespace:Q,phrase:"videoAtAGlance"})),d&&r.createElement(O.L,{onClick:e.onClickShowDescription,className:"".concat(H.detailsBtn," position-absolute cursor-pointer me-4 fw-semibold text-info")},r.createElement(v.x,{namespace:Q,phrase:"readFullDescription"})),r.createElement("div",{ref:i,onClick:function(t){return function(e,t,n){e.preventDefault();var r=e.target.getAttribute("href");if((null==r?void 0:r.includes("cv://poi"))&&(null==t?void 0:t.length)){var i=r.split("cv://poi?id=")[1],a=t.find((function(e){return e.id.toString()===i}));n&&a&&n(a.startTime)}}(t,e.pointsOfInterest,e.setStartTime)},dangerouslySetInnerHTML:{__html:n}}),function(){var t,n,i,a;return(null===(n=null===(t=e.video.tags)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)?r.createElement("div",{className:"py-1"},r.createElement(U.P,Object.assign({tags:null===(a=null===(i=e.video)||void 0===i?void 0:i.tags)||void 0===a?void 0:a.data,themeColours:s},R.G.getTagActionProps(e.getTagAppLink,e.suppressInteractivity)))):r.createElement(r.Fragment,null)}(),r.createElement("div",{className:"mt-2"},m&&r.createElement(O.L,{onClick:e.onClickShowCurriculumLinks,className:"cursor-pointer d-inline-block fw-semibold text-info"},r.createElement(v.x,{namespace:Q,phrase:"seeCurriculumLinks"}))))),function(){var t,n,i,a=null!==(i=null===(n=null===(t=e.theme)||void 0===t?void 0:t.data)||void 0===n?void 0:n.images)&&void 0!==i?i:{};return j.t.keys(a).filter((function(e){return!j.t.isEmpty(a[e])})).map((function(e){var t,n,i=F.j.createUrl(null===(t=a[e])||void 0===t?void 0:t.url,{size:D.h2.Medium});return r.createElement("div",{key:null===(n=a[e])||void 0===n?void 0:n.fileId,className:"".concat(H[e]," ").concat(H.background),style:{backgroundImage:"url('".concat(i,"')")}})}))}())}var J=n(38647),X=n(11518),ee=n(15446),te=n(47862),ne=n(26733),re=n(71063),ie=n(10439),ae=n(35429),oe=n(4594),ce=n(16714),le=n(58704),ue=n(80143),se=n(22902),de=n(10038),me=n(13375),ve=n(67753),fe=n(31908),pe=n(47938),he=n(81024),ge=n(78166),ye=n(99719);function be(){return r.createElement("div",{className:"p-3 mb-3 border rounded"},r.createElement("div",{className:"row"},r.createElement("div",{className:"pe-3 col-md-7 border-right"},r.createElement("div",{className:"partial-loading-background mb-2",style:{height:"1.5rem",width:"12rem"}}),r.createElement("div",{className:"partial-loading-background mb-2",style:{height:"4.5rem"}}),r.createElement("div",{className:"partial-loading-background",style:{height:"1.5rem",width:"15rem"}})),r.createElement("div",{className:"col-md-5 ps-md-3 pt-3 pt-md-0"},r.createElement("div",{className:"partial-loading-background mb-2",style:{height:"1.5rem",width:"7rem"}}),r.createElement("div",{className:"partial-loading-background mb-2",style:{height:"1.5rem",width:"10rem"}}),r.createElement("div",{className:"partial-loading-background mb-2",style:{height:"1.5rem",width:"12rem"}}),r.createElement("div",{className:"partial-loading-background mb-2 me-2 d-inline-block",style:{height:"1.5rem",width:"3rem"}}),r.createElement("div",{className:"partial-loading-background mb-2 me-2 d-inline-block",style:{height:"1.5rem",width:"4rem"}}),r.createElement("div",{className:"partial-loading-background mb-2 me-2 d-inline-block",style:{height:"1.5rem",width:"3.5rem"}}),r.createElement("div",{className:"partial-loading-background mb-2 me-2 d-inline-block",style:{height:"1.5rem",width:"4.5rem"}}))))}var Ee=n(99742),we=n(14070),ke=n(97291),Ce=n(90102),Ae=n(65986),Ie=n(99092);const Se={series:"SaFrA",createInteractive:"sB8ng",badgeListContainer:"QHYXF",actionsContainer:"YpwOS",belowTitle:"c0fZQ"};function Le(e){return function(e){if(Array.isArray(e))return Te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(e,t)||xe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xe(e,t){if(e){if("string"==typeof e)return Te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Te(e,t):void 0}}function Te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Pe="shared.playPage",Ve=i.T.encloseNamespace(Pe);function je(e){var t,n,i,m,f,p,h,g,y,E,w,k=Ne(r.useState(!1),2),C=k[0],A=k[1],I=(0,ae.g)(),S=(0,se.T)().hasPermissions,L=fe.M.getCanBeConsumed(e.video).canConsume,N=e.imageCdnUrl,x=r.useRef(!1),T=r.useRef(null),j=r.useRef(null),O=(0,Ie.A1)(e.video),R=O.hasBadges,U=O.hasSeries,D=K(e.video,e.glanceTheme)&&e.featureAccess.canViewGlance,F=Ne(r.useState({view:"loading",referrer:null}),2),M=F[0],B=F[1];r.useEffect((function(){e.glanceLoaded&&B({view:e.glanceTheme?"v@g":"details",referrer:null})}),[e.glanceLoaded,e.glanceTheme]);var _=(0,ue.n)(null===(t=e.video.subjectPresentationAudiences)||void 0===t?void 0:t.data,e.audiences),G=(0,Ie.lU)(),H=(0,Ae._)(Ae.i.PlayPage);function Y(){if(T.current&&j.current){var e=T.current.getBoundingClientRect().width,t=j.current.getBoundingClientRect().width>e/2;t&&!C?A(!0):!t&&C&&A(!1)}}var Z=(0,Ie.jh)(e.video,S(ce.C.StudentExperience)),W=a.q.throttle(Y,300);(0,de.H)(W,null,[C]),r.useEffect(Y,[T,j,C]);var z="picture-in-picture"===I.mode||e.featureAccess.canViewPublicLayout,q=!(!e.featureAccess.canViewCurriculumLinks||!e.curriculums.customerHasCurriculumLinks);return r.createElement(v.D.Provider,{value:Pe},r.createElement(pe.W,{restrictions:e.video._restrictions,yearGroups:e.yearGroups,objectId:e.video.id,objectTypeId:oe.E.Video,canManageVideoAccess:e.canManageVideoAccess}),r.createElement("section",{className:"mb-2 ".concat(re.M.GLOBAL_PLAYER_SELECTOR)},L&&r.createElement(ie.r,{key:e.video.id,objectId:e.video.id,objectTypeId:e.video.typeId,shareId:e.shareId,context:null===(n=e.params)||void 0===n?void 0:n.context,contextId:null===(i=e.params)||void 0===i?void 0:i.contextId,playNext:null===(m=e.params)||void 0===m?void 0:m.playNext,moviesAndTv:null===(f=e.params)||void 0===f?void 0:f.mtv,startTime:null===(p=e.params)||void 0===p?void 0:p.t,mode:"default",location:"play-page"}),r.createElement("div",{className:z?"":"d-none"},r.createElement(he.S,{video:e.video,appLink:{application:ke.O.SIGN_UP,action:we.e.SignUp.SIGN_UP},type:"picture-in-picture"===I.mode?"pip":"public"}))),r.createElement("section",{className:"".concat(U||R?"mb-3":"mb-2"," position-relative"),ref:T},r.createElement("div",{className:"d-inline-block",ref:j},!!e.video.series&&r.createElement(V.M,{video:e.video,appLink:G.getSeriesAppLink(e.video.series,e.params.mtv),className:"".concat(Se.series," text-truncate mw-100"),analyticsOptions:{location:c.LZ.PlayPage}}),r.createElement("h1",{className:"h4 d-inline-flex align-items-center mb-2 mt-n1 mw-100 ".concat(U||R?"":"mb-0 pt-2")},r.createElement("span",{className:"align-self-center"},e.video.name),r.createElement(J.m,{tooltipPlacement:"right",className:"ps-1 mb-n1",video:e.video,yearGroups:e.yearGroups}))),R&&r.createElement(d.c,{className:Se.badgeListContainer},r.createElement(u.P,{audience:_,className:"bg-white text-dark",border:"dark"}),r.createElement(s.C,{type:s.g.Rating,data:e.video.rating}),r.createElement(s.C,{type:s.g.ProductionYear,data:e.video.productionYear}),!!(null==Z?void 0:Z.length)&&r.createElement(s.C,{type:s.g.Resources,data:[].concat(Le(null!==(g=null===(h=e.video.resources)||void 0===h?void 0:h.data)&&void 0!==g?g:[]),Le(null!==(E=null===(y=e.video.links)||void 0===y?void 0:y.data)&&void 0!==E?E:[]))})),e.featureAccess.canNavigate&&r.createElement("div",{className:"ms-2 ".concat(Se.actionsContainer," ").concat(C?Se.belowTitle:"")},r.createElement(l.e,{actions:H(e.video),actionsDropdownClassName:"btn btn-outline-dark"}))),r.createElement("section",{className:"".concat("v@g"===M.view?"d-block":"d-none")},r.createElement($,{theme:e.glanceTheme,video:e.video,pointsOfInterest:e.pointsOfInterest,onClickShowDescription:function(){return B({view:"details",referrer:"v@g"})},onClickShowCurriculumLinks:q&&function(){return B({view:"curriculumLinks",referrer:"v@g"})},setStartTime:function(e){var t;return null===(t=I.playerRef.current)||void 0===t?void 0:t.currentTime(e)},getTagAppLink:G.getTagAppLink,suppressInteractivity:e.featureAccess.canViewPublicLayout})),r.createElement("section",{className:"".concat("details"===M.view?"d-block":"d-none")},r.createElement(ye.X,{video:e.video,onLaunchImmersiveReader:function(){var e,t,n,r;x.current=!(null===(t=null===(e=null==I?void 0:I.playerRef)||void 0===e?void 0:e.current)||void 0===t?void 0:t.isPaused()),null===(r=null===(n=null==I?void 0:I.playerRef)||void 0===n?void 0:n.current)||void 0===r||r.pause()},onExitImmersiveReader:function(){var e,t;x.current&&(null===(t=null===(e=null==I?void 0:I.playerRef)||void 0===e?void 0:e.current)||void 0===t||t.play())},onClickClose:D&&function(){return B({view:"v@g",referrer:"details"})},onClickShowCurriculumLinks:q&&function(){return B({view:"curriculumLinks",referrer:"details"})},getTagAppLink:G.getTagAppLink,suppressInteractivity:e.featureAccess.canViewPublicLayout})),r.createElement("section",{className:"".concat("curriculumLinks"===M.view?"d-block":"d-none")},r.createElement(P,{height:Ce.x,curriculums:e.curriculums,onClickClose:function(){return B({view:M.referrer,referrer:"curriculumLinks"})},emptyStateUrl:Ee.W.EmptyStates.CURRICULUM_LINKS})),r.createElement("section",{className:"".concat("loading"===M.view?"d-block":"d-none")},r.createElement(be,null)),fe.M.isBroadcast(e.video)&&r.createElement(b,{placement:"bottom-end",className:"d-flex justify-content-end mt-n2"}),!!(null==Z?void 0:Z.length)&&r.createElement("section",{className:"pb-3"},r.createElement(X.kM,{name:Ve("resources",{count:Z.length}),contents:le.z.Resources,collection:Z,prefetched:!0,childComponent:ne.R,extraChildComponentProps:{imageCdnUrl:N,imageErrorFallbackUrl:Ee.W.Fallbacks.RESOURCE_THUMBNAIL,actionBehaviour:e.featureAccess.canViewResourceItems?"normal":"public"},getChildAppLink:G.getResourceAppLink(null===(w=e.video)||void 0===w?void 0:w.id,e.shareId,e.featureAccess.canViewResourceItems),analyticsOptions:e.featureAccess.canViewResourceItems?{}:{workflowPhase:c.eu.Start,descriptor:c.Yu.SignUp},analyticsData:{widgetId:"resources"}})),e.featureAccess.canViewInteractives&&!me.U.isEmpty(e.video.interactives)&&r.createElement("section",{className:"pb-3"},r.createElement(X.kM,{name:Ve("interactives",{count:me.U.length(e.video.interactives)}),contents:le.z.Interactives,collection:e.video.interactives.data,prefetched:!0,getChildAppLink:function(e){return{application:ke.O.INTERACTIVES,action:we.e.Interactives.VIEW_INTERACTIVE,args:[e.id,o.m.slugify(e.name)]}},childComponent:te.K,extraChildComponentProps:{video:e.video,questionsAppLink:{application:ke.O.INTERACTIVES,action:we.e.Interactives.PREVIEW_QUESTIONS},imageCdnUrl:e.imageCdnUrl},analyticsData:{widgetId:"interactives"}})),e.featureAccess.canViewClips&&!me.U.isEmpty(e.video.clips)&&r.createElement("section",{className:"pb-3"},r.createElement(X.kM,{name:Ve("clips",{count:me.U.length(e.video.clips)}),contents:le.z.Clips,collection:e.video.clips.data,prefetched:!0,getChildAppLink:function(e){return{application:ke.O.CLIPS,action:we.e.Clips.PLAY_CLIP,args:[e.id,o.m.slugify(e.name)]}},childComponent:ee.C,extraChildComponentProps:{video:e.video,imageCdnUrl:e.imageCdnUrl},analyticsData:{widgetId:"clips"}})),r.createElement("section",null,r.createElement(ge.Z,{currentVideo:e.video,yearGroups:e.yearGroups,relatedVideos:e.relatedVideos,currentUser:e.currentUser,setFavourite:e.setFavourite,canFavourite:e.canFavourite,getVideoAppLink:function(t){return ve.W.getAppLink(t,{context:e.params.context,contextId:e.params.contextId,playNext:e.params.playNext,shareId:e.shareId,moviesAndTv:e.params.mtv})},audiences:e.audiences,moviesAndTv:e.params.mtv})))}},35014:(e,t,n)=>{n.d(t,{I:()=>l});var r=n(16714),i=n(12754),a=n(22902),o=n(15311),c=n(11387);function l(){var e=(0,a.T)(),t=e.hasPermissions,n=e.hasLocalPermissions,l=(0,(0,o.r)().hasProduct)(i.x.Primary);return{canViewGlance:t(r.C.ViewVideoGlance),canViewResources:!0,canViewInteractives:l&&t(r.C.ViewVideoInteractives),canViewClips:l&&t(r.C.ViewVideoClips),canViewCurriculumLinks:t(r.C.ViewCurriculums),canUseActions:n(r.E.UseVideoActions),canViewPublicLayout:!n(r.E.WatchVideos)&&c.C.hasRegionPrefix(),canViewResourceItems:n(r.E.ViewVideoResourceItems),canNavigate:l}}}}]);