@orangelogic/orange-dam-content-browser-sdk 2.2.0-beta-72 → 2.2.0-beta-74

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.
@@ -109,7 +109,7 @@
109
109
  margin-bottom: var(--cx-spacing-3x-small);
110
110
  }
111
111
  }
112
- `;var Ut=n(4413),Vt=n(579);const qt=e=>{let{loadMore:t,isLoading:n,disabled:r=!1,slot:o,disabledIndentation:i}=e;return(0,Vt.jsxs)("cx-space",{direction:"horizontal",slot:o,children:[!i&&(0,Vt.jsx)("div",{className:"browser__load-more__indentation"}),(0,Vt.jsxs)("cx-button",{variant:"text",size:"small",onClick:t,disabled:r,loading:n,className:"browser__load-more",children:[(0,Vt.jsx)("cx-icon",{name:"add",slot:"prefix"}),"More"]})]})},Ht=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Wt=(e,t)=>{if(!t)return e;const n=t.toLowerCase().split(" ").filter(Boolean),r=n.map(Ht),o=new RegExp(`(${r.join("|")})`,"gi");return e.split(o).map(((e,t)=>n.includes(e.toLowerCase())?(0,Vt.jsx)("strong",{children:e},t):e))},Kt=e=>{var t;let{allowedFolders:n,folder:r,currentFolderID:o,icon:i,searchText:a,useSession:s,damViewSeeThru:l}=e;const[c,u]=(0,wt.useState)(!1),[d,h]=(0,wt.useState)(!1),[p,f]=(0,wt.useState)({start:0,pageSize:Ut.VH}),m=(0,wt.useRef)(null),g=o===r.id,{data:v,isFetching:b,isLoading:y}=(0,Rt.Jz)({allowedFolders:n,folder:r,searchText:"",useSession:s,start:p.start,pageSize:p.pageSize,damViewSeeThru:l},{skip:!d}),x=(0,wt.useMemo)((()=>{var e;return null!==(e=null===v||void 0===v?void 0:v.items)&&void 0!==e?e:void 0}),[v]),w=null!==(t=null===v||void 0===v?void 0:v.totalCount)&&void 0!==t?t:0,S=(0,wt.useCallback)((()=>{const e=(null===x||void 0===x?void 0:x.length)||0;e>=w||f((t=>({...t,start:e})))}),[null===x||void 0===x?void 0:x.length,w]);(0,wt.useEffect)((()=>{Promise.all([customElements.whenDefined("cx-tree-item")]).then((()=>{u(!0)}))}),[c]),(0,wt.useEffect)((()=>{const e=m.current;if(!e)return;const t=()=>{h(!0)},n=e=>{e.detail.target===m.current&&h(!1)};return e.addEventListener("cx-lazy-load",t),e.addEventListener("cx-expand",t),e.addEventListener("cx-collapse",n),()=>{e.removeEventListener("cx-lazy-load",t),e.removeEventListener("cx-expand",t),e.removeEventListener("cx-collapse",n)}}),[c]);const k=(0,wt.useMemo)((()=>{let e,t="outlined";return i?e=i:"Album"===r.docType?e=r.isShared?"share":"folder":(e="folder",t="filled"),{name:e,variant:t}}),[r.docType,r.isShared,i]),_=r.hasChildren&&(void 0===x||b);return(0,Vt.jsxs)(Vt.Fragment,{children:[(0,Vt.jsxs)("cx-tree-item",{ref:m,"data-value":JSON.stringify(r),expanded:d,selected:g,lazy:_,children:[(0,Vt.jsx)("cx-icon",{name:k.name,variant:k.variant}),(0,Vt.jsx)("cx-line-clamp",{lines:1,children:Wt(r.title,a)}),null===x||void 0===x?void 0:x.map((e=>(0,Vt.jsx)(Kt,{allowedFolders:n,folder:e,searchText:a,currentFolderID:o,damViewSeeThru:l,useSession:s},e.id)))]}),x&&x.length<w&&!y&&(0,Vt.jsx)(qt,{loadMore:S,isLoading:b,disabled:b})]})},$t=Kt;var Qt=n(1158);const Gt=e=>{switch(e){case Qt.zu.Audio:return"audio_file";case Qt.zu.Album:return"album";case Qt.zu.Widget:return"widgets";case Qt.zu.Multimedia:return"perm_media";case Qt.zu.Story:return"article";case Qt.zu.Video:return"video_file";case Qt.zu.Image:return"photo";default:return"file"}},Xt=e=>`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e).replace(/'/g,"%27").replace(/"/g,"%22")}`;var Zt=n(7840);const Yt={id:"",title:"My Favorites",docType:"Story",path:[],parents:[],fullPath:"My Favorites",hasChildren:!1},Jt=e=>{var t,n;let{allowedFolders:r,allowPin:o,collectionPath:i,currentFolder:a,favoriteFolderId:s,focusInput:l,lastLocationMode:c,open:u,showCollections:d,showFavoriteFolder:h,useSession:p,onFolderSelect:f,onClose:m,isPersistent:g,onChangePersistent:v,forceOverlay:b,damViewSeeThru:y}=e;const[x,w]=(0,wt.useState)(""),[S,k]=(0,wt.useState)(!1),[_,C]=(0,wt.useState)(!1),[E,A]=(0,wt.useState)(!1),[T,O]=(0,wt.useState)({start:0,pageSize:Ut.VH}),[P,z]=(0,wt.useState)({start:0,pageSize:Ut.VH}),D=(0,wt.useRef)(null),R=(0,wt.useRef)(null),j=(0,wt.useRef)(null),N=(0,wt.useRef)(null),I=(0,wt.useRef)(!0);(0,wt.useEffect)((()=>{Promise.all([customElements.whenDefined("cx-drawer"),customElements.whenDefined("cx-input"),customElements.whenDefined("cx-tree")]).then((()=>{k(!0)}))}),[]),(0,wt.useEffect)((()=>{const e=j.current;if(!e)return;const t=ke((e=>{const t=e.target.value;x!==t&&(t.length>2||0===t.length)&&(w(t),O((e=>({...e,start:0}))))}),500);return e.addEventListener("cx-input",t),()=>{e.removeEventListener("cx-input",t)}}),[S,x]),(0,wt.useEffect)((()=>{const e=R.current;if(!e)return;const t=()=>{m(),v(!1)};return e.addEventListener("cx-request-close",t),()=>{e.removeEventListener("cx-request-close",t)}}),[S,m,v]);const{data:M,isLoading:F,isFetching:L,isError:B}=(0,Rt.Jz)({allowedFolders:r,folder:Nt,searchText:x,useSession:p,start:T.start,pageSize:T.pageSize,damViewSeeThru:y}),{data:U}=(0,Rt.Jz)({allowedFolders:r,folder:{...Yt,id:null!==s&&void 0!==s?s:""},searchText:"",useSession:p,self:!0,includeDirectChild:!1,damViewSeeThru:y},{skip:!s}),V=(0,wt.useMemo)((()=>{var e;return null!==(e=null===M||void 0===M?void 0:M.items)&&void 0!==e?e:void 0}),[M]),q=null!==(t=null===M||void 0===M?void 0:M.totalCount)&&void 0!==t?t:0,H=(0,wt.useCallback)((()=>{if(!V)return;const e=V.length;e>=q||(C(!0),O((t=>({...t,start:e}))))}),[V,q]);(0,wt.useEffect)((()=>{const e=()=>{if(!V)return;if(r&&r.length>0){const e=V.find((e=>r.includes(e.id)));if(e)return void f(e)}const e=V.find((e=>e.title===Dt.mT));f(e||Nt)};I.current&&V&&(I.current=!1,c?(0,Mt.bQ)("lastLocation").then((t=>{if("string"===typeof t)try{const n=JSON.parse(t);if(n.id===s&&!h||r&&r.length>0)return void e();f(n)}catch(n){e()}else e()})).catch((()=>{e()})):e())}),[r,s,V,c,f,h]);const{data:W,isLoading:K,isFetching:$,isError:Q}=(0,Rt.$Y)(i?{folder:i,searchText:x,useSession:p,start:P.start,pageSize:P.pageSize}:Ft.hT),G=(0,wt.useMemo)((()=>{var e;return null!==(e=null===W||void 0===W?void 0:W.items)&&void 0!==e?e:void 0}),[W]),X=null!==(n=null===W||void 0===W?void 0:W.totalCount)&&void 0!==n?n:0,Z=(0,wt.useCallback)((()=>{if(!G)return;A(!0);const e=G.length;e>=X||z((t=>({...t,start:e})))}),[G,X]);(0,wt.useEffect)((()=>{const e=N.current;if(!e)return;const t=e=>{var t;const n=JSON.parse(null!==(t=e.detail.selection[0].dataset.value)&&void 0!==t?t:"{}");null===f||void 0===f||f(n)};return e.addEventListener("cx-selection-change",t),()=>{e.removeEventListener("cx-selection-change",t)}}),[S,f]),(0,wt.useEffect)((()=>{const e=D.current;if(!e)return;const t=e=>{var t;const n=JSON.parse(null!==(t=e.detail.item.value)&&void 0!==t?t:"{}");null===f||void 0===f||f(n)};return e.addEventListener("cx-select",t),()=>{e.removeEventListener("cx-select",t)}}),[S,G,f]),(0,wt.useEffect)((()=>{L||C(!1)}),[L]),(0,wt.useEffect)((()=>{$||A(!1)}),[$]);const Y=(0,wt.useCallback)((()=>{if(F||L&&!_)return Array.from({length:5}).map(((e,t)=>(0,Vt.jsx)("cx-skeleton",{},t)));if(V&&V.length>0){var e;const i=[];var t,n,o;if(s)i.push((0,Vt.jsx)($t,{folder:{...Yt,id:s,hasChildren:null!==(t=null===U||void 0===U||null===(n=U.items)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.hasChildren)&&void 0!==t&&t},currentFolderID:a.id,icon:"star",useSession:p,damViewSeeThru:y},s));return[...i,...(null!==(e=(0,Zt.A)(V,(e=>e.id)))&&void 0!==e?e:[]).map((e=>(0,Vt.jsx)($t,{allowedFolders:r,folder:e,currentFolderID:a.id,searchText:x,useSession:p,damViewSeeThru:y},e.id)))]}return B?(0,Vt.jsx)("cx-typography",{variant:"body3",children:"Failed to load folders"}):(0,Vt.jsx)("cx-typography",{variant:"body3",children:"No folders found"})}),[r,a.id,s,V,B,L,F,x,p,_,U,y]),J=(0,wt.useCallback)((()=>K||$&&!E?Array.from({length:5}).map(((e,t)=>(0,Vt.jsx)("cx-skeleton",{},t))):G&&G.length>0?null===G||void 0===G?void 0:G.map((e=>{const t=a.id===e.id;return(0,Vt.jsxs)("cx-menu-item",{value:JSON.stringify(e),className:""+(t?"selected":""),children:[(0,Vt.jsx)("cx-icon",{slot:"prefix",name:"collections"}),Wt(e.title,x)]},e.id)})):Q?(0,Vt.jsx)("cx-typography",{variant:"body3",children:"Failed to load collections"}):(0,Vt.jsx)("cx-typography",{variant:"body3",children:"No collections found"})),[K,$,G,Q,a.id,x,E]),ee={persistent:{src:Xt('<svg\n xmlns="http://www.w3.org/2000/svg"\n height="24px"\n viewBox="0 -960 960 960"\n width="24px"\n fill="#52525B"\n >\n <path d="M660-320v-320L500-480l160 160ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm120-80v-560H200v560h120Zm80 0h360v-560H400v560Zm-80 0H200h120Z" />\n </svg>'),onclick:()=>{m(),v(!1)}},overlay:{src:Xt('<svg\n xmlns="http://www.w3.org/2000/svg"\n height="24px"\n viewBox="0 -960 960 960"\n width="24px"\n fill="#52525B"\n >\n <path d="M500-640v320l160-160-160-160ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm120-80v-560H200v560h120Zm80 0h360v-560H400v560Zm-80 0H200h120Z" />\n </svg>'),onclick:()=>v(!0)}},te=g?ee.persistent:ee.overlay,ne=b||!g?"overlay":"persistent",re=!b&&g;return(0,Vt.jsxs)(Bt,{ref:R,label:"Browser",placement:"start",contained:!0,open:u,variant:ne,noCloseButton:re,children:[!b&&o?(0,Vt.jsx)("cx-icon-button",{slot:"header-actions",...te}):null,(0,Vt.jsxs)("cx-space",{direction:"vertical",spacing:"small",wrap:"nowrap",children:[(0,Vt.jsxs)("cx-space",{direction:"vertical",spacing:"small",style:{padding:"var(--body-spacing) var(--body-spacing) 0"},children:[(0,Vt.jsx)("cx-typography",{variant:"body3",children:"Folders"}),(0,Vt.jsx)("cx-input",{ref:j,value:x,placeholder:"Search...",clearable:!0,autoFocus:l,className:"search-input",children:(0,Vt.jsx)("cx-icon",{name:"search",slot:"prefix",className:"icon--large"})}),(0,Vt.jsx)("div",{className:"browser__folders",children:(0,Vt.jsxs)("cx-tree",{ref:N,"force-on-change":!0,children:[Y(),V&&V.length<q&&!F&&(0,Vt.jsx)(qt,{loadMore:H,isLoading:L,disabled:L})]})})]}),d&&(0,Vt.jsx)("div",{className:"browser__collections",children:(0,Vt.jsxs)("cx-details",{children:[(0,Vt.jsx)("cx-typography",{slot:"summary",variant:"body3",children:"Collections"}),(0,Vt.jsxs)("cx-menu",{ref:D,className:"browser__collections__menu",children:[J(),G&&G.length<X&&!K&&(0,Vt.jsx)(qt,{loadMore:Z,isLoading:$,disabled:$,disabledIndentation:!0})]})]})})]})]})},en=[{label:"Ascending",value:"ascending",icon:()=>(0,Vt.jsxs)("svg",{slot:"prefix",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Vt.jsx)("path",{d:"M3.33333 4.7619L4.25984 5.68841L6.60714 3.33929V11.3095H7.61905V3.33929L9.96627 5.68841L10.8929 4.7619L6.96429 0.833333L3.33333 4.7619Z",fill:"currentColor"}),(0,Vt.jsx)("path",{opacity:"0.3",d:"M17.0833 15.2381L16.1568 14.3116L13.8095 16.6607V8.69048H12.7976V16.6607L10.4504 14.3116L9.52381 15.2381L13.4524 19.1667L17.0833 15.2381Z",fill:"currentColor"})]})},{label:"Descending",value:"descending",icon:()=>(0,Vt.jsxs)("svg",{slot:"prefix",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Vt.jsx)("path",{opacity:"0.3",d:"M3.33333 4.7619L4.25984 5.68841L6.60714 3.33929V11.3095H7.61905V3.33929L9.96627 5.68841L10.8929 4.7619L6.96429 0.833333L3.33333 4.7619Z",fill:"currentColor"}),(0,Vt.jsx)("path",{d:"M17.0833 15.2381L16.1568 14.3116L13.8095 16.6607V8.69048H12.7976V16.6607L10.4504 14.3116L9.52381 15.2381L13.4524 19.1667L17.0833 15.2381Z",fill:"currentColor"})]})}],tn=[{value:Qt.gf.Small,label:"Small labeled"},{value:Qt.gf.Medium,label:"Medium labeled"},{value:Qt.gf.Large,label:"Large labeled"}],nn=Lt.Ay.div`
112
+ `;var Ut=n(4413),Vt=n(579);const qt=e=>{let{loadMore:t,isLoading:n,disabled:r=!1,slot:o,disabledIndentation:i}=e;return(0,Vt.jsxs)("cx-space",{direction:"horizontal",slot:o,children:[!i&&(0,Vt.jsx)("div",{className:"browser__load-more__indentation"}),(0,Vt.jsxs)("cx-button",{variant:"text",size:"small",onClick:t,disabled:r,loading:n,className:"browser__load-more",children:[(0,Vt.jsx)("cx-icon",{name:"add",slot:"prefix"}),"More"]})]})},Ht=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Wt=(e,t)=>{if(!t)return e;const n=t.toLowerCase().split(" ").filter(Boolean),r=n.map(Ht),o=new RegExp(`(${r.join("|")})`,"gi");return e.split(o).map(((e,t)=>n.includes(e.toLowerCase())?(0,Vt.jsx)("strong",{children:e},t):e))},Kt=e=>{var t;let{allowedFolders:n,folder:r,currentFolderID:o,icon:i,searchText:a,useSession:s,damViewSeeThru:l}=e;const[c,u]=(0,wt.useState)(!1),[d,h]=(0,wt.useState)(!1),[p,f]=(0,wt.useState)({start:0,pageSize:Ut.VH}),m=(0,wt.useRef)(null),g=o===r.id,{data:v,isFetching:b,isLoading:y}=(0,Rt.Jz)({allowedFolders:n,folder:r,searchText:"",useSession:s,start:p.start,pageSize:p.pageSize,damViewSeeThru:l},{skip:!d}),x=(0,wt.useMemo)((()=>{var e;return null!==(e=null===v||void 0===v?void 0:v.items)&&void 0!==e?e:void 0}),[v]),w=null!==(t=null===v||void 0===v?void 0:v.totalCount)&&void 0!==t?t:0,S=(0,wt.useCallback)((()=>{const e=(null===x||void 0===x?void 0:x.length)||0;e>=w||f((t=>({...t,start:e})))}),[null===x||void 0===x?void 0:x.length,w]);(0,wt.useEffect)((()=>{Promise.all([customElements.whenDefined("cx-tree-item")]).then((()=>{u(!0)}))}),[c]),(0,wt.useEffect)((()=>{const e=m.current;if(!e)return;const t=()=>{h(!0)},n=e=>{e.detail.target===m.current&&h(!1)};return e.addEventListener("cx-lazy-load",t),e.addEventListener("cx-expand",t),e.addEventListener("cx-collapse",n),()=>{e.removeEventListener("cx-lazy-load",t),e.removeEventListener("cx-expand",t),e.removeEventListener("cx-collapse",n)}}),[c]);const k=(0,wt.useMemo)((()=>{let e,t="outlined";return i?e=i:"Album"===r.docType?e=r.isShared?"share":"folder":(e="folder",t="filled"),{name:e,variant:t}}),[r.docType,r.isShared,i]),_=r.hasChildren&&(void 0===x||b);return(0,Vt.jsxs)(Vt.Fragment,{children:[(0,Vt.jsxs)("cx-tree-item",{ref:m,"data-value":JSON.stringify(r),expanded:d,selected:g,lazy:_,children:[(0,Vt.jsx)("cx-icon",{name:k.name,variant:k.variant}),(0,Vt.jsx)("cx-line-clamp",{lines:1,children:Wt(r.title,a)}),null===x||void 0===x?void 0:x.map((e=>(0,Vt.jsx)(Kt,{allowedFolders:n,folder:e,searchText:a,currentFolderID:o,damViewSeeThru:l,useSession:s},e.id)))]}),x&&x.length<w&&!y&&(0,Vt.jsx)(qt,{loadMore:S,isLoading:b,disabled:b})]})},$t=Kt;var Qt=n(1158);const Gt=e=>{switch(e){case Qt.zu.Audio:return"audio_file";case Qt.zu.Album:return"album";case Qt.zu.Widget:return"widgets";case Qt.zu.Multimedia:return"perm_media";case Qt.zu.Story:return"article";case Qt.zu.Video:return"video_file";case Qt.zu.Image:return"photo";default:return"file"}},Xt=e=>`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e).replace(/'/g,"%27").replace(/"/g,"%22")}`;var Zt=n(7840);const Yt={id:"",title:"My Favorites",docType:"Story",path:[],parents:[],fullPath:"My Favorites",hasChildren:!1},Jt=e=>{var t,n;let{allowedFolders:r,allowPin:o,collectionPath:i,currentFolder:a,favoriteFolderId:s,focusInput:l,lastLocationMode:c,open:u,showCollections:d,showFavoriteFolder:h,useSession:p,onFolderSelect:f,onClose:m,isPersistent:g,onChangePersistent:v,forceOverlay:b,damViewSeeThru:y}=e;const[x,w]=(0,wt.useState)(""),[S,k]=(0,wt.useState)(!1),[_,C]=(0,wt.useState)(!1),[E,A]=(0,wt.useState)(!1),[T,O]=(0,wt.useState)({start:0,pageSize:Ut.VH}),[P,z]=(0,wt.useState)({start:0,pageSize:Ut.VH}),D=(0,wt.useRef)(null),R=(0,wt.useRef)(null),j=(0,wt.useRef)(null),N=(0,wt.useRef)(null),I=(0,wt.useRef)(!0);(0,wt.useEffect)((()=>{Promise.all([customElements.whenDefined("cx-drawer"),customElements.whenDefined("cx-input"),customElements.whenDefined("cx-tree")]).then((()=>{k(!0)}))}),[]),(0,wt.useEffect)((()=>{const e=j.current;if(!e)return;const t=ke((e=>{const t=e.target.value;x!==t&&(t.length>2||0===t.length)&&(w(t),O((e=>({...e,start:0}))))}),500);return e.addEventListener("cx-input",t),()=>{e.removeEventListener("cx-input",t)}}),[S,x]),(0,wt.useEffect)((()=>{const e=R.current;if(!e)return;const t=()=>{m(),v(!1)};return e.addEventListener("cx-request-close",t),()=>{e.removeEventListener("cx-request-close",t)}}),[S,m,v]);const{data:M,isLoading:F,isFetching:L,isError:B}=(0,Rt.Jz)({allowedFolders:r,folder:Nt,searchText:x,useSession:p,start:T.start,pageSize:T.pageSize,damViewSeeThru:y}),{data:U}=(0,Rt.Jz)({allowedFolders:r,folder:{...Yt,id:null!==s&&void 0!==s?s:""},searchText:"",useSession:p,self:!0,includeDirectChild:!1,damViewSeeThru:y},{skip:!s}),V=(0,wt.useMemo)((()=>{var e;return null!==(e=null===M||void 0===M?void 0:M.items)&&void 0!==e?e:void 0}),[M]),q=null!==(t=null===M||void 0===M?void 0:M.totalCount)&&void 0!==t?t:0,H=(0,wt.useCallback)((()=>{if(!V)return;const e=V.length;e>=q||(C(!0),O((t=>({...t,start:e}))))}),[V,q]);(0,wt.useEffect)((()=>{const e=()=>{if(!V)return;if(r&&r.length>0){const e=V.find((e=>r.includes(e.id)));if(e)return void f(e)}const e=V.find((e=>e.title===Dt.mT));f(e||Nt)};I.current&&V&&(I.current=!1,c?(0,Mt.bQ)("lastLocation").then((t=>{if("string"===typeof t)try{const n=JSON.parse(t);if(n.id===s&&!h||r&&r.length>0)return void e();f(n)}catch(n){e()}else e()})).catch((()=>{e()})):e())}),[r,s,V,c,f,h]);const{data:W,isLoading:K,isFetching:$,isError:Q}=(0,Rt.$Y)(i?{folder:i,searchText:x,useSession:p,start:P.start,pageSize:P.pageSize}:Ft.hT),G=(0,wt.useMemo)((()=>{var e;return null!==(e=null===W||void 0===W?void 0:W.items)&&void 0!==e?e:void 0}),[W]),X=null!==(n=null===W||void 0===W?void 0:W.totalCount)&&void 0!==n?n:0,Z=(0,wt.useCallback)((()=>{if(!G)return;A(!0);const e=G.length;e>=X||z((t=>({...t,start:e})))}),[G,X]);(0,wt.useEffect)((()=>{const e=N.current;if(!e)return;const t=e=>{var t;const n=JSON.parse(null!==(t=e.detail.selection[0].dataset.value)&&void 0!==t?t:"{}");null===f||void 0===f||f(n)};return e.addEventListener("cx-selection-change",t),()=>{e.removeEventListener("cx-selection-change",t)}}),[S,f]),(0,wt.useEffect)((()=>{const e=D.current;if(!e)return;const t=e=>{var t;const n=JSON.parse(null!==(t=e.detail.item.value)&&void 0!==t?t:"{}");null===f||void 0===f||f(n)};return e.addEventListener("cx-select",t),()=>{e.removeEventListener("cx-select",t)}}),[S,G,f]),(0,wt.useEffect)((()=>{L||C(!1)}),[L]),(0,wt.useEffect)((()=>{$||A(!1)}),[$]);const Y=(0,wt.useCallback)((()=>{if(F||L&&!_)return Array.from({length:5}).map(((e,t)=>(0,Vt.jsx)("cx-skeleton",{},t)));if(V&&V.length>0){var e;const i=[];var t,n,o;if(s)i.push((0,Vt.jsx)($t,{folder:{...Yt,id:s,hasChildren:null!==(t=null===U||void 0===U||null===(n=U.items)||void 0===n||null===(o=n[0])||void 0===o?void 0:o.hasChildren)&&void 0!==t&&t},currentFolderID:a.id,icon:"star",useSession:p,damViewSeeThru:y},s));return[...i,...(null!==(e=(0,Zt.A)(V,(e=>e.id)))&&void 0!==e?e:[]).map((e=>(0,Vt.jsx)($t,{allowedFolders:r,folder:e,currentFolderID:a.id,searchText:x,useSession:p,damViewSeeThru:y},e.id)))]}return B?(0,Vt.jsx)("cx-typography",{variant:"body3",children:"Failed to load folders"}):(0,Vt.jsx)("cx-typography",{variant:"body3",children:"No folders found"})}),[r,a.id,s,V,B,L,F,x,p,_,U,y]),J=(0,wt.useCallback)((()=>K||$&&!E?Array.from({length:5}).map(((e,t)=>(0,Vt.jsx)("cx-skeleton",{},t))):G&&G.length>0?null===G||void 0===G?void 0:G.map((e=>{const t=a.id===e.id;return(0,Vt.jsxs)("cx-menu-item",{value:JSON.stringify(e),className:""+(t?"selected":""),children:[(0,Vt.jsx)("cx-icon",{slot:"prefix",name:"collections"}),Wt(e.title,x)]},e.id)})):Q?(0,Vt.jsx)("cx-typography",{variant:"body3",children:"Failed to load collections"}):(0,Vt.jsx)("cx-typography",{variant:"body3",children:"No collections found"})),[K,$,G,Q,a.id,x,E]),ee={persistent:{src:Xt('<svg\n xmlns="http://www.w3.org/2000/svg"\n height="24px"\n viewBox="0 -960 960 960"\n width="24px"\n fill="#52525B"\n >\n <path d="M660-320v-320L500-480l160 160ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm120-80v-560H200v560h120Zm80 0h360v-560H400v560Zm-80 0H200h120Z" />\n </svg>'),onclick:()=>{m(),v(!1)}},overlay:{src:Xt('<svg\n xmlns="http://www.w3.org/2000/svg"\n height="24px"\n viewBox="0 -960 960 960"\n width="24px"\n fill="#52525B"\n >\n <path d="M500-640v320l160-160-160-160ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm120-80v-560H200v560h120Zm80 0h360v-560H400v560Zm-80 0H200h120Z" />\n </svg>'),onclick:()=>v(!0)}},te=g?ee.persistent:ee.overlay,ne=b||!g?"overlay":"persistent",re=!b&&g;return(0,Vt.jsxs)(Bt,{ref:R,label:"Browser",placement:"start",contained:!0,open:u,variant:ne,noCloseButton:re,children:[!b&&o?(0,Vt.jsx)("cx-tooltip",{slot:"header-actions",content:g?"Collapse menu":"Expand menu",children:(0,Vt.jsx)("cx-icon-button",{...te})}):null,(0,Vt.jsxs)("cx-space",{direction:"vertical",spacing:"small",wrap:"nowrap",children:[(0,Vt.jsxs)("cx-space",{direction:"vertical",spacing:"small",style:{padding:"var(--body-spacing) var(--body-spacing) 0"},children:[(0,Vt.jsx)("cx-typography",{variant:"body3",children:"Folders"}),(0,Vt.jsx)("cx-input",{ref:j,value:x,placeholder:"Search...",clearable:!0,autoFocus:l,className:"search-input",children:(0,Vt.jsx)("cx-icon",{name:"search",slot:"prefix",className:"icon--large"})}),(0,Vt.jsx)("div",{className:"browser__folders",children:(0,Vt.jsxs)("cx-tree",{ref:N,"force-on-change":!0,children:[Y(),V&&V.length<q&&!F&&(0,Vt.jsx)(qt,{loadMore:H,isLoading:L,disabled:L})]})})]}),d&&(0,Vt.jsx)("div",{className:"browser__collections",children:(0,Vt.jsxs)("cx-details",{children:[(0,Vt.jsx)("cx-typography",{slot:"summary",variant:"body3",children:"Collections"}),(0,Vt.jsxs)("cx-menu",{ref:D,className:"browser__collections__menu",children:[J(),G&&G.length<X&&!K&&(0,Vt.jsx)(qt,{loadMore:Z,isLoading:$,disabled:$,disabledIndentation:!0})]})]})})]})]})},en=[{label:"Ascending",value:"ascending",icon:()=>(0,Vt.jsxs)("svg",{slot:"prefix",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Vt.jsx)("path",{d:"M3.33333 4.7619L4.25984 5.68841L6.60714 3.33929V11.3095H7.61905V3.33929L9.96627 5.68841L10.8929 4.7619L6.96429 0.833333L3.33333 4.7619Z",fill:"currentColor"}),(0,Vt.jsx)("path",{opacity:"0.3",d:"M17.0833 15.2381L16.1568 14.3116L13.8095 16.6607V8.69048H12.7976V16.6607L10.4504 14.3116L9.52381 15.2381L13.4524 19.1667L17.0833 15.2381Z",fill:"currentColor"})]})},{label:"Descending",value:"descending",icon:()=>(0,Vt.jsxs)("svg",{slot:"prefix",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Vt.jsx)("path",{opacity:"0.3",d:"M3.33333 4.7619L4.25984 5.68841L6.60714 3.33929V11.3095H7.61905V3.33929L9.96627 5.68841L10.8929 4.7619L6.96429 0.833333L3.33333 4.7619Z",fill:"currentColor"}),(0,Vt.jsx)("path",{d:"M17.0833 15.2381L16.1568 14.3116L13.8095 16.6607V8.69048H12.7976V16.6607L10.4504 14.3116L9.52381 15.2381L13.4524 19.1667L17.0833 15.2381Z",fill:"currentColor"})]})}],tn=[{value:Qt.gf.Small,label:"Small labeled"},{value:Qt.gf.Medium,label:"Medium labeled"},{value:Qt.gf.Large,label:"Large labeled"}],nn=Lt.Ay.div`
113
113
  display: flex;
114
114
  justify-content: space-between;
115
115
  flex-wrap: wrap;
@@ -196,7 +196,7 @@
196
196
  display: none;
197
197
  }
198
198
  }
199
- `,rn=e=>{let{itemKey:t,type:n,loading:r,selected:o,all:i,rest:a,mappedDisplayNames:s,collections:l,partialSyncCheckbox:c}=e;const u=(0,wt.useRef)(null),d=(0,wt.useMemo)((()=>{const e=u.current;if(!e)return;const n=Object.keys(a).some((e=>l.includes(`${t}>>${e}`)));return o||n?!o&&n?(e.indeterminate=!0,!1):o:(e.previouslySelected=!1,e.indeterminate=!1,!1)}),[o,l,a,t]);return(0,Vt.jsxs)("cx-tree-item",{ref:u,"data-value":t,"data-type":n,readonly:r,selected:d||void 0,"partial-sync-checkboxes":c,children:[s[t]," ",!!i&&`(${i})`,Object.entries(a).map((e=>{let[o,i]=e;return(0,Vt.jsxs)("cx-tree-item",{"data-value":`${t}>>${o}`,"data-type":n,readonly:r,selected:l.includes(`${t}>>${o}`),children:[s[`${t}>>${o}`]," (",i,")"]},o)}))]})},on=e=>{let{values:t,type:n,displayName:r,collections:o,loading:i=!1}=e;const[a,s]=(0,wt.useState)(1),l=(0,wt.useMemo)((()=>t.reduce(((e,t)=>{let{value:n,count:r}=t;const[o,i]=n.split(">>");return e[o]&&"object"===typeof e[o]||(e[o]?e[o]={all:e[o]}:e[o]={}),i&&(e[o][i]=r),e[o].all=(e[o].all||0)+r,e}),{})),[t]),c=(0,wt.useMemo)((()=>{const e={};return t.forEach((t=>{e[t.value]=t.displayValue})),t.forEach((t=>{const n=t.value.split(">>");if(n.length>1){const t=n.slice(0,-1).join(">>");e[t]||(e[t]=t.split(" ").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "))}})),e}),[t]),u=(0,wt.useMemo)((()=>Object.keys(l).length>20*a),[l,a]);return 0===t.length?null:(0,Vt.jsxs)("cx-details",{open:!0,className:"filter-details",children:[(0,Vt.jsxs)("cx-space",{slot:"summary","align-items":"center",spacing:"x-small",wrap:"nowrap",children:[(0,Vt.jsx)("span",{children:r}),i&&(0,Vt.jsx)("cx-spinner",{})]}),(0,Vt.jsx)("cx-space",{direction:"vertical",children:(0,Vt.jsxs)("cx-tree",{selection:"multiple","label-select-single":!0,"data-facet":n,children:[Object.entries(l).slice(0,20*a).map((e=>{let[t,r]=e;if("object"===typeof r){const e=o.includes(t),{all:a,...s}=r,l=Object.values(s).reduce(((e,t)=>e+t),0);return(0,Vt.jsx)(rn,{itemKey:t,type:n,loading:i,selected:e,all:a,rest:s,mappedDisplayNames:c,collections:o,partialSyncCheckbox:l<a||void 0},t)}return(0,Vt.jsxs)("cx-tree-item",{"data-value":t,"data-type":n,readonly:i,selected:o.includes(t),children:[c[t]," (",r,")"]},t)})),u&&(0,Vt.jsx)(qt,{loadMore:()=>s((e=>e+1)),isLoading:i,disabled:i})]})})]})},an=e=>{let{allowSorting:t,availableFacets:n,currentCount:r,loading:o,facets:i,isMobile:a,isSeeThrough:s,searchValue:l,selectedFacets:c,sortDirection:u,sortOrder:d,sortOrders:h,totalCount:p,view:f,onSearchChange:m,onSettingChange:g}=e;const[v,b]=(0,wt.useState)(!1),[y,x]=(0,wt.useState)({type:void 0,value:void 0}),w=(0,wt.useRef)(null),S=(0,wt.useRef)(null),k=(0,wt.useRef)(null),_=(0,wt.useRef)(null);(0,wt.useEffect)((()=>{Promise.all([customElements.whenDefined("cx-input"),customElements.whenDefined("cx-checkbox"),customElements.whenDefined("cx-dropdown")]).then((()=>b(!0)))}),[]),(0,wt.useEffect)((()=>{const e=e=>{const t=e.target.value;l!==t&&m(t)},t=w.current;return null===t||void 0===t||t.addEventListener("cx-change",e),()=>{null===t||void 0===t||t.removeEventListener("cx-change",e)}}),[v,l,m]),(0,wt.useEffect)((()=>{const e=e=>{const t=e.detail.item.value;"see-thru"===t?g("isSeeThrough",!s):g("view",null!==t&&void 0!==t?t:Qt.gf.Medium)},t=k.current;return null===t||void 0===t||t.addEventListener("cx-select",e),()=>{null===t||void 0===t||t.removeEventListener("cx-select",e)}}),[v,s,g]),(0,wt.useEffect)((()=>{const e=e=>{const t=e.target,n=t.dataset.type,r=t.dataset.value;if(!r||!n)return;const o={...c};o[n]&&(o[n]=o[n].filter((e=>e!==r))),g("filter",o)},t=e=>{const t=e.target.dataset.facet;if(!t)return;x({type:"filter",value:t});const n=e.detail.selection.reduce(((e,t)=>{const n=t.dataset.type,r=t.dataset.value;return r&&n?(e[n]||(e[n]=[]),e[n].push(r),e):e}),{...c,[t]:[]});g("filter",n)},n=e=>{const t=e.detail.item.dataset.type,n=e.detail.item.value;n&&("sort-direction"===t?(x({type:"sortDirection",value:n}),g("sortDirection",n)):"sort-order"===t&&(x({type:"sortOrder",value:n}),g("sortOrder",n)))},r=S.current,o=_.current;return null===r||void 0===r||r.addEventListener("cx-selection-change",t),null===r||void 0===r||r.addEventListener("cx-remove",e),null===o||void 0===o||o.addEventListener("cx-select",n),()=>{null===r||void 0===r||r.removeEventListener("cx-selection-change",t),null===r||void 0===r||r.removeEventListener("cx-remove",e),null===o||void 0===o||o.removeEventListener("cx-select",n)}}),[v,c,g]);const C=(0,wt.useMemo)((()=>tn.find((e=>e.value===f))),[f]),E=(0,wt.useMemo)((()=>{var e;return null!==(e=null===i||void 0===i?void 0:i.reduce(((e,t)=>{const n=t.values.reduce(((e,t)=>{let{value:n,displayValue:r}=t;return e[n]=r,e}),{});return{...e,[t.facetDetails.facetFieldName]:n}}),{}))&&void 0!==e?e:{}}),[i]),A=(0,wt.useMemo)((()=>Object.entries(c).reduce(((e,t)=>{let[n,r]=t;return E[n]?e+r.filter((e=>E[n][e])).length:e}),0)),[c,E]),T=(0,wt.useCallback)((()=>(0,Vt.jsxs)("cx-details",{"data-cy":"applied-filters",open:!0,className:("filter-details "+(0===A?"filter-details--empty":"")).trim(),children:[(0,Vt.jsxs)("cx-space",{slot:"summary","align-items":"center",spacing:"x-small",wrap:"nowrap",children:[(0,Vt.jsxs)("span",{children:["Applied filters"," ",A>0?` (${A})`:""]}),o&&"filter"===y.type&&(0,Vt.jsx)("cx-spinner",{})]}),(0,Vt.jsx)("cx-space",{direction:"horizontal",spacing:"small",style:{maxWidth:"320px"},children:Object.entries(c).map((e=>{let[t,n]=e;return n&&0!==n.length?n.filter((e=>E[t][e])).map((e=>(0,Vt.jsxs)("cx-tag",{removable:!0,"data-value":e,"data-type":t,size:"small",children:[E[t][e],(0,Vt.jsx)("cx-icon",{slot:"suffix",name:"close"})]},e))):null}))}),A>0&&(0,Vt.jsxs)("cx-button",{variant:"text",className:"clear-all-button",onClick:()=>{g("filter",{mediaTypes:[],visibilityClasses:[],statuses:[],extensions:[]})},children:["Clear all",(0,Vt.jsx)("cx-icon",{slot:"prefix",name:"clear",label:"Clear"})]})]})),[A,o,E,y.type,g,c]);return(0,Vt.jsxs)(nn,{children:[(0,Vt.jsxs)("cx-space",{"align-items":"center",spacing:"x-small",wrap:"nowrap",style:{flex:1},children:[(0,Vt.jsx)("cx-input",{ref:w,value:l,placeholder:"Search...",clearable:!0,className:"search-input",children:(0,Vt.jsx)("cx-icon",{name:"search",slot:"prefix",className:"icon--large"})}),(0,Vt.jsxs)("cx-dropdown",{ref:S,children:[(0,Vt.jsx)("div",{slot:"trigger",children:(0,Vt.jsx)("cx-tooltip",{content:"Filter",children:(0,Vt.jsx)("cx-icon-button",{name:"filter_alt",label:"Filter",outline:!0,"data-cy":"filter-button",children:A>0&&(0,Vt.jsx)("cx-badge",{slot:"badge",pill:!0,size:"small",children:A})})})}),T(),n.length>0&&(0,Vt.jsx)("cx-space",{direction:"vertical",className:"filter-details",children:n.map((e=>{const t=null===i||void 0===i?void 0:i.find((t=>t.facetDetails.facetFieldName===e.facetFieldName));return t?(0,Vt.jsx)(on,{values:t.values,displayName:t.facetDetails.displayName,type:t.facetDetails.facetFieldName,collections:c[t.facetDetails.facetFieldName]||[]},t.facetDetails.facetFieldName):null}))})]})]}),(0,Vt.jsxs)("cx-space",{"align-items":"center",spacing:"x-small",wrap:"nowrap",style:{marginLeft:"auto"},children:[(0,Vt.jsx)("cx-line-clamp",{lines:1,children:(0,Vt.jsxs)("cx-typography",{variant:"body3",children:[r," of ",p]})}),(0,Vt.jsxs)("cx-dropdown",{ref:k,"auto-width-factor":a?1:.6,"stay-open-on-select":!0,placement:"bottom-end",skidding:a?40:0,children:[(0,Vt.jsx)("div",{slot:"trigger",children:(0,Vt.jsx)("cx-tooltip",{content:"View",children:(0,Vt.jsx)("cx-icon-button",{name:"dashboard",label:"View",outline:!0,"data-cy":"view-button"})})}),a?(0,Vt.jsxs)("cx-menu",{variant:"multiple",children:[(0,Vt.jsxs)("cx-menu",{active:!0,name:"main",children:[(0,Vt.jsx)("cx-menu-label",{children:"View"}),(0,Vt.jsxs)("cx-menu-item",{menu:"submenu",class:C?"selected":"",children:["Grid (",null===C||void 0===C?void 0:C.label,")",(0,Vt.jsx)("cx-icon",{slot:"prefix",name:"grid_view"})]}),(0,Vt.jsx)("cx-divider",{}),(0,Vt.jsxs)("cx-menu-item",{value:"see-thru",className:"menu-item--switch",children:[(0,Vt.jsx)("cx-line-clamp",{lines:1,children:"See-thru"}),(0,Vt.jsx)("cx-switch",{checked:s,onClick:e=>e.preventDefault()})]})]}),(0,Vt.jsx)("cx-menu",{name:"submenu",back:"main",children:tn.map((e=>(0,Vt.jsxs)("cx-menu-item",{value:e.value.toString(),class:e.value===f?"selected":"",children:[(0,Vt.jsx)("cx-line-clamp",{lines:1,children:e.label}),(0,Vt.jsx)("cx-icon",{slot:"prefix",name:f===e.value?"check":""})]},e.value)))})]},"multiple-menu"):(0,Vt.jsxs)("cx-menu",{children:[(0,Vt.jsx)("cx-menu-label",{children:"View"}),(0,Vt.jsxs)("cx-menu-item",{class:C?"selected":"",children:["Grid (",null===C||void 0===C?void 0:C.label,")",(0,Vt.jsx)("cx-menu",{slot:"submenu",children:tn.map((e=>(0,Vt.jsxs)("cx-menu-item",{value:e.value.toString(),class:e.value===f?"selected":"",children:[(0,Vt.jsx)("cx-line-clamp",{lines:1,children:e.label}),(0,Vt.jsx)("cx-icon",{slot:"prefix",name:f===e.value?"check":""})]},e.value)))}),(0,Vt.jsx)("cx-icon",{slot:"prefix",name:"grid_view"})]}),(0,Vt.jsx)("cx-divider",{}),(0,Vt.jsxs)("cx-menu-item",{value:"see-thru",className:"menu-item--switch",children:[(0,Vt.jsx)("cx-line-clamp",{lines:1,children:"See-thru"}),(0,Vt.jsx)("cx-switch",{checked:s,onClick:e=>e.preventDefault()})]})]},"default-menu")]}),(0,Vt.jsxs)("cx-dropdown",{ref:_,"auto-width-factor":a?1:.5,"stay-open-on-select":!0,children:[(0,Vt.jsx)("div",{slot:"trigger",children:(0,Vt.jsx)("cx-tooltip",{content:"Sort",children:(0,Vt.jsx)("cx-icon-button",{name:"sort",label:"Sort",outline:!0,"data-cy":"sort-button"})})}),(0,Vt.jsxs)("cx-menu",{children:[(h?en.map((e=>{var t,n;const r=null===(t=h[d])||void 0===t||null===(n=t.find((t=>t.sortDirection.toLowerCase()===e.value.toLowerCase())))||void 0===n?void 0:n.sortDirectionDisplayName;return{...e,label:null!==r&&void 0!==r?r:e.value}})):en).map((e=>(0,Vt.jsxs)("cx-menu-item",{"data-type":"sort-direction",disabled:!t,value:e.value,class:t&&u===e.value?"selected":"",children:[e.label.replace(/\b\w/g,(e=>e.toUpperCase())),o&&"sortDirection"===y.type&&y.value===e.value?(0,Vt.jsx)("cx-spinner",{slot:"prefix"}):(0,Vt.jsx)(e.icon,{})]},e.value))),(0,Vt.jsx)("cx-divider",{}),Object.keys(null!==h&&void 0!==h?h:{}).map((e=>(0,Vt.jsxs)("cx-menu-item",{"data-type":"sort-order",value:e,class:d===e?"selected":"",children:[e.replace(/\b\w/g,(e=>e.toUpperCase())),o&&"sortOrder"===y.type&&y.value===e?(0,Vt.jsx)("cx-spinner",{slot:"prefix"}):(0,Vt.jsx)("cx-icon",{slot:"prefix",name:d===e?"check":""})]},e)))]})]})]})]})};var sn=n(8743);const ln=(e,t)=>{const n=(e,t)=>0===t?e:n(t,e%t),r=Math.round(e),o=Math.round(t),i=n(r,o);return{width:r/i,height:o/i}},cn=(e,t,n)=>{const r=n*Math.PI/180;if(n%90===0)return{width:n%180===0?e:t,height:n%180===0?t:e};const o=Math.abs(Math.cos(r)),i=Math.abs(Math.sin(r)),a=e*o+t*i,s=e*i+t*o;return{width:Math.round(a),height:Math.round(s)}};var un=function(e,t){return un=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},un(e,t)};function dn(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}un(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var hn=function(){return hn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hn.apply(this,arguments)};Object.create;Object.create;"function"===typeof SuppressedError&&SuppressedError;var pn=n(1185),fn=n.n(pn);function mn(e,t,n,r,o){void 0===o&&(o=0);var i=Sn(t.width,t.height,o),a=i.width,s=i.height;return{x:gn(e.x,a,n.width,r),y:gn(e.y,s,n.height,r)}}function gn(e,t,n,r){var o=t*r/2-n/2;return kn(e,-o,o)}function vn(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function bn(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function yn(e,t){return Math.min(e,Math.max(0,t))}function xn(e,t){return t}function wn(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function Sn(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function kn(e,t,n){return Math.min(Math.max(e,t),n)}function _n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"===typeof e&&e.length>0})).join(" ").trim()}var Cn=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.cropperRef=wt.createRef(),n.imageRef=wt.createRef(),n.videoRef=wt.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!==typeof document?document:null,n.currentWindow="undefined"!==typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if("undefined"!==typeof window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=function(e,t,n,r,o,i){var a=Sn(t.width,t.height,n),s=kn(r.width/a.width*(100/e.width),o,i);return{crop:{x:s*a.width/2-r.width/2-a.width*s*(e.x/100),y:s*a.height/2-r.height/2-a.height*s*(e.y/100)},zoom:s}}(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,o=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var i=function(e,t,n,r,o,i){void 0===n&&(n=0);var a=Sn(t.naturalWidth,t.naturalHeight,n),s=kn(function(e,t,n){var r=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}(e,t,r),o,i),l=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((a.width-e.width)/2-e.x)*l,y:((a.height-e.height)/2-e.y)*l},zoom:s}}(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=i.crop,o=i.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var e,t,r,o,i,a,s=n.imageRef.current||n.videoRef.current;if(s&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var l=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(r=n.imageRef.current)||void 0===r?void 0:r.naturalHeight)||(null===(o=n.videoRef.current)||void 0===o?void 0:o.videoHeight)||0,d=c/u,h=void 0;if(s.offsetWidth<c||s.offsetHeight<u)switch(n.state.mediaObjectFit){default:case"contain":h=l>d?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":h={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":h={width:n.containerRect.height*d,height:n.containerRect.height}}else h={width:s.offsetWidth,height:s.offsetHeight};n.mediaSize=hn(hn({},h),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var p=n.props.cropSize?n.props.cropSize:function(e,t,n,r,o,i){void 0===i&&(i=0);var a=Sn(e,t,i),s=a.width,l=a.height,c=Math.min(s,n),u=Math.min(l,r);return c>u*o?{width:u*o,height:u}:{width:c,height:c/o}}(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(i=n.state.cropSize)||void 0===i?void 0:i.height)===p.height&&(null===(a=n.state.cropSize)||void 0===a?void 0:a.width)===p.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(p),n.setState({cropSize:p},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(p),p}},n.saveContainerPosition=function(){if(n.containerRef){var e=n.containerRef.getBoundingClientRect();n.containerPosition={x:e.left,y:e.top}}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onScroll=function(e){n.currentDoc&&(e.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),o=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,r,o=e.x,i=e.y;n.dragStartPosition={x:o,y:i},n.dragStartCrop=hn({},n.props.crop),null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},a=n.props.restrictPosition?mn(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(a)}})))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var r=t.getMousePoint(e),o=fn()(e).pixelY,i=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(i,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e,t){var r=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(r-t.x),y:n.containerRect.height/2-(o-t.y)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,i=o.crop,a=o.zoom;return{x:(t+i.x)/a,y:(r+i.y)/a}},n.setNewZoom=function(e,t,r){var o=(void 0===r?{}:r).shouldUpdatePosition,i=void 0===o||o;if(n.state.cropSize&&n.props.onZoomChange){var a=kn(e,n.props.minZoom,n.props.maxZoom);if(i){var s=n.getPointOnContainer(t,n.containerPosition),l=n.getPointOnMedia(s),c={x:l.x*a-s.x,y:l.y*a-s.y},u=n.props.restrictPosition?mn(c,n.mediaSize,n.state.cropSize,a,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(a)}},n.getCropData=function(){return n.state.cropSize?function(e,t,n,r,o,i,a){void 0===i&&(i=0),void 0===a&&(a=!0);var s=a?yn:xn,l=Sn(t.width,t.height,i),c=Sn(t.naturalWidth,t.naturalHeight,i),u={x:s(100,((l.width-n.width/o)/2-e.x/o)/l.width*100),y:s(100,((l.height-n.height/o)/2-e.y/o)/l.height*100),width:s(100,n.width/l.width*100/o),height:s(100,n.height/l.height*100/o)},d=Math.round(s(c.width,u.width*c.width/100)),h=Math.round(s(c.height,u.height*c.height/100)),p=c.width>=c.height*r?{width:Math.round(h*r),height:h}:{width:d,height:Math.round(d/r)};return{croppedAreaPercentages:u,croppedAreaPixels:hn(hn({},p),{x:Math.round(s(c.width-p.width,u.x*c.width/100)),y:Math.round(s(c.height-p.height,u.y*c.height/100))})}}(n.props.restrictPosition?mn(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?mn(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n.onKeyDown=function(e){var t,r,o=n.props,i=o.crop,a=o.onCropChange,s=o.keyboardStep,l=o.zoom,c=o.rotation,u=s;if(n.state.cropSize){e.shiftKey&&(u*=.2);var d=hn({},i);switch(e.key){case"ArrowUp":d.y-=u,e.preventDefault();break;case"ArrowDown":d.y+=u,e.preventDefault();break;case"ArrowLeft":d.x-=u,e.preventDefault();break;case"ArrowRight":d.x+=u,e.preventDefault();break;default:return}n.props.restrictPosition&&(d=mn(d,n.mediaSize,n.state.cropSize,l,c)),e.repeat||null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t),a(d)}},n.onKeyUp=function(e){var t,r;switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":e.preventDefault();break;default:return}n.emitCropData(),null===(r=(t=n.props).onInteractionEnd)||void 0===r||r.call(t)},n}return dn(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),"undefined"===typeof window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&("undefined"===typeof window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,r,o,i,a,s,l,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect||e.objectFit!==this.props.objectFit?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():(null===(i=e.crop)||void 0===i?void 0:i.x)===(null===(a=this.props.crop)||void 0===a?void 0:a.x)&&(null===(s=e.crop)||void 0===s?void 0:s.y)===(null===(l=this.props.crop)||void 0===l?void 0:l.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load());var u=this.getObjectFit();u!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:u},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.getObjectFit=function(){var e,t,n,r;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var o=this.containerRect.width/this.containerRect.height;return((null===(e=this.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=this.videoRef.current)||void 0===t?void 0:t.videoWidth)||0)/((null===(n=this.imageRef.current)||void 0===n?void 0:n.naturalHeight)||(null===(r=this.videoRef.current)||void 0===r?void 0:r.videoHeight)||0)<o?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=vn(n,r),this.lastPinchRotation=bn(n,r),this.onDragStart(wn(n,r))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=wn(r,o);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=vn(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var a=bn(r,o),s=n.props.rotation+(a-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=a}))}},t.prototype.render=function(){var e,t=this,n=this.props,r=n.image,o=n.video,i=n.mediaProps,a=n.cropperProps,s=n.transform,l=n.crop,c=l.x,u=l.y,d=n.rotation,h=n.zoom,p=n.cropShape,f=n.showGrid,m=n.style,g=m.containerStyle,v=m.cropAreaStyle,b=m.mediaStyle,y=n.classes,x=y.containerClassName,w=y.cropAreaClassName,S=y.mediaClassName,k=null!==(e=this.state.mediaObjectFit)&&void 0!==e?e:this.getObjectFit();return wt.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(e){return t.containerRef=e},"data-testid":"container",style:g,className:_n("reactEasyCrop_Container",x)},r?wt.createElement("img",hn({alt:"",className:_n("reactEasyCrop_Image","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical",S)},i,{src:r,ref:this.imageRef,style:hn(hn({},b),{transform:s||"translate(".concat(c,"px, ").concat(u,"px) rotate(").concat(d,"deg) scale(").concat(h,")")}),onLoad:this.onMediaLoad})):o&&wt.createElement("video",hn({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:_n("reactEasyCrop_Video","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical",S)},i,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:hn(hn({},b),{transform:s||"translate(".concat(c,"px, ").concat(u,"px) rotate(").concat(d,"deg) scale(").concat(h,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return wt.createElement("source",hn({key:e.src},e))}))),this.state.cropSize&&wt.createElement("div",hn({ref:this.cropperRef,style:hn(hn({},v),{width:this.state.cropSize.width,height:this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:_n("reactEasyCrop_CropArea","round"===p&&"reactEasyCrop_CropAreaRound",f&&"reactEasyCrop_CropAreaGrid",w)},a)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:1},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(wt.Component);const En=(e,t,n,r)=>{const o=n/r;let i=e,a=t;return e/t>o?i=Math.round(a*o):a=Math.round(i/o),{width:i,height:a}},An=Lt.Ay.div`
199
+ `,rn=e=>{let{itemKey:t,type:n,loading:r,selected:o,all:i,rest:a,mappedDisplayNames:s,collections:l,partialSyncCheckbox:c}=e;const u=(0,wt.useRef)(null),d=(0,wt.useMemo)((()=>{const e=u.current;if(!e)return;const n=Object.keys(a).some((e=>l.includes(`${t}>>${e}`)));return o||n?!o&&n?(e.indeterminate=!0,!1):o:(e.previouslySelected=!1,e.indeterminate=!1,!1)}),[o,l,a,t]);return(0,Vt.jsxs)("cx-tree-item",{ref:u,"data-value":t,"data-type":n,readonly:r,selected:d||void 0,"partial-sync-checkboxes":c,children:[s[t]," ",!!i&&`(${i})`,Object.entries(a).map((e=>{let[o,i]=e;return(0,Vt.jsxs)("cx-tree-item",{"data-value":`${t}>>${o}`,"data-type":n,readonly:r,selected:l.includes(`${t}>>${o}`),children:[s[`${t}>>${o}`]," (",i,")"]},o)}))]})},on=e=>{let{values:t,type:n,displayName:r,collections:o,loading:i=!1}=e;const[a,s]=(0,wt.useState)(1),l=(0,wt.useMemo)((()=>t.reduce(((e,t)=>{let{value:n,count:r}=t;const[o,i]=n.split(">>");return e[o]&&"object"===typeof e[o]||(e[o]?e[o]={all:e[o]}:e[o]={}),i&&(e[o][i]=r),e[o].all=(e[o].all||0)+r,e}),{})),[t]),c=(0,wt.useMemo)((()=>{const e={};return t.forEach((t=>{e[t.value]=t.displayValue})),t.forEach((t=>{const n=t.value.split(">>");if(n.length>1){const t=n.slice(0,-1).join(">>");e[t]||(e[t]=t.split(" ").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "))}})),e}),[t]),u=(0,wt.useMemo)((()=>Object.keys(l).length>20*a),[l,a]);return 0===t.length?null:(0,Vt.jsxs)("cx-details",{open:!0,className:"filter-details",children:[(0,Vt.jsxs)("cx-space",{slot:"summary","align-items":"center",spacing:"x-small",wrap:"nowrap",children:[(0,Vt.jsx)("span",{children:r}),i&&(0,Vt.jsx)("cx-spinner",{})]}),(0,Vt.jsx)("cx-space",{direction:"vertical",children:(0,Vt.jsxs)("cx-tree",{selection:"multiple","label-select-single":!0,"data-facet":n,children:[Object.entries(l).slice(0,20*a).map((e=>{let[t,r]=e;if("object"===typeof r){const e=o.includes(t),{all:a,...s}=r,l=Object.values(s).reduce(((e,t)=>e+t),0);return(0,Vt.jsx)(rn,{itemKey:t,type:n,loading:i,selected:e,all:a,rest:s,mappedDisplayNames:c,collections:o,partialSyncCheckbox:l<a||void 0},t)}return(0,Vt.jsxs)("cx-tree-item",{"data-value":t,"data-type":n,readonly:i,selected:o.includes(t),children:[c[t]," (",r,")"]},t)})),u&&(0,Vt.jsx)(qt,{loadMore:()=>s((e=>e+1)),isLoading:i,disabled:i})]})})]})},an=e=>{let{allowSorting:t,availableFacets:n,currentCount:r,loading:o,facets:i,isMobile:a,isSeeThrough:s,searchValue:l,selectedFacets:c,sortDirection:u,sortOrder:d,sortOrders:h,totalCount:p,view:f,onSearchChange:m,onSettingChange:g}=e;const[v,b]=(0,wt.useState)(!1),[y,x]=(0,wt.useState)({type:void 0,value:void 0}),w=(0,wt.useRef)(null),S=(0,wt.useRef)(null),k=(0,wt.useRef)(null),_=(0,wt.useRef)(null),C=(0,wt.useRef)(null);(0,wt.useEffect)((()=>{Promise.all([customElements.whenDefined("cx-input"),customElements.whenDefined("cx-checkbox"),customElements.whenDefined("cx-dropdown")]).then((()=>b(!0)))}),[]),(0,wt.useEffect)((()=>{const e=e=>{const t=e.target.value;l!==t&&m(t)},t=w.current;return null===t||void 0===t||t.addEventListener("cx-change",e),()=>{null===t||void 0===t||t.removeEventListener("cx-change",e)}}),[v,l,m]),(0,wt.useEffect)((()=>{const e=e=>{const t=e.detail.item.value;"see-thru"===t?g("isSeeThrough",!s):g("view",null!==t&&void 0!==t?t:Qt.gf.Medium)},t=k.current;return null===t||void 0===t||t.addEventListener("cx-select",e),()=>{null===t||void 0===t||t.removeEventListener("cx-select",e)}}),[v,s,g]),(0,wt.useEffect)((()=>{const e=C.current;if(!v||!e)return;const t=e.closest(".cbsdk__home");t&&(e.flipBoundary=t,e.shiftBoundary=t)}),[v]),(0,wt.useEffect)((()=>{const e=e=>{const t=e.target,n=t.dataset.type,r=t.dataset.value;if(!r||!n)return;const o={...c};o[n]&&(o[n]=o[n].filter((e=>e!==r))),g("filter",o)},t=e=>{const t=e.target.dataset.facet;if(!t)return;x({type:"filter",value:t});const n=e.detail.selection.reduce(((e,t)=>{const n=t.dataset.type,r=t.dataset.value;return r&&n?(e[n]||(e[n]=[]),e[n].push(r),e):e}),{...c,[t]:[]});g("filter",n)},n=e=>{const t=e.detail.item.dataset.type,n=e.detail.item.value;n&&("sort-direction"===t?(x({type:"sortDirection",value:n}),g("sortDirection",n)):"sort-order"===t&&(x({type:"sortOrder",value:n}),g("sortOrder",n)))},r=S.current,o=_.current;return null===r||void 0===r||r.addEventListener("cx-selection-change",t),null===r||void 0===r||r.addEventListener("cx-remove",e),null===o||void 0===o||o.addEventListener("cx-select",n),()=>{null===r||void 0===r||r.removeEventListener("cx-selection-change",t),null===r||void 0===r||r.removeEventListener("cx-remove",e),null===o||void 0===o||o.removeEventListener("cx-select",n)}}),[v,c,g]);const E=(0,wt.useMemo)((()=>tn.find((e=>e.value===f))),[f]),A=(0,wt.useMemo)((()=>{var e;return null!==(e=null===i||void 0===i?void 0:i.reduce(((e,t)=>{const n=t.values.reduce(((e,t)=>{let{value:n,displayValue:r}=t;return e[n]=r,e}),{});return{...e,[t.facetDetails.facetFieldName]:n}}),{}))&&void 0!==e?e:{}}),[i]),T=(0,wt.useMemo)((()=>Object.entries(c).reduce(((e,t)=>{let[n,r]=t;return A[n]?e+r.filter((e=>A[n][e])).length:e}),0)),[c,A]),O=(0,wt.useCallback)((()=>(0,Vt.jsxs)("cx-details",{"data-cy":"applied-filters",open:!0,className:("filter-details "+(0===T?"filter-details--empty":"")).trim(),children:[(0,Vt.jsxs)("cx-space",{slot:"summary","align-items":"center",spacing:"x-small",wrap:"nowrap",children:[(0,Vt.jsxs)("span",{children:["Applied filters"," ",T>0?` (${T})`:""]}),o&&"filter"===y.type&&(0,Vt.jsx)("cx-spinner",{})]}),(0,Vt.jsx)("cx-space",{direction:"horizontal",spacing:"small",style:{maxWidth:"320px"},children:Object.entries(c).map((e=>{let[t,n]=e;return n&&0!==n.length?n.filter((e=>A[t][e])).map((e=>(0,Vt.jsxs)("cx-tag",{removable:!0,"data-value":e,"data-type":t,size:"small",children:[A[t][e],(0,Vt.jsx)("cx-icon",{slot:"suffix",name:"close"})]},e))):null}))}),T>0&&(0,Vt.jsxs)("cx-button",{variant:"text",className:"clear-all-button",onClick:()=>{g("filter",{mediaTypes:[],visibilityClasses:[],statuses:[],extensions:[]})},children:["Clear all",(0,Vt.jsx)("cx-icon",{slot:"prefix",name:"clear",label:"Clear"})]})]})),[T,o,A,y.type,g,c]);return(0,Vt.jsxs)(nn,{children:[(0,Vt.jsxs)("cx-space",{"align-items":"center",spacing:"x-small",wrap:"nowrap",style:{flex:1},children:[(0,Vt.jsx)("cx-input",{ref:w,value:l,placeholder:"Search...",clearable:!0,className:"search-input",children:(0,Vt.jsx)("cx-icon",{name:"search",slot:"prefix",className:"icon--large"})}),(0,Vt.jsxs)("cx-dropdown",{ref:S,children:[(0,Vt.jsx)("div",{slot:"trigger",children:(0,Vt.jsx)("cx-tooltip",{content:"Filter",children:(0,Vt.jsx)("cx-icon-button",{name:"filter_alt",label:"Filter",outline:!0,"data-cy":"filter-button",children:T>0&&(0,Vt.jsx)("cx-badge",{slot:"badge",pill:!0,size:"small",children:T})})})}),O(),n.length>0&&(0,Vt.jsx)("cx-space",{direction:"vertical",className:"filter-details",children:n.map((e=>{const t=null===i||void 0===i?void 0:i.find((t=>t.facetDetails.facetFieldName===e.facetFieldName));return t?(0,Vt.jsx)(on,{values:t.values,displayName:t.facetDetails.displayName,type:t.facetDetails.facetFieldName,collections:c[t.facetDetails.facetFieldName]||[]},t.facetDetails.facetFieldName):null}))})]})]}),(0,Vt.jsxs)("cx-space",{"align-items":"center",spacing:"x-small",wrap:"nowrap",style:{marginLeft:"auto"},children:[(0,Vt.jsx)("cx-line-clamp",{lines:1,children:(0,Vt.jsxs)("cx-typography",{variant:"body3",children:[r," of ",p]})}),(0,Vt.jsxs)("cx-dropdown",{ref:k,"auto-width-factor":a?1:.6,"stay-open-on-select":!0,placement:"bottom-end",skidding:a?40:0,children:[(0,Vt.jsx)("div",{slot:"trigger",children:(0,Vt.jsx)("cx-tooltip",{content:"View",children:(0,Vt.jsx)("cx-icon-button",{name:"dashboard",label:"View",outline:!0,"data-cy":"view-button"})})}),a?(0,Vt.jsxs)("cx-menu",{variant:"multiple",children:[(0,Vt.jsxs)("cx-menu",{active:!0,name:"main",children:[(0,Vt.jsx)("cx-menu-label",{children:"View"}),(0,Vt.jsxs)("cx-menu-item",{menu:"submenu",class:E?"selected":"",children:["Grid (",null===E||void 0===E?void 0:E.label,")",(0,Vt.jsx)("cx-icon",{slot:"prefix",name:"grid_view"})]}),(0,Vt.jsx)("cx-divider",{}),(0,Vt.jsxs)("cx-menu-item",{value:"see-thru",className:"menu-item--switch",children:[(0,Vt.jsx)("cx-line-clamp",{lines:1,children:"See-thru"}),(0,Vt.jsx)("cx-switch",{checked:s,onClick:e=>e.preventDefault()})]})]}),(0,Vt.jsx)("cx-menu",{name:"submenu",back:"main",children:tn.map((e=>(0,Vt.jsxs)("cx-menu-item",{value:e.value.toString(),class:e.value===f?"selected":"",children:[(0,Vt.jsx)("cx-line-clamp",{lines:1,children:e.label}),(0,Vt.jsx)("cx-icon",{slot:"prefix",name:f===e.value?"check":""})]},e.value)))})]},"multiple-menu"):(0,Vt.jsxs)("cx-menu",{children:[(0,Vt.jsx)("cx-menu-label",{children:"View"}),(0,Vt.jsxs)("cx-menu-item",{ref:C,class:E?"selected":"",children:["Grid (",null===E||void 0===E?void 0:E.label,")",(0,Vt.jsx)("cx-menu",{slot:"submenu",children:tn.map((e=>(0,Vt.jsxs)("cx-menu-item",{value:e.value.toString(),class:e.value===f?"selected":"",children:[(0,Vt.jsx)("cx-line-clamp",{lines:1,children:e.label}),(0,Vt.jsx)("cx-icon",{slot:"prefix",name:f===e.value?"check":""})]},e.value)))}),(0,Vt.jsx)("cx-icon",{slot:"prefix",name:"grid_view"})]}),(0,Vt.jsx)("cx-divider",{}),(0,Vt.jsxs)("cx-menu-item",{value:"see-thru",className:"menu-item--switch",children:[(0,Vt.jsx)("cx-line-clamp",{lines:1,children:"See-thru"}),(0,Vt.jsx)("cx-switch",{checked:s,onClick:e=>e.preventDefault()})]})]},"default-menu")]}),(0,Vt.jsxs)("cx-dropdown",{ref:_,"auto-width-factor":a?1:.5,"stay-open-on-select":!0,children:[(0,Vt.jsx)("div",{slot:"trigger",children:(0,Vt.jsx)("cx-tooltip",{content:"Sort",children:(0,Vt.jsx)("cx-icon-button",{name:"sort",label:"Sort",outline:!0,"data-cy":"sort-button"})})}),(0,Vt.jsxs)("cx-menu",{children:[(h?en.map((e=>{var t,n;const r=null===(t=h[d])||void 0===t||null===(n=t.find((t=>t.sortDirection.toLowerCase()===e.value.toLowerCase())))||void 0===n?void 0:n.sortDirectionDisplayName;return{...e,label:null!==r&&void 0!==r?r:e.value}})):en).map((e=>(0,Vt.jsxs)("cx-menu-item",{"data-type":"sort-direction",disabled:!t,value:e.value,class:t&&u===e.value?"selected":"",children:[e.label.replace(/\b\w/g,(e=>e.toUpperCase())),o&&"sortDirection"===y.type&&y.value===e.value?(0,Vt.jsx)("cx-spinner",{slot:"prefix"}):(0,Vt.jsx)(e.icon,{})]},e.value))),(0,Vt.jsx)("cx-divider",{}),Object.keys(null!==h&&void 0!==h?h:{}).map((e=>(0,Vt.jsxs)("cx-menu-item",{"data-type":"sort-order",value:e,class:d===e?"selected":"",children:[e.replace(/\b\w/g,(e=>e.toUpperCase())),o&&"sortOrder"===y.type&&y.value===e?(0,Vt.jsx)("cx-spinner",{slot:"prefix"}):(0,Vt.jsx)("cx-icon",{slot:"prefix",name:d===e?"check":""})]},e)))]})]})]})]})};var sn=n(8743);const ln=(e,t)=>{const n=(e,t)=>0===t?e:n(t,e%t),r=Math.round(e),o=Math.round(t),i=n(r,o);return{width:r/i,height:o/i}},cn=(e,t,n)=>{const r=n*Math.PI/180;if(n%90===0)return{width:n%180===0?e:t,height:n%180===0?t:e};const o=Math.abs(Math.cos(r)),i=Math.abs(Math.sin(r)),a=e*o+t*i,s=e*i+t*o;return{width:Math.round(a),height:Math.round(s)}};var un=function(e,t){return un=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},un(e,t)};function dn(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}un(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var hn=function(){return hn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},hn.apply(this,arguments)};Object.create;Object.create;"function"===typeof SuppressedError&&SuppressedError;var pn=n(1185),fn=n.n(pn);function mn(e,t,n,r,o){void 0===o&&(o=0);var i=Sn(t.width,t.height,o),a=i.width,s=i.height;return{x:gn(e.x,a,n.width,r),y:gn(e.y,s,n.height,r)}}function gn(e,t,n,r){var o=t*r/2-n/2;return kn(e,-o,o)}function vn(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function bn(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function yn(e,t){return Math.min(e,Math.max(0,t))}function xn(e,t){return t}function wn(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function Sn(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function kn(e,t,n){return Math.min(Math.max(e,t),n)}function _n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"===typeof e&&e.length>0})).join(" ").trim()}var Cn=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.cropperRef=wt.createRef(),n.imageRef=wt.createRef(),n.videoRef=wt.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!==typeof document?document:null,n.currentWindow="undefined"!==typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if("undefined"!==typeof window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=function(e,t,n,r,o,i){var a=Sn(t.width,t.height,n),s=kn(r.width/a.width*(100/e.width),o,i);return{crop:{x:s*a.width/2-r.width/2-a.width*s*(e.x/100),y:s*a.height/2-r.height/2-a.height*s*(e.y/100)},zoom:s}}(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,o=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var i=function(e,t,n,r,o,i){void 0===n&&(n=0);var a=Sn(t.naturalWidth,t.naturalHeight,n),s=kn(function(e,t,n){var r=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}(e,t,r),o,i),l=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((a.width-e.width)/2-e.x)*l,y:((a.height-e.height)/2-e.y)*l},zoom:s}}(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=i.crop,o=i.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var e,t,r,o,i,a,s=n.imageRef.current||n.videoRef.current;if(s&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var l=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(r=n.imageRef.current)||void 0===r?void 0:r.naturalHeight)||(null===(o=n.videoRef.current)||void 0===o?void 0:o.videoHeight)||0,d=c/u,h=void 0;if(s.offsetWidth<c||s.offsetHeight<u)switch(n.state.mediaObjectFit){default:case"contain":h=l>d?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":h={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":h={width:n.containerRect.height*d,height:n.containerRect.height}}else h={width:s.offsetWidth,height:s.offsetHeight};n.mediaSize=hn(hn({},h),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var p=n.props.cropSize?n.props.cropSize:function(e,t,n,r,o,i){void 0===i&&(i=0);var a=Sn(e,t,i),s=a.width,l=a.height,c=Math.min(s,n),u=Math.min(l,r);return c>u*o?{width:u*o,height:u}:{width:c,height:c/o}}(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(i=n.state.cropSize)||void 0===i?void 0:i.height)===p.height&&(null===(a=n.state.cropSize)||void 0===a?void 0:a.width)===p.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(p),n.setState({cropSize:p},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(p),p}},n.saveContainerPosition=function(){if(n.containerRef){var e=n.containerRef.getBoundingClientRect();n.containerPosition={x:e.left,y:e.top}}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onScroll=function(e){n.currentDoc&&(e.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),o=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,r,o=e.x,i=e.y;n.dragStartPosition={x:o,y:i},n.dragStartCrop=hn({},n.props.crop),null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},a=n.props.restrictPosition?mn(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(a)}})))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var r=t.getMousePoint(e),o=fn()(e).pixelY,i=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(i,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e,t){var r=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(r-t.x),y:n.containerRect.height/2-(o-t.y)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,i=o.crop,a=o.zoom;return{x:(t+i.x)/a,y:(r+i.y)/a}},n.setNewZoom=function(e,t,r){var o=(void 0===r?{}:r).shouldUpdatePosition,i=void 0===o||o;if(n.state.cropSize&&n.props.onZoomChange){var a=kn(e,n.props.minZoom,n.props.maxZoom);if(i){var s=n.getPointOnContainer(t,n.containerPosition),l=n.getPointOnMedia(s),c={x:l.x*a-s.x,y:l.y*a-s.y},u=n.props.restrictPosition?mn(c,n.mediaSize,n.state.cropSize,a,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(a)}},n.getCropData=function(){return n.state.cropSize?function(e,t,n,r,o,i,a){void 0===i&&(i=0),void 0===a&&(a=!0);var s=a?yn:xn,l=Sn(t.width,t.height,i),c=Sn(t.naturalWidth,t.naturalHeight,i),u={x:s(100,((l.width-n.width/o)/2-e.x/o)/l.width*100),y:s(100,((l.height-n.height/o)/2-e.y/o)/l.height*100),width:s(100,n.width/l.width*100/o),height:s(100,n.height/l.height*100/o)},d=Math.round(s(c.width,u.width*c.width/100)),h=Math.round(s(c.height,u.height*c.height/100)),p=c.width>=c.height*r?{width:Math.round(h*r),height:h}:{width:d,height:Math.round(d/r)};return{croppedAreaPercentages:u,croppedAreaPixels:hn(hn({},p),{x:Math.round(s(c.width-p.width,u.x*c.width/100)),y:Math.round(s(c.height-p.height,u.y*c.height/100))})}}(n.props.restrictPosition?mn(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?mn(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n.onKeyDown=function(e){var t,r,o=n.props,i=o.crop,a=o.onCropChange,s=o.keyboardStep,l=o.zoom,c=o.rotation,u=s;if(n.state.cropSize){e.shiftKey&&(u*=.2);var d=hn({},i);switch(e.key){case"ArrowUp":d.y-=u,e.preventDefault();break;case"ArrowDown":d.y+=u,e.preventDefault();break;case"ArrowLeft":d.x-=u,e.preventDefault();break;case"ArrowRight":d.x+=u,e.preventDefault();break;default:return}n.props.restrictPosition&&(d=mn(d,n.mediaSize,n.state.cropSize,l,c)),e.repeat||null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t),a(d)}},n.onKeyUp=function(e){var t,r;switch(e.key){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":e.preventDefault();break;default:return}n.emitCropData(),null===(r=(t=n.props).onInteractionEnd)||void 0===r||r.call(t)},n}return dn(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),"undefined"===typeof window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef),this.props.setCropperRef&&this.props.setCropperRef(this.cropperRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&("undefined"===typeof window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,r,o,i,a,s,l,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect||e.objectFit!==this.props.objectFit?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():(null===(i=e.crop)||void 0===i?void 0:i.x)===(null===(a=this.props.crop)||void 0===a?void 0:a.x)&&(null===(s=e.crop)||void 0===s?void 0:s.y)===(null===(l=this.props.crop)||void 0===l?void 0:l.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load());var u=this.getObjectFit();u!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:u},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.getObjectFit=function(){var e,t,n,r;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var o=this.containerRect.width/this.containerRect.height;return((null===(e=this.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=this.videoRef.current)||void 0===t?void 0:t.videoWidth)||0)/((null===(n=this.imageRef.current)||void 0===n?void 0:n.naturalHeight)||(null===(r=this.videoRef.current)||void 0===r?void 0:r.videoHeight)||0)<o?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=vn(n,r),this.lastPinchRotation=bn(n,r),this.onDragStart(wn(n,r))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=wn(r,o);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=vn(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var a=bn(r,o),s=n.props.rotation+(a-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=a}))}},t.prototype.render=function(){var e,t=this,n=this.props,r=n.image,o=n.video,i=n.mediaProps,a=n.cropperProps,s=n.transform,l=n.crop,c=l.x,u=l.y,d=n.rotation,h=n.zoom,p=n.cropShape,f=n.showGrid,m=n.style,g=m.containerStyle,v=m.cropAreaStyle,b=m.mediaStyle,y=n.classes,x=y.containerClassName,w=y.cropAreaClassName,S=y.mediaClassName,k=null!==(e=this.state.mediaObjectFit)&&void 0!==e?e:this.getObjectFit();return wt.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(e){return t.containerRef=e},"data-testid":"container",style:g,className:_n("reactEasyCrop_Container",x)},r?wt.createElement("img",hn({alt:"",className:_n("reactEasyCrop_Image","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical",S)},i,{src:r,ref:this.imageRef,style:hn(hn({},b),{transform:s||"translate(".concat(c,"px, ").concat(u,"px) rotate(").concat(d,"deg) scale(").concat(h,")")}),onLoad:this.onMediaLoad})):o&&wt.createElement("video",hn({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:_n("reactEasyCrop_Video","contain"===k&&"reactEasyCrop_Contain","horizontal-cover"===k&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===k&&"reactEasyCrop_Cover_Vertical",S)},i,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:hn(hn({},b),{transform:s||"translate(".concat(c,"px, ").concat(u,"px) rotate(").concat(d,"deg) scale(").concat(h,")")}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return wt.createElement("source",hn({key:e.src},e))}))),this.state.cropSize&&wt.createElement("div",hn({ref:this.cropperRef,style:hn(hn({},v),{width:this.state.cropSize.width,height:this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,"data-testid":"cropper",className:_n("reactEasyCrop_CropArea","round"===p&&"reactEasyCrop_CropAreaRound",f&&"reactEasyCrop_CropAreaGrid",w)},a)))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},cropperProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:1},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(wt.Component);const En=(e,t,n,r)=>{const o=n/r;let i=e,a=t;return e/t>o?i=Math.round(a*o):a=Math.round(i/o),{width:i,height:a}},An=Lt.Ay.div`
200
200
  position: relative;
201
201
  width: 100%;
202
202
  height: 350px;
@@ -1037,7 +1037,7 @@
1037
1037
  height: 100%;
1038
1038
  display: flex;
1039
1039
  flex-direction: column;
1040
- `;var Hr=n(2246);const Wr={containerSize:{width:0,height:0},currentCount:0,currentFolder:Nt,defaultPageSize:Ut.md,facets:[],hasScrolled:!1,isLoading:!1,isSeeThrough:!0,openBrowser:!1,start:0,pageSize:0,maxPageSize:0,searchText:"",selectedFacets:{},shouldResetFilters:!0,sortDirection:void 0,sortOrder:"",totalCount:0,view:Qt.gf.Medium},Kr=(e,t)=>{const n={start:0,pageSize:e.maxPageSize};switch(t.type){case"SET_CONTAINER_SIZE":return{...e,containerSize:t.payload};case"SET_CURRENT_COUNT":return{...e,currentCount:t.payload};case"SET_CURRENT_FOLDER":return{...e,currentFolder:t.payload.folder,shouldResetFilters:!!t.payload.shouldResetFilters,...n};case"SET_FACETS":return{...e,facets:t.payload};case"SET_FILTERS":return{...e,selectedFacets:t.payload,shouldResetFilters:!1,...n};case"SET_HAS_SCROLLED":return{...e,hasScrolled:t.payload};case"SET_IS_LOADING":return{...e,isLoading:t.payload};case"SET_IS_SEE_THROUGH":return{...e,isSeeThrough:t.payload,...n};case"SET_OPEN_BROWSER":return{...e,openBrowser:t.payload};case"SET_START":return{...e,start:t.payload,pageSize:e.defaultPageSize};case"SET_PAGE_SIZE":{const n={...e,pageSize:t.payload.pageSize,maxPageSize:t.payload.pageSize};return t.payload.returnToFirstPage&&(n.start=0),n}case"SET_SEARCH_TEXT":return{...e,...n,searchText:t.payload};case"SET_SORT_DIRECTION":return{...e,...n,sortDirection:t.payload};case"SET_SORT_ORDER":return{...e,...n,sortOrder:t.payload};case"SET_TOTAL_COUNT":return{...e,totalCount:t.payload};case"SET_VIEW":{let n=Ut.md;switch(t.payload){case Qt.gf.Large:n=15;break;case Qt.gf.Medium:n=20;break;case Qt.gf.Small:n=30}return{...e,view:t.payload,defaultPageSize:n}}case"RESET_SEARCH":return{...e,currentCount:0,currentFolder:Nt,searchText:"",totalCount:0};default:return e}},$r=()=>{var e;const[t,n]=(0,wt.useReducer)(Kr,Wr),r=(0,Fr.GV)(Br.jT),o=(0,Fr.GV)(Br.wL),i=(0,Fr.GV)(Lr.OC),{allowedExtensions:a,allowedFolders:s,allowFavorites:l,allowPin:c,allowProxy:u,allowTracking:d,availableDocTypes:h,availableRepresentativeSubtypes:p,ctaText:f,lastLocationMode:m,persistMode:g,showCollections:v,showFavoriteFolder:b,showVersions:y,defaultGridView:x}=(0,wt.useContext)(ar.t),{extraFields:w,onAssetAction:S,onAssetSelected:k,onClose:_}=(0,wt.useContext)(zt.B),{data:C,isFetching:E,isError:A}=(0,Rt.aM)(i?{id:i,useSession:o}:Ft.hT),T=(0,wt.useMemo)((()=>C&&i&&C.recordId===i?C:null),[C,i]),{data:O,isFetching:P,isLoading:z,refetch:D}=(0,Ur.X)({});(0,wt.useEffect)((()=>{r&&D()}),[r,D]);const{data:R,isFetching:j,isError:N}=(0,Yn.t$)(T?{assetImages:T?[T]:[],useSession:o}:Ft.hT),{data:I}=(0,Yn.jS)({useSession:o}),{data:M}=(0,Yn.M$)({useSession:o}),{ATSEnabled:F,autoExtension:L=".auto",collectionPath:B,supportedExtensions:U,supportedRepresentativeSubtypes:V}=M||{},{data:q}=(0,Yn.ZP)({useSession:o}),{data:H}=(0,Yn.nb)({useSession:o}),{data:W,refetch:K}=(0,Rt.E7)(T&&l?{recordId:T.id}:Ft.hT),[$,Q]=(0,wt.useState)(!1),[G,X]=(0,wt.useState)(!1),[Z,Y]=(0,wt.useState)(sn.EI.Hide),[J,ee]=(0,wt.useState)(0),[te,ne]=(0,wt.useState)(!1),[re,oe]=(0,wt.useState)(!1),ie=(0,wt.useRef)($),ae=(0,wt.useRef)(null),le=(0,wt.useRef)(null),ce=(0,wt.useRef)(null),ue=(0,wt.useRef)(!1),de=(0,wt.useRef)([]),he=(0,wt.useRef)({}),pe=(0,Fr.jL)(),fe=(0,wt.useRef)(t.pageSize),me=(0,wt.useRef)(t.view),ge=(0,wt.useRef)(!1),ve=(0,wt.useRef)(null);ie.current=$,de.current=t.facets,he.current=t.selectedFacets,me.current=t.view,fe.current=t.pageSize;const be=(0,wt.useRef)(null),ye=(0,wt.useMemo)((()=>t.selectedFacets.Types&&t.selectedFacets.Types.length>0?t.selectedFacets.Types:["*"]),[t.selectedFacets]),xe=(0,wt.useMemo)((()=>!(null!==ye&&void 0!==ye&&ye.length)||0===ye.length),[ye]),we=(0,wt.useMemo)((()=>{var e;if(!q)return;const r=null===(e=Object.values(q).find((e=>e.some((e=>e.isDefault)))))||void 0===e?void 0:e[0];return t.sortOrder&&q[t.sortOrder]&&0!==q[t.sortOrder].length?1===q[t.sortOrder].length?q[t.sortOrder][0]:q[t.sortOrder].find((e=>{let{sortDirection:n}=e;return n.toLowerCase()===t.sortDirection})):(r&&(n({type:"SET_SORT_DIRECTION",payload:r.sortDirection.toLowerCase()}),n({type:"SET_SORT_ORDER",payload:r.sortDirectionGroupKey.toLowerCase()})),r)}),[q,t.sortDirection,t.sortOrder]),Se=(0,wt.useMemo)((()=>null===R||void 0===R?void 0:R.proxies.filter((e=>{if(!a||0===a.length)return!0;let t="";if(e.extension)t=e.extension.replace(".","");else{var n;const r=null===(n=e.permanentLink)||void 0===n?void 0:n.split(".").at(-1);t=null!==r&&void 0!==r?r:""}return a.some((e=>!!t&&t.toLowerCase()===e.toLowerCase()))}))),[R,a]),_e=(0,wt.useMemo)((()=>G&&q&&(null===ye||void 0===ye?void 0:ye.length)&&$),[G,q,ye,$]),{data:Ce,isFetching:Ee,isError:Ae,refetch:Te}=(0,Rt.pf)(_e?{folderID:t.currentFolder.id,isSeeThrough:t.isSeeThrough,limitedToDocTypes:h,pageSize:t.pageSize,searchText:t.searchText,selectedFacets:t.selectedFacets,sortOrder:null===we||void 0===we?void 0:we.id,start:t.start,useSession:o}:Ft.hT);(0,wt.useEffect)((()=>{var e;ee(null!==(e=null===Ce||void 0===Ce?void 0:Ce.items.length)&&void 0!==e?e:0)}),[null===Ce||void 0===Ce?void 0:Ce.items.length]),(0,wt.useEffect)((()=>{A&&pe((0,Lr.DM)(null))}),[pe,A]),(0,wt.useEffect)((()=>{S&&null!==T&&void 0!==T&&T.recordId&&S("select",T.recordId)}),[S,T]),(0,wt.useEffect)((()=>{let e=null;return Ee?n({type:"SET_IS_LOADING",payload:!0}):e=setTimeout((()=>{n({type:"SET_IS_LOADING",payload:Ee})}),200),()=>{e&&clearTimeout(e)}}),[Ee]),(0,wt.useEffect)((()=>{r&&(pe((0,Lr.DM)(null)),n({type:"RESET_SEARCH"}),Promise.all([(0,Mt.bQ)("selectedSortOrder"),(0,Mt.bQ)("selectedSortDirection"),(0,Mt.bQ)("selectedView"),(0,Mt.bQ)("newFacets"),(0,Mt.bQ)("selectedFilter"),(0,Mt.bQ)("selectedIsSeeThrough"),(0,Mt.bQ)("searchText")]).then((e=>{let[t,r,o,i,a,s,l]=e;if(t&&n({type:"SET_SORT_ORDER",payload:t}),"ascending"!==r&&"descending"!==r||n({type:"SET_SORT_DIRECTION",payload:r}),null===o&&(o=x),"string"===typeof o&&(Object.values(Qt.gf).includes(o)?n({type:"SET_VIEW",payload:o}):n({type:"SET_VIEW",payload:Qt.gf.Medium})),m){if(i){const e=JSON.parse(i);(0,Ge.A)(e)?n({type:"SET_FACETS",payload:e}):n({type:"SET_FACETS",payload:[]})}if(a){const e=JSON.parse(a);n(e?{type:"SET_FILTERS",payload:xt(e,Ge.A)}:{type:"SET_FILTERS",payload:{}})}s&&n({type:"SET_IS_SEE_THROUGH",payload:"true"===s}),l&&n({type:"SET_SEARCH_TEXT",payload:l}),ue.current=!0,oe(!0)}})))}),[pe,r,m,x]),(0,wt.useEffect)((()=>{let e=null;const t=ae.current;if(!t)return;const n=t.offsetWidth;return t.style.width=n-1+"px",e=setTimeout((()=>{t.style.width="100%"}),50),()=>{e&&clearTimeout(e)}}),[r]),(0,wt.useEffect)((()=>{const e=ce.current;if(!e)return;ae.current&&n({type:"SET_CONTAINER_SIZE",payload:{width:ae.current.offsetWidth,height:ae.current.offsetHeight}});const t=e=>{const t=e.detail.entries;window.requestAnimationFrame((()=>{Array.isArray(t)&&t.length&&t[0].target===ae.current&&n({type:"SET_CONTAINER_SIZE",payload:{width:t[0].contentRect.width,height:t[0].contentRect.height}})}))};return e.addEventListener("cx-resize",t),()=>{e.removeEventListener("cx-resize",t)}}),[re]),(0,wt.useEffect)((()=>{!we&&ue.current&&n({type:"SET_SORT_ORDER",payload:Wr.sortOrder})}),[we,q]),(0,wt.useEffect)((()=>{ue.current&&((0,Mt.yt)("selectedSortOrder",t.sortOrder),t.sortDirection&&(0,Mt.yt)("selectedSortDirection",t.sortDirection),(0,Mt.yt)("selectedView",t.view),(0,Mt.yt)("newFacets",JSON.stringify(t.facets)),(0,Mt.yt)("selectedFilter",JSON.stringify(t.selectedFacets)),(0,Mt.yt)("selectedIsSeeThrough",t.isSeeThrough.toString()),(0,Mt.yt)("searchText",t.searchText))}),[t.currentFolder,t.facets,t.isSeeThrough,t.sortDirection,t.sortOrder,t.searchText,t.view,t.selectedFacets]);const Oe=t.containerSize.width>0&&t.containerSize.width<=Ut.Pm,Pe=e=>{pe((0,Lr.DM)(e.recordId))},ze=(0,wt.useCallback)((e=>{pe((0,Lr.DM)(null)),n({type:"SET_SEARCH_TEXT",payload:e})}),[pe]),De=(0,wt.useRef)(0),Re=(0,wt.useRef)(0),je=(0,wt.useRef)(t.defaultPageSize);je.current=t.defaultPageSize;const Ne=(0,wt.useCallback)(((e,t)=>{var r;const{width:o,height:i}=e,a=o||0,s=i||0;if(a*s===0||!ue.current)return;const l=De.current,c=Re.current;if(Math.abs(l-s)<10&&Math.abs(c-a)<10&&(null===t||void 0===t||!t.force))return;De.current=s,Re.current=a;const u=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--cx-spacing-medium")||"16",10),d=(null===(r=Rr[me.current])||void 0===r?void 0:r.minWidth)||Rr[Qt.gf.Large].minWidth,h=Math.max(1,Math.floor((a+u)/(d+u))),p=Math.ceil(s/(d+u)),f=Math.ceil(p*h/je.current+1)*je.current;X(!0),f!==fe.current&&0!==f&&n({type:"SET_PAGE_SIZE",payload:{pageSize:f,returnToFirstPage:!(null===t||void 0===t||!t.returnToFirstPage)}})}),[]),Ie=(0,wt.useMemo)((()=>ke(Ne,Ut.h,{leading:!1})),[Ne]);(0,wt.useEffect)((()=>{if(ue.current){const e=le.current;me.current=t.view,e&&Ie({width:e.clientWidth,height:e.clientHeight},{returnToFirstPage:!0,force:!0})}}),[Ie,t.view]);const Me=(0,wt.useCallback)(((e,t)=>{switch(e){case"view":n({type:"SET_VIEW",payload:t});break;case"sortDirection":n({type:"SET_SORT_DIRECTION",payload:t});break;case"sortOrder":n({type:"SET_SORT_ORDER",payload:t.toString()});break;case"isSeeThrough":n({type:"SET_IS_SEE_THROUGH",payload:Boolean(t)});break;case"filter":n({type:"SET_FILTERS",payload:t})}}),[]),Fe=(0,wt.useCallback)((e=>{n({type:"SET_CURRENT_COUNT",payload:e.currentCount}),n({type:"SET_TOTAL_COUNT",payload:e.totalCount}),n({type:"SET_FACETS",payload:e.facets})}),[]),Le=(0,wt.useCallback)((async e=>{ie.current||Q(!0);const t=await pe(It(e));It.fulfilled.match(t)&&(n({type:"SET_CURRENT_FOLDER",payload:{folder:e,shouldResetFilters:ie.current}}),te||n({type:"SET_OPEN_BROWSER",payload:!1}),pe((0,Lr.DM)(null)),(0,Mt.yt)("lastLocation",JSON.stringify(e)))}),[pe,te]),Be=(0,wt.useCallback)((()=>{ge.current?ge.current=!1:n({type:"SET_START",payload:null!==J&&void 0!==J?J:0})}),[J]),Ue=(0,wt.useCallback)((e=>{if(!e.target)return;const t=e.target.scrollTop;n(0===t?{type:"SET_HAS_SCROLLED",payload:!1}:{type:"SET_HAS_SCROLLED",payload:!0})}),[]),Ve=(0,wt.useCallback)((async(e,t,n)=>{const r=[...e];Dt.Yq.forEach((e=>{const o=se(e);var i,a,s,l,c,u,d,h,p,f;T&&null!==w&&void 0!==w&&w.includes(e)&&(r[0]={...r[0],extraFields:{...(null===(i=r[0])||void 0===i?void 0:i.extraFields)||{},[e]:T[o]}});n?r[0]={...r[0],assetTransformationSource:t,assetLinkInfo:{extension:n.extension,isCustomFormat:null===(a=n.isCustomFormat)||void 0===a||a,permanentLink:r[0].imageUrl,width:n.width,height:n.height}}:r[0]={...r[0],assetLinkInfo:{cdnName:null!==(s=null===t||void 0===t?void 0:t.cdnName)&&void 0!==s?s:null,extension:null!==(l=null===t||void 0===t?void 0:t.extension)&&void 0!==l?l:null,isCustomFormat:null!==(c=null===t||void 0===t?void 0:t.isCustomFormat)&&void 0!==c&&c,permanentLink:null!==(u=r[0].imageUrl)&&void 0!==u?u:null,proxyLabel:null!==(d=null===t||void 0===t?void 0:t.proxyLabel)&&void 0!==d?d:null,proxyName:null!==(h=null===t||void 0===t?void 0:t.proxyName)&&void 0!==h?h:null,width:null!==(p=null===t||void 0===t?void 0:t.width)&&void 0!==p?p:null,height:null!==(f=null===t||void 0===t?void 0:t.height)&&void 0!==f?f:null}}}));const o=k(r);if("object"===typeof(i=o)&&null!==i&&"function"===typeof i.then)try{await o}catch(a){return void console.error("Error in onAssetSelected:",a)}var i;g||null===_||void 0===_||_()}),[w,k,_,g,T]),qe=(0,wt.useMemo)((()=>!!Ce&&t.start+t.pageSize<t.totalCount),[Ce,t.pageSize,t.start,t.totalCount]);(0,wt.useEffect)((()=>{if(Fe){var e,t,n,r,o;const i=new Map(de.current.map((e=>[`${e.facetDetails.facetFieldName}|${e.facetDetails.displayName}`,{...e,values:e.values.reduce(((t,n)=>{var r;return(null===(r=he.current[e.facetDetails.facetFieldName])||void 0===r?void 0:r.find((e=>e===n.value)))&&t.push({...n,count:0}),t}),[])}])));(null!==(e=null===Ce||void 0===Ce||null===(t=Ce.facets)||void 0===t?void 0:t.filter((e=>e.values.length>0)))&&void 0!==e?e:[]).forEach((e=>{var t;const n=i.get(`${e.facetDetails.facetFieldName}|${e.facetDetails.displayName}`),r=[...e.values,...null!==(t=null===n||void 0===n?void 0:n.values.filter((t=>!(null!==e&&void 0!==e&&e.values.find((e=>t.value===e.value&&t.displayValue===e.displayValue))))))&&void 0!==t?t:[]];i.set(`${e.facetDetails.facetFieldName}|${e.facetDetails.displayName}`,{...e,values:r})})),Fe({currentCount:null!==(n=null===Ce||void 0===Ce?void 0:Ce.items.length)&&void 0!==n?n:0,items:null!==(r=null===Ce||void 0===Ce?void 0:Ce.items)&&void 0!==r?r:[],facets:Array.from(i.values()),totalCount:null!==(o=null===Ce||void 0===Ce?void 0:Ce.totalCount)&&void 0!==o?o:0})}}),[Ce,Fe]),(0,wt.useEffect)((()=>{const e=()=>{ge.current=!0,ve.current&&clearTimeout(ve.current),ve.current=setTimeout((()=>{ge.current=!1}),Ut.h)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),(0,wt.useEffect)((()=>{const e=be.current,t=()=>{e&&window.clearTimeout(e)};return t(),E||j?(Y(sn.EI.Hide),be.current=window.setTimeout((()=>{Y(sn.EI.ShowLoader)}),800)):E||j||!(null!==R&&void 0!==R&&R.proxies||N)||be.current&&(t(),Y(sn.EI.ShowDialog)),()=>{t()}}),[R,N,j,E]),(0,wt.useEffect)((()=>{T||Y(sn.EI.ShowDialog)}),[T]);const He=(0,wt.useMemo)((()=>I&&a&&0!==a.length?Object.entries(I).reduce(((e,t)=>{let[n,r]=t;return{...e,[n]:r.filter((e=>!a||0===a.length||a.some((t=>e.value.toLowerCase()===`.${t.toLowerCase()}`))))}}),I):I),[I,a]),We=t.containerSize.width<650;return re?(0,Vt.jsx)("cx-resize-observer",{ref:ce,children:(0,Vt.jsxs)(Vr,{ref:ae,children:[(0,Vt.jsx)(Jt,{allowedFolders:s,allowPin:c,collectionPath:B,currentFolder:t.currentFolder,favoriteFolderId:null===O||void 0===O?void 0:O.favoriteFolderRecordID,lastLocationMode:m,open:t.openBrowser,showCollections:v,showFavoriteFolder:b,useSession:o,onFolderSelect:Le,onClose:()=>n({type:"SET_OPEN_BROWSER",payload:!1}),isPersistent:te,onChangePersistent:ne,forceOverlay:We,damViewSeeThru:t.isSeeThrough}),(0,Vt.jsxs)(qr,{children:[(0,Vt.jsx)(lr,{bordered:t.hasScrolled,currentFolder:t.currentFolder,isFetching:P,isLoading:z,userInfo:O,showMenu:!te,onMenuClick:()=>n({type:"SET_OPEN_BROWSER",payload:!0}),onLogout:()=>{pe((0,Br.ri)()),pe((0,Lr.DM)(null)),n({type:"RESET_SEARCH"})},children:(0,Vt.jsx)(an,{allowSorting:"Mono"!==(null===we||void 0===we?void 0:we.sortDirection)&&!!we,availableFacets:null!==H&&void 0!==H?H:[],currentCount:t.currentCount,facets:t.facets,isMobile:Oe,isSeeThrough:t.isSeeThrough,loading:t.isLoading,searchValue:t.searchText,selectedFacets:t.selectedFacets,sortDirection:t.sortDirection,sortOrder:t.sortOrder,sortOrders:q,totalCount:t.totalCount,view:t.view,onSearchChange:ze,onSettingChange:Me})}),(0,Vt.jsx)("div",{style:{flex:1,minHeight:"320px",padding:"0 var(--cx-spacing-medium)",position:"relative"},children:(0,Vt.jsx)(Pt,{onResize:Ie,children:e=>{let{height:n,width:r}=e;return(0,Vt.jsx)("div",{style:{height:n+"px",width:r+"px"},children:(0,Vt.jsx)(Mr,{ref:le,isError:Ae,isConfigError:xe,hasNextPage:qe,height:n,isLoadingData:t.isLoading||!Ce,isFetched:!!Ce||xe,items:(null===Ce||void 0===Ce?void 0:Ce.items)||[],selectedAsset:null!==T&&void 0!==T?T:null,view:t.view,width:r,onItemSelect:Pe,onLoadMore:Be,onScroll:Ue},t.currentFolder.id+t.searchText+Object.values(t.selectedFacets).join("+")+t.isSeeThrough+t.view)})}})}),Z===sn.EI.ShowLoader&&(0,Vt.jsx)("cx-space",{className:"format-loader",children:(0,Vt.jsx)("cx-spinner",{})}),(0,Vt.jsx)(ir,{allowCustomFormat:!!F&&!(null===T||void 0===T||!T.allowATSLink),allowFavorites:l,allowProxy:u,allowTracking:d,allowedExtensions:a,appendAutoExtension:null!==(e=null===a||void 0===a?void 0:a.includes(L))&&void 0!==e&&e,autoExtension:L,availableExtensions:He,availableProxies:N?[]:j?void 0:Se,ctaText:f,extensions:null!==U&&void 0!==U?U:[],isFavorite:!!W,maxHeight:t.containerSize.height,open:!!T&&Z===sn.EI.ShowDialog,previewUrl:N||j||null===R||void 0===R?void 0:R.previewUrl,selectedAsset:null!==T&&void 0!==T?T:null,showVersions:y,supportedRepresentativeSubtypes:null!==p&&void 0!==p&&p.length?Qe(p,V):V,variant:Oe?"drawer":"dialog",boundary:ae.current,onClose:()=>{pe((0,Lr.DM)(null)),S("unselect","")},onFavorite:async()=>{if(!T)return!1;const e=await pe((0,Lr.P1)({recordId:T.recordId}));return Lr.P1.fulfilled.match(e)&&(S&&S("favorite",T.recordId),await K(),S&&S("afterFavorite",T.recordId),t.currentFolder.id===(null===O||void 0===O?void 0:O.favoriteFolderRecordID)&&(0===t.start?Te():n({type:"SET_CURRENT_FOLDER",payload:{folder:t.currentFolder,shouldResetFilters:!0}}))),!!e||e},onProxyConfirm:async e=>{let{extension:t,value:n,permanentLink:r,parameters:i,useRepresentative:a,selectedProxyMetadata:s}=e;if(!T)return;const l=await pe((0,Lr.Tp)({extension:t,extraFields:w,parameters:i,permanentLink:r,proxiesPreference:n,selectedAsset:T,useRepresentative:a,useSession:o}));Lr.Tp.fulfilled.match(l)&&await Ve(l.payload,s)},onFormatConfirm:async e=>{let{value:t,parameters:n,proxiesPreference:r,extension:i,sourceProxyMetadata:a,transformedAssetMetadata:s}=e;if(!T)return;const l=null!==T&&void 0!==T&&T.width?parseInt(T.width,10):0,c=null!==T&&void 0!==T&&T.height?parseInt(T.height,10):0,u=await pe((0,Lr.Tp)({extraFields:w,extension:i,maxHeight:c,maxWidth:l,parameters:n,proxiesPreference:r,selectedAsset:T,useSession:o,transformations:t}));Lr.Tp.fulfilled.match(u)&&await Ve(u.payload,a,s)},onUnFavorite:async()=>{if(!T)return!1;const e=await pe((0,Lr.BZ)({recordId:T.recordId}));return Lr.BZ.fulfilled.match(e)&&(S&&S("unfavorite",T.recordId),await K(),S&&S("afterUnfavorite",T.recordId),t.currentFolder.id===(null===O||void 0===O?void 0:O.favoriteFolderRecordID)&&(0===t.start?Te():n({type:"SET_CURRENT_FOLDER",payload:{folder:t.currentFolder,shouldResetFilters:!0}}))),!!e||e}})]})]})}):(0,Vt.jsx)(Hr.A,{})}},8853:(e,t,n)=>{"use strict";e.exports=n(5896)},8879:(e,t,n)=>{"use strict";n.d(t,{xP:()=>z});var r=n(4657),o=n(2222),i=n(5043),a=n(5137),s=n(9815),l=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},c=Object.defineProperty,u=Object.defineProperties,d=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,m=function(e,t,n){return t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},g=function(e,t){for(var n in t||(t={}))p.call(t,n)&&m(e,n,t[n]);if(h)for(var r=0,o=h(t);r<o.length;r++){n=o[r];f.call(t,n)&&m(e,n,t[n])}return e},v=function(e,t){return u(e,d(t))};function b(e,t,n,r){var o=(0,i.useMemo)((function(){return{queryArgs:e,serialized:"object"==typeof e?t({queryArgs:e,endpointDefinition:n,endpointName:r}):e}}),[e,t,n,r]),a=(0,i.useRef)(o);return(0,i.useEffect)((function(){a.current.serialized!==o.serialized&&(a.current=o)}),[o]),a.current.serialized===o.serialized?a.current.queryArgs:e}var y=Symbol();function x(e){var t=(0,i.useRef)(e);return(0,i.useEffect)((function(){(0,a.bN)(t.current,e)||(t.current=e)}),[e]),(0,a.bN)(t.current,e)?t.current:e}var w,S,k=WeakMap?new WeakMap:void 0,_=function(e){var t=e.endpointName,n=e.queryArgs,r="",o=null==k?void 0:k.get(n);if("string"===typeof o)r=o;else{var i=JSON.stringify(n,(function(e,t){return(0,s.isPlainObject)(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}));(0,s.isPlainObject)(n)&&(null==k||k.set(n,i)),r=i}return t+"("+r+")"},C="undefined"!==typeof window&&window.document&&window.document.createElement?i.useLayoutEffect:i.useEffect,E=function(e){return e},A=function(e){return e.isUninitialized?v(g({},e),{isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:r.RE.pending}):e};function T(e){return e.replace(e[0],e[0].toUpperCase())}function O(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,l([e],t))}(S=w||(w={})).query="query",S.mutation="mutation";var P=Symbol();var z=(0,r.l0)((0,r.m7)(),function(e){var t=void 0===e?{}:e,n=t.batch,s=void 0===n?a.vA:n,l=t.useDispatch,c=void 0===l?a.wA:l,u=t.useSelector,d=void 0===u?a.d4:u,h=t.useStore,p=void 0===h?a.Pj:h,f=t.unstable__sideEffectsInRender,m=void 0!==f&&f;return{name:P,init:function(e,t,n){var l=t.serializeQueryArgs,u=e,h=function(e){var t=e.api,n=e.moduleOptions,s=n.batch,l=n.useDispatch,c=n.useSelector,u=n.useStore,d=n.unstable__sideEffectsInRender,h=e.serializeQueryArgs,p=e.context,f=d?function(e){return e()}:i.useEffect;return{buildQueryHooks:function(e){var n=function(n,o){var a=void 0===o?{}:o,s=a.refetchOnReconnect,c=a.refetchOnFocus,u=a.refetchOnMountOrArgChange,d=a.skip,h=void 0!==d&&d,m=a.pollingInterval,g=void 0===m?0:m,v=t.endpoints[e].initiate,y=l(),w=b(h?r.hT:n,_,p.endpointDefinitions[e],e),S=x({refetchOnReconnect:s,refetchOnFocus:c,pollingInterval:g}),k=(0,i.useRef)(!1),C=(0,i.useRef)(),E=C.current||{},A=E.queryCacheKey,T=E.requestId,O=!1;if(A&&T){var P=y(t.internalActions.internal_probeSubscription({queryCacheKey:A,requestId:T}));O=!!P}var z=!O&&k.current;return f((function(){k.current=O})),f((function(){z&&(C.current=void 0)}),[z]),f((function(){var e,t=C.current;if(w===r.hT)return null==t||t.unsubscribe(),void(C.current=void 0);var n=null==(e=C.current)?void 0:e.subscriptionOptions;if(t&&t.arg===w)S!==n&&t.updateSubscriptionOptions(S);else{null==t||t.unsubscribe();var o=y(v(w,{subscriptionOptions:S,forceRefetch:u}));C.current=o}}),[y,v,u,w,S,z]),(0,i.useEffect)((function(){return function(){var e;null==(e=C.current)||e.unsubscribe(),C.current=void 0}}),[]),(0,i.useMemo)((function(){return{refetch:function(){var e;if(!C.current)throw new Error("Cannot refetch a query that has not been started yet.");return null==(e=C.current)?void 0:e.refetch()}}}),[])},d=function(n){var r=void 0===n?{}:n,o=r.refetchOnReconnect,a=r.refetchOnFocus,c=r.pollingInterval,u=void 0===c?0:c,d=t.endpoints[e].initiate,h=l(),p=(0,i.useState)(y),m=p[0],g=p[1],v=(0,i.useRef)(),b=x({refetchOnReconnect:o,refetchOnFocus:a,pollingInterval:u});f((function(){var e,t,n=null==(e=v.current)?void 0:e.subscriptionOptions;b!==n&&(null==(t=v.current)||t.updateSubscriptionOptions(b))}),[b]);var w=(0,i.useRef)(b);f((function(){w.current=b}),[b]);var S=(0,i.useCallback)((function(e,t){var n;return void 0===t&&(t=!1),s((function(){var r;null==(r=v.current)||r.unsubscribe(),v.current=n=h(d(e,{subscriptionOptions:w.current,forceRefetch:!t})),g(e)})),n}),[h,d]);return(0,i.useEffect)((function(){return function(){var e;null==(e=null==v?void 0:v.current)||e.unsubscribe()}}),[]),(0,i.useEffect)((function(){m===y||v.current||S(m,!0)}),[m,S]),(0,i.useMemo)((function(){return[S,m]}),[S,m])},w=function(n,s){var l=void 0===s?{}:s,d=l.skip,f=void 0!==d&&d,g=l.selectFromResult,v=t.endpoints[e].select,y=b(f?r.hT:n,h,p.endpointDefinitions[e],e),x=(0,i.useRef)(),w=(0,i.useMemo)((function(){return(0,o.createSelector)([v(y),function(e,t){return t},function(e){return y}],m)}),[v,y]),S=(0,i.useMemo)((function(){return g?(0,o.createSelector)([w],g):w}),[w,g]),k=c((function(e){return S(e,x.current)}),a.bN),_=u(),E=w(_.getState(),x.current);return C((function(){x.current=E}),[E]),k};return{useQueryState:w,useQuerySubscription:n,useLazyQuerySubscription:d,useLazyQuery:function(e){var t=d(e),n=t[0],r=t[1],o=w(r,v(g({},e),{skip:r===y})),a=(0,i.useMemo)((function(){return{lastArg:r}}),[r]);return(0,i.useMemo)((function(){return[n,o,a]}),[n,o,a])},useQuery:function(e,t){var o=n(e,t),a=w(e,g({selectFromResult:e===r.hT||(null==t?void 0:t.skip)?void 0:A},t)),s=a.data,l=a.status,c=a.isLoading,u=a.isSuccess,d=a.isError,h=a.error;return(0,i.useDebugValue)({data:s,status:l,isLoading:c,isSuccess:u,isError:d,error:h}),(0,i.useMemo)((function(){return g(g({},a),o)}),[a,o])}}},buildMutationHook:function(e){return function(n){var r=void 0===n?{}:n,u=r.selectFromResult,d=void 0===u?E:u,h=r.fixedCacheKey,p=t.endpoints[e],f=p.select,m=p.initiate,b=l(),y=(0,i.useState)(),x=y[0],w=y[1];(0,i.useEffect)((function(){return function(){(null==x?void 0:x.arg.fixedCacheKey)||null==x||x.reset()}}),[x]);var S=(0,i.useCallback)((function(e){var t=b(m(e,{fixedCacheKey:h}));return w(t),t}),[b,m,h]),k=(x||{}).requestId,_=(0,i.useMemo)((function(){return(0,o.createSelector)([f({fixedCacheKey:h,requestId:null==x?void 0:x.requestId})],d)}),[f,x,d,h]),C=c(_,a.bN),A=null==h?null==x?void 0:x.arg.originalArgs:void 0,T=(0,i.useCallback)((function(){s((function(){x&&w(void 0),h&&b(t.internalActions.removeMutationResult({requestId:k,fixedCacheKey:h}))}))}),[b,h,x,k]),O=C.endpointName,P=C.data,z=C.status,D=C.isLoading,R=C.isSuccess,j=C.isError,N=C.error;(0,i.useDebugValue)({endpointName:O,data:P,status:z,isLoading:D,isSuccess:R,isError:j,error:N});var I=(0,i.useMemo)((function(){return v(g({},C),{originalArgs:A,reset:T})}),[C,A,T]);return(0,i.useMemo)((function(){return[S,I]}),[S,I])}},usePrefetch:function(e,n){var r=l(),o=x(n);return(0,i.useCallback)((function(n,i){return r(t.util.prefetch(e,n,g(g({},o),i)))}),[e,r,o])}};function m(e,t,n){if((null==t?void 0:t.endpointName)&&e.isUninitialized){var r=t.endpointName,o=p.endpointDefinitions[r];h({queryArgs:t.originalArgs,endpointDefinition:o,endpointName:r})===h({queryArgs:n,endpointDefinition:o,endpointName:r})&&(t=void 0)}var i=e.isSuccess?e.data:null==t?void 0:t.data;void 0===i&&(i=e.data);var a=void 0!==i,s=e.isLoading,l=!a&&s,c=e.isSuccess||s&&a;return v(g({},e),{data:i,currentData:e.data,isFetching:s,isLoading:l,isSuccess:c})}}({api:e,moduleOptions:{batch:s,useDispatch:c,useSelector:d,useStore:p,unstable__sideEffectsInRender:m},serializeQueryArgs:l,context:n}),f=h.buildQueryHooks,S=h.buildMutationHook,k=h.usePrefetch;return O(u,{usePrefetch:k}),O(n,{batch:s}),{injectEndpoint:function(t,n){if(function(e){return e.type===w.query}(n)){var r=f(t),o=r.useQuery,i=r.useLazyQuery,a=r.useLazyQuerySubscription,s=r.useQueryState,l=r.useQuerySubscription;O(u.endpoints[t],{useQuery:o,useLazyQuery:i,useLazyQuerySubscription:a,useQueryState:s,useQuerySubscription:l}),e["use"+T(t)+"Query"]=o,e["useLazy"+T(t)+"Query"]=i}else if(function(e){return e.type===w.mutation}(n)){var c=S(t);O(u.endpoints[t],{useMutation:c}),e["use"+T(t)+"Mutation"]=c}}}}}}())},8948:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e,t){return e.has(t)}},9063:(e,t,n)=>{"use strict";n.d(t,{$Y:()=>m,E7:()=>b,Jz:()=>f,PG:()=>p,aM:()=>v,pf:()=>g});var r=n(7840),o=n(4951),i=n(8024),a=n(9487),s=n(4657),l=n(8879),c=n(4413);const u=e=>{let{searchText:t,folder:n,allowedFolders:r}=e,o="MediaType:Story OR MediaType:Album";if((0,a.o)(t)||(o=`(${o}) AND Story_Title:${t}`),null!==r&&void 0!==r&&r.length){o=`(${o}) AND (${r.map((e=>`Path:${e}${null!==n&&void 0!==n&&n.id?"/*":""}`)).join(" OR ")})`}return o},d=e=>e&&0!==Object.keys(e).length?Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return r&&0!==r.length?"Types"===n?{...e,subtypeCriteria:e.subtypeCriteria.concat(r)}:{...e,facetFilters:{...e.facetFilters,[n]:r}}:e}),{subtypeCriteria:[],facetFilters:{}}):{subtypeCriteria:[],facetFilters:{}},h=(0,s.L5)(i.rQ,{maxRetries:2}),p=(0,l.xP)({reducerPath:"searchApi",baseQuery:h,tagTypes:["Folders","Images","ImagesInFolders"],endpoints:e=>({getFolders:e.query({keepUnusedDataFor:0,query:e=>{let{allowedFolders:t,folder:n,searchText:r,useSession:o,start:i=0,pageSize:a=c.VH,self:s=!1,includeDirectChild:l,damViewSeeThru:u}=e;const d=[["DamViewSeeThru",u?"true":"false"]];var h;if((i||i>=0)&&d.push(["Start",i.toString()]),r&&(d.push(["Text",r]),d.push(["SeeThru","true"])),a&&d.push(["Limit",a.toString()]),null===t||void 0===t||!t.length||null!==n&&void 0!==n&&n.id){if(null!==n&&void 0!==n&&n.id){var p;d.push(["ObjectRecordIDs",n.id]),d.push(["IncludeDirectChild",null!==(p=null===l||void 0===l?void 0:l.toString())&&void 0!==p?p:"true"])}}else t.forEach((e=>{d.push(["ObjectRecordIDs",e])})),d.push(["Self","true"]),d.push(["IncludeDirectChild",null!==(h=null===l||void 0===l?void 0:l.toString())&&void 0!==h?h:"false"]);return o&&d.push(["UseSession",o]),s&&d.push(["Self","true"]),{url:"/webapi/extensibility/integrations/gab/assetbrowser/gethierarchy_41e8",params:d}},transformResponse:(e,t,n)=>{var r,a;return{items:null!==(r=null===(a=e.contentItems)||void 0===a?void 0:a.map((e=>{var t,r,a,s;return{id:e.recordID,title:null!==(t=(0,i.Pp)(e.fields,o._3))&&void 0!==t?t:"",docType:null!==(r=(0,i.Pp)(e.fields,o.VV))&&void 0!==r?r:"",path:n.folder?[...n.folder.path,n.folder.title]:[],fullPath:(null!==(a=(0,i.Pp)(e.fields,o.bV))&&void 0!==a?a:"").replace(/^Root\//i,""),parents:n.folder?[...n.folder.parents,n.folder]:[],hasChildren:"1"===(null!==(s=(0,i.Pp)(e.fields,o.VH))&&void 0!==s?s:"0"),isShared:"DO_OR1ND000001913488"===(0,i.Pp)(e.fields,o.Gv)}})))&&void 0!==r?r:[],totalCount:e.totalCount}},providesTags:(e,t,n)=>{var r,o;return[{type:"Folders",id:null!==(r=null===(o=n.folder)||void 0===o?void 0:o.id)&&void 0!==r?r:"Root"}]},merge:(e,t,n)=>n.arg.start&&n.arg.start>0?(e.items.push(...t.items),e):t,forceRefetch(e){let{currentArg:t,previousArg:n}=e;return t!==n},serializeQueryArgs:e=>{var t;let{endpointName:n,queryArgs:r}=e;return{endpointName:n,id:null===(t=r.folder)||void 0===t?void 0:t.id,type:"Folders"}}}),getCollections:e.query({keepUnusedDataFor:0,query:e=>{let{folder:t,searchText:n,useSession:r,start:i=0,pageSize:a=c.VH}=e;const s=[["extraFilters",u({searchText:n})],["fields",o.bV],["fields",o.VV],["fields",o._3],["seeThru",!0],["subtypeCriteria",t]];return(i||i>=0)&&s.push(["start",i.toString()]),a&&s.push(["limit",a.toString()]),r&&s.push(["UseSession",r]),{url:"/webapi/extensibility/integrations/contentBrowserSDK/getcontent_4bw_v1",params:s}},transformResponse:(e,t)=>{var n,r;return{items:null!==(n=null===(r=e.contentItems)||void 0===r?void 0:r.map((e=>{var t,n,r;return{id:e.recordID,title:null!==(t=(0,i.Pp)(e.fields,o._3))&&void 0!==t?t:"",docType:null!==(n=(0,i.Pp)(e.fields,o.VV))&&void 0!==n?n:"",path:[],fullPath:(null!==(r=(0,i.Pp)(e.fields,o.bV))&&void 0!==r?r:"").replace(/^Root\//i,""),parents:[],hasChildren:!1}})))&&void 0!==n?n:[],totalCount:e.totalCount}},providesTags:(e,t,n)=>[{type:"Folders",id:n.folder.id}],merge:(e,t,n)=>n.arg.start&&n.arg.start>0?(e.items.push(...t.items),e):t,forceRefetch(e){let{currentArg:t,previousArg:n}=e;return t!==n},serializeQueryArgs:e=>{var t;let{endpointName:n,queryArgs:r}=e;return{endpointName:n,id:null===(t=r.folder)||void 0===t?void 0:t.id,type:"Folders"}}}),getAssets:e.query({keepUnusedDataFor:0,query:e=>{let{folderID:t,isSeeThrough:n,limitedToDocTypes:r=[],pageSize:i,searchText:a,selectedFacets:s,sortOrder:l,start:c,useSession:u}=e;return{url:"/webapi/extensibility/integrations/contentBrowserSDK/getcontent_4bw_v3",body:{fields:[o.s6,o.VV,o.jb,o._R,o.vA,o.sP,o.S,o.Ni,o.Gu,o.HO,o.EG,o._3,o.Uh,o.g_],seeThru:!!n,objectRecordID:null!==t&&void 0!==t?t:void 0,start:null!==c&&void 0!==c?c:void 0,limit:null!==i&&void 0!==i?i:void 0,orderBy:l,limitedToDocTypes:r,text:a,useSession:u,...d(s)},method:"POST"}},transformResponse:e=>{var t,n;return{facets:e.facets,items:null!==(t=null===(n=e.contentItems)||void 0===n?void 0:n.map((e=>{var t,n,r,a,s,l,c,u,d,h,p,f;let m=null!==(t=(0,i.Pp)(e.fields,o.jb))&&void 0!==t?t:"";const g=(0,i.Pp)(e.fields,o.Gu);return m&&!m.startsWith(".")&&(m="."+m),{docType:null!==(n=(0,i.Pp)(e.fields,o.VV))&&void 0!==n?n:"",docSubType:null!==(r=(0,i.Pp)(e.fields,o.EG))&&void 0!==r?r:"",extension:m,height:null!==(a=(0,i.Pp)(e.fields,o.S))&&void 0!==a?a:"0",id:e.recordID,identifier:null!==(s=(0,i.Pp)(e.fields,o.vA))&&void 0!==s?s:"",imageUrl:null!==(l=(0,i.Pp)(e.fields,o.s6))&&void 0!==l?l:"",originalUrl:null!==(c=(0,i.Pp)(e.fields,o.g_))&&void 0!==c?c:"",name:null!==g&&void 0!==g?g:"",scrubUrl:null!==(u=(0,i.Pp)(e.fields,o.he))&&void 0!==u?u:"",size:null!==(d=(0,i.Pp)(e.fields,o._R))&&void 0!==d?d:"0 MB",tags:null!==(h=(0,i.Pp)(e.fields,o.sP))&&void 0!==h?h:"",width:null!==(p=(0,i.Pp)(e.fields,o.Ni))&&void 0!==p?p:"0",allowATSLink:"True"===(0,i.Pp)(e.fields,o.F4),recordId:null!==(f=(0,i.Pp)(e.fields,o.HO))&&void 0!==f?f:""}})))&&void 0!==t?t:[],totalCount:e.totalCount}},providesTags:(e,t,n)=>{var r;return[{selectedFacets:Object.values(null!==(r=n.selectedFacets)&&void 0!==r?r:{}),id:n.folderID,isSeeThrough:n.isSeeThrough,searchText:n.searchText,sortOrder:n.sortOrder,type:"ImagesInFolders"},"Images"]},merge:(e,t,n)=>n.arg.start&&n.arg.start>0?{...e,items:(0,r.A)([...e.items,...t.items],"recordId")}:t,forceRefetch(e){let{currentArg:t,previousArg:n}=e;return(null===t||void 0===t?void 0:t.start)===(null===n||void 0===n?void 0:n.start)?!(null===t||void 0===t||!t.pageSize)&&!(null===n||void 0===n||!n.pageSize)&&t.pageSize>n.pageSize:t!==n},serializeQueryArgs:e=>{var t;let{endpointName:n,queryArgs:r}=e;return{endpointName:n,selectedFacets:Object.values(null!==(t=r.selectedFacets)&&void 0!==t?t:{}),id:r.folderID,isSeeThrough:r.isSeeThrough,searchText:r.searchText,sortOrder:r.sortOrder,type:"ImagesInFolders"}}}),getIsFavorite:e.query({keepUnusedDataFor:0,query:e=>{let{recordId:t}=e;return{url:"/webapi/extensibility/integrations/contentBrowserSDK/getfavorites_419t",params:[["recordId",t]]}},transformResponse:(e,t,n)=>{let{recordId:r}=n;return!!e.favoriteRecordIds&&e.favoriteRecordIds.includes(r)}}),getAssetById:e.query({keepUnusedDataFor:0,query:e=>{let{id:t,useSession:n}=e;const r=[["extraFilters",`RecordID:${t}`],["fields",o.s6],["fields",o.VV],["fields",o.jb],["fields",o._R],["fields",o.vA],["fields",o.sP],["fields",o.S],["fields",o.Ni],["fields",o.Gu],["fields",o.HO],["fields",o.EG],["fields",o._3],["fields",o.Uh],["fields",o.g_],["seeThru","true"]];return n&&r.push(["UseSession",n]),{url:"/webapi/extensibility/integrations/contentBrowserSDK/getcontent_4bw_v1",params:r}},transformResponse:e=>{var t,n,r,a,s,l,c,u,d,h,p,f,m;const g=null===(t=e.contentItems)||void 0===t?void 0:t[0];if(!g)return;let v=null!==(n=(0,i.Pp)(g.fields,o.jb))&&void 0!==n?n:"";v&&!v.startsWith(".")&&(v="."+v);const b=(0,i.Pp)(g.fields,o.Gu);return v&&!v.startsWith(".")&&(v="."+v),{docType:null!==(r=(0,i.Pp)(g.fields,o.VV))&&void 0!==r?r:"",docSubType:null!==(a=(0,i.Pp)(g.fields,o.EG))&&void 0!==a?a:"",extension:v,height:null!==(s=(0,i.Pp)(g.fields,o.S))&&void 0!==s?s:"0",id:g.recordID,identifier:null!==(l=(0,i.Pp)(g.fields,o.vA))&&void 0!==l?l:"",imageUrl:null!==(c=(0,i.Pp)(g.fields,o.s6))&&void 0!==c?c:"",originalUrl:null!==(u=(0,i.Pp)(g.fields,o.g_))&&void 0!==u?u:"",name:b,scrubUrl:null!==(d=(0,i.Pp)(g.fields,o.he))&&void 0!==d?d:"",size:null!==(h=(0,i.Pp)(g.fields,o._R))&&void 0!==h?h:"0 MB",tags:null!==(p=(0,i.Pp)(g.fields,o.sP))&&void 0!==p?p:"",width:null!==(f=(0,i.Pp)(g.fields,o.Ni))&&void 0!==f?f:"0",allowATSLink:"True"===(0,i.Pp)(g.fields,o.F4),recordId:null!==(m=(0,i.Pp)(g.fields,o.HO))&&void 0!==m?m:""}},providesTags:(e,t,n)=>[{type:"Images",id:n.id}],serializeQueryArgs:e=>{let{endpointName:t,queryArgs:n}=e;return{endpointName:t,id:n.id,useSession:n.useSession}}})})}),{useGetFoldersQuery:f,useGetCollectionsQuery:m,useGetAssetsQuery:g,useGetAssetByIdQuery:v,useGetIsFavoriteQuery:b}=p},9171:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});const r=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1};const o=function(e){return e!==e};const i=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1};const a=function(e,t,n){return t===t?i(e,t,n):r(e,o,n)};const s=function(e,t){return!!(null==e?0:e.length)&&a(e,t,0)>-1}},9392:(e,t,n)=>{"use strict";var r=n(1218),o=n(6496);function i(e){var t=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}i.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=i},9406:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(){return[]}},9461:(e,t,n)=>{"use strict";e.exports=n(2330)},9487:(e,t,n)=>{"use strict";n.d(t,{k:()=>r,o:()=>o});const r=e=>{let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz";for(let r=0;r<e;r++)t+=n.charAt(Math.floor(62*Math.random()));return t},o=e=>!e||""===e.trim()},9500:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(4802),o=n(3239);const i=function(e){return(0,o.A)(e)&&"[object Arguments]"==(0,r.A)(e)};var a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable;const c=i(function(){return arguments}())?i:function(e){return(0,o.A)(e)&&s.call(e,"callee")&&!l.call(e,"callee")}},9618:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});const r=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i};var o=n(9406),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;const s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o.A},9717:(e,t,n)=>{"use strict";var r=n(5043),o=n(9461);var i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},a=o.useSyncExternalStore,s=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=s(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=c((function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==o&&h.hasValue){var t=h.value;if(o(t,e))return s=t}return s=e}if(t=s,i(a,e))return t;var n=r(e);return void 0!==o&&o(t,n)?(a=e,t):(a=e,s=n)}var a,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,o]);var p=a(e,d[0],d[1]);return l((function(){h.hasValue=!0,h.value=p}),[p]),u(p),p}},9815:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EnhancerArray:()=>j,MiddlewareArray:()=>R,SHOULD_AUTOBATCH:()=>Ze,TaskAbortError:()=>Pe,__DO_NOT_USE__ActionTypes:()=>o.$d,addListener:()=>We,applyMiddleware:()=>o.Tw,autoBatchEnhancer:()=>nt,bindActionCreators:()=>o.zH,clearAllListeners:()=>Ke,combineReducers:()=>o.HY,compose:()=>o.Zz,configureStore:()=>H,createAction:()=>E,createActionCreatorInvariantMiddleware:()=>D,createAsyncThunk:()=>ae,createDraftSafeSelector:()=>S,createEntityAdapter:()=>ee,createImmutableStateInvariantMiddleware:()=>M,createListenerMiddleware:()=>Ge,createNextState:()=>r.Ay,createReducer:()=>K,createSelector:()=>i.createSelector,createSerializableStateInvariantMiddleware:()=>U,createSlice:()=>$,createStore:()=>o.y$,current:()=>r.ss,findNonSerializableValue:()=>L,freeze:()=>r.CN,getDefaultMiddleware:()=>V,getType:()=>z,isAction:()=>A,isActionCreator:()=>T,isAllOf:()=>ue,isAnyOf:()=>ce,isAsyncThunkAction:()=>ve,isDraft:()=>r.Qx,isFluxStandardAction:()=>O,isFulfilled:()=>ge,isImmutableDefault:()=>I,isPending:()=>pe,isPlain:()=>F,isPlainObject:()=>_,isRejected:()=>fe,isRejectedWithValue:()=>me,legacy_createStore:()=>o.Yl,miniSerializeError:()=>ie,nanoid:()=>te,original:()=>r.c2,prepareAutoBatched:()=>Ye,removeListener:()=>$e,unwrapResult:()=>se});var r=n(2272),o=n(6096),i=n(2222);function a(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"===typeof o?o(n,r,e):t(o)}}}}var s=a();s.withExtraArgument=a;const l=s;var c=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},d=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},h=Object.defineProperty,p=Object.defineProperties,f=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,b=function(e,t,n){return t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},y=function(e,t){for(var n in t||(t={}))g.call(t,n)&&b(e,n,t[n]);if(m)for(var r=0,o=m(t);r<o.length;r++){n=o[r];v.call(t,n)&&b(e,n,t[n])}return e},x=function(e,t){return p(e,f(t))},w=function(e,t,n){return new Promise((function(r,o){var i=function(e){try{s(n.next(e))}catch(t){o(t)}},a=function(e){try{s(n.throw(e))}catch(t){o(t)}},s=function(e){return e.done?r(e.value):Promise.resolve(e.value).then(i,a)};s((n=n.apply(e,t)).next())}))},S=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=i.createSelector.apply(void 0,e);return function(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];return n.apply(void 0,d([(0,r.Qx)(e)?(0,r.ss)(e):e],t))}},k="undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"===typeof arguments[0]?o.Zz:o.Zz.apply(null,arguments)};"undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function _(e){if("object"!==typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}var C=function(e){return e&&"function"===typeof e.match};function E(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(t){var o=t.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return y(y({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:n[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(t){return t.type===e},n}function A(e){return _(e)&&"type"in e}function T(e){return"function"===typeof e&&"type"in e&&C(e)}function O(e){return A(e)&&"string"===typeof e.type&&Object.keys(e).every(P)}function P(e){return["type","payload","error","meta"].indexOf(e)>-1}function z(e){return""+e}function D(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}var R=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return c(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,d([void 0],e[0].concat(this)))):new(t.bind.apply(t,d([void 0],e.concat(this))))},t}(Array),j=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return c(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,d([void 0],e[0].concat(this)))):new(t.bind.apply(t,d([void 0],e.concat(this))))},t}(Array);function N(e){return(0,r.a6)(e)?(0,r.Ay)(e,(function(){})):e}function I(e){return"object"!==typeof e||null==e||Object.isFrozen(e)}function M(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}function F(e){var t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||_(e)}function L(e,t,n,r,o,i){var a;if(void 0===t&&(t=""),void 0===n&&(n=F),void 0===o&&(o=[]),!n(e))return{keyPath:t||"<root>",value:e};if("object"!==typeof e||null===e)return!1;if(null==i?void 0:i.has(e))return!1;for(var s=null!=r?r(e):Object.entries(e),l=o.length>0,c=function(e,s){var c=t?t+"."+e:e;if(l&&o.some((function(e){return e instanceof RegExp?e.test(c):c===e})))return"continue";return n(s)?"object"===typeof s&&(a=L(s,c,n,r,o,i))?{value:a}:void 0:{value:{keyPath:c,value:s}}},u=0,d=s;u<d.length;u++){var h=d[u],p=c(h[0],h[1]);if("object"===typeof p)return p.value}return i&&B(e)&&i.add(e),!1}function B(e){if(!Object.isFrozen(e))return!1;for(var t=0,n=Object.values(e);t<n.length;t++){var r=n[t];if("object"===typeof r&&null!==r&&!B(r))return!1}return!0}function U(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}function V(e){void 0===e&&(e={});var t=e.thunk,n=void 0===t||t,r=(e.immutableCheck,e.serializableCheck,e.actionCreatorCheck,new R);return n&&("boolean"===typeof n?r.push(l):r.push(l.withExtraArgument(n.extraArgument))),r}var q=!0;function H(e){var t,n=function(e){return V(e)},r=e||{},i=r.reducer,a=void 0===i?void 0:i,s=r.middleware,l=void 0===s?n():s,c=r.devTools,u=void 0===c||c,h=r.preloadedState,p=void 0===h?void 0:h,f=r.enhancers,m=void 0===f?void 0:f;if("function"===typeof a)t=a;else{if(!_(a))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=(0,o.HY)(a)}var g=l;if("function"===typeof g&&(g=g(n),!q&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!q&&g.some((function(e){return"function"!==typeof e})))throw new Error("each middleware provided to configureStore must be a function");var v=o.Tw.apply(void 0,g),b=o.Zz;u&&(b=k(y({trace:!q},"object"===typeof u&&u)));var x=new j(v),w=x;Array.isArray(m)?w=d([v],m):"function"===typeof m&&(w=m(x));var S=b.apply(void 0,w);return(0,o.y$)(t,p,S)}function W(e){var t,n={},r=[],o={addCase:function(e,t){var r="string"===typeof e?e:e.type;if(!r)throw new Error("`builder.addCase` cannot be called with an empty action type");if(r in n)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return n[r]=t,o},addMatcher:function(e,t){return r.push({matcher:e,reducer:t}),o},addDefaultCase:function(e){return t=e,o}};return e(o),[n,r,t]}function K(e,t,n,o){void 0===n&&(n=[]);var i,a="function"===typeof t?W(t):[t,n,o],s=a[0],l=a[1],c=a[2];if("function"===typeof e)i=function(){return N(e())};else{var u=N(e);i=function(){return u}}function h(e,t){void 0===e&&(e=i());var n=d([s[t.type]],l.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===n.filter((function(e){return!!e})).length&&(n=[c]),n.reduce((function(e,n){if(n){var o;if((0,r.Qx)(e))return void 0===(o=n(e,t))?e:o;if((0,r.a6)(e))return(0,r.Ay)(e,(function(e){return n(e,t)}));if(void 0===(o=n(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return o}return e}),e)}return h.getInitialState=i,h}function $(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n,r="function"==typeof e.initialState?e.initialState:N(e.initialState),o=e.reducers||{},i=Object.keys(o),a={},s={},l={};function c(){var t="function"===typeof e.extraReducers?W(e.extraReducers):[e.extraReducers],n=t[0],o=void 0===n?{}:n,i=t[1],a=void 0===i?[]:i,l=t[2],c=void 0===l?void 0:l,u=y(y({},o),s);return K(r,(function(e){for(var t in u)e.addCase(t,u[t]);for(var n=0,r=a;n<r.length;n++){var o=r[n];e.addMatcher(o.matcher,o.reducer)}c&&e.addDefaultCase(c)}))}return i.forEach((function(e){var n,r,i=o[e],c=t+"/"+e;"reducer"in i?(n=i.reducer,r=i.prepare):n=i,a[e]=n,s[c]=n,l[e]=r?E(c,r):E(c)})),{name:t,reducer:function(e,t){return n||(n=c()),n(e,t)},actions:l,caseReducers:a,getInitialState:function(){return n||(n=c()),n.getInitialState()}}}function Q(e){var t=G((function(t,n){return e(n)}));return function(e){return t(e,void 0)}}function G(e){return function(t,n){var o=function(t){O(n)?e(n.payload,t):e(n,t)};return(0,r.Qx)(t)?(o(t),t):(0,r.Ay)(t,o)}}function X(e,t){return t(e)}function Z(e){return Array.isArray(e)||(e=Object.values(e)),e}function Y(e,t,n){for(var r=[],o=[],i=0,a=e=Z(e);i<a.length;i++){var s=a[i],l=X(s,t);l in n.entities?o.push({id:l,changes:s}):r.push(s)}return[r,o]}function J(e){function t(t,n){var r=X(t,e);r in n.entities||(n.ids.push(r),n.entities[r]=t)}function n(e,n){for(var r=0,o=e=Z(e);r<o.length;r++){t(o[r],n)}}function r(t,n){var r=X(t,e);r in n.entities||n.ids.push(r),n.entities[r]=t}function o(e,t){var n=!1;e.forEach((function(e){e in t.entities&&(delete t.entities[e],n=!0)})),n&&(t.ids=t.ids.filter((function(e){return e in t.entities})))}function i(t,n){var r={},o={};if(t.forEach((function(e){e.id in n.entities&&(o[e.id]={id:e.id,changes:y(y({},o[e.id]?o[e.id].changes:null),e.changes)})})),(t=Object.values(o)).length>0){var i=t.filter((function(t){return function(t,n,r){var o=r.entities[n.id],i=Object.assign({},o,n.changes),a=X(i,e),s=a!==n.id;return s&&(t[n.id]=a,delete r.entities[n.id]),r.entities[a]=i,s}(r,t,n)})).length>0;i&&(n.ids=Object.keys(n.entities))}}function a(t,r){var o=Y(t,e,r),a=o[0];i(o[1],r),n(a,r)}return{removeAll:Q((function(e){Object.assign(e,{ids:[],entities:{}})})),addOne:G(t),addMany:G(n),setOne:G(r),setMany:G((function(e,t){for(var n=0,o=e=Z(e);n<o.length;n++){r(o[n],t)}})),setAll:G((function(e,t){e=Z(e),t.ids=[],t.entities={},n(e,t)})),updateOne:G((function(e,t){return i([e],t)})),updateMany:G(i),upsertOne:G((function(e,t){return a([e],t)})),upsertMany:G(a),removeOne:G((function(e,t){return o([e],t)})),removeMany:G(o)}}function ee(e){void 0===e&&(e={});var t=y({sortComparer:!1,selectId:function(e){return e.id}},e),n=t.selectId,r=t.sortComparer,o={getInitialState:function(e){return void 0===e&&(e={}),Object.assign({ids:[],entities:{}},e)}},i={getSelectors:function(e){var t=function(e){return e.ids},n=function(e){return e.entities},r=S(t,n,(function(e,t){return e.map((function(e){return t[e]}))})),o=function(e,t){return t},i=function(e,t){return e[t]},a=S(t,(function(e){return e.length}));if(!e)return{selectIds:t,selectEntities:n,selectAll:r,selectTotal:a,selectById:S(n,o,i)};var s=S(e,n);return{selectIds:S(e,t),selectEntities:s,selectAll:S(e,r),selectTotal:S(e,a),selectById:S(s,o,i)}}},a=r?function(e,t){var n=J(e);function r(t,n){var r=(t=Z(t)).filter((function(t){return!(X(t,e)in n.entities)}));0!==r.length&&s(r,n)}function o(e,t){0!==(e=Z(e)).length&&s(e,t)}function i(t,n){for(var r=!1,o=0,i=t;o<i.length;o++){var a=i[o],s=n.entities[a.id];if(s){r=!0,Object.assign(s,a.changes);var c=e(s);a.id!==c&&(delete n.entities[a.id],n.entities[c]=s)}}r&&l(n)}function a(t,n){var o=Y(t,e,n),a=o[0];i(o[1],n),r(a,n)}function s(t,n){t.forEach((function(t){n.entities[e(t)]=t})),l(n)}function l(n){var r=Object.values(n.entities);r.sort(t);var o=r.map(e);(function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(n.ids,o)||(n.ids=o)}return{removeOne:n.removeOne,removeMany:n.removeMany,removeAll:n.removeAll,addOne:G((function(e,t){return r([e],t)})),updateOne:G((function(e,t){return i([e],t)})),upsertOne:G((function(e,t){return a([e],t)})),setOne:G((function(e,t){return o([e],t)})),setMany:G(o),setAll:G((function(e,t){e=Z(e),t.entities={},t.ids=[],r(e,t)})),addMany:G(r),updateMany:G(i),upsertMany:G(a)}}(n,r):J(n);return y(y(y({selectId:n,sortComparer:r},o),i),a)}var te=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},ne=["name","message","stack","code"],re=function(e,t){this.payload=e,this.meta=t},oe=function(e,t){this.payload=e,this.meta=t},ie=function(e){if("object"===typeof e&&null!==e){for(var t={},n=0,r=ne;n<r.length;n++){var o=r[n];"string"===typeof e[o]&&(t[o]=e[o])}return t}return{message:String(e)}},ae=function(){function e(e,t,n){var r=E(e+"/fulfilled",(function(e,t,n,r){return{payload:e,meta:x(y({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),o=E(e+"/pending",(function(e,t,n){return{payload:void 0,meta:x(y({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),i=E(e+"/rejected",(function(e,t,r,o,i){return{payload:o,error:(n&&n.serializeError||ie)(e||"Rejected"),meta:x(y({},i||{}),{arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),a="undefined"!==typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return e.prototype.abort=function(){0},e}();return Object.assign((function(e){return function(s,l,c){var d,h=(null==n?void 0:n.idGenerator)?n.idGenerator(e):te(),p=new a;function f(e){d=e,p.abort()}var m=function(){return w(this,null,(function(){var a,m,g,v,b,y;return u(this,(function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),v=null==(a=null==n?void 0:n.condition)?void 0:a.call(n,e,{getState:l,extra:c}),null===(x=v)||"object"!==typeof x||"function"!==typeof x.then?[3,2]:[4,v];case 1:v=u.sent(),u.label=2;case 2:if(!1===v||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(e,t){return p.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:d||"Aborted"})}))})),s(o(h,e,null==(m=null==n?void 0:n.getPendingMeta)?void 0:m.call(n,{requestId:h,arg:e},{getState:l,extra:c}))),[4,Promise.race([b,Promise.resolve(t(e,{dispatch:s,getState:l,extra:c,requestId:h,signal:p.signal,abort:f,rejectWithValue:function(e,t){return new re(e,t)},fulfillWithValue:function(e,t){return new oe(e,t)}})).then((function(t){if(t instanceof re)throw t;return t instanceof oe?r(t.payload,h,e,t.meta):r(t,h,e)}))])];case 3:return g=u.sent(),[3,5];case 4:return y=u.sent(),g=y instanceof re?i(null,h,e,y.payload,y.meta):i(y,h,e),[3,5];case 5:return n&&!n.dispatchConditionRejection&&i.match(g)&&g.meta.condition||s(g),[2,g]}var x}))}))}();return Object.assign(m,{abort:f,requestId:h,arg:e,unwrap:function(){return m.then(se)}})}}),{pending:o,rejected:i,fulfilled:r,typePrefix:e})}return e.withTypes=function(){return e},e}();function se(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var le=function(e,t){return C(e)?e.match(t):e(t)};function ce(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.some((function(e){return le(e,t)}))}}function ue(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.every((function(e){return le(e,t)}))}}function de(e,t){if(!e||!e.meta)return!1;var n="string"===typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function he(e){return"function"===typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function pe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return de(e,["pending"])}:he(e)?function(t){var n=e.map((function(e){return e.pending}));return ce.apply(void 0,n)(t)}:pe()(e[0])}function fe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return de(e,["rejected"])}:he(e)?function(t){var n=e.map((function(e){return e.rejected}));return ce.apply(void 0,n)(t)}:fe()(e[0])}function me(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return e&&e.meta&&e.meta.rejectedWithValue};return 0===e.length||he(e)?function(t){return ue(fe.apply(void 0,e),n)(t)}:me()(e[0])}function ge(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return de(e,["fulfilled"])}:he(e)?function(t){var n=e.map((function(e){return e.fulfilled}));return ce.apply(void 0,n)(t)}:ge()(e[0])}function ve(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return de(e,["pending","fulfilled","rejected"])}:he(e)?function(t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push(i.pending,i.rejected,i.fulfilled)}return ce.apply(void 0,n)(t)}:ve()(e[0])}var be=function(e,t){if("function"!==typeof e)throw new TypeError(t+" is not a function")},ye=function(){},xe=function(e,t){return void 0===t&&(t=ye),e.catch(t),e},we=function(e,t){return e.addEventListener("abort",t,{once:!0}),function(){return e.removeEventListener("abort",t)}},Se=function(e,t){var n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},ke="listener",_e="completed",Ce="cancelled",Ee="task-"+Ce,Ae="task-"+_e,Te=ke+"-"+Ce,Oe=ke+"-"+_e,Pe=function(e){this.code=e,this.name="TaskAbortError",this.message="task "+Ce+" (reason: "+e+")"},ze=function(e){if(e.aborted)throw new Pe(e.reason)};function De(e,t){var n=ye;return new Promise((function(r,o){var i=function(){return o(new Pe(e.reason))};e.aborted?i():(n=we(e,i),t.finally((function(){return n()})).then(r,o))})).finally((function(){n=ye}))}var Re=function(e){return function(t){return xe(De(e,t).then((function(t){return ze(e),t})))}},je=function(e){var t=Re(e);return function(e){return t(new Promise((function(t){return setTimeout(t,e)})))}},Ne=Object.assign,Ie={},Me="listenerMiddleware",Fe=function(e,t){return function(n,r){be(n,"taskExecutor");var o,i=new AbortController;o=i,we(e,(function(){return Se(o,e.reason)}));var a,s,l=(a=function(){return w(void 0,null,(function(){var t;return u(this,(function(r){switch(r.label){case 0:return ze(e),ze(i.signal),[4,n({pause:Re(i.signal),delay:je(i.signal),signal:i.signal})];case 1:return t=r.sent(),ze(i.signal),[2,t]}}))}))},s=function(){return Se(i,Ae)},w(void 0,null,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,4,5]),[4,Promise.resolve()];case 1:return t.sent(),[4,a()];case 2:return[2,{status:"ok",value:t.sent()}];case 3:return[2,{status:(e=t.sent())instanceof Pe?"cancelled":"rejected",error:e}];case 4:return null==s||s(),[7];case 5:return[2]}}))})));return(null==r?void 0:r.autoJoin)&&t.push(l),{result:Re(e)(l),cancel:function(){Se(i,Ee)}}}},Le=function(e,t){return function(n,r){return xe(function(n,r){return w(void 0,null,(function(){var o,i,a,s;return u(this,(function(l){switch(l.label){case 0:ze(t),o=function(){},i=new Promise((function(t,r){var i=e({predicate:n,effect:function(e,n){n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});o=function(){i(),r()}})),a=[i],null!=r&&a.push(new Promise((function(e){return setTimeout(e,r,null)}))),l.label=1;case 1:return l.trys.push([1,,3,4]),[4,De(t,Promise.race(a))];case 2:return s=l.sent(),ze(t),[2,s];case 3:return o(),[7];case 4:return[2]}}))}))}(n,r))}},Be=function(e){var t=e.type,n=e.actionCreator,r=e.matcher,o=e.predicate,i=e.effect;if(t)o=E(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return be(i,"options.listener"),{predicate:o,type:t,effect:i}},Ue=function(e){var t=Be(e),n=t.type,r=t.predicate,o=t.effect;return{id:te(),effect:o,type:n,predicate:r,pending:new Set,unsubscribe:function(){throw new Error("Unsubscribe not initialized")}}},Ve=function(e){e.pending.forEach((function(e){Se(e,Te)}))},qe=function(e){return function(){e.forEach(Ve),e.clear()}},He=function(e,t,n){try{e(t,n)}catch(r){setTimeout((function(){throw r}),0)}},We=E(Me+"/add"),Ke=E(Me+"/removeAll"),$e=E(Me+"/remove"),Qe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error.apply(console,d([Me+"/error"],e))};function Ge(e){var t=this;void 0===e&&(e={});var n=new Map,r=e.extra,o=e.onError,i=void 0===o?Qe:o;be(i,"onError");var a=function(e){for(var t=0,r=Array.from(n.values());t<r.length;t++){var o=r[t];if(e(o))return o}},s=function(e){var t=a((function(t){return t.effect===e.effect}));return t||(t=Ue(e)),function(e){return e.unsubscribe=function(){return n.delete(e.id)},n.set(e.id,e),function(t){e.unsubscribe(),(null==t?void 0:t.cancelActive)&&Ve(e)}}(t)},l=function(e){var t=Be(e),n=t.type,r=t.effect,o=t.predicate,i=a((function(e){return("string"===typeof n?e.type===n:e.predicate===o)&&e.effect===r}));return i&&(i.unsubscribe(),e.cancelActive&&Ve(i)),!!i},c=function(e,o,a,l){return w(t,null,(function(){var t,c,d,h;return u(this,(function(u){switch(u.label){case 0:t=new AbortController,c=Le(s,t.signal),d=[],u.label=1;case 1:return u.trys.push([1,3,4,6]),e.pending.add(t),[4,Promise.resolve(e.effect(o,Ne({},a,{getOriginalState:l,condition:function(e,t){return c(e,t).then(Boolean)},take:c,delay:je(t.signal),pause:Re(t.signal),extra:r,signal:t.signal,fork:Fe(t.signal,d),unsubscribe:e.unsubscribe,subscribe:function(){n.set(e.id,e)},cancelActiveListeners:function(){e.pending.forEach((function(e,n,r){e!==t&&(Se(e,Te),r.delete(e))}))}})))];case 2:return u.sent(),[3,6];case 3:return(h=u.sent())instanceof Pe||He(i,h,{raisedBy:"effect"}),[3,6];case 4:return[4,Promise.allSettled(d)];case 5:return u.sent(),Se(t,Oe),e.pending.delete(t),[7];case 6:return[2]}}))}))},d=qe(n);return{middleware:function(e){return function(t){return function(r){if(!A(r))return t(r);if(We.match(r))return s(r.payload);if(!Ke.match(r)){if($e.match(r))return l(r.payload);var o,a=e.getState(),u=function(){if(a===Ie)throw new Error(Me+": getOriginalState can only be called synchronously");return a};try{if(o=t(r),n.size>0)for(var h=e.getState(),p=Array.from(n.values()),f=0,m=p;f<m.length;f++){var g=m[f],v=!1;try{v=g.predicate(r,h,a)}catch(b){v=!1,He(i,b,{raisedBy:"predicate"})}v&&c(g,r,e,u)}}finally{a=Ie}return o}d()}}},startListening:s,stopListening:l,clearListeners:d}}var Xe,Ze="RTK_autoBatch",Ye=function(){return function(e){var t;return{payload:e,meta:(t={},t[Ze]=!0,t)}}},Je="function"===typeof queueMicrotask?queueMicrotask.bind("undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:globalThis):function(e){return(Xe||(Xe=Promise.resolve())).then(e).catch((function(e){return setTimeout((function(){throw e}),0)}))},et=function(e){return function(t){setTimeout(t,e)}},tt="undefined"!==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:et(10),nt=function(e){return void 0===e&&(e={type:"raf"}),function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.apply(void 0,n),i=!0,a=!1,s=!1,l=new Set,c="tick"===e.type?Je:"raf"===e.type?tt:"callback"===e.type?e.queueNotification:et(e.timeout),u=function(){s=!1,a&&(a=!1,l.forEach((function(e){return e()})))};return Object.assign({},o,{subscribe:function(e){var t=o.subscribe((function(){return i&&e()}));return l.add(e),function(){t(),l.delete(e)}},dispatch:function(e){var t;try{return i=!(null==(t=null==e?void 0:e.meta)?void 0:t[Ze]),(a=!i)&&(s||(s=!0,c(u))),o.dispatch(e)}finally{i=!0}}})}}};(0,r.rF)()},9885:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(4067);const o=n(4306).A["__core-js_shared__"];var i=function(){var e=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();const a=function(e){return!!i&&i in e};var s=n(7664),l=n(6166),c=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,h=u.toString,p=d.hasOwnProperty,f=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(e){return!(!(0,s.A)(e)||a(e))&&((0,r.A)(e)?f:c).test((0,l.A)(e))};const g=function(e,t){return null==e?void 0:e[t]};const v=function(e,t){var n=g(e,t);return m(n)?n:void 0}},9989:e=>{"use strict";var t=!("undefined"===typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},9993:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(4802),o=n(3903),i=n(3239),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;const s=function(e){return(0,i.A)(e)&&(0,o.A)(e.length)&&!!a[(0,r.A)(e)]};var l=n(7328),c=n(8187),u="object"==typeof exports&&exports&&!exports.nodeType&&exports,d=u&&"object"==typeof module&&module&&!module.nodeType&&module,h=d&&d.exports===u&&c.A.process,p=function(){try{var e=d&&d.require&&d.require("util").types;return e||h&&h.binding&&h.binding("util")}catch(t){}}();var f=p&&p.isTypedArray;const m=f?(0,l.A)(f):s}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.d(r,{default:()=>Iv});var e=n(4391),t=n(5137);const o=globalThis,i=o.ShadowRoot&&(void 0===o.ShadyCSS||o.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),s=new WeakMap;let l=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=s.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&s.set(t,e))}return e}toString(){return this.cssText}};const c=e=>new l("string"==typeof e?e:e+"",void 0,a),u=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];const o=1===e.length?e[0]:n.reduce(((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[r+1]),e[0]);return new l(o,e,a)},d=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return c(t)})(e):e,{is:h,defineProperty:p,getOwnPropertyDescriptor:f,getOwnPropertyNames:m,getOwnPropertySymbols:g,getPrototypeOf:v}=Object,b=globalThis,y=b.trustedTypes,x=y?y.emptyScript:"",w=b.reactiveElementPolyfillSupport,S=(e,t)=>e,k={toAttribute(e,t){switch(t){case Boolean:e=e?x:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},_=(e,t)=>!h(e,t),C={attribute:!0,type:String,converter:k,reflect:!1,useDefault:!1,hasChanged:_};Symbol.metadata??=Symbol("metadata"),b.litPropertyMetadata??=new WeakMap;let E=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C;if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(e,n,t);void 0!==r&&p(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){const{get:r,set:o}=f(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){const i=r?.call(this);o?.call(this,t),this.requestUpdate(e,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??C}static _$Ei(){if(this.hasOwnProperty(S("elementProperties")))return;const e=v(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(S("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(S("properties"))){const e=this.properties,t=[...m(e),...g(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const e=this._$Eu(t,n);void 0!==e&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(d(e))}else void 0!==e&&t.push(d(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(i)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const n of t){const t=document.createElement("style"),r=o.litNonce;void 0!==r&&t.setAttribute("nonce",r),t.textContent=n.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){const n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(void 0!==r&&!0===n.reflect){const o=(void 0!==n.converter?.toAttribute?n.converter:k).toAttribute(t,n.type);this._$Em=e,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(e,t){const n=this.constructor,r=n._$Eh.get(e);if(void 0!==r&&this._$Em!==r){const e=n.getPropertyOptions(r),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:k;this._$Em=r;const i=o.fromAttribute(t,e.type);this[r]=i??this._$Ej?.get(r)??i,this._$Em=null}}requestUpdate(e,t,n){if(void 0!==e){const r=this.constructor,o=this[e];if(n??=r.getPropertyOptions(e),!((n.hasChanged??_)(o,t)||n.useDefault&&n.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,n,r){let{useDefault:o,reflect:i,wrapped:a}=n;o&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,r??t??this[e]),!0!==a||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),!0===i&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e){const{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||void 0===r||this.C(t,void 0,n,r)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EM()}catch(Oe){throw e=!1,this._$EM(),Oe}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}};E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[S("elementProperties")]=new Map,E[S("finalized")]=new Map,w?.({ReactiveElement:E}),(b.reactiveElementVersions??=[]).push("2.1.1");const A=globalThis,T=A.trustedTypes,O=T?T.createPolicy("lit-html",{createHTML:e=>e}):void 0,P="$lit$",z=`lit$${Math.random().toFixed(9).slice(2)}$`,D="?"+z,R=`<${D}>`,j=document,N=()=>j.createComment(""),I=e=>null===e||"object"!=typeof e&&"function"!=typeof e,M=Array.isArray,F="[ \t\n\f\r]",L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,U=/>/g,V=RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),q=/'/g,H=/"/g,W=/^(?:script|style|textarea|title)$/i,K=e=>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{_$litType$:e,strings:t,values:r}},$=K(1),Q=(K(2),Symbol.for("lit-noChange")),G=Symbol.for("lit-nothing"),X=new WeakMap,Z=j.createTreeWalker(j,129);function Y(e,t){if(!M(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==O?O.createHTML(t):t}class J{constructor(e,t){let n,{strings:r,_$litType$:o}=e;this.parts=[];let i=0,a=0;const s=r.length-1,l=this.parts,[c,u]=((e,t)=>{const n=e.length-1,r=[];let o,i=2===t?"<svg>":3===t?"<math>":"",a=L;for(let s=0;s<n;s++){const t=e[s];let n,l,c=-1,u=0;for(;u<t.length&&(a.lastIndex=u,l=a.exec(t),null!==l);)u=a.lastIndex,a===L?"!--"===l[1]?a=B:void 0!==l[1]?a=U:void 0!==l[2]?(W.test(l[2])&&(o=RegExp("</"+l[2],"g")),a=V):void 0!==l[3]&&(a=V):a===V?">"===l[0]?(a=o??L,c=-1):void 0===l[1]?c=-2:(c=a.lastIndex-l[2].length,n=l[1],a=void 0===l[3]?V:'"'===l[3]?H:q):a===H||a===q?a=V:a===B||a===U?a=L:(a=V,o=void 0);const d=a===V&&e[s+1].startsWith("/>")?" ":"";i+=a===L?t+R:c>=0?(r.push(n),t.slice(0,c)+P+t.slice(c)+z+d):t+z+(-2===c?s:d)}return[Y(e,i+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),r]})(r,o);if(this.el=J.createElement(c,t),Z.currentNode=this.el.content,2===o||3===o){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=Z.nextNode())&&l.length<s;){if(1===n.nodeType){if(n.hasAttributes())for(const e of n.getAttributeNames())if(e.endsWith(P)){const t=u[a++],r=n.getAttribute(e).split(z),o=/([.?@])?(.*)/.exec(t);l.push({type:1,index:i,name:o[2],strings:r,ctor:"."===o[1]?oe:"?"===o[1]?ie:"@"===o[1]?ae:re}),n.removeAttribute(e)}else e.startsWith(z)&&(l.push({type:6,index:i}),n.removeAttribute(e));if(W.test(n.tagName)){const e=n.textContent.split(z),t=e.length-1;if(t>0){n.textContent=T?T.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],N()),Z.nextNode(),l.push({type:2,index:++i});n.append(e[t],N())}}}else if(8===n.nodeType)if(n.data===D)l.push({type:2,index:i});else{let e=-1;for(;-1!==(e=n.data.indexOf(z,e+1));)l.push({type:7,index:i}),e+=z.length-1}i++}}static createElement(e,t){const n=j.createElement("template");return n.innerHTML=e,n}}function ee(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3?arguments[3]:void 0;if(t===Q)return t;let o=void 0!==r?n._$Co?.[r]:n._$Cl;const i=I(t)?void 0:t._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(!1),void 0===i?o=void 0:(o=new i(e),o._$AT(e,n,r)),void 0!==r?(n._$Co??=[])[r]=o:n._$Cl=o),void 0!==o&&(t=ee(e,o._$AS(e,t.values),o,r)),t}class te{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??j).importNode(t,!0);Z.currentNode=r;let o=Z.nextNode(),i=0,a=0,s=n[0];for(;void 0!==s;){if(i===s.index){let t;2===s.type?t=new ne(o,o.nextSibling,this,e):1===s.type?t=new s.ctor(o,s.name,s.strings,this,e):6===s.type&&(t=new se(o,this,e)),this._$AV.push(t),s=n[++a]}i!==s?.index&&(o=Z.nextNode(),i++)}return Z.currentNode=j,r}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class ne{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e){e=ee(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),I(e)?e===G||null==e||""===e?(this._$AH!==G&&this._$AR(),this._$AH=G):e!==this._$AH&&e!==Q&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>M(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==G&&I(this._$AH)?this._$AA.nextSibling.data=e:this.T(j.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:n}=e,r="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=J.createElement(Y(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{const e=new te(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=X.get(e.strings);return void 0===t&&X.set(e.strings,t=new J(e)),t}k(e){M(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,r=0;for(const o of e)r===t.length?t.push(n=new ne(this.O(N()),this.O(N()),this,this.options)):n=t[r],n._$AI(o),r++;r<t.length&&(this._$AR(n&&n._$AB.nextSibling,r),t.length=r)}_$AR(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,t=arguments.length>1?arguments[1]:void 0;for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class re{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,o){this.type=1,this._$AH=G,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=G}_$AI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const o=this.strings;let i=!1;if(void 0===o)e=ee(this,e,t,0),i=!I(e)||e!==this._$AH&&e!==Q,i&&(this._$AH=e);else{const r=e;let a,s;for(e=o[0],a=0;a<o.length-1;a++)s=ee(this,r[n+a],t,a),s===Q&&(s=this._$AH[a]),i||=!I(s)||s!==this._$AH[a],s===G?e=G:e!==G&&(e+=(s??"")+o[a+1]),this._$AH[a]=s}i&&!r&&this.j(e)}j(e){e===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class oe extends re{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===G?void 0:e}}class ie extends re{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==G)}}class ae extends re{constructor(e,t,n,r,o){super(e,t,n,r,o),this.type=5}_$AI(e){if((e=ee(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,0)??G)===Q)return;const t=this._$AH,n=e===G&&t!==G||e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive,r=e!==G&&(t===G||n);n&&this.element.removeEventListener(this.name,this,t),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class se{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){ee(this,e)}}const le={I:ne},ce=A.litHtmlPolyfillSupport;ce?.(J,ne),(A.litHtmlVersions??=[]).push("3.3.1");const ue=globalThis;class de extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{const r=n?.renderBefore??t;let o=r._$litPart$;if(void 0===o){const e=n?.renderBefore??null;r._$litPart$=o=new ne(t.insertBefore(N(),e),e,void 0,n??{})}return o._$AI(e),o})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Q}}de._$litElement$=!0,de.finalized=!0,ue.litElementHydrateSupport?.({LitElement:de});const he=ue.litElementPolyfillSupport;he?.({LitElement:de}),(ue.litElementVersions??=[]).push("4.2.1");const pe={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:_};function fe(e){return(t,n)=>"object"==typeof n?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const{kind:r,metadata:o}=n;let i=globalThis.litPropertyMetadata.get(o);if(void 0===i&&globalThis.litPropertyMetadata.set(o,i=new Map),"setter"===r&&((e=Object.create(e)).wrapped=!0),i.set(n.name,e),"accessor"===r){const{name:r}=n;return{set(n){const o=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,o,e)},init(t){return void 0!==t&&this.C(r,void 0,e,t),t}}}if("setter"===r){const{name:r}=n;return function(n){const o=this[r];t.call(this,n),this.requestUpdate(r,o,e)}}throw Error("Unsupported decorator location: "+r)}(e,t,n):((e,t,n)=>{const r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}var me=Object.defineProperty,ge=(e,t,n,r)=>{for(var o,i=void 0,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);return i&&me(t,n,i),i};const ve=class extends de{constructor(){super(),this.preRender=!1,Object.entries(this.constructor.dependencies).forEach((e=>{let[t,n]=e;this.constructor.define(t,n)}))}emit(e,t){const n=new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:{},...t});return this.dispatchEvent(n),n}static define(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=customElements.get(e);if(!r){try{customElements.define(e,t,n)}catch{customElements.define(e,class extends t{},n)}return}let o=" (unknown version)",i=o;"version"in t&&t.version&&(o=" v"+t.version),"version"in r&&r.version&&(i=" v"+r.version),(!o||!i||o!==i)&&console.warn(`Attempted to register <${e}>${o}, but <${e}>${i} has already been registered.`)}static createProperty(e,t){super.createProperty(e,t),t?.attribute&&"string"==typeof t.attribute&&!Object.prototype.hasOwnProperty.call(this.prototype,t.attribute)&&Object.prototype.hasOwnProperty.call(this.prototype,e)&&Object.defineProperty(this.prototype,t.attribute,{get(){return this[e]},set(t){this[e]=t}})}firstUpdated(e){super.firstUpdated(e),!this.preRender&&this.runFirstUpdated(e)}runFirstUpdated(e){}adoptedCallback(){ye(this)}disconnectedCallback(){super.disconnectedCallback(),ye(this)}};ve.version="1",ve.dependencies={};let be=ve;function ye(e){if(e instanceof be)return;const t=e.localName||e.tagName,n=customElements.get(t.toLowerCase());n&&Object.setPrototypeOf(e,n.prototype)}ge([fe()],be.prototype,"dir"),ge([fe()],be.prototype,"lang"),ge([fe({attribute:"pre-render",type:Boolean})],be.prototype,"preRender");const xe=e=>t=>"function"==typeof t?((e,t)=>(window.customElements.get(e)||window.customElements.define(e,t),t))(e,t):((e,t)=>{const{elements:n,kind:r}=t;return{elements:n,finisher(t){window.customElements.get(e)||window.customElements.define(e,t)},kind:r}})(e,t),we=u`
1040
+ `;var Hr=n(2246);const Wr={containerSize:{width:0,height:0},currentCount:0,currentFolder:Nt,defaultPageSize:Ut.md,facets:[],hasScrolled:!1,isLoading:!1,isSeeThrough:!0,openBrowser:!1,start:0,pageSize:0,maxPageSize:0,searchText:"",selectedFacets:{},shouldResetFilters:!0,sortDirection:void 0,sortOrder:"",totalCount:0,view:Qt.gf.Medium},Kr=(e,t)=>{const n={start:0,pageSize:e.maxPageSize};switch(t.type){case"SET_CONTAINER_SIZE":return{...e,containerSize:t.payload};case"SET_CURRENT_COUNT":return{...e,currentCount:t.payload};case"SET_CURRENT_FOLDER":return{...e,currentFolder:t.payload.folder,shouldResetFilters:!!t.payload.shouldResetFilters,...n};case"SET_FACETS":return{...e,facets:t.payload};case"SET_FILTERS":return{...e,selectedFacets:t.payload,shouldResetFilters:!1,...n};case"SET_HAS_SCROLLED":return{...e,hasScrolled:t.payload};case"SET_IS_LOADING":return{...e,isLoading:t.payload};case"SET_IS_SEE_THROUGH":return{...e,isSeeThrough:t.payload,...n};case"SET_OPEN_BROWSER":return{...e,openBrowser:t.payload};case"SET_START":return{...e,start:t.payload,pageSize:e.defaultPageSize};case"SET_PAGE_SIZE":{const n={...e,pageSize:t.payload.pageSize,maxPageSize:t.payload.pageSize};return t.payload.returnToFirstPage&&(n.start=0),n}case"SET_SEARCH_TEXT":return{...e,...n,searchText:t.payload};case"SET_SORT_DIRECTION":return{...e,...n,sortDirection:t.payload};case"SET_SORT_ORDER":return{...e,...n,sortOrder:t.payload};case"SET_TOTAL_COUNT":return{...e,totalCount:t.payload};case"SET_VIEW":{let n=Ut.md;switch(t.payload){case Qt.gf.Large:n=15;break;case Qt.gf.Medium:n=20;break;case Qt.gf.Small:n=30}return{...e,view:t.payload,defaultPageSize:n}}case"RESET_SEARCH":return{...e,currentCount:0,currentFolder:Nt,searchText:"",totalCount:0};default:return e}},$r=()=>{var e;const[t,n]=(0,wt.useReducer)(Kr,Wr),r=(0,Fr.GV)(Br.jT),o=(0,Fr.GV)(Br.wL),i=(0,Fr.GV)(Lr.OC),{allowedExtensions:a,allowedFolders:s,allowFavorites:l,allowPin:c,allowProxy:u,allowTracking:d,availableDocTypes:h,availableRepresentativeSubtypes:p,ctaText:f,lastLocationMode:m,persistMode:g,showCollections:v,showFavoriteFolder:b,showVersions:y,defaultGridView:x}=(0,wt.useContext)(ar.t),{extraFields:w,onAssetAction:S,onAssetSelected:k,onClose:_}=(0,wt.useContext)(zt.B),{data:C,isFetching:E,isError:A}=(0,Rt.aM)(i?{id:i,useSession:o}:Ft.hT),T=(0,wt.useMemo)((()=>C&&i&&C.recordId===i?C:null),[C,i]),{data:O,isFetching:P,isLoading:z,refetch:D}=(0,Ur.X)({});(0,wt.useEffect)((()=>{r&&D()}),[r,D]);const{data:R,isFetching:j,isError:N}=(0,Yn.t$)(T?{assetImages:T?[T]:[],useSession:o}:Ft.hT),{data:I}=(0,Yn.jS)({useSession:o}),{data:M}=(0,Yn.M$)({useSession:o}),{ATSEnabled:F,autoExtension:L=".auto",collectionPath:B,supportedExtensions:U,supportedRepresentativeSubtypes:V}=M||{},{data:q}=(0,Yn.ZP)({useSession:o}),{data:H}=(0,Yn.nb)({useSession:o}),{data:W,refetch:K}=(0,Rt.E7)(T&&l?{recordId:T.id}:Ft.hT),[$,Q]=(0,wt.useState)(!1),[G,X]=(0,wt.useState)(!1),[Z,Y]=(0,wt.useState)(sn.EI.Hide),[J,ee]=(0,wt.useState)(0),[te,ne]=(0,wt.useState)(!1),[re,oe]=(0,wt.useState)(!1),ie=(0,wt.useRef)($),ae=(0,wt.useRef)(null),le=(0,wt.useRef)(null),ce=(0,wt.useRef)(null),ue=(0,wt.useRef)(!1),de=(0,wt.useRef)([]),he=(0,wt.useRef)({}),pe=(0,Fr.jL)(),fe=(0,wt.useRef)(t.pageSize),me=(0,wt.useRef)(t.view),ge=(0,wt.useRef)(!1),ve=(0,wt.useRef)(null);ie.current=$,de.current=t.facets,he.current=t.selectedFacets,me.current=t.view,fe.current=t.pageSize;const be=(0,wt.useRef)(null),ye=(0,wt.useMemo)((()=>t.selectedFacets.Types&&t.selectedFacets.Types.length>0?t.selectedFacets.Types:["*"]),[t.selectedFacets]),xe=(0,wt.useMemo)((()=>!(null!==ye&&void 0!==ye&&ye.length)||0===ye.length),[ye]),we=(0,wt.useMemo)((()=>{var e;if(!q)return;const r=null===(e=Object.values(q).find((e=>e.some((e=>e.isDefault)))))||void 0===e?void 0:e[0];return t.sortOrder&&q[t.sortOrder]&&0!==q[t.sortOrder].length?1===q[t.sortOrder].length?q[t.sortOrder][0]:q[t.sortOrder].find((e=>{let{sortDirection:n}=e;return n.toLowerCase()===t.sortDirection})):(r&&(n({type:"SET_SORT_DIRECTION",payload:r.sortDirection.toLowerCase()}),n({type:"SET_SORT_ORDER",payload:r.sortDirectionGroupKey.toLowerCase()})),r)}),[q,t.sortDirection,t.sortOrder]),Se=(0,wt.useMemo)((()=>null===R||void 0===R?void 0:R.proxies.filter((e=>{if(!a||0===a.length)return!0;let t="";if(e.extension)t=e.extension.replace(".","");else{var n;const r=null===(n=e.permanentLink)||void 0===n?void 0:n.split(".").at(-1);t=null!==r&&void 0!==r?r:""}return a.some((e=>!!t&&t.toLowerCase()===e.toLowerCase()))}))),[R,a]),_e=(0,wt.useMemo)((()=>G&&q&&(null===ye||void 0===ye?void 0:ye.length)&&$),[G,q,ye,$]),{data:Ce,isFetching:Ee,isError:Ae,refetch:Te}=(0,Rt.pf)(_e?{folderID:t.currentFolder.id,isSeeThrough:t.isSeeThrough,limitedToDocTypes:h,pageSize:t.pageSize,searchText:t.searchText,selectedFacets:t.selectedFacets,sortOrder:null===we||void 0===we?void 0:we.id,start:t.start,useSession:o}:Ft.hT);(0,wt.useEffect)((()=>{var e;ee(null!==(e=null===Ce||void 0===Ce?void 0:Ce.items.length)&&void 0!==e?e:0)}),[null===Ce||void 0===Ce?void 0:Ce.items.length]),(0,wt.useEffect)((()=>{A&&pe((0,Lr.DM)(null))}),[pe,A]),(0,wt.useEffect)((()=>{S&&null!==T&&void 0!==T&&T.recordId&&S("select",T.recordId)}),[S,T]),(0,wt.useEffect)((()=>{let e=null;return Ee?n({type:"SET_IS_LOADING",payload:!0}):e=setTimeout((()=>{n({type:"SET_IS_LOADING",payload:Ee})}),200),()=>{e&&clearTimeout(e)}}),[Ee]),(0,wt.useEffect)((()=>{r&&(pe((0,Lr.DM)(null)),n({type:"RESET_SEARCH"}),Promise.all([(0,Mt.bQ)("selectedSortOrder"),(0,Mt.bQ)("selectedSortDirection"),(0,Mt.bQ)("selectedView"),(0,Mt.bQ)("newFacets"),(0,Mt.bQ)("selectedFilter"),(0,Mt.bQ)("selectedIsSeeThrough"),(0,Mt.bQ)("searchText")]).then((e=>{let[t,r,o,i,a,s,l]=e;if(t&&n({type:"SET_SORT_ORDER",payload:t}),"ascending"!==r&&"descending"!==r||n({type:"SET_SORT_DIRECTION",payload:r}),null===o&&(o=x),"string"===typeof o&&(Object.values(Qt.gf).includes(o)?n({type:"SET_VIEW",payload:o}):n({type:"SET_VIEW",payload:Qt.gf.Medium})),m){if(i){const e=JSON.parse(i);(0,Ge.A)(e)?n({type:"SET_FACETS",payload:e}):n({type:"SET_FACETS",payload:[]})}if(a){const e=JSON.parse(a);n(e?{type:"SET_FILTERS",payload:xt(e,Ge.A)}:{type:"SET_FILTERS",payload:{}})}s&&n({type:"SET_IS_SEE_THROUGH",payload:"true"===s}),l&&n({type:"SET_SEARCH_TEXT",payload:l})}ue.current=!0,oe(!0)})))}),[pe,r,m,x]),(0,wt.useEffect)((()=>{let e=null;const t=ae.current;if(!t)return;const n=t.offsetWidth;return t.style.width=n-1+"px",e=setTimeout((()=>{t.style.width="100%"}),50),()=>{e&&clearTimeout(e)}}),[r]),(0,wt.useEffect)((()=>{const e=ce.current;if(!e)return;ae.current&&n({type:"SET_CONTAINER_SIZE",payload:{width:ae.current.offsetWidth,height:ae.current.offsetHeight}});const t=e=>{const t=e.detail.entries;window.requestAnimationFrame((()=>{Array.isArray(t)&&t.length&&t[0].target===ae.current&&n({type:"SET_CONTAINER_SIZE",payload:{width:t[0].contentRect.width,height:t[0].contentRect.height}})}))};return e.addEventListener("cx-resize",t),()=>{e.removeEventListener("cx-resize",t)}}),[re]),(0,wt.useEffect)((()=>{!we&&ue.current&&n({type:"SET_SORT_ORDER",payload:Wr.sortOrder})}),[we,q]),(0,wt.useEffect)((()=>{ue.current&&((0,Mt.yt)("selectedSortOrder",t.sortOrder),t.sortDirection&&(0,Mt.yt)("selectedSortDirection",t.sortDirection),(0,Mt.yt)("selectedView",t.view),(0,Mt.yt)("newFacets",JSON.stringify(t.facets)),(0,Mt.yt)("selectedFilter",JSON.stringify(t.selectedFacets)),(0,Mt.yt)("selectedIsSeeThrough",t.isSeeThrough.toString()),(0,Mt.yt)("searchText",t.searchText))}),[t.currentFolder,t.facets,t.isSeeThrough,t.sortDirection,t.sortOrder,t.searchText,t.view,t.selectedFacets]);const Oe=t.containerSize.width>0&&t.containerSize.width<=Ut.Pm,Pe=e=>{pe((0,Lr.DM)(e.recordId))},ze=(0,wt.useCallback)((e=>{pe((0,Lr.DM)(null)),n({type:"SET_SEARCH_TEXT",payload:e})}),[pe]),De=(0,wt.useRef)(0),Re=(0,wt.useRef)(0),je=(0,wt.useRef)(t.defaultPageSize);je.current=t.defaultPageSize;const Ne=(0,wt.useCallback)(((e,t)=>{var r;const{width:o,height:i}=e,a=o||0,s=i||0;if(a*s===0||!ue.current)return;const l=De.current,c=Re.current;if(Math.abs(l-s)<10&&Math.abs(c-a)<10&&(null===t||void 0===t||!t.force))return;De.current=s,Re.current=a;const u=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--cx-spacing-medium")||"16",10),d=(null===(r=Rr[me.current])||void 0===r?void 0:r.minWidth)||Rr[Qt.gf.Large].minWidth,h=Math.max(1,Math.floor((a+u)/(d+u))),p=Math.ceil(s/(d+u)),f=Math.ceil(p*h/je.current+1)*je.current;X(!0),f!==fe.current&&0!==f&&n({type:"SET_PAGE_SIZE",payload:{pageSize:f,returnToFirstPage:!(null===t||void 0===t||!t.returnToFirstPage)}})}),[]),Ie=(0,wt.useMemo)((()=>ke(Ne,Ut.h,{leading:!1})),[Ne]);(0,wt.useEffect)((()=>{if(ue.current){const e=le.current;me.current=t.view,e&&Ie({width:e.clientWidth,height:e.clientHeight},{returnToFirstPage:!0,force:!0})}}),[Ie,t.view]);const Me=(0,wt.useCallback)(((e,t)=>{switch(e){case"view":n({type:"SET_VIEW",payload:t});break;case"sortDirection":n({type:"SET_SORT_DIRECTION",payload:t});break;case"sortOrder":n({type:"SET_SORT_ORDER",payload:t.toString()});break;case"isSeeThrough":n({type:"SET_IS_SEE_THROUGH",payload:Boolean(t)});break;case"filter":n({type:"SET_FILTERS",payload:t})}}),[]),Fe=(0,wt.useCallback)((e=>{n({type:"SET_CURRENT_COUNT",payload:e.currentCount}),n({type:"SET_TOTAL_COUNT",payload:e.totalCount}),n({type:"SET_FACETS",payload:e.facets})}),[]),Le=(0,wt.useCallback)((async e=>{ie.current||Q(!0);const t=await pe(It(e));It.fulfilled.match(t)&&(n({type:"SET_CURRENT_FOLDER",payload:{folder:e,shouldResetFilters:ie.current}}),te||n({type:"SET_OPEN_BROWSER",payload:!1}),pe((0,Lr.DM)(null)),(0,Mt.yt)("lastLocation",JSON.stringify(e)))}),[pe,te]),Be=(0,wt.useCallback)((()=>{ge.current?ge.current=!1:n({type:"SET_START",payload:null!==J&&void 0!==J?J:0})}),[J]),Ue=(0,wt.useCallback)((e=>{if(!e.target)return;const t=e.target.scrollTop;n(0===t?{type:"SET_HAS_SCROLLED",payload:!1}:{type:"SET_HAS_SCROLLED",payload:!0})}),[]),Ve=(0,wt.useCallback)((async(e,t,n)=>{const r=[...e];Dt.Yq.forEach((e=>{const o=se(e);var i,a,s,l,c,u,d,h,p,f;T&&null!==w&&void 0!==w&&w.includes(e)&&(r[0]={...r[0],extraFields:{...(null===(i=r[0])||void 0===i?void 0:i.extraFields)||{},[e]:T[o]}});n?r[0]={...r[0],assetTransformationSource:t,assetLinkInfo:{extension:n.extension,isCustomFormat:null===(a=n.isCustomFormat)||void 0===a||a,permanentLink:r[0].imageUrl,width:n.width,height:n.height}}:r[0]={...r[0],assetLinkInfo:{cdnName:null!==(s=null===t||void 0===t?void 0:t.cdnName)&&void 0!==s?s:null,extension:null!==(l=null===t||void 0===t?void 0:t.extension)&&void 0!==l?l:null,isCustomFormat:null!==(c=null===t||void 0===t?void 0:t.isCustomFormat)&&void 0!==c&&c,permanentLink:null!==(u=r[0].imageUrl)&&void 0!==u?u:null,proxyLabel:null!==(d=null===t||void 0===t?void 0:t.proxyLabel)&&void 0!==d?d:null,proxyName:null!==(h=null===t||void 0===t?void 0:t.proxyName)&&void 0!==h?h:null,width:null!==(p=null===t||void 0===t?void 0:t.width)&&void 0!==p?p:null,height:null!==(f=null===t||void 0===t?void 0:t.height)&&void 0!==f?f:null}}}));const o=k(r);if("object"===typeof(i=o)&&null!==i&&"function"===typeof i.then)try{await o}catch(a){return void console.error("Error in onAssetSelected:",a)}var i;g||null===_||void 0===_||_()}),[w,k,_,g,T]),qe=(0,wt.useMemo)((()=>!!Ce&&t.start+t.pageSize<t.totalCount),[Ce,t.pageSize,t.start,t.totalCount]);(0,wt.useEffect)((()=>{if(Fe){var e,t,n,r,o;const i=new Map(de.current.map((e=>[`${e.facetDetails.facetFieldName}|${e.facetDetails.displayName}`,{...e,values:e.values.reduce(((t,n)=>{var r;return(null===(r=he.current[e.facetDetails.facetFieldName])||void 0===r?void 0:r.find((e=>e===n.value)))&&t.push({...n,count:0}),t}),[])}])));(null!==(e=null===Ce||void 0===Ce||null===(t=Ce.facets)||void 0===t?void 0:t.filter((e=>e.values.length>0)))&&void 0!==e?e:[]).forEach((e=>{var t;const n=i.get(`${e.facetDetails.facetFieldName}|${e.facetDetails.displayName}`),r=[...e.values,...null!==(t=null===n||void 0===n?void 0:n.values.filter((t=>!(null!==e&&void 0!==e&&e.values.find((e=>t.value===e.value&&t.displayValue===e.displayValue))))))&&void 0!==t?t:[]];i.set(`${e.facetDetails.facetFieldName}|${e.facetDetails.displayName}`,{...e,values:r})})),Fe({currentCount:null!==(n=null===Ce||void 0===Ce?void 0:Ce.items.length)&&void 0!==n?n:0,items:null!==(r=null===Ce||void 0===Ce?void 0:Ce.items)&&void 0!==r?r:[],facets:Array.from(i.values()),totalCount:null!==(o=null===Ce||void 0===Ce?void 0:Ce.totalCount)&&void 0!==o?o:0})}}),[Ce,Fe]),(0,wt.useEffect)((()=>{const e=()=>{ge.current=!0,ve.current&&clearTimeout(ve.current),ve.current=setTimeout((()=>{ge.current=!1}),Ut.h)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]),(0,wt.useEffect)((()=>{const e=be.current,t=()=>{e&&window.clearTimeout(e)};return t(),E||j?(Y(sn.EI.Hide),be.current=window.setTimeout((()=>{Y(sn.EI.ShowLoader)}),800)):E||j||!(null!==R&&void 0!==R&&R.proxies||N)||be.current&&(t(),Y(sn.EI.ShowDialog)),()=>{t()}}),[R,N,j,E]),(0,wt.useEffect)((()=>{T||Y(sn.EI.ShowDialog)}),[T]);const He=(0,wt.useMemo)((()=>I&&a&&0!==a.length?Object.entries(I).reduce(((e,t)=>{let[n,r]=t;return{...e,[n]:r.filter((e=>!a||0===a.length||a.some((t=>e.value.toLowerCase()===`.${t.toLowerCase()}`))))}}),I):I),[I,a]),We=t.containerSize.width<650;return re?(0,Vt.jsx)("cx-resize-observer",{ref:ce,children:(0,Vt.jsxs)(Vr,{ref:ae,className:"cbsdk__home",children:[(0,Vt.jsx)(Jt,{allowedFolders:s,allowPin:c,collectionPath:B,currentFolder:t.currentFolder,favoriteFolderId:null===O||void 0===O?void 0:O.favoriteFolderRecordID,lastLocationMode:m,open:t.openBrowser,showCollections:v,showFavoriteFolder:b,useSession:o,onFolderSelect:Le,onClose:()=>n({type:"SET_OPEN_BROWSER",payload:!1}),isPersistent:te,onChangePersistent:ne,forceOverlay:We,damViewSeeThru:t.isSeeThrough}),(0,Vt.jsxs)(qr,{children:[(0,Vt.jsx)(lr,{bordered:t.hasScrolled,currentFolder:t.currentFolder,isFetching:P,isLoading:z,userInfo:O,showMenu:!te,onMenuClick:()=>n({type:"SET_OPEN_BROWSER",payload:!0}),onLogout:()=>{pe((0,Br.ri)()),pe((0,Lr.DM)(null)),n({type:"RESET_SEARCH"})},children:(0,Vt.jsx)(an,{allowSorting:"Mono"!==(null===we||void 0===we?void 0:we.sortDirection)&&!!we,availableFacets:null!==H&&void 0!==H?H:[],currentCount:t.currentCount,facets:t.facets,isMobile:Oe,isSeeThrough:t.isSeeThrough,loading:t.isLoading,searchValue:t.searchText,selectedFacets:t.selectedFacets,sortDirection:t.sortDirection,sortOrder:t.sortOrder,sortOrders:q,totalCount:t.totalCount,view:t.view,onSearchChange:ze,onSettingChange:Me})}),(0,Vt.jsx)("div",{style:{flex:1,minHeight:"320px",padding:"0 var(--cx-spacing-medium)",position:"relative"},children:(0,Vt.jsx)(Pt,{onResize:Ie,children:e=>{let{height:n,width:r}=e;return(0,Vt.jsx)("div",{style:{height:n+"px",width:r+"px"},children:(0,Vt.jsx)(Mr,{ref:le,isError:Ae,isConfigError:xe,hasNextPage:qe,height:n,isLoadingData:t.isLoading||!Ce,isFetched:!!Ce||xe,items:(null===Ce||void 0===Ce?void 0:Ce.items)||[],selectedAsset:null!==T&&void 0!==T?T:null,view:t.view,width:r,onItemSelect:Pe,onLoadMore:Be,onScroll:Ue},t.currentFolder.id+t.searchText+Object.values(t.selectedFacets).join("+")+t.isSeeThrough+t.view)})}})}),Z===sn.EI.ShowLoader&&(0,Vt.jsx)("cx-space",{className:"format-loader",children:(0,Vt.jsx)("cx-spinner",{})}),(0,Vt.jsx)(ir,{allowCustomFormat:!!F&&!(null===T||void 0===T||!T.allowATSLink),allowFavorites:l,allowProxy:u,allowTracking:d,allowedExtensions:a,appendAutoExtension:null!==(e=null===a||void 0===a?void 0:a.includes(L))&&void 0!==e&&e,autoExtension:L,availableExtensions:He,availableProxies:N?[]:j?void 0:Se,ctaText:f,extensions:null!==U&&void 0!==U?U:[],isFavorite:!!W,maxHeight:t.containerSize.height,open:!!T&&Z===sn.EI.ShowDialog,previewUrl:N||j||null===R||void 0===R?void 0:R.previewUrl,selectedAsset:null!==T&&void 0!==T?T:null,showVersions:y,supportedRepresentativeSubtypes:null!==p&&void 0!==p&&p.length?Qe(p,V):V,variant:Oe?"drawer":"dialog",boundary:ae.current,onClose:()=>{pe((0,Lr.DM)(null)),S("unselect","")},onFavorite:async()=>{if(!T)return!1;const e=await pe((0,Lr.P1)({recordId:T.recordId}));return Lr.P1.fulfilled.match(e)&&(S&&S("favorite",T.recordId),await K(),S&&S("afterFavorite",T.recordId),t.currentFolder.id===(null===O||void 0===O?void 0:O.favoriteFolderRecordID)&&(0===t.start?Te():n({type:"SET_CURRENT_FOLDER",payload:{folder:t.currentFolder,shouldResetFilters:!0}}))),!!e||e},onProxyConfirm:async e=>{let{extension:t,value:n,permanentLink:r,parameters:i,useRepresentative:a,selectedProxyMetadata:s}=e;if(!T)return;const l=await pe((0,Lr.Tp)({extension:t,extraFields:w,parameters:i,permanentLink:r,proxiesPreference:n,selectedAsset:T,useRepresentative:a,useSession:o}));Lr.Tp.fulfilled.match(l)&&await Ve(l.payload,s)},onFormatConfirm:async e=>{let{value:t,parameters:n,proxiesPreference:r,extension:i,sourceProxyMetadata:a,transformedAssetMetadata:s}=e;if(!T)return;const l=null!==T&&void 0!==T&&T.width?parseInt(T.width,10):0,c=null!==T&&void 0!==T&&T.height?parseInt(T.height,10):0,u=await pe((0,Lr.Tp)({extraFields:w,extension:i,maxHeight:c,maxWidth:l,parameters:n,proxiesPreference:r,selectedAsset:T,useSession:o,transformations:t}));Lr.Tp.fulfilled.match(u)&&await Ve(u.payload,a,s)},onUnFavorite:async()=>{if(!T)return!1;const e=await pe((0,Lr.BZ)({recordId:T.recordId}));return Lr.BZ.fulfilled.match(e)&&(S&&S("unfavorite",T.recordId),await K(),S&&S("afterUnfavorite",T.recordId),t.currentFolder.id===(null===O||void 0===O?void 0:O.favoriteFolderRecordID)&&(0===t.start?Te():n({type:"SET_CURRENT_FOLDER",payload:{folder:t.currentFolder,shouldResetFilters:!0}}))),!!e||e}})]})]})}):(0,Vt.jsx)(Hr.A,{})}},8853:(e,t,n)=>{"use strict";e.exports=n(5896)},8879:(e,t,n)=>{"use strict";n.d(t,{xP:()=>z});var r=n(4657),o=n(2222),i=n(5043),a=n(5137),s=n(9815),l=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},c=Object.defineProperty,u=Object.defineProperties,d=Object.getOwnPropertyDescriptors,h=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,m=function(e,t,n){return t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},g=function(e,t){for(var n in t||(t={}))p.call(t,n)&&m(e,n,t[n]);if(h)for(var r=0,o=h(t);r<o.length;r++){n=o[r];f.call(t,n)&&m(e,n,t[n])}return e},v=function(e,t){return u(e,d(t))};function b(e,t,n,r){var o=(0,i.useMemo)((function(){return{queryArgs:e,serialized:"object"==typeof e?t({queryArgs:e,endpointDefinition:n,endpointName:r}):e}}),[e,t,n,r]),a=(0,i.useRef)(o);return(0,i.useEffect)((function(){a.current.serialized!==o.serialized&&(a.current=o)}),[o]),a.current.serialized===o.serialized?a.current.queryArgs:e}var y=Symbol();function x(e){var t=(0,i.useRef)(e);return(0,i.useEffect)((function(){(0,a.bN)(t.current,e)||(t.current=e)}),[e]),(0,a.bN)(t.current,e)?t.current:e}var w,S,k=WeakMap?new WeakMap:void 0,_=function(e){var t=e.endpointName,n=e.queryArgs,r="",o=null==k?void 0:k.get(n);if("string"===typeof o)r=o;else{var i=JSON.stringify(n,(function(e,t){return(0,s.isPlainObject)(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}));(0,s.isPlainObject)(n)&&(null==k||k.set(n,i)),r=i}return t+"("+r+")"},C="undefined"!==typeof window&&window.document&&window.document.createElement?i.useLayoutEffect:i.useEffect,E=function(e){return e},A=function(e){return e.isUninitialized?v(g({},e),{isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:r.RE.pending}):e};function T(e){return e.replace(e[0],e[0].toUpperCase())}function O(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,l([e],t))}(S=w||(w={})).query="query",S.mutation="mutation";var P=Symbol();var z=(0,r.l0)((0,r.m7)(),function(e){var t=void 0===e?{}:e,n=t.batch,s=void 0===n?a.vA:n,l=t.useDispatch,c=void 0===l?a.wA:l,u=t.useSelector,d=void 0===u?a.d4:u,h=t.useStore,p=void 0===h?a.Pj:h,f=t.unstable__sideEffectsInRender,m=void 0!==f&&f;return{name:P,init:function(e,t,n){var l=t.serializeQueryArgs,u=e,h=function(e){var t=e.api,n=e.moduleOptions,s=n.batch,l=n.useDispatch,c=n.useSelector,u=n.useStore,d=n.unstable__sideEffectsInRender,h=e.serializeQueryArgs,p=e.context,f=d?function(e){return e()}:i.useEffect;return{buildQueryHooks:function(e){var n=function(n,o){var a=void 0===o?{}:o,s=a.refetchOnReconnect,c=a.refetchOnFocus,u=a.refetchOnMountOrArgChange,d=a.skip,h=void 0!==d&&d,m=a.pollingInterval,g=void 0===m?0:m,v=t.endpoints[e].initiate,y=l(),w=b(h?r.hT:n,_,p.endpointDefinitions[e],e),S=x({refetchOnReconnect:s,refetchOnFocus:c,pollingInterval:g}),k=(0,i.useRef)(!1),C=(0,i.useRef)(),E=C.current||{},A=E.queryCacheKey,T=E.requestId,O=!1;if(A&&T){var P=y(t.internalActions.internal_probeSubscription({queryCacheKey:A,requestId:T}));O=!!P}var z=!O&&k.current;return f((function(){k.current=O})),f((function(){z&&(C.current=void 0)}),[z]),f((function(){var e,t=C.current;if(w===r.hT)return null==t||t.unsubscribe(),void(C.current=void 0);var n=null==(e=C.current)?void 0:e.subscriptionOptions;if(t&&t.arg===w)S!==n&&t.updateSubscriptionOptions(S);else{null==t||t.unsubscribe();var o=y(v(w,{subscriptionOptions:S,forceRefetch:u}));C.current=o}}),[y,v,u,w,S,z]),(0,i.useEffect)((function(){return function(){var e;null==(e=C.current)||e.unsubscribe(),C.current=void 0}}),[]),(0,i.useMemo)((function(){return{refetch:function(){var e;if(!C.current)throw new Error("Cannot refetch a query that has not been started yet.");return null==(e=C.current)?void 0:e.refetch()}}}),[])},d=function(n){var r=void 0===n?{}:n,o=r.refetchOnReconnect,a=r.refetchOnFocus,c=r.pollingInterval,u=void 0===c?0:c,d=t.endpoints[e].initiate,h=l(),p=(0,i.useState)(y),m=p[0],g=p[1],v=(0,i.useRef)(),b=x({refetchOnReconnect:o,refetchOnFocus:a,pollingInterval:u});f((function(){var e,t,n=null==(e=v.current)?void 0:e.subscriptionOptions;b!==n&&(null==(t=v.current)||t.updateSubscriptionOptions(b))}),[b]);var w=(0,i.useRef)(b);f((function(){w.current=b}),[b]);var S=(0,i.useCallback)((function(e,t){var n;return void 0===t&&(t=!1),s((function(){var r;null==(r=v.current)||r.unsubscribe(),v.current=n=h(d(e,{subscriptionOptions:w.current,forceRefetch:!t})),g(e)})),n}),[h,d]);return(0,i.useEffect)((function(){return function(){var e;null==(e=null==v?void 0:v.current)||e.unsubscribe()}}),[]),(0,i.useEffect)((function(){m===y||v.current||S(m,!0)}),[m,S]),(0,i.useMemo)((function(){return[S,m]}),[S,m])},w=function(n,s){var l=void 0===s?{}:s,d=l.skip,f=void 0!==d&&d,g=l.selectFromResult,v=t.endpoints[e].select,y=b(f?r.hT:n,h,p.endpointDefinitions[e],e),x=(0,i.useRef)(),w=(0,i.useMemo)((function(){return(0,o.createSelector)([v(y),function(e,t){return t},function(e){return y}],m)}),[v,y]),S=(0,i.useMemo)((function(){return g?(0,o.createSelector)([w],g):w}),[w,g]),k=c((function(e){return S(e,x.current)}),a.bN),_=u(),E=w(_.getState(),x.current);return C((function(){x.current=E}),[E]),k};return{useQueryState:w,useQuerySubscription:n,useLazyQuerySubscription:d,useLazyQuery:function(e){var t=d(e),n=t[0],r=t[1],o=w(r,v(g({},e),{skip:r===y})),a=(0,i.useMemo)((function(){return{lastArg:r}}),[r]);return(0,i.useMemo)((function(){return[n,o,a]}),[n,o,a])},useQuery:function(e,t){var o=n(e,t),a=w(e,g({selectFromResult:e===r.hT||(null==t?void 0:t.skip)?void 0:A},t)),s=a.data,l=a.status,c=a.isLoading,u=a.isSuccess,d=a.isError,h=a.error;return(0,i.useDebugValue)({data:s,status:l,isLoading:c,isSuccess:u,isError:d,error:h}),(0,i.useMemo)((function(){return g(g({},a),o)}),[a,o])}}},buildMutationHook:function(e){return function(n){var r=void 0===n?{}:n,u=r.selectFromResult,d=void 0===u?E:u,h=r.fixedCacheKey,p=t.endpoints[e],f=p.select,m=p.initiate,b=l(),y=(0,i.useState)(),x=y[0],w=y[1];(0,i.useEffect)((function(){return function(){(null==x?void 0:x.arg.fixedCacheKey)||null==x||x.reset()}}),[x]);var S=(0,i.useCallback)((function(e){var t=b(m(e,{fixedCacheKey:h}));return w(t),t}),[b,m,h]),k=(x||{}).requestId,_=(0,i.useMemo)((function(){return(0,o.createSelector)([f({fixedCacheKey:h,requestId:null==x?void 0:x.requestId})],d)}),[f,x,d,h]),C=c(_,a.bN),A=null==h?null==x?void 0:x.arg.originalArgs:void 0,T=(0,i.useCallback)((function(){s((function(){x&&w(void 0),h&&b(t.internalActions.removeMutationResult({requestId:k,fixedCacheKey:h}))}))}),[b,h,x,k]),O=C.endpointName,P=C.data,z=C.status,D=C.isLoading,R=C.isSuccess,j=C.isError,N=C.error;(0,i.useDebugValue)({endpointName:O,data:P,status:z,isLoading:D,isSuccess:R,isError:j,error:N});var I=(0,i.useMemo)((function(){return v(g({},C),{originalArgs:A,reset:T})}),[C,A,T]);return(0,i.useMemo)((function(){return[S,I]}),[S,I])}},usePrefetch:function(e,n){var r=l(),o=x(n);return(0,i.useCallback)((function(n,i){return r(t.util.prefetch(e,n,g(g({},o),i)))}),[e,r,o])}};function m(e,t,n){if((null==t?void 0:t.endpointName)&&e.isUninitialized){var r=t.endpointName,o=p.endpointDefinitions[r];h({queryArgs:t.originalArgs,endpointDefinition:o,endpointName:r})===h({queryArgs:n,endpointDefinition:o,endpointName:r})&&(t=void 0)}var i=e.isSuccess?e.data:null==t?void 0:t.data;void 0===i&&(i=e.data);var a=void 0!==i,s=e.isLoading,l=!a&&s,c=e.isSuccess||s&&a;return v(g({},e),{data:i,currentData:e.data,isFetching:s,isLoading:l,isSuccess:c})}}({api:e,moduleOptions:{batch:s,useDispatch:c,useSelector:d,useStore:p,unstable__sideEffectsInRender:m},serializeQueryArgs:l,context:n}),f=h.buildQueryHooks,S=h.buildMutationHook,k=h.usePrefetch;return O(u,{usePrefetch:k}),O(n,{batch:s}),{injectEndpoint:function(t,n){if(function(e){return e.type===w.query}(n)){var r=f(t),o=r.useQuery,i=r.useLazyQuery,a=r.useLazyQuerySubscription,s=r.useQueryState,l=r.useQuerySubscription;O(u.endpoints[t],{useQuery:o,useLazyQuery:i,useLazyQuerySubscription:a,useQueryState:s,useQuerySubscription:l}),e["use"+T(t)+"Query"]=o,e["useLazy"+T(t)+"Query"]=i}else if(function(e){return e.type===w.mutation}(n)){var c=S(t);O(u.endpoints[t],{useMutation:c}),e["use"+T(t)+"Mutation"]=c}}}}}}())},8948:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e,t){return e.has(t)}},9063:(e,t,n)=>{"use strict";n.d(t,{$Y:()=>m,E7:()=>b,Jz:()=>f,PG:()=>p,aM:()=>v,pf:()=>g});var r=n(7840),o=n(4951),i=n(8024),a=n(9487),s=n(4657),l=n(8879),c=n(4413);const u=e=>{let{searchText:t,folder:n,allowedFolders:r}=e,o="MediaType:Story OR MediaType:Album";if((0,a.o)(t)||(o=`(${o}) AND Story_Title:${t}`),null!==r&&void 0!==r&&r.length){o=`(${o}) AND (${r.map((e=>`Path:${e}${null!==n&&void 0!==n&&n.id?"/*":""}`)).join(" OR ")})`}return o},d=e=>e&&0!==Object.keys(e).length?Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return r&&0!==r.length?"Types"===n?{...e,subtypeCriteria:e.subtypeCriteria.concat(r)}:{...e,facetFilters:{...e.facetFilters,[n]:r}}:e}),{subtypeCriteria:[],facetFilters:{}}):{subtypeCriteria:[],facetFilters:{}},h=(0,s.L5)(i.rQ,{maxRetries:2}),p=(0,l.xP)({reducerPath:"searchApi",baseQuery:h,tagTypes:["Folders","Images","ImagesInFolders"],endpoints:e=>({getFolders:e.query({keepUnusedDataFor:0,query:e=>{let{allowedFolders:t,folder:n,searchText:r,useSession:o,start:i=0,pageSize:a=c.VH,self:s=!1,includeDirectChild:l,damViewSeeThru:u}=e;const d=[["DamViewSeeThru",u?"true":"false"]];var h;if((i||i>=0)&&d.push(["Start",i.toString()]),r&&(d.push(["Text",r]),d.push(["SeeThru","true"])),a&&d.push(["Limit",a.toString()]),null===t||void 0===t||!t.length||null!==n&&void 0!==n&&n.id){if(null!==n&&void 0!==n&&n.id){var p;d.push(["ObjectRecordIDs",n.id]),d.push(["IncludeDirectChild",null!==(p=null===l||void 0===l?void 0:l.toString())&&void 0!==p?p:"true"])}}else t.forEach((e=>{d.push(["ObjectRecordIDs",e])})),d.push(["Self","true"]),d.push(["IncludeDirectChild",null!==(h=null===l||void 0===l?void 0:l.toString())&&void 0!==h?h:"false"]);return o&&d.push(["UseSession",o]),s&&d.push(["Self","true"]),{url:"/webapi/extensibility/integrations/gab/assetbrowser/gethierarchy_41e8",params:d}},transformResponse:(e,t,n)=>{var r,a;return{items:null!==(r=null===(a=e.contentItems)||void 0===a?void 0:a.map((e=>{var t,r,a,s;return{id:e.recordID,title:null!==(t=(0,i.Pp)(e.fields,o._3))&&void 0!==t?t:"",docType:null!==(r=(0,i.Pp)(e.fields,o.VV))&&void 0!==r?r:"",path:n.folder?[...n.folder.path,n.folder.title]:[],fullPath:(null!==(a=(0,i.Pp)(e.fields,o.bV))&&void 0!==a?a:"").replace(/^Root\//i,""),parents:n.folder?[...n.folder.parents,n.folder]:[],hasChildren:"1"===(null!==(s=(0,i.Pp)(e.fields,o.VH))&&void 0!==s?s:"0"),isShared:"DO_OR1ND000001913488"===(0,i.Pp)(e.fields,o.Gv)}})))&&void 0!==r?r:[],totalCount:e.totalCount}},providesTags:(e,t,n)=>{var r,o;return[{type:"Folders",id:null!==(r=null===(o=n.folder)||void 0===o?void 0:o.id)&&void 0!==r?r:"Root"}]},merge:(e,t,n)=>n.arg.start&&n.arg.start>0?(e.items.push(...t.items),e):t,forceRefetch(e){let{currentArg:t,previousArg:n}=e;return t!==n},serializeQueryArgs:e=>{var t;let{endpointName:n,queryArgs:r}=e;return{endpointName:n,id:null===(t=r.folder)||void 0===t?void 0:t.id,type:"Folders"}}}),getCollections:e.query({keepUnusedDataFor:0,query:e=>{let{folder:t,searchText:n,useSession:r,start:i=0,pageSize:a=c.VH}=e;const s=[["extraFilters",u({searchText:n})],["fields",o.bV],["fields",o.VV],["fields",o._3],["seeThru",!0],["subtypeCriteria",t]];return(i||i>=0)&&s.push(["start",i.toString()]),a&&s.push(["limit",a.toString()]),r&&s.push(["UseSession",r]),{url:"/webapi/extensibility/integrations/contentBrowserSDK/getcontent_4bw_v1",params:s}},transformResponse:(e,t)=>{var n,r;return{items:null!==(n=null===(r=e.contentItems)||void 0===r?void 0:r.map((e=>{var t,n,r;return{id:e.recordID,title:null!==(t=(0,i.Pp)(e.fields,o._3))&&void 0!==t?t:"",docType:null!==(n=(0,i.Pp)(e.fields,o.VV))&&void 0!==n?n:"",path:[],fullPath:(null!==(r=(0,i.Pp)(e.fields,o.bV))&&void 0!==r?r:"").replace(/^Root\//i,""),parents:[],hasChildren:!1}})))&&void 0!==n?n:[],totalCount:e.totalCount}},providesTags:(e,t,n)=>[{type:"Folders",id:n.folder.id}],merge:(e,t,n)=>n.arg.start&&n.arg.start>0?(e.items.push(...t.items),e):t,forceRefetch(e){let{currentArg:t,previousArg:n}=e;return t!==n},serializeQueryArgs:e=>{var t;let{endpointName:n,queryArgs:r}=e;return{endpointName:n,id:null===(t=r.folder)||void 0===t?void 0:t.id,type:"Folders"}}}),getAssets:e.query({keepUnusedDataFor:0,query:e=>{let{folderID:t,isSeeThrough:n,limitedToDocTypes:r=[],pageSize:i,searchText:a,selectedFacets:s,sortOrder:l,start:c,useSession:u}=e;return{url:"/webapi/extensibility/integrations/contentBrowserSDK/getcontent_4bw_v3",body:{fields:[o.s6,o.VV,o.jb,o._R,o.vA,o.sP,o.S,o.Ni,o.Gu,o.HO,o.EG,o._3,o.Uh,o.g_],seeThru:!!n,objectRecordID:null!==t&&void 0!==t?t:void 0,start:null!==c&&void 0!==c?c:void 0,limit:null!==i&&void 0!==i?i:void 0,orderBy:l,limitedToDocTypes:r,text:a,useSession:u,...d(s)},method:"POST"}},transformResponse:e=>{var t,n;return{facets:e.facets,items:null!==(t=null===(n=e.contentItems)||void 0===n?void 0:n.map((e=>{var t,n,r,a,s,l,c,u,d,h,p,f;let m=null!==(t=(0,i.Pp)(e.fields,o.jb))&&void 0!==t?t:"";const g=(0,i.Pp)(e.fields,o.Gu);return m&&!m.startsWith(".")&&(m="."+m),{docType:null!==(n=(0,i.Pp)(e.fields,o.VV))&&void 0!==n?n:"",docSubType:null!==(r=(0,i.Pp)(e.fields,o.EG))&&void 0!==r?r:"",extension:m,height:null!==(a=(0,i.Pp)(e.fields,o.S))&&void 0!==a?a:"0",id:e.recordID,identifier:null!==(s=(0,i.Pp)(e.fields,o.vA))&&void 0!==s?s:"",imageUrl:null!==(l=(0,i.Pp)(e.fields,o.s6))&&void 0!==l?l:"",originalUrl:null!==(c=(0,i.Pp)(e.fields,o.g_))&&void 0!==c?c:"",name:null!==g&&void 0!==g?g:"",scrubUrl:null!==(u=(0,i.Pp)(e.fields,o.he))&&void 0!==u?u:"",size:null!==(d=(0,i.Pp)(e.fields,o._R))&&void 0!==d?d:"0 MB",tags:null!==(h=(0,i.Pp)(e.fields,o.sP))&&void 0!==h?h:"",width:null!==(p=(0,i.Pp)(e.fields,o.Ni))&&void 0!==p?p:"0",allowATSLink:"True"===(0,i.Pp)(e.fields,o.F4),recordId:null!==(f=(0,i.Pp)(e.fields,o.HO))&&void 0!==f?f:""}})))&&void 0!==t?t:[],totalCount:e.totalCount}},providesTags:(e,t,n)=>{var r;return[{selectedFacets:Object.values(null!==(r=n.selectedFacets)&&void 0!==r?r:{}),id:n.folderID,isSeeThrough:n.isSeeThrough,searchText:n.searchText,sortOrder:n.sortOrder,type:"ImagesInFolders"},"Images"]},merge:(e,t,n)=>n.arg.start&&n.arg.start>0?{...e,items:(0,r.A)([...e.items,...t.items],"recordId")}:t,forceRefetch(e){let{currentArg:t,previousArg:n}=e;return(null===t||void 0===t?void 0:t.start)===(null===n||void 0===n?void 0:n.start)?!(null===t||void 0===t||!t.pageSize)&&!(null===n||void 0===n||!n.pageSize)&&t.pageSize>n.pageSize:t!==n},serializeQueryArgs:e=>{var t;let{endpointName:n,queryArgs:r}=e;return{endpointName:n,selectedFacets:Object.values(null!==(t=r.selectedFacets)&&void 0!==t?t:{}),id:r.folderID,isSeeThrough:r.isSeeThrough,searchText:r.searchText,sortOrder:r.sortOrder,type:"ImagesInFolders"}}}),getIsFavorite:e.query({keepUnusedDataFor:0,query:e=>{let{recordId:t}=e;return{url:"/webapi/extensibility/integrations/contentBrowserSDK/getfavorites_419t",params:[["recordId",t]]}},transformResponse:(e,t,n)=>{let{recordId:r}=n;return!!e.favoriteRecordIds&&e.favoriteRecordIds.includes(r)}}),getAssetById:e.query({keepUnusedDataFor:0,query:e=>{let{id:t,useSession:n}=e;const r=[["extraFilters",`RecordID:${t}`],["fields",o.s6],["fields",o.VV],["fields",o.jb],["fields",o._R],["fields",o.vA],["fields",o.sP],["fields",o.S],["fields",o.Ni],["fields",o.Gu],["fields",o.HO],["fields",o.EG],["fields",o._3],["fields",o.Uh],["fields",o.g_],["seeThru","true"]];return n&&r.push(["UseSession",n]),{url:"/webapi/extensibility/integrations/contentBrowserSDK/getcontent_4bw_v1",params:r}},transformResponse:e=>{var t,n,r,a,s,l,c,u,d,h,p,f,m;const g=null===(t=e.contentItems)||void 0===t?void 0:t[0];if(!g)return;let v=null!==(n=(0,i.Pp)(g.fields,o.jb))&&void 0!==n?n:"";v&&!v.startsWith(".")&&(v="."+v);const b=(0,i.Pp)(g.fields,o.Gu);return v&&!v.startsWith(".")&&(v="."+v),{docType:null!==(r=(0,i.Pp)(g.fields,o.VV))&&void 0!==r?r:"",docSubType:null!==(a=(0,i.Pp)(g.fields,o.EG))&&void 0!==a?a:"",extension:v,height:null!==(s=(0,i.Pp)(g.fields,o.S))&&void 0!==s?s:"0",id:g.recordID,identifier:null!==(l=(0,i.Pp)(g.fields,o.vA))&&void 0!==l?l:"",imageUrl:null!==(c=(0,i.Pp)(g.fields,o.s6))&&void 0!==c?c:"",originalUrl:null!==(u=(0,i.Pp)(g.fields,o.g_))&&void 0!==u?u:"",name:b,scrubUrl:null!==(d=(0,i.Pp)(g.fields,o.he))&&void 0!==d?d:"",size:null!==(h=(0,i.Pp)(g.fields,o._R))&&void 0!==h?h:"0 MB",tags:null!==(p=(0,i.Pp)(g.fields,o.sP))&&void 0!==p?p:"",width:null!==(f=(0,i.Pp)(g.fields,o.Ni))&&void 0!==f?f:"0",allowATSLink:"True"===(0,i.Pp)(g.fields,o.F4),recordId:null!==(m=(0,i.Pp)(g.fields,o.HO))&&void 0!==m?m:""}},providesTags:(e,t,n)=>[{type:"Images",id:n.id}],serializeQueryArgs:e=>{let{endpointName:t,queryArgs:n}=e;return{endpointName:t,id:n.id,useSession:n.useSession}}})})}),{useGetFoldersQuery:f,useGetCollectionsQuery:m,useGetAssetsQuery:g,useGetAssetByIdQuery:v,useGetIsFavoriteQuery:b}=p},9171:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});const r=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1};const o=function(e){return e!==e};const i=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1};const a=function(e,t,n){return t===t?i(e,t,n):r(e,o,n)};const s=function(e,t){return!!(null==e?0:e.length)&&a(e,t,0)>-1}},9392:(e,t,n)=>{"use strict";var r=n(1218),o=n(6496);function i(e){var t=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}i.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=i},9406:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(){return[]}},9461:(e,t,n)=>{"use strict";e.exports=n(2330)},9487:(e,t,n)=>{"use strict";n.d(t,{k:()=>r,o:()=>o});const r=e=>{let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz";for(let r=0;r<e;r++)t+=n.charAt(Math.floor(62*Math.random()));return t},o=e=>!e||""===e.trim()},9500:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(4802),o=n(3239);const i=function(e){return(0,o.A)(e)&&"[object Arguments]"==(0,r.A)(e)};var a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable;const c=i(function(){return arguments}())?i:function(e){return(0,o.A)(e)&&s.call(e,"callee")&&!l.call(e,"callee")}},9618:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});const r=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i};var o=n(9406),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;const s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o.A},9717:(e,t,n)=>{"use strict";var r=n(5043),o=n(9461);var i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},a=o.useSyncExternalStore,s=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=s(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=c((function(){function e(e){if(!l){if(l=!0,a=e,e=r(e),void 0!==o&&h.hasValue){var t=h.value;if(o(t,e))return s=t}return s=e}if(t=s,i(a,e))return t;var n=r(e);return void 0!==o&&o(t,n)?(a=e,t):(a=e,s=n)}var a,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,o]);var p=a(e,d[0],d[1]);return l((function(){h.hasValue=!0,h.value=p}),[p]),u(p),p}},9815:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EnhancerArray:()=>j,MiddlewareArray:()=>R,SHOULD_AUTOBATCH:()=>Ze,TaskAbortError:()=>Pe,__DO_NOT_USE__ActionTypes:()=>o.$d,addListener:()=>We,applyMiddleware:()=>o.Tw,autoBatchEnhancer:()=>nt,bindActionCreators:()=>o.zH,clearAllListeners:()=>Ke,combineReducers:()=>o.HY,compose:()=>o.Zz,configureStore:()=>H,createAction:()=>E,createActionCreatorInvariantMiddleware:()=>D,createAsyncThunk:()=>ae,createDraftSafeSelector:()=>S,createEntityAdapter:()=>ee,createImmutableStateInvariantMiddleware:()=>M,createListenerMiddleware:()=>Ge,createNextState:()=>r.Ay,createReducer:()=>K,createSelector:()=>i.createSelector,createSerializableStateInvariantMiddleware:()=>U,createSlice:()=>$,createStore:()=>o.y$,current:()=>r.ss,findNonSerializableValue:()=>L,freeze:()=>r.CN,getDefaultMiddleware:()=>V,getType:()=>z,isAction:()=>A,isActionCreator:()=>T,isAllOf:()=>ue,isAnyOf:()=>ce,isAsyncThunkAction:()=>ve,isDraft:()=>r.Qx,isFluxStandardAction:()=>O,isFulfilled:()=>ge,isImmutableDefault:()=>I,isPending:()=>pe,isPlain:()=>F,isPlainObject:()=>_,isRejected:()=>fe,isRejectedWithValue:()=>me,legacy_createStore:()=>o.Yl,miniSerializeError:()=>ie,nanoid:()=>te,original:()=>r.c2,prepareAutoBatched:()=>Ye,removeListener:()=>$e,unwrapResult:()=>se});var r=n(2272),o=n(6096),i=n(2222);function a(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"===typeof o?o(n,r,e):t(o)}}}}var s=a();s.withExtraArgument=a;const l=s;var c=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},d=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},h=Object.defineProperty,p=Object.defineProperties,f=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,b=function(e,t,n){return t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},y=function(e,t){for(var n in t||(t={}))g.call(t,n)&&b(e,n,t[n]);if(m)for(var r=0,o=m(t);r<o.length;r++){n=o[r];v.call(t,n)&&b(e,n,t[n])}return e},x=function(e,t){return p(e,f(t))},w=function(e,t,n){return new Promise((function(r,o){var i=function(e){try{s(n.next(e))}catch(t){o(t)}},a=function(e){try{s(n.throw(e))}catch(t){o(t)}},s=function(e){return e.done?r(e.value):Promise.resolve(e.value).then(i,a)};s((n=n.apply(e,t)).next())}))},S=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=i.createSelector.apply(void 0,e);return function(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];return n.apply(void 0,d([(0,r.Qx)(e)?(0,r.ss)(e):e],t))}},k="undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"===typeof arguments[0]?o.Zz:o.Zz.apply(null,arguments)};"undefined"!==typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function _(e){if("object"!==typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}var C=function(e){return e&&"function"===typeof e.match};function E(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(t){var o=t.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return y(y({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:n[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(t){return t.type===e},n}function A(e){return _(e)&&"type"in e}function T(e){return"function"===typeof e&&"type"in e&&C(e)}function O(e){return A(e)&&"string"===typeof e.type&&Object.keys(e).every(P)}function P(e){return["type","payload","error","meta"].indexOf(e)>-1}function z(e){return""+e}function D(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}var R=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return c(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,d([void 0],e[0].concat(this)))):new(t.bind.apply(t,d([void 0],e.concat(this))))},t}(Array),j=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return c(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,d([void 0],e[0].concat(this)))):new(t.bind.apply(t,d([void 0],e.concat(this))))},t}(Array);function N(e){return(0,r.a6)(e)?(0,r.Ay)(e,(function(){})):e}function I(e){return"object"!==typeof e||null==e||Object.isFrozen(e)}function M(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}function F(e){var t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||_(e)}function L(e,t,n,r,o,i){var a;if(void 0===t&&(t=""),void 0===n&&(n=F),void 0===o&&(o=[]),!n(e))return{keyPath:t||"<root>",value:e};if("object"!==typeof e||null===e)return!1;if(null==i?void 0:i.has(e))return!1;for(var s=null!=r?r(e):Object.entries(e),l=o.length>0,c=function(e,s){var c=t?t+"."+e:e;if(l&&o.some((function(e){return e instanceof RegExp?e.test(c):c===e})))return"continue";return n(s)?"object"===typeof s&&(a=L(s,c,n,r,o,i))?{value:a}:void 0:{value:{keyPath:c,value:s}}},u=0,d=s;u<d.length;u++){var h=d[u],p=c(h[0],h[1]);if("object"===typeof p)return p.value}return i&&B(e)&&i.add(e),!1}function B(e){if(!Object.isFrozen(e))return!1;for(var t=0,n=Object.values(e);t<n.length;t++){var r=n[t];if("object"===typeof r&&null!==r&&!B(r))return!1}return!0}function U(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}function V(e){void 0===e&&(e={});var t=e.thunk,n=void 0===t||t,r=(e.immutableCheck,e.serializableCheck,e.actionCreatorCheck,new R);return n&&("boolean"===typeof n?r.push(l):r.push(l.withExtraArgument(n.extraArgument))),r}var q=!0;function H(e){var t,n=function(e){return V(e)},r=e||{},i=r.reducer,a=void 0===i?void 0:i,s=r.middleware,l=void 0===s?n():s,c=r.devTools,u=void 0===c||c,h=r.preloadedState,p=void 0===h?void 0:h,f=r.enhancers,m=void 0===f?void 0:f;if("function"===typeof a)t=a;else{if(!_(a))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=(0,o.HY)(a)}var g=l;if("function"===typeof g&&(g=g(n),!q&&!Array.isArray(g)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!q&&g.some((function(e){return"function"!==typeof e})))throw new Error("each middleware provided to configureStore must be a function");var v=o.Tw.apply(void 0,g),b=o.Zz;u&&(b=k(y({trace:!q},"object"===typeof u&&u)));var x=new j(v),w=x;Array.isArray(m)?w=d([v],m):"function"===typeof m&&(w=m(x));var S=b.apply(void 0,w);return(0,o.y$)(t,p,S)}function W(e){var t,n={},r=[],o={addCase:function(e,t){var r="string"===typeof e?e:e.type;if(!r)throw new Error("`builder.addCase` cannot be called with an empty action type");if(r in n)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return n[r]=t,o},addMatcher:function(e,t){return r.push({matcher:e,reducer:t}),o},addDefaultCase:function(e){return t=e,o}};return e(o),[n,r,t]}function K(e,t,n,o){void 0===n&&(n=[]);var i,a="function"===typeof t?W(t):[t,n,o],s=a[0],l=a[1],c=a[2];if("function"===typeof e)i=function(){return N(e())};else{var u=N(e);i=function(){return u}}function h(e,t){void 0===e&&(e=i());var n=d([s[t.type]],l.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===n.filter((function(e){return!!e})).length&&(n=[c]),n.reduce((function(e,n){if(n){var o;if((0,r.Qx)(e))return void 0===(o=n(e,t))?e:o;if((0,r.a6)(e))return(0,r.Ay)(e,(function(e){return n(e,t)}));if(void 0===(o=n(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return o}return e}),e)}return h.getInitialState=i,h}function $(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n,r="function"==typeof e.initialState?e.initialState:N(e.initialState),o=e.reducers||{},i=Object.keys(o),a={},s={},l={};function c(){var t="function"===typeof e.extraReducers?W(e.extraReducers):[e.extraReducers],n=t[0],o=void 0===n?{}:n,i=t[1],a=void 0===i?[]:i,l=t[2],c=void 0===l?void 0:l,u=y(y({},o),s);return K(r,(function(e){for(var t in u)e.addCase(t,u[t]);for(var n=0,r=a;n<r.length;n++){var o=r[n];e.addMatcher(o.matcher,o.reducer)}c&&e.addDefaultCase(c)}))}return i.forEach((function(e){var n,r,i=o[e],c=t+"/"+e;"reducer"in i?(n=i.reducer,r=i.prepare):n=i,a[e]=n,s[c]=n,l[e]=r?E(c,r):E(c)})),{name:t,reducer:function(e,t){return n||(n=c()),n(e,t)},actions:l,caseReducers:a,getInitialState:function(){return n||(n=c()),n.getInitialState()}}}function Q(e){var t=G((function(t,n){return e(n)}));return function(e){return t(e,void 0)}}function G(e){return function(t,n){var o=function(t){O(n)?e(n.payload,t):e(n,t)};return(0,r.Qx)(t)?(o(t),t):(0,r.Ay)(t,o)}}function X(e,t){return t(e)}function Z(e){return Array.isArray(e)||(e=Object.values(e)),e}function Y(e,t,n){for(var r=[],o=[],i=0,a=e=Z(e);i<a.length;i++){var s=a[i],l=X(s,t);l in n.entities?o.push({id:l,changes:s}):r.push(s)}return[r,o]}function J(e){function t(t,n){var r=X(t,e);r in n.entities||(n.ids.push(r),n.entities[r]=t)}function n(e,n){for(var r=0,o=e=Z(e);r<o.length;r++){t(o[r],n)}}function r(t,n){var r=X(t,e);r in n.entities||n.ids.push(r),n.entities[r]=t}function o(e,t){var n=!1;e.forEach((function(e){e in t.entities&&(delete t.entities[e],n=!0)})),n&&(t.ids=t.ids.filter((function(e){return e in t.entities})))}function i(t,n){var r={},o={};if(t.forEach((function(e){e.id in n.entities&&(o[e.id]={id:e.id,changes:y(y({},o[e.id]?o[e.id].changes:null),e.changes)})})),(t=Object.values(o)).length>0){var i=t.filter((function(t){return function(t,n,r){var o=r.entities[n.id],i=Object.assign({},o,n.changes),a=X(i,e),s=a!==n.id;return s&&(t[n.id]=a,delete r.entities[n.id]),r.entities[a]=i,s}(r,t,n)})).length>0;i&&(n.ids=Object.keys(n.entities))}}function a(t,r){var o=Y(t,e,r),a=o[0];i(o[1],r),n(a,r)}return{removeAll:Q((function(e){Object.assign(e,{ids:[],entities:{}})})),addOne:G(t),addMany:G(n),setOne:G(r),setMany:G((function(e,t){for(var n=0,o=e=Z(e);n<o.length;n++){r(o[n],t)}})),setAll:G((function(e,t){e=Z(e),t.ids=[],t.entities={},n(e,t)})),updateOne:G((function(e,t){return i([e],t)})),updateMany:G(i),upsertOne:G((function(e,t){return a([e],t)})),upsertMany:G(a),removeOne:G((function(e,t){return o([e],t)})),removeMany:G(o)}}function ee(e){void 0===e&&(e={});var t=y({sortComparer:!1,selectId:function(e){return e.id}},e),n=t.selectId,r=t.sortComparer,o={getInitialState:function(e){return void 0===e&&(e={}),Object.assign({ids:[],entities:{}},e)}},i={getSelectors:function(e){var t=function(e){return e.ids},n=function(e){return e.entities},r=S(t,n,(function(e,t){return e.map((function(e){return t[e]}))})),o=function(e,t){return t},i=function(e,t){return e[t]},a=S(t,(function(e){return e.length}));if(!e)return{selectIds:t,selectEntities:n,selectAll:r,selectTotal:a,selectById:S(n,o,i)};var s=S(e,n);return{selectIds:S(e,t),selectEntities:s,selectAll:S(e,r),selectTotal:S(e,a),selectById:S(s,o,i)}}},a=r?function(e,t){var n=J(e);function r(t,n){var r=(t=Z(t)).filter((function(t){return!(X(t,e)in n.entities)}));0!==r.length&&s(r,n)}function o(e,t){0!==(e=Z(e)).length&&s(e,t)}function i(t,n){for(var r=!1,o=0,i=t;o<i.length;o++){var a=i[o],s=n.entities[a.id];if(s){r=!0,Object.assign(s,a.changes);var c=e(s);a.id!==c&&(delete n.entities[a.id],n.entities[c]=s)}}r&&l(n)}function a(t,n){var o=Y(t,e,n),a=o[0];i(o[1],n),r(a,n)}function s(t,n){t.forEach((function(t){n.entities[e(t)]=t})),l(n)}function l(n){var r=Object.values(n.entities);r.sort(t);var o=r.map(e);(function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(n.ids,o)||(n.ids=o)}return{removeOne:n.removeOne,removeMany:n.removeMany,removeAll:n.removeAll,addOne:G((function(e,t){return r([e],t)})),updateOne:G((function(e,t){return i([e],t)})),upsertOne:G((function(e,t){return a([e],t)})),setOne:G((function(e,t){return o([e],t)})),setMany:G(o),setAll:G((function(e,t){e=Z(e),t.entities={},t.ids=[],r(e,t)})),addMany:G(r),updateMany:G(i),upsertMany:G(a)}}(n,r):J(n);return y(y(y({selectId:n,sortComparer:r},o),i),a)}var te=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},ne=["name","message","stack","code"],re=function(e,t){this.payload=e,this.meta=t},oe=function(e,t){this.payload=e,this.meta=t},ie=function(e){if("object"===typeof e&&null!==e){for(var t={},n=0,r=ne;n<r.length;n++){var o=r[n];"string"===typeof e[o]&&(t[o]=e[o])}return t}return{message:String(e)}},ae=function(){function e(e,t,n){var r=E(e+"/fulfilled",(function(e,t,n,r){return{payload:e,meta:x(y({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),o=E(e+"/pending",(function(e,t,n){return{payload:void 0,meta:x(y({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),i=E(e+"/rejected",(function(e,t,r,o,i){return{payload:o,error:(n&&n.serializeError||ie)(e||"Rejected"),meta:x(y({},i||{}),{arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),a="undefined"!==typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return e.prototype.abort=function(){0},e}();return Object.assign((function(e){return function(s,l,c){var d,h=(null==n?void 0:n.idGenerator)?n.idGenerator(e):te(),p=new a;function f(e){d=e,p.abort()}var m=function(){return w(this,null,(function(){var a,m,g,v,b,y;return u(this,(function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),v=null==(a=null==n?void 0:n.condition)?void 0:a.call(n,e,{getState:l,extra:c}),null===(x=v)||"object"!==typeof x||"function"!==typeof x.then?[3,2]:[4,v];case 1:v=u.sent(),u.label=2;case 2:if(!1===v||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return b=new Promise((function(e,t){return p.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:d||"Aborted"})}))})),s(o(h,e,null==(m=null==n?void 0:n.getPendingMeta)?void 0:m.call(n,{requestId:h,arg:e},{getState:l,extra:c}))),[4,Promise.race([b,Promise.resolve(t(e,{dispatch:s,getState:l,extra:c,requestId:h,signal:p.signal,abort:f,rejectWithValue:function(e,t){return new re(e,t)},fulfillWithValue:function(e,t){return new oe(e,t)}})).then((function(t){if(t instanceof re)throw t;return t instanceof oe?r(t.payload,h,e,t.meta):r(t,h,e)}))])];case 3:return g=u.sent(),[3,5];case 4:return y=u.sent(),g=y instanceof re?i(null,h,e,y.payload,y.meta):i(y,h,e),[3,5];case 5:return n&&!n.dispatchConditionRejection&&i.match(g)&&g.meta.condition||s(g),[2,g]}var x}))}))}();return Object.assign(m,{abort:f,requestId:h,arg:e,unwrap:function(){return m.then(se)}})}}),{pending:o,rejected:i,fulfilled:r,typePrefix:e})}return e.withTypes=function(){return e},e}();function se(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var le=function(e,t){return C(e)?e.match(t):e(t)};function ce(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.some((function(e){return le(e,t)}))}}function ue(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.every((function(e){return le(e,t)}))}}function de(e,t){if(!e||!e.meta)return!1;var n="string"===typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function he(e){return"function"===typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function pe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return de(e,["pending"])}:he(e)?function(t){var n=e.map((function(e){return e.pending}));return ce.apply(void 0,n)(t)}:pe()(e[0])}function fe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return de(e,["rejected"])}:he(e)?function(t){var n=e.map((function(e){return e.rejected}));return ce.apply(void 0,n)(t)}:fe()(e[0])}function me(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return e&&e.meta&&e.meta.rejectedWithValue};return 0===e.length||he(e)?function(t){return ue(fe.apply(void 0,e),n)(t)}:me()(e[0])}function ge(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return de(e,["fulfilled"])}:he(e)?function(t){var n=e.map((function(e){return e.fulfilled}));return ce.apply(void 0,n)(t)}:ge()(e[0])}function ve(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return de(e,["pending","fulfilled","rejected"])}:he(e)?function(t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push(i.pending,i.rejected,i.fulfilled)}return ce.apply(void 0,n)(t)}:ve()(e[0])}var be=function(e,t){if("function"!==typeof e)throw new TypeError(t+" is not a function")},ye=function(){},xe=function(e,t){return void 0===t&&(t=ye),e.catch(t),e},we=function(e,t){return e.addEventListener("abort",t,{once:!0}),function(){return e.removeEventListener("abort",t)}},Se=function(e,t){var n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},ke="listener",_e="completed",Ce="cancelled",Ee="task-"+Ce,Ae="task-"+_e,Te=ke+"-"+Ce,Oe=ke+"-"+_e,Pe=function(e){this.code=e,this.name="TaskAbortError",this.message="task "+Ce+" (reason: "+e+")"},ze=function(e){if(e.aborted)throw new Pe(e.reason)};function De(e,t){var n=ye;return new Promise((function(r,o){var i=function(){return o(new Pe(e.reason))};e.aborted?i():(n=we(e,i),t.finally((function(){return n()})).then(r,o))})).finally((function(){n=ye}))}var Re=function(e){return function(t){return xe(De(e,t).then((function(t){return ze(e),t})))}},je=function(e){var t=Re(e);return function(e){return t(new Promise((function(t){return setTimeout(t,e)})))}},Ne=Object.assign,Ie={},Me="listenerMiddleware",Fe=function(e,t){return function(n,r){be(n,"taskExecutor");var o,i=new AbortController;o=i,we(e,(function(){return Se(o,e.reason)}));var a,s,l=(a=function(){return w(void 0,null,(function(){var t;return u(this,(function(r){switch(r.label){case 0:return ze(e),ze(i.signal),[4,n({pause:Re(i.signal),delay:je(i.signal),signal:i.signal})];case 1:return t=r.sent(),ze(i.signal),[2,t]}}))}))},s=function(){return Se(i,Ae)},w(void 0,null,(function(){var e;return u(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,4,5]),[4,Promise.resolve()];case 1:return t.sent(),[4,a()];case 2:return[2,{status:"ok",value:t.sent()}];case 3:return[2,{status:(e=t.sent())instanceof Pe?"cancelled":"rejected",error:e}];case 4:return null==s||s(),[7];case 5:return[2]}}))})));return(null==r?void 0:r.autoJoin)&&t.push(l),{result:Re(e)(l),cancel:function(){Se(i,Ee)}}}},Le=function(e,t){return function(n,r){return xe(function(n,r){return w(void 0,null,(function(){var o,i,a,s;return u(this,(function(l){switch(l.label){case 0:ze(t),o=function(){},i=new Promise((function(t,r){var i=e({predicate:n,effect:function(e,n){n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});o=function(){i(),r()}})),a=[i],null!=r&&a.push(new Promise((function(e){return setTimeout(e,r,null)}))),l.label=1;case 1:return l.trys.push([1,,3,4]),[4,De(t,Promise.race(a))];case 2:return s=l.sent(),ze(t),[2,s];case 3:return o(),[7];case 4:return[2]}}))}))}(n,r))}},Be=function(e){var t=e.type,n=e.actionCreator,r=e.matcher,o=e.predicate,i=e.effect;if(t)o=E(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return be(i,"options.listener"),{predicate:o,type:t,effect:i}},Ue=function(e){var t=Be(e),n=t.type,r=t.predicate,o=t.effect;return{id:te(),effect:o,type:n,predicate:r,pending:new Set,unsubscribe:function(){throw new Error("Unsubscribe not initialized")}}},Ve=function(e){e.pending.forEach((function(e){Se(e,Te)}))},qe=function(e){return function(){e.forEach(Ve),e.clear()}},He=function(e,t,n){try{e(t,n)}catch(r){setTimeout((function(){throw r}),0)}},We=E(Me+"/add"),Ke=E(Me+"/removeAll"),$e=E(Me+"/remove"),Qe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error.apply(console,d([Me+"/error"],e))};function Ge(e){var t=this;void 0===e&&(e={});var n=new Map,r=e.extra,o=e.onError,i=void 0===o?Qe:o;be(i,"onError");var a=function(e){for(var t=0,r=Array.from(n.values());t<r.length;t++){var o=r[t];if(e(o))return o}},s=function(e){var t=a((function(t){return t.effect===e.effect}));return t||(t=Ue(e)),function(e){return e.unsubscribe=function(){return n.delete(e.id)},n.set(e.id,e),function(t){e.unsubscribe(),(null==t?void 0:t.cancelActive)&&Ve(e)}}(t)},l=function(e){var t=Be(e),n=t.type,r=t.effect,o=t.predicate,i=a((function(e){return("string"===typeof n?e.type===n:e.predicate===o)&&e.effect===r}));return i&&(i.unsubscribe(),e.cancelActive&&Ve(i)),!!i},c=function(e,o,a,l){return w(t,null,(function(){var t,c,d,h;return u(this,(function(u){switch(u.label){case 0:t=new AbortController,c=Le(s,t.signal),d=[],u.label=1;case 1:return u.trys.push([1,3,4,6]),e.pending.add(t),[4,Promise.resolve(e.effect(o,Ne({},a,{getOriginalState:l,condition:function(e,t){return c(e,t).then(Boolean)},take:c,delay:je(t.signal),pause:Re(t.signal),extra:r,signal:t.signal,fork:Fe(t.signal,d),unsubscribe:e.unsubscribe,subscribe:function(){n.set(e.id,e)},cancelActiveListeners:function(){e.pending.forEach((function(e,n,r){e!==t&&(Se(e,Te),r.delete(e))}))}})))];case 2:return u.sent(),[3,6];case 3:return(h=u.sent())instanceof Pe||He(i,h,{raisedBy:"effect"}),[3,6];case 4:return[4,Promise.allSettled(d)];case 5:return u.sent(),Se(t,Oe),e.pending.delete(t),[7];case 6:return[2]}}))}))},d=qe(n);return{middleware:function(e){return function(t){return function(r){if(!A(r))return t(r);if(We.match(r))return s(r.payload);if(!Ke.match(r)){if($e.match(r))return l(r.payload);var o,a=e.getState(),u=function(){if(a===Ie)throw new Error(Me+": getOriginalState can only be called synchronously");return a};try{if(o=t(r),n.size>0)for(var h=e.getState(),p=Array.from(n.values()),f=0,m=p;f<m.length;f++){var g=m[f],v=!1;try{v=g.predicate(r,h,a)}catch(b){v=!1,He(i,b,{raisedBy:"predicate"})}v&&c(g,r,e,u)}}finally{a=Ie}return o}d()}}},startListening:s,stopListening:l,clearListeners:d}}var Xe,Ze="RTK_autoBatch",Ye=function(){return function(e){var t;return{payload:e,meta:(t={},t[Ze]=!0,t)}}},Je="function"===typeof queueMicrotask?queueMicrotask.bind("undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:globalThis):function(e){return(Xe||(Xe=Promise.resolve())).then(e).catch((function(e){return setTimeout((function(){throw e}),0)}))},et=function(e){return function(t){setTimeout(t,e)}},tt="undefined"!==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:et(10),nt=function(e){return void 0===e&&(e={type:"raf"}),function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=t.apply(void 0,n),i=!0,a=!1,s=!1,l=new Set,c="tick"===e.type?Je:"raf"===e.type?tt:"callback"===e.type?e.queueNotification:et(e.timeout),u=function(){s=!1,a&&(a=!1,l.forEach((function(e){return e()})))};return Object.assign({},o,{subscribe:function(e){var t=o.subscribe((function(){return i&&e()}));return l.add(e),function(){t(),l.delete(e)}},dispatch:function(e){var t;try{return i=!(null==(t=null==e?void 0:e.meta)?void 0:t[Ze]),(a=!i)&&(s||(s=!0,c(u))),o.dispatch(e)}finally{i=!0}}})}}};(0,r.rF)()},9885:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(4067);const o=n(4306).A["__core-js_shared__"];var i=function(){var e=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();const a=function(e){return!!i&&i in e};var s=n(7664),l=n(6166),c=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,h=u.toString,p=d.hasOwnProperty,f=RegExp("^"+h.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(e){return!(!(0,s.A)(e)||a(e))&&((0,r.A)(e)?f:c).test((0,l.A)(e))};const g=function(e,t){return null==e?void 0:e[t]};const v=function(e,t){var n=g(e,t);return m(n)?n:void 0}},9989:e=>{"use strict";var t=!("undefined"===typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},9993:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(4802),o=n(3903),i=n(3239),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;const s=function(e){return(0,i.A)(e)&&(0,o.A)(e.length)&&!!a[(0,r.A)(e)]};var l=n(7328),c=n(8187),u="object"==typeof exports&&exports&&!exports.nodeType&&exports,d=u&&"object"==typeof module&&module&&!module.nodeType&&module,h=d&&d.exports===u&&c.A.process,p=function(){try{var e=d&&d.require&&d.require("util").types;return e||h&&h.binding&&h.binding("util")}catch(t){}}();var f=p&&p.isTypedArray;const m=f?(0,l.A)(f):s}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.d(r,{default:()=>Iv});var e=n(4391),t=n(5137);const o=globalThis,i=o.ShadowRoot&&(void 0===o.ShadyCSS||o.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),s=new WeakMap;let l=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(i&&void 0===e){const n=void 0!==t&&1===t.length;n&&(e=s.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&s.set(t,e))}return e}toString(){return this.cssText}};const c=e=>new l("string"==typeof e?e:e+"",void 0,a),u=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];const o=1===e.length?e[0]:n.reduce(((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[r+1]),e[0]);return new l(o,e,a)},d=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return c(t)})(e):e,{is:h,defineProperty:p,getOwnPropertyDescriptor:f,getOwnPropertyNames:m,getOwnPropertySymbols:g,getPrototypeOf:v}=Object,b=globalThis,y=b.trustedTypes,x=y?y.emptyScript:"",w=b.reactiveElementPolyfillSupport,S=(e,t)=>e,k={toAttribute(e,t){switch(t){case Boolean:e=e?x:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},_=(e,t)=>!h(e,t),C={attribute:!0,type:String,converter:k,reflect:!1,useDefault:!1,hasChanged:_};Symbol.metadata??=Symbol("metadata"),b.litPropertyMetadata??=new WeakMap;let E=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C;if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(e,n,t);void 0!==r&&p(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){const{get:r,set:o}=f(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){const i=r?.call(this);o?.call(this,t),this.requestUpdate(e,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??C}static _$Ei(){if(this.hasOwnProperty(S("elementProperties")))return;const e=v(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(S("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(S("properties"))){const e=this.properties,t=[...m(e),...g(e)];for(const n of t)this.createProperty(n,e[n])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,n]of t)this.elementProperties.set(e,n)}this._$Eh=new Map;for(const[t,n]of this.elementProperties){const e=this._$Eu(t,n);void 0!==e&&this._$Eh.set(e,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const e of n)t.unshift(d(e))}else void 0!==e&&t.push(d(e));return t}static _$Eu(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,t=this.constructor.elementProperties;for(const n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(i)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const n of t){const t=document.createElement("style"),r=o.litNonce;void 0!==r&&t.setAttribute("nonce",r),t.textContent=n.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){const n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(void 0!==r&&!0===n.reflect){const o=(void 0!==n.converter?.toAttribute?n.converter:k).toAttribute(t,n.type);this._$Em=e,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(e,t){const n=this.constructor,r=n._$Eh.get(e);if(void 0!==r&&this._$Em!==r){const e=n.getPropertyOptions(r),o="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:k;this._$Em=r;const i=o.fromAttribute(t,e.type);this[r]=i??this._$Ej?.get(r)??i,this._$Em=null}}requestUpdate(e,t,n){if(void 0!==e){const r=this.constructor,o=this[e];if(n??=r.getPropertyOptions(e),!((n.hasChanged??_)(o,t)||n.useDefault&&n.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,n,r){let{useDefault:o,reflect:i,wrapped:a}=n;o&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,r??t??this[e]),!0!==a||void 0!==r)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),!0===i&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,n]of e){const{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||void 0===r||this.C(t,void 0,n,r)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((e=>e.hostUpdate?.())),this.update(t)):this._$EM()}catch(Oe){throw e=!1,this._$EM(),Oe}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(e){}firstUpdated(e){}};E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[S("elementProperties")]=new Map,E[S("finalized")]=new Map,w?.({ReactiveElement:E}),(b.reactiveElementVersions??=[]).push("2.1.1");const A=globalThis,T=A.trustedTypes,O=T?T.createPolicy("lit-html",{createHTML:e=>e}):void 0,P="$lit$",z=`lit$${Math.random().toFixed(9).slice(2)}$`,D="?"+z,R=`<${D}>`,j=document,N=()=>j.createComment(""),I=e=>null===e||"object"!=typeof e&&"function"!=typeof e,M=Array.isArray,F="[ \t\n\f\r]",L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,U=/>/g,V=RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),q=/'/g,H=/"/g,W=/^(?:script|style|textarea|title)$/i,K=e=>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{_$litType$:e,strings:t,values:r}},$=K(1),Q=(K(2),Symbol.for("lit-noChange")),G=Symbol.for("lit-nothing"),X=new WeakMap,Z=j.createTreeWalker(j,129);function Y(e,t){if(!M(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==O?O.createHTML(t):t}class J{constructor(e,t){let n,{strings:r,_$litType$:o}=e;this.parts=[];let i=0,a=0;const s=r.length-1,l=this.parts,[c,u]=((e,t)=>{const n=e.length-1,r=[];let o,i=2===t?"<svg>":3===t?"<math>":"",a=L;for(let s=0;s<n;s++){const t=e[s];let n,l,c=-1,u=0;for(;u<t.length&&(a.lastIndex=u,l=a.exec(t),null!==l);)u=a.lastIndex,a===L?"!--"===l[1]?a=B:void 0!==l[1]?a=U:void 0!==l[2]?(W.test(l[2])&&(o=RegExp("</"+l[2],"g")),a=V):void 0!==l[3]&&(a=V):a===V?">"===l[0]?(a=o??L,c=-1):void 0===l[1]?c=-2:(c=a.lastIndex-l[2].length,n=l[1],a=void 0===l[3]?V:'"'===l[3]?H:q):a===H||a===q?a=V:a===B||a===U?a=L:(a=V,o=void 0);const d=a===V&&e[s+1].startsWith("/>")?" ":"";i+=a===L?t+R:c>=0?(r.push(n),t.slice(0,c)+P+t.slice(c)+z+d):t+z+(-2===c?s:d)}return[Y(e,i+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),r]})(r,o);if(this.el=J.createElement(c,t),Z.currentNode=this.el.content,2===o||3===o){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(n=Z.nextNode())&&l.length<s;){if(1===n.nodeType){if(n.hasAttributes())for(const e of n.getAttributeNames())if(e.endsWith(P)){const t=u[a++],r=n.getAttribute(e).split(z),o=/([.?@])?(.*)/.exec(t);l.push({type:1,index:i,name:o[2],strings:r,ctor:"."===o[1]?oe:"?"===o[1]?ie:"@"===o[1]?ae:re}),n.removeAttribute(e)}else e.startsWith(z)&&(l.push({type:6,index:i}),n.removeAttribute(e));if(W.test(n.tagName)){const e=n.textContent.split(z),t=e.length-1;if(t>0){n.textContent=T?T.emptyScript:"";for(let r=0;r<t;r++)n.append(e[r],N()),Z.nextNode(),l.push({type:2,index:++i});n.append(e[t],N())}}}else if(8===n.nodeType)if(n.data===D)l.push({type:2,index:i});else{let e=-1;for(;-1!==(e=n.data.indexOf(z,e+1));)l.push({type:7,index:i}),e+=z.length-1}i++}}static createElement(e,t){const n=j.createElement("template");return n.innerHTML=e,n}}function ee(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3?arguments[3]:void 0;if(t===Q)return t;let o=void 0!==r?n._$Co?.[r]:n._$Cl;const i=I(t)?void 0:t._$litDirective$;return o?.constructor!==i&&(o?._$AO?.(!1),void 0===i?o=void 0:(o=new i(e),o._$AT(e,n,r)),void 0!==r?(n._$Co??=[])[r]=o:n._$Cl=o),void 0!==o&&(t=ee(e,o._$AS(e,t.values),o,r)),t}class te{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??j).importNode(t,!0);Z.currentNode=r;let o=Z.nextNode(),i=0,a=0,s=n[0];for(;void 0!==s;){if(i===s.index){let t;2===s.type?t=new ne(o,o.nextSibling,this,e):1===s.type?t=new s.ctor(o,s.name,s.strings,this,e):6===s.type&&(t=new se(o,this,e)),this._$AV.push(t),s=n[++a]}i!==s?.index&&(o=Z.nextNode(),i++)}return Z.currentNode=j,r}p(e){let t=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class ne{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e){e=ee(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this),I(e)?e===G||null==e||""===e?(this._$AH!==G&&this._$AR(),this._$AH=G):e!==this._$AH&&e!==Q&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):(e=>M(e)||"function"==typeof e?.[Symbol.iterator])(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==G&&I(this._$AH)?this._$AA.nextSibling.data=e:this.T(j.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:n}=e,r="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=J.createElement(Y(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{const e=new te(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=X.get(e.strings);return void 0===t&&X.set(e.strings,t=new J(e)),t}k(e){M(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,r=0;for(const o of e)r===t.length?t.push(n=new ne(this.O(N()),this.O(N()),this,this.options)):n=t[r],n._$AI(o),r++;r<t.length&&(this._$AR(n&&n._$AB.nextSibling,r),t.length=r)}_$AR(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._$AA.nextSibling,t=arguments.length>1?arguments[1]:void 0;for(this._$AP?.(!1,!0,t);e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class re{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,o){this.type=1,this._$AH=G,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=o,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=G}_$AI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const o=this.strings;let i=!1;if(void 0===o)e=ee(this,e,t,0),i=!I(e)||e!==this._$AH&&e!==Q,i&&(this._$AH=e);else{const r=e;let a,s;for(e=o[0],a=0;a<o.length-1;a++)s=ee(this,r[n+a],t,a),s===Q&&(s=this._$AH[a]),i||=!I(s)||s!==this._$AH[a],s===G?e=G:e!==G&&(e+=(s??"")+o[a+1]),this._$AH[a]=s}i&&!r&&this.j(e)}j(e){e===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class oe extends re{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===G?void 0:e}}class ie extends re{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==G)}}class ae extends re{constructor(e,t,n,r,o){super(e,t,n,r,o),this.type=5}_$AI(e){if((e=ee(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,0)??G)===Q)return;const t=this._$AH,n=e===G&&t!==G||e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive,r=e!==G&&(t===G||n);n&&this.element.removeEventListener(this.name,this,t),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class se{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){ee(this,e)}}const le={I:ne},ce=A.litHtmlPolyfillSupport;ce?.(J,ne),(A.litHtmlVersions??=[]).push("3.3.1");const ue=globalThis;class de extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=((e,t,n)=>{const r=n?.renderBefore??t;let o=r._$litPart$;if(void 0===o){const e=n?.renderBefore??null;r._$litPart$=o=new ne(t.insertBefore(N(),e),e,void 0,n??{})}return o._$AI(e),o})(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Q}}de._$litElement$=!0,de.finalized=!0,ue.litElementHydrateSupport?.({LitElement:de});const he=ue.litElementPolyfillSupport;he?.({LitElement:de}),(ue.litElementVersions??=[]).push("4.2.1");const pe={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:_};function fe(e){return(t,n)=>"object"==typeof n?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const{kind:r,metadata:o}=n;let i=globalThis.litPropertyMetadata.get(o);if(void 0===i&&globalThis.litPropertyMetadata.set(o,i=new Map),"setter"===r&&((e=Object.create(e)).wrapped=!0),i.set(n.name,e),"accessor"===r){const{name:r}=n;return{set(n){const o=t.get.call(this);t.set.call(this,n),this.requestUpdate(r,o,e)},init(t){return void 0!==t&&this.C(r,void 0,e,t),t}}}if("setter"===r){const{name:r}=n;return function(n){const o=this[r];t.call(this,n),this.requestUpdate(r,o,e)}}throw Error("Unsupported decorator location: "+r)}(e,t,n):((e,t,n)=>{const r=t.hasOwnProperty(n);return t.constructor.createProperty(n,e),r?Object.getOwnPropertyDescriptor(t,n):void 0})(e,t,n)}var me=Object.defineProperty,ge=(e,t,n,r)=>{for(var o,i=void 0,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);return i&&me(t,n,i),i};const ve=class extends de{constructor(){super(),this.preRender=!1,Object.entries(this.constructor.dependencies).forEach((e=>{let[t,n]=e;this.constructor.define(t,n)}))}emit(e,t){const n=new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:{},...t});return this.dispatchEvent(n),n}static define(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=customElements.get(e);if(!r){try{customElements.define(e,t,n)}catch{customElements.define(e,class extends t{},n)}return}let o=" (unknown version)",i=o;"version"in t&&t.version&&(o=" v"+t.version),"version"in r&&r.version&&(i=" v"+r.version),(!o||!i||o!==i)&&console.warn(`Attempted to register <${e}>${o}, but <${e}>${i} has already been registered.`)}static createProperty(e,t){super.createProperty(e,t),t?.attribute&&"string"==typeof t.attribute&&!Object.prototype.hasOwnProperty.call(this.prototype,t.attribute)&&Object.prototype.hasOwnProperty.call(this.prototype,e)&&Object.defineProperty(this.prototype,t.attribute,{get(){return this[e]},set(t){this[e]=t}})}firstUpdated(e){super.firstUpdated(e),!this.preRender&&this.runFirstUpdated(e)}runFirstUpdated(e){}adoptedCallback(){ye(this)}disconnectedCallback(){super.disconnectedCallback(),ye(this)}};ve.version="1",ve.dependencies={};let be=ve;function ye(e){if(e instanceof be)return;const t=e.localName||e.tagName,n=customElements.get(t.toLowerCase());n&&Object.setPrototypeOf(e,n.prototype)}ge([fe()],be.prototype,"dir"),ge([fe()],be.prototype,"lang"),ge([fe({attribute:"pre-render",type:Boolean})],be.prototype,"preRender");const xe=e=>t=>"function"==typeof t?((e,t)=>(window.customElements.get(e)||window.customElements.define(e,t),t))(e,t):((e,t)=>{const{elements:n,kind:r}=t;return{elements:n,finisher(t){window.customElements.get(e)||window.customElements.define(e,t)},kind:r}})(e,t),we=u`
1041
1041
  :host {
1042
1042
  box-sizing: border-box;
1043
1043
  }
@@ -1103,7 +1103,7 @@
1103
1103
  ::-webkit-scrollbar-button:horizontal:end:decrement {
1104
1104
  display: none;
1105
1105
  }
1106
- `;function Se(e,t,n){return new Promise((r=>{if(n?.duration===1/0)throw new Error("Promise-based animations must be finite.");const o=e.animate(t,{...n,duration:window.matchMedia("(prefers-reduced-motion: reduce)").matches?0:n.duration});o.addEventListener("cancel",r,{once:!0}),o.addEventListener("finish",r,{once:!0})}))}function ke(e){return(e=e.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(e):e.indexOf("s")>-1?1e3*parseFloat(e):parseFloat(e)}function _e(e){return Promise.all(e.getAnimations().map((e=>new Promise((t=>{e.cancel(),requestAnimationFrame(t)})))))}function Ce(e,t){return e.map((e=>({...e,height:"auto"===e.height?`${t}px`:e.height})))}const Ee=new Map,Ae=new WeakMap;function Te(e){return e??{keyframes:[],options:{duration:0}}}function Oe(e,t){return"rtl"===t.toLowerCase()?{keyframes:e.rtlKeyframes||e.keyframes,options:e.options}:e}function Pe(e,t){Ee.set(e,Te(t))}function ze(e,t,n){const r=Ae.get(e);if(r?.[t])return Oe(r[t],n.dir);const o=Ee.get(t);return o?Oe(o,n.dir):{keyframes:[],options:{duration:0}}}function De(e,t){return new Promise((n=>{e.addEventListener(t,(function r(o){o.target===e&&(e.removeEventListener(t,r),n())}))}))}const Re=new Set,je=new MutationObserver(Ue),Ne=new Map;let Ie,Me=document.documentElement.dir||"ltr",Fe=document.documentElement.lang||navigator.language;function Le(e){return`${e.dir||Me}`.toLowerCase()}function Be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.map((e=>{const t=e.$code.toLowerCase();Ne.has(t)?Ne.set(t,{...Ne.get(t),...e}):Ne.set(t,e),Ie||(Ie=e)})),Ue()}function Ue(){Me=document.documentElement.dir||"ltr",Fe=document.documentElement.lang||navigator.language,[...Re.keys()].forEach((e=>{"function"==typeof e.requestUpdate&&e.requestUpdate()}))}je.observe(document.documentElement,{attributeFilter:["dir","lang"],attributes:!0});let Ve=class{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){Re.add(this.host)}hostDisconnected(){Re.delete(this.host)}dir(){return`${this.host.dir||Me}`.toLowerCase()}lang(){return`${this.host.lang||Fe}`.toLowerCase()}getTranslationData(e){const t=new Intl.Locale(e.replace(/_/g,"-")),n=t?.language.toLowerCase(),r=t?.region?.toLowerCase()??"";return{language:n,locale:t,primary:Ne.get(`${n}-${r}`),region:r,secondary:Ne.get(n)}}exists(e,t){const{primary:n,secondary:r}=this.getTranslationData(t.lang??this.lang());return t={includeFallback:!1,...t},!!(n&&n[e]||r&&r[e]||t.includeFallback&&Ie&&Ie[e])}term(e){const{primary:t,secondary:n}=this.getTranslationData(this.lang());let r;if(t&&t[e])r=t[e];else if(n&&n[e])r=n[e];else{if(!Ie||!Ie[e])return console.error(`No translation found for: ${String(e)}`),String(e);r=Ie[e]}for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return"function"==typeof r?r(...i):r}date(e,t){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),t).format(e)}number(e,t){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),t).format(e)}relativeTime(e,t,n){if(0===e||"second"===t&&e<0&&e>-10)return"Just now";const r=new Intl.RelativeTimeFormat(this.lang(),n).format(e,t);return e>0?r.replace("in ","").concat(" left"):r}};var qe=(e=>(e.Asset="asset",e.Folder="folder",e.Link="link",e.Page="page",e.Space="space",e))(qe||{});const He={$code:"en",$dir:"ltr",$name:"English",about:"About",action:"Action",actionOnClick:"Action on click",actions:"Actions",activeBackground:"Active background",activeFolders:"Active folders",activeFoldersHelpText:"Select folders that you\u2019d like to be active on the mounted drive.",activeTextColor:"Active text color",add:"Add",addBlock:"Add block",addChapter:"Add chapter",addColor:"Add color",addLimitExceeded:e=>`Cannot add more than ${e} fields at a time. Please modify your selection. Then add another set of fields.`,addSection:"Add section",addTab:"Add tab",addText:"Add text",addUrl:"Add URL",additionalFields:"Additional fields",additionalFieldsHelpText:"Specified metadata fields to be displayed below the details",advanced:"Advanced",alignItems:"Horizontal alignment",alignSelf:"Align self",alignment:"Alignment",allAssetUploadsWillBeVisibleHere:"All asset uploads will be visible here",allFavoriteAssetsWillBeVisibleHere:"All favorite assets will be visible here",allFoldersDefault:"All folders (Default)",allOther:"All other",allUnsavedChangesWillBeLost:"All unsaved changes will be lost.",allViewedAssetsWillBeVisibleHere:"All viewed assets will be visible here",allowDownloads:"Allow downloads",allowDownloadsDisabledTooltip:"Download is only available for custom fonts.",always:"Always",andOthers:e=>e>1?`and ${e} others`:"and 1 other",animation:"Animation",appearance:"Appearance",apply:"Apply",areaCode:"Area Code",arrows:"Arrows",ascending:"Ascending",aspectRatio:"Aspect ratio",assetIndexSync:"Asset index sync",assets:"Assets",audio:"Audio",audioGeneratingHelpText:"Processing audio generation. Controls temporarily unavailable.",autoCropping:"Auto cropping",autoSlide:"Auto-slide",automatic:"Automatic",autoplay:"Autoplay",autoplayHelp:"The video will be muted by default in order for this feature to work",back:"Back",backgroundColor:"Background color",backgroundImage:"Background image",beginTime:"Begin time",belowImage:"Below image",bento:"Bento",border:"Border",borderColor:"Border color",borderRadius:"Border radius",borderStyle:"Border style",borderWidth:"Border width",bottom:"Bottom",boxShadow:"Box shadow",cache:"Cache",cacheSizeCannotBeNegative:"Cache size cannot be negative.",cancel:"Cancel",cancelAll:"Cancel all",canceled:"Canceled",card:"Card",cardContent:"Card content",cardType:"Card type",cardTypeHelpText:e=>{switch(e){case"asset":return"Each card represents and opens a particular asset";case"space":return"Each slide represents and opens a specified space";case"link":return"Each slide opens an external link";case"page":return"Each card represents and opens a specified page";case"folder":return"Each card represents a folder or collection. Images in the card are synchronized with those in the folder. Clicking on the card opens the folder";default:return""}},cards:"Cards",cardsPerRow:"Cards per row",carousel:"Carousel",center:"Center",change:"Change",characterFormat:"Character Format",choose:"Choose",chooseExistingPaletteOrCreateNew:"Choose existing palette or create new",chunkSize:"Chunk Size",circles:"Circles",clear:"Clear",clearAll:"Clear all",clearCache:"Clear cache",clearEntry:"Clear entry",clearSearch:"Clear search",clickToCopy:"Click to copy",close:"Close",color:"Color",colorNameWillAppearInSwatch:"Color name will appear in swatches",compact:"Compact",config:"Config",configure:"Configure",confirm:"Confirm",confirmWantCancel:"Are you sure you want to cancel?",confirmWantClose:"Are you sure you want to close?",confirmWantInstanceCount:e=>`Do you confirm you want ${e}\n instance${e>1?"s":""}?`,confirmWantQuit:"Are you sure you want to quit?",connect:"Connect",connectedTo:"Connected to",connection:"Connection",connectionCannotBeEmpty:"Connection URL cannot be empty.",connectionURLInput:"Connection URL input",content:"Content",contentBuilderBlockSettingsHelp:"Block settings will be saved as a template and can be applied later to the same objects on any page of this space.",contentHelpText:"Automatic layout pulls metadata from the linked source (asset, collection, space, or page). Custom layout lets you design each slide with text, buttons, and other components.",copied:"Copied",copy:"Copy",createNewPalette:"Press Enter to create a new palette",createTransition:"Create transition",crop:"Crop",cubic:"Cubic",currentValue:"Current value",currentVersion:"Current version",custom:"Custom",customShadowAndBorderRadius:"Custom shadow and border radius",customShadowAndBorderRadiusHelpText:"By default, all cards follow the space's border-radius and shadow settings. Enable this to customize them for this gallery",customStyle:"Custom style",dashSpacing:"Dash spacing",dashWidth:"Dash width",dashed:"Dashed",dateFormat:"Date Format",default:"Default",defaultDownloadLocation:"Default download location",defaultView:"Default view",definition:"Definition",delete:"Delete",descending:"Descending",description:"Description",detachTemplate:"Detach template",detailed:"Detailed",details:"Details",detailsSourceField:"Details source field",detectedUnsavedChanges:"Detected Unsaved Changes",dimensions:"Dimensions",disabledHeightInputHelpText:"The height is automatically calculated to maintain the aspect ratio",discardAllPendingEffects:"Discard all pending effects. You cannot undo this.",disconnect:"Disconnect",displayExpandButton:"Display expand button",displayExpandButtonHelpText:"The button at the top right of the ribbon will open the library",displayShowMoreButton:'Display "Show more" button',displayShowMoreButtonHelpText:"Places a button after the last row that shows more items",doNotAskAgain:"Do not ask again",doNothing:"Do nothing",download:"Download",downloadButton:"Download button",downloadCompleted:"Download completed",downloadFailed:"Download failed",downloadLocationNoLongerExists:e=>`Default download location <strong>${e}</strong> no longer exists.`,downloadManager:"Download Manager",downloadNewVersion:"Download new version",downloadPaused:"Download paused",downloadSpeed:"Download speed",downloadingFileName:e=>`Downloading "${e}"`,downloadingFileNum:e=>`Downloading ${e} file${e>1?"s":""}`,easing:"Easing",edit:"Edit",editChapters:"Edit chapters",editColor:"Edit color",editSection:"Edit Section",editTemplate:"Edit template",emphasis:"Emphasis",emptyAccordion:"Empty accordion",emptyBento:"Empty bento",emptyCarousel:"Empty carousel",emptyGrid:"Empty grid",emptyImage:"Empty image",emptyRibbon:"Empty ribbon",emptyTabGroup:"Empty tab group",emptyVideo:"Empty video",enterYourSiteUrlToConnect:"Enter your site URL to connect",environment:"Environment",error:"Error",errorUpdatingChapters:"Error updating chapters",example:e=>`Example: ${e}`,executeACommand:"Execute a command",exitFullscreen:"Exit fullscreen",expo:"Expo",export:"Export",extension:"Extension",externalLink:"External link",fade:"Fade",failed:"Failed",favorite:"Favorite",favorites:"Favorites",favoritesSync:"Favorites sync",female:"Female",fileOnDemandSyncErrorMessage:"There are upload errors in your system. If this issue persists, please reach out to your administrator.",fill:"Fill",filter:"Filter",first:"First",firstLineIndent:"First-line indent",fit:"Fit",folder:"Folder",folderCollection:"Folder/Collection",fontKitPreview:"Font kit preview",fontSize:"Font size",fontWeight:"Font weight",format:"Format",forward:"Forward",fullscreen:"Fullscreen",galleryPickerAddCardButton:e=>{switch(e){default:case"carousel":return"Add slide";case"gallery":return"Add card"}},galleryPickerDialogTitle:(e,t)=>{const n=t?"Edit":"Add";switch(e){case qe.Asset:return`${n} asset card`;case qe.Folder:return`${n} folder card`;case qe.Page:return`${n} page card`;case qe.Space:return`${n} space card`;default:return`${n} slide`}},gap:"Gap",general:"General",generateResponse:"Generate response",goToSlide:(e,t)=>`Go to slide ${e} of ${t}`,grid:"Grid",groupBy:"Group by",header:"Header",headerSourceField:"Header source field",heading:e=>`Heading ${e}`,height:"Height",hideCode:"Hide code",hidePassword:"Hide password",history:"History",icon:"Icon",iconPicker:"Icon picker",image:"Image",imageFormat:"Image format",import:"Import",importTextFile:"Import text file",importTextFileDialogConfirm:"Import text",importTextFileDialogContent:"Imported text will replace the existing text",importTextFileDialogTitle:"Replace existing text",individualAssets:"Individual assets",individualAssetsHelpText:"Manually add assets as slides.",insertBreak:"Insert pause",inspectInFullScreen:"Inspect in fullscreen",install:"Install",interpretTextAs:"Interpret Text As",itCanTakeAFewMinutesForThisSettingToTakeEffect:"It can take a few minutes for this setting to take effect.",itemOfTotal:(e,t)=>`${e} of ${t}`,itemRangeOfTotal:(e,t,n)=>`${e} - ${t} of ${n}`,itemsGap:"Items gap",justify:"Justify",justifyContent:"Vertical alignment",keepAspectRatio:"Keep aspect ratio",label:"Label",labelAndIconColor:"Label and icon color",large:"Large",last:"Last",layout:"Layout",left:"Left",letterSpacing:"Letter spacing",lineAppearance:"Line appearance",lineColor:"Line color",lineHeight:"Line height",linear:"Linear",link:"Link",linkHelp:"Link that will open when button is clicked",listOfSections:"List of sections",loading:"Loading",location:"Location",logs:"Logs",loop:"Loop",male:"Male",marginBottom:"Margin Bottom",marginLeft:"Margin Left",marginRight:"Margin Right",marginTop:"Margin Top",max:"max",maxDownloadRate:"Max download rate",maxDownloadRateCannotBeNegative:"Max download rate cannot be negative.",maxRows:"Max rows",maxUploadRate:"Max upload rate",maxUploadRateCannotBeNegative:"Max upload rate cannot be negative.",maxWidth:"Max width",medium:"Medium",metadata:"Metadata",metadataHelpText:"By default, almost all embedded metadata will be stripped. Apply this option to preserve embedded metadata.",min:"min",minimize:"Minimize",more:"More",moreOptions:"More options",moveLeft:"Move left",moveRight:"Move right",moveSelectedItemLeft:"Move selected item(s) to the left",moveSelectedItemRight:"Move selected item(s) to the right",name:"Name",navigation:"Navigation",new:"New",newBlock:"New block",newVersionAvailable:e=>`New version ${e} available`,next:"Next",nextSlide:"Next slide",noDataAvailable:"No data available",noDownloads:"No downloads",noDownloadsMessage:"Your downloading assets will appear here.",noItemsAddedYet:e=>{switch(e){default:case"carousel":return"No slides added yet";case"gallery":return"No cards added yet"}},noResults:"No results",noSourceUrlProvided:"No source URL provided",noTemplatesAvailableForContentTeamHelpText:"No templates available. The content team can only add blocks with predefined templates which are created by the design team. Contact your administrator for further information.",nonAcceptedExtension:e=>`Invalid file(s) selected, please only choose ${e.join("/")} files.`,none:"None",notSelected:"Not selected",numOptionsSelected:e=>0===e?"No options selected":1===e?"1 option selected":`${e} options selected`,ok:"Ok",onHover:"On hover",onThisPage:"On this page",oopsSomethingWentWrong:"Oops! Something went wrong",openALink:"Open a link",openAssetInLibrary:"Open asset in the library",openAssetOverview:"Open asset overview",openDrive:"Open drive",openInDrive:"Open in drive",openInNewTab:"Open in new tab",options:"Options",overflowBehavior:"Overflow behavior",overlay:"Overlay",padding:"Padding",paddingBottom:"Padding Bottom",paddingLeft:"Padding Left",paddingRight:"Padding Right",paddingTop:"Padding Top",page:"Page",pagination:"Pagination",palette:"Palette",pantoneMatchingSystemName:"Pantone matching system name",paragraphSpacing:"Paragraph spacing",pause:"Pause",pauseAll:"Pause All",pauseTime:"Pause Time",paused:"Paused",pendingChangesSaveReminder:"Pending changes must be saved to export",pinFirstCard:"Pin first card",pinFirstCardHelpText:"Makes the first card double size. Only applies if 2 or more rows",pitchWithUnit:e=>e?`Pitch (${e})`:"Pitch",pixels:"Pixels",placeholder:"Placeholder",play:"Play",pleaseEnterAValidUrl:"Please enter a valid URL.",pleaseSelectAnAsset:"Please select an asset",position:"Position",positionInLargeCard:"Position in large card",positionInSmallCard:"Position in small card",preserveMetadata:"Preserve metadata",preview:"Preview",previewText:"Preview text",previewTooltip:"Preview the entire audio file or select text to preview the selection",previous:"Previous",previousSlide:"Previous slide",primary:"Primary",progress:"Progress",quad:"Quad",quality:"Quality",qualityHelpText:"From 1 to 100. 1 = Worst. 100 = Best. Supported Image Formats: JPG, JPEG.",radixPoint:"Radix Point",readyToUse:"Ready to use",recent:"Recent",redo:"Redo",refresh:"Refresh",remove:"Remove",removeFolder:e=>e>1?`Remove ${e} folders`:"Remove folder",renderAudio:"Render audio",reset:"Reset",resetPosition:"Reset position",resize:"Resize",resources:"Resources",responsive:"Responsive",responsiveHelpText:"Automatically adjust table on mobile devices",resume:"Resume",resumeAll:"Resume All",retry:"Retry",retryAll:"Retry all",ribbon:"Ribbon",right:"Right",rocketMode:"Rocket mode",rocketModeDefinition:"Download files faster. For better system/web performance turn this off.",rotate:"Rotate",rowsGap:"Rows gap",rowsPerPage:"Rows per page",running:"running",save:"Save",saveAllPendingEffects:"Save all pending effects. You cannot undo this.",saveAsNewTemplate:"Save as new template",scrollHint:"Peek slides width",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",search:"Search",searchDownloads:"Search downloads",searchFolders:"Search folders",secondary:"Secondary",sectionBackground:"Section background",selectAColorFromTheScreen:"Select a color from the screen",selectFolder:"Select folder",selectFolders:"Select folders",selected:"Selected",send:"Send",settings:"Settings",settingsTitle:e=>`${e} settings`,shadesPalette:e=>"No Palette"===e?"No Palette":`${e} Shades`,shadows:"Shadows",share:"Share",show:"Show",showAll:"Show all",showAllResources:"Show all resources",showCode:"Show code",showCodes:"Show codes",showControls:"Show controls",showDownloadIconsNextToEachFont:"Show download icons next to each font",showLess:"Show less",showMore:"Show more",showPassword:"Show password",showPeekSlides:"Show peek slides",showPeekSlidesHelpText:"Display side previews of neighboring slides",size:"Size",slide:"Slide",slideContent:"Slide content",slideDisplayTime:"Slide display time",slideNum:e=>`Slide ${e}`,slides:"Slides",small:"Small",software:"Software",solid:"Solid",sort:"Sort",source:"Source",space:"Space",spaceDefault:"Space default",speed:"Speed",splitIntoMultipleScreens:"Split into multiple screens",splitIntoMultipleScreensHelpText:"Creates a slideshow of images split into scrollable screens",start:"Start",status:"Status",statusDate:"Status date",stop:"Stop",style:"Style",syncing:"Syncing",tabBackground:"Tab background",table:"Table",template:"Template",templateDeletedInformation:"The template was deleted. The styling will fall back to the default styles.",templateDetachedSuccessfully:"Template was detached from the block",templateIsCurrentlyInUseInstruction:"In order to be deleted, a template must not be used by any of the blocks.",templateIsCurrentlyInUseOn:"This template is currently in use on the following pages",templateIsInUse:"Template is in use",templateName:"Template name",text:"Text",textAlign:"Alignment",textColor:"Text color",textEditor:"Text Editor",textInput:"Text content",textToSpeechUserGuide:"Rendering audio generates and saves the final text-to-speech audio file based on the selected settings.",textures:"Textures",thickness:"Thickness",thousandsSeparator:"Thousands Separator",thumbnail:"Thumbnail",thumbnailHelp:"Specify a custom image to use as a preview for the video before it has started playing. If unset, the first frame of the video will be used.",timeFormat:"Time Format",title:"Title",titleImage:"Title image",today:"Today",toggleColorFormat:"Toggle color format",tooManyFiles:"Only one file can be uploaded at a time. Please try again.",top:"Top",total:"Total",transitionDuration:"Transition duration",transitionToExisting:"Transition to existing",transitionType:"Transition type",trim:"Trim",tuneDisabled:"Select some texts to apply the effect",txtOnly:"Only text files are allowed",typeAMessage:"Type a message...",typeface:"Typeface",types:"Types",undo:"Undo",unfavorite:"Unfavorite",unit:"Unit",unlimitedDownloadRate:"Unlimited download rate",unlimitedUploadRate:"Unlimited upload rate",unlink:"Unlink",untitled:"Untitled",upToDate:"Up to date",updateChaptersSuccessfully:"Update chapters successfully",uploadDownload:"Upload & Download",uploadFailed:"Upload failed",uploads:"Uploads",userGuide:"User guide",variant:"Variant",variants:"Variants",video:"Video",videoChaptersEmptyPlaceholder:"This video doesn\u2019t have chapter yet",view:"View",viewAndSort:"view & sort",viewInAR:"View in AR",viewLogs:"View logs",virtualFolder:"Virtual folder",virtualFolderHelpText:"Sync slides with assets in the specified directory",voice:"Voice",voiceHelpText:(e,t)=>t?"does not support any formatting. All formatting will be removed upon previewing or rendering audio":`does not support: ${e.join(", ")}. These formatting will be removed upon previewing or rendering audio`,voiceSavedError:"An error occurred while saving the voice",voiceSavedSuccessfully:"Voice saved successfully",volumeWithUnit:e=>e?`Volume (${e})`:"Volume",welcomeToFileOnDemand:"Welcome to File On Demand",width:"Width",wireframe:"Wireframe",zoomIn:"Zoom in",zoomInAsset:"Zoom in on asset",zoomOut:"Zoom out",zoomToFit:"Zoom to fit"};Be(He);class We extends Ve{}Be(He);class Ke{constructor(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.slotNames=[],this.handleSlotChange=e=>{const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()},(this.host=e).addController(this),this.slotNames=n}hasDefaultSlot(){return[...this.host.childNodes].some((e=>{if(e.nodeType===e.TEXT_NODE&&""!==e.textContent.trim())return!0;if(e.nodeType===e.ELEMENT_NODE){const t=e;if("cx-visually-hidden"===t.tagName.toLowerCase())return!1;if(!t.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(e){return null!==this.host.querySelector(`:scope > [slot="${e}"]`)}test(e){return"[default]"===e?this.hasDefaultSlot():this.hasNamedSlot(e)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}}var $e="object"==typeof global&&global&&global.Object===Object&&global,Qe="object"==typeof self&&self&&self.Object===Object&&self,Ge=$e||Qe||Function("return this")(),Xe=Ge.Symbol,Ze=Object.prototype,Ye=Ze.hasOwnProperty,Je=Ze.toString,et=Xe?Xe.toStringTag:void 0;var tt=Object.prototype.toString;var nt=Xe?Xe.toStringTag:void 0;function rt(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":nt&&nt in Object(e)?function(e){var t=Ye.call(e,et),n=e[et];try{e[et]=void 0;var r=!0}catch{}var o=Je.call(e);return r&&(t?e[et]=n:delete e[et]),o}(e):function(e){return tt.call(e)}(e)}function ot(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function it(e){return null!=e&&"object"==typeof e}function at(e,t){return e===t||e!==e&&t!==t}function st(e,t){for(var n=e.length;n--;)if(at(e[n][0],t))return n;return-1}var lt=Array.prototype.splice;function ct(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ct.prototype.clear=function(){this.__data__=[],this.size=0},ct.prototype.delete=function(e){var t=this.__data__,n=st(t,e);return!(n<0)&&(n==t.length-1?t.pop():lt.call(t,n,1),--this.size,!0)},ct.prototype.get=function(e){var t=this.__data__,n=st(t,e);return n<0?void 0:t[n][1]},ct.prototype.has=function(e){return st(this.__data__,e)>-1},ct.prototype.set=function(e,t){var n=this.__data__,r=st(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function ut(e){if(!ot(e))return!1;var t=rt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var dt=Ge["__core-js_shared__"],ht=function(){var e=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var pt=Function.prototype.toString;function ft(e){if(null!=e){try{return pt.call(e)}catch{}try{return e+""}catch{}}return""}var mt=/^\[object .+?Constructor\]$/,gt=Function.prototype,vt=Object.prototype,bt=gt.toString,yt=vt.hasOwnProperty,xt=RegExp("^"+bt.call(yt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wt(e){return!(!ot(e)||function(e){return!!ht&&ht in e}(e))&&(ut(e)?xt:mt).test(ft(e))}function St(e,t){var n=function(e,t){return e?.[t]}(e,t);return wt(n)?n:void 0}var kt=St(Ge,"Map"),_t=St(Object,"create");var Ct=Object.prototype.hasOwnProperty;var Et=Object.prototype.hasOwnProperty;function At(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Tt(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ot(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}At.prototype.clear=function(){this.__data__=_t?_t(null):{},this.size=0},At.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},At.prototype.get=function(e){var t=this.__data__;if(_t){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ct.call(t,e)?t[e]:void 0},At.prototype.has=function(e){var t=this.__data__;return _t?void 0!==t[e]:Et.call(t,e)},At.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=_t&&void 0===t?"__lodash_hash_undefined__":t,this},Ot.prototype.clear=function(){this.size=0,this.__data__={hash:new At,map:new(kt||ct),string:new At}},Ot.prototype.delete=function(e){var t=Tt(this,e).delete(e);return this.size-=t?1:0,t},Ot.prototype.get=function(e){return Tt(this,e).get(e)},Ot.prototype.has=function(e){return Tt(this,e).has(e)},Ot.prototype.set=function(e,t){var n=Tt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Pt(e){var t=this.__data__=new ct(e);this.size=t.size}Pt.prototype.clear=function(){this.__data__=new ct,this.size=0},Pt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Pt.prototype.get=function(e){return this.__data__.get(e)},Pt.prototype.has=function(e){return this.__data__.has(e)},Pt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ct){var r=n.__data__;if(!kt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ot(r)}return n.set(e,t),this.size=n.size,this};function zt(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ot;++t<n;)this.add(e[t])}function Dt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Rt(e,t){return e.has(t)}zt.prototype.add=zt.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},zt.prototype.has=function(e){return this.__data__.has(e)};function jt(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=2&n?new zt:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var f=e[d],m=t[d];if(r)var g=a?r(m,f,d,t,e,i):r(f,m,d,e,t,i);if(void 0!==g){if(g)continue;h=!1;break}if(p){if(!Dt(t,(function(e,t){if(!Rt(p,t)&&(f===e||o(f,e,n,r,i)))return p.push(t)}))){h=!1;break}}else if(f!==m&&!o(f,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h}var Nt=Ge.Uint8Array;function It(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Mt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Ft=Xe?Xe.prototype:void 0,Lt=Ft?Ft.valueOf:void 0;var Bt=Array.isArray;var Ut=Object.prototype.propertyIsEnumerable,Vt=Object.getOwnPropertySymbols,qt=Vt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(Vt(e),(function(t){return Ut.call(e,t)})))}:function(){return[]};function Ht(e){return it(e)&&"[object Arguments]"==rt(e)}var Wt=Object.prototype,Kt=Wt.hasOwnProperty,$t=Wt.propertyIsEnumerable,Qt=Ht(function(){return arguments}())?Ht:function(e){return it(e)&&Kt.call(e,"callee")&&!$t.call(e,"callee")};var Gt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xt=Gt&&"object"==typeof module&&module&&!module.nodeType&&module,Zt=Xt&&Xt.exports===Gt?Ge.Buffer:void 0,Yt=(Zt?Zt.isBuffer:void 0)||function(){return!1},Jt=/^(?:0|[1-9]\d*)$/;function en(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&("number"==n||"symbol"!=n&&Jt.test(e))&&e>-1&&e%1==0&&e<t}function tn(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var nn={};nn["[object Float32Array]"]=nn["[object Float64Array]"]=nn["[object Int8Array]"]=nn["[object Int16Array]"]=nn["[object Int32Array]"]=nn["[object Uint8Array]"]=nn["[object Uint8ClampedArray]"]=nn["[object Uint16Array]"]=nn["[object Uint32Array]"]=!0,nn["[object Arguments]"]=nn["[object Array]"]=nn["[object ArrayBuffer]"]=nn["[object Boolean]"]=nn["[object DataView]"]=nn["[object Date]"]=nn["[object Error]"]=nn["[object Function]"]=nn["[object Map]"]=nn["[object Number]"]=nn["[object Object]"]=nn["[object RegExp]"]=nn["[object Set]"]=nn["[object String]"]=nn["[object WeakMap]"]=!1;var rn="object"==typeof exports&&exports&&!exports.nodeType&&exports,on=rn&&"object"==typeof module&&module&&!module.nodeType&&module,an=on&&on.exports===rn&&$e.process,sn=function(){try{return on&&on.require&&on.require("util").types||an&&an.binding&&an.binding("util")}catch{}}(),ln=sn&&sn.isTypedArray,cn=ln?function(e){return function(t){return e(t)}}(ln):function(e){return it(e)&&tn(e.length)&&!!nn[rt(e)]},un=Object.prototype.hasOwnProperty;function dn(e,t){var n=Bt(e),r=!n&&Qt(e),o=!n&&!r&&Yt(e),i=!n&&!r&&!o&&cn(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)(t||un.call(e,c))&&(!a||!("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||en(c,l)))&&s.push(c);return s}var hn=Object.prototype;var pn=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),fn=Object.prototype.hasOwnProperty;function mn(e){if(!function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||hn)}(e))return pn(e);var t=[];for(var n in Object(e))fn.call(e,n)&&"constructor"!=n&&t.push(n);return t}function gn(e){return function(e){return null!=e&&tn(e.length)&&!ut(e)}(e)?dn(e):mn(e)}function vn(e){return function(e,t,n){var r=t(e);return Bt(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,gn,qt)}var bn=Object.prototype.hasOwnProperty;var yn=St(Ge,"DataView"),xn=St(Ge,"Promise"),wn=St(Ge,"Set"),Sn=St(Ge,"WeakMap"),kn="[object Map]",_n="[object Promise]",Cn="[object Set]",En="[object WeakMap]",An="[object DataView]",Tn=ft(yn),On=ft(kt),Pn=ft(xn),zn=ft(wn),Dn=ft(Sn),Rn=rt;(yn&&Rn(new yn(new ArrayBuffer(1)))!=An||kt&&Rn(new kt)!=kn||xn&&Rn(xn.resolve())!=_n||wn&&Rn(new wn)!=Cn||Sn&&Rn(new Sn)!=En)&&(Rn=function(e){var t=rt(e),n="[object Object]"==t?e.constructor:void 0,r=n?ft(n):"";if(r)switch(r){case Tn:return An;case On:return kn;case Pn:return _n;case zn:return Cn;case Dn:return En}return t});var jn="[object Arguments]",Nn="[object Array]",In="[object Object]",Mn=Object.prototype.hasOwnProperty;function Fn(e,t,n,r,o,i){var a=Bt(e),s=Bt(t),l=a?Nn:Rn(e),c=s?Nn:Rn(t),u=(l=l==jn?In:l)==In,d=(c=c==jn?In:c)==In,h=l==c;if(h&&Yt(e)){if(!Yt(t))return!1;a=!0,u=!1}if(h&&!u)return i||(i=new Pt),a||cn(e)?jt(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Nt(e),new Nt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return at(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=It;case"[object Set]":var l=1&r;if(s||(s=Mt),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=jt(s(e),s(t),r,o,i,a);return a.delete(e),u;case"[object Symbol]":if(Lt)return Lt.call(e)==Lt.call(t)}return!1}(e,t,l,n,r,o,i);if(!(1&n)){var p=u&&Mn.call(e,"__wrapped__"),f=d&&Mn.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,g=f?t.value():t;return i||(i=new Pt),o(m,g,n,r,i)}}return!!h&&(i||(i=new Pt),function(e,t,n,r,o,i){var a=1&n,s=vn(e),l=s.length;if(l!=vn(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:bn.call(t,u)))return!1}var d=i.get(e),h=i.get(t);if(d&&h)return d==t&&h==e;var p=!0;i.set(e,t),i.set(t,e);for(var f=a;++c<l;){var m=e[u=s[c]],g=t[u];if(r)var v=a?r(g,m,u,t,e,i):r(m,g,u,e,t,i);if(!(void 0===v?m===g||o(m,g,n,r,i):v)){p=!1;break}f||(f="constructor"==u)}if(p&&!f){var b=e.constructor,y=t.constructor;b!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y)&&(p=!1)}return i.delete(e),i.delete(t),p}(e,t,n,r,o,i))}function Ln(e,t,n,r,o){return e===t||(null==e||null==t||!it(e)&&!it(t)?e!==e&&t!==t:Fn(e,t,n,r,Ln,o))}function Bn(e,t){const n={deepCompare:!1,waitUntilFirstUpdate:!1,...t};return(t,r)=>{const{update:o}=t,i=Array.isArray(e)?e:[e];t.update=function(e){i.forEach((t=>{const o=t;if(e.has(o)){const t=e.get(o),i=this[o];(n.deepCompare?!function(e,t){return Ln(e,t)}(t,i):t!==i)&&(!n.waitUntilFirstUpdate||this.hasUpdated)&&this[r](t,i)}})),o.call(this,e)}}}function Un(e){return fe({...e,state:!0,attribute:!1})}const Vn=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,n),n);function qn(e,t){return(t,n,r)=>Vn(t,n,{get(){return(t=>t.renderRoot?.querySelector(e)??null)(this)}})}const Hn=1,Wn=2,Kn=3,$n=4,Qn=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return{_$litDirective$:e,values:n}};class Gn{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const Xn=Qn(class extends Gn{constructor(e){if(super(e),e.type!==Hn||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,t){let[n]=t;if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in n)n[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(n)}const r=e.element.classList;for(const o of this.st)o in n||(r.remove(o),this.st.delete(o));for(const o in n){const e=!!n[o];e===this.st.has(o)||this.nt?.has(o)||(e?(r.add(o),this.st.add(o)):(r.remove(o),this.st.delete(o)))}return Q}}),Zn=e=>e??G;function Yn(e,t,n){return e?t(e):n?.(e)}const Jn=Symbol.for(""),er=e=>{if(e?.r===Jn)return e?._$litStatic$},tr=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];return{_$litStatic$:n.reduce(((t,n,r)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(n)+e[r+1]),e[0]),r:Jn}},nr=new Map,rr=(e=>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];const i=r.length;let a,s;const l=[],c=[];let u,d=0,h=!1;for(;d<i;){for(u=t[d];d<i&&(s=r[d],void 0!==(a=er(s)));)u+=a+t[++d],h=!0;d!==i&&c.push(s),l.push(u),d++}if(d===i&&l.push(t[i]),h){const e=l.join("$$lit$$");void 0===(t=nr.get(e))&&(l.raw=l,nr.set(e,t=l)),r=c}return e(t,...r)})($),or=u`
1106
+ `;function Se(e,t,n){return new Promise((r=>{if(n?.duration===1/0)throw new Error("Promise-based animations must be finite.");const o=e.animate(t,{...n,duration:window.matchMedia("(prefers-reduced-motion: reduce)").matches?0:n.duration});o.addEventListener("cancel",r,{once:!0}),o.addEventListener("finish",r,{once:!0})}))}function ke(e){return(e=e.toString().toLowerCase()).indexOf("ms")>-1?parseFloat(e):e.indexOf("s")>-1?1e3*parseFloat(e):parseFloat(e)}function _e(e){return Promise.all(e.getAnimations().map((e=>new Promise((t=>{e.cancel(),requestAnimationFrame(t)})))))}function Ce(e,t){return e.map((e=>({...e,height:"auto"===e.height?`${t}px`:e.height})))}const Ee=new Map,Ae=new WeakMap;function Te(e){return e??{keyframes:[],options:{duration:0}}}function Oe(e,t){return"rtl"===t.toLowerCase()?{keyframes:e.rtlKeyframes||e.keyframes,options:e.options}:e}function Pe(e,t){Ee.set(e,Te(t))}function ze(e,t,n){const r=Ae.get(e);if(r?.[t])return Oe(r[t],n.dir);const o=Ee.get(t);return o?Oe(o,n.dir):{keyframes:[],options:{duration:0}}}function De(e,t){return new Promise((n=>{e.addEventListener(t,(function r(o){o.target===e&&(e.removeEventListener(t,r),n())}))}))}const Re=new Set,je=new MutationObserver(Ue),Ne=new Map;let Ie,Me=document.documentElement.dir||"ltr",Fe=document.documentElement.lang||navigator.language;function Le(e){return`${e.dir||Me}`.toLowerCase()}function Be(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.map((e=>{const t=e.$code.toLowerCase();Ne.has(t)?Ne.set(t,{...Ne.get(t),...e}):Ne.set(t,e),Ie||(Ie=e)})),Ue()}function Ue(){Me=document.documentElement.dir||"ltr",Fe=document.documentElement.lang||navigator.language,[...Re.keys()].forEach((e=>{"function"==typeof e.requestUpdate&&e.requestUpdate()}))}je.observe(document.documentElement,{attributeFilter:["dir","lang"],attributes:!0});let Ve=class{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){Re.add(this.host)}hostDisconnected(){Re.delete(this.host)}dir(){return`${this.host.dir||Me}`.toLowerCase()}lang(){return`${this.host.lang||Fe}`.toLowerCase()}getTranslationData(e){const t=new Intl.Locale(e.replace(/_/g,"-")),n=t?.language.toLowerCase(),r=t?.region?.toLowerCase()??"";return{language:n,locale:t,primary:Ne.get(`${n}-${r}`),region:r,secondary:Ne.get(n)}}exists(e,t){const{primary:n,secondary:r}=this.getTranslationData(t.lang??this.lang());return t={includeFallback:!1,...t},!!(n&&n[e]||r&&r[e]||t.includeFallback&&Ie&&Ie[e])}term(e){const{primary:t,secondary:n}=this.getTranslationData(this.lang());let r;if(t&&t[e])r=t[e];else if(n&&n[e])r=n[e];else{if(!Ie||!Ie[e])return console.error(`No translation found for: ${String(e)}`),String(e);r=Ie[e]}for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return"function"==typeof r?r(...i):r}date(e,t){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),t).format(e)}number(e,t){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),t).format(e)}relativeTime(e,t,n){if(0===e||"second"===t&&e<0&&e>-10)return"Just now";const r=new Intl.RelativeTimeFormat(this.lang(),n).format(e,t);return e>0?r.replace("in ","").concat(" left"):r}};var qe=(e=>(e.Asset="asset",e.Folder="folder",e.Link="link",e.Page="page",e.Space="space",e))(qe||{});const He={$code:"en",$dir:"ltr",$name:"English",about:"About",action:"Action",actionOnClick:"Action on click",actions:"Actions",activeBackground:"Active background",activeFolders:"Active folders",activeFoldersHelpText:"Select folders that you\u2019d like to be active on the mounted drive.",activeTextColor:"Active text color",add:"Add",addBlock:"Add block",addChapter:"Add chapter",addColor:"Add color",addLimitExceeded:e=>`Cannot add more than ${e} fields at a time. Please modify your selection. Then add another set of fields.`,addSection:"Add section",addTab:"Add tab",addText:"Add text",addUrl:"Add URL",additionalFields:"Additional fields",additionalFieldsHelpText:"Specified metadata fields to be displayed below the details",advanced:"Advanced",alignItems:"Horizontal alignment",alignSelf:"Align self",alignment:"Alignment",allAssetUploadsWillBeVisibleHere:"All asset uploads will be visible here",allFavoriteAssetsWillBeVisibleHere:"All favorite assets will be visible here",allFoldersDefault:"All folders (Default)",allOther:"All other",allUnsavedChangesWillBeLost:"All unsaved changes will be lost.",allViewedAssetsWillBeVisibleHere:"All viewed assets will be visible here",allowDownloads:"Allow downloads",allowDownloadsDisabledTooltip:"Download is only available for custom fonts.",always:"Always",andOthers:e=>e>1?`and ${e} others`:"and 1 other",animation:"Animation",appearance:"Appearance",apply:"Apply",areaCode:"Area Code",arrows:"Arrows",ascending:"Ascending",aspectRatio:"Aspect ratio",assetIndexSync:"Asset index sync",assets:"Assets",audio:"Audio",audioGeneratingHelpText:"Processing audio generation. Controls temporarily unavailable.",autoCropping:"Auto cropping",autoSlide:"Auto-slide",automatic:"Automatic",autoplay:"Autoplay",autoplayHelp:"The video will be muted by default in order for this feature to work",back:"Back",backgroundColor:"Background color",backgroundImage:"Background image",beginTime:"Begin time",belowImage:"Below image",bento:"Bento",border:"Border",borderColor:"Border color",borderRadius:"Border radius",borderStyle:"Border style",borderWidth:"Border width",bottom:"Bottom",boxShadow:"Box shadow",cache:"Cache",cacheSizeCannotBeNegative:"Cache size cannot be negative.",cancel:"Cancel",cancelAll:"Cancel all",canceled:"Canceled",card:"Card",cardContent:"Card content",cardType:"Card type",cardTypeHelpText:e=>{switch(e){case"asset":return"Each card represents and opens a particular asset";case"space":return"Each slide represents and opens a specified space";case"link":return"Each slide opens an external link";case"page":return"Each card represents and opens a specified page";case"folder":return"Each card represents a folder or collection. Images in the card are synchronized with those in the folder. Clicking on the card opens the folder";default:return""}},cards:"Cards",cardsPerRow:"Cards per row",carousel:"Carousel",center:"Center",change:"Change",characterFormat:"Character Format",choose:"Choose",chooseExistingPaletteOrCreateNew:"Choose existing palette or create new",chunkSize:"Chunk Size",circles:"Circles",clear:"Clear",clearAll:"Clear all",clearCache:"Clear cache",clearEntry:"Clear entry",clearSearch:"Clear search",clickToCopy:"Click to copy",close:"Close",color:"Color",colorNameWillAppearInSwatch:"Color name will appear in swatches",compact:"Compact",config:"Config",configure:"Configure",confirm:"Confirm",confirmWantCancel:"Are you sure you want to cancel?",confirmWantClose:"Are you sure you want to close?",confirmWantInstanceCount:e=>`Do you confirm you want ${e}\n instance${e>1?"s":""}?`,confirmWantQuit:"Are you sure you want to quit?",connect:"Connect",connectedTo:"Connected to",connection:"Connection",connectionCannotBeEmpty:"Connection URL cannot be empty.",connectionURLInput:"Connection URL input",content:"Content",contentBuilderBlockSettingsHelp:"Block settings will be saved as a template and can be applied later to the same objects on any page of this space.",contentHelpText:"Automatic layout pulls metadata from the linked source (asset, collection, space, or page). Custom layout lets you design each slide with text, buttons, and other components.",copied:"Copied",copy:"Copy",createNewPalette:"Press Enter to create a new palette",createTransition:"Create transition",crop:"Crop",cubic:"Cubic",currentValue:"Current value",currentVersion:"Current version",custom:"Custom",customShadowAndBorderRadius:"Custom shadow and border radius",customShadowAndBorderRadiusHelpText:"By default, all cards follow the space's border-radius and shadow settings. Enable this to customize them for this gallery",customStyle:"Custom style",dashSpacing:"Dash spacing",dashWidth:"Dash width",dashed:"Dashed",dateFormat:"Date Format",default:"Default",defaultDownloadLocation:"Default download location",defaultView:"Default view",definition:"Definition",delete:"Delete",descending:"Descending",description:"Description",detachTemplate:"Detach template",detailed:"Detailed",details:"Details",detailsSourceField:"Details source field",detectedUnsavedChanges:"Detected Unsaved Changes",dimensions:"Dimensions",disabledHeightInputHelpText:"The height is automatically calculated to maintain the aspect ratio",discardAllPendingEffects:"Discard all pending effects. You cannot undo this.",disconnect:"Disconnect",displayExpandButton:"Display expand button",displayExpandButtonHelpText:"The button at the top right of the ribbon will open the library",displayShowMoreButton:'Display "Show more" button',displayShowMoreButtonHelpText:"Places a button after the last row that shows more items",doNotAskAgain:"Do not ask again",doNothing:"Do nothing",download:"Download",downloadButton:"Download button",downloadCompleted:"Download completed",downloadFailed:"Download failed",downloadLocationNoLongerExists:e=>`Default download location <strong>${e}</strong> no longer exists.`,downloadManager:"Download Manager",downloadNewVersion:"Download new version",downloadPaused:"Download paused",downloadSpeed:"Download speed",downloadingFileName:e=>`Downloading "${e}"`,downloadingFileNum:e=>`Downloading ${e} file${e>1?"s":""}`,easing:"Easing",edit:"Edit",editChapters:"Edit chapters",editColor:"Edit color",editSection:"Edit Section",editTemplate:"Edit template",emphasis:"Emphasis",emptyAccordion:"Empty accordion",emptyBento:"Empty bento",emptyCarousel:"Empty carousel",emptyGrid:"Empty grid",emptyImage:"Empty image",emptyRibbon:"Empty ribbon",emptyTabGroup:"Empty tab group",emptyVideo:"Empty video",enterYourSiteUrlToConnect:"Enter your site URL to connect",environment:"Environment",error:"Error",errorUpdatingChapters:"Error updating chapters",example:e=>`Example: ${e}`,executeACommand:"Execute a command",exitFullscreen:"Exit fullscreen",expo:"Expo",export:"Export",extension:"Extension",externalLink:"External link",fade:"Fade",failed:"Failed",favorite:"Favorite",favorites:"Favorites",favoritesSync:"Favorites sync",female:"Female",fileOnDemandSyncErrorMessage:"There are upload errors in your system. If this issue persists, please reach out to your administrator.",fill:"Fill",filter:"Filter",first:"First",firstLineIndent:"First-line indent",fit:"Fit",folder:"Folder",folderCollection:"Folder/Collection",fontKitPreview:"Font kit preview",fontSize:"Font size",fontWeight:"Font weight",format:"Format",forward:"Forward",fullscreen:"Fullscreen",galleryPickerAddCardButton:e=>{switch(e){default:case"carousel":return"Add slide";case"gallery":return"Add card"}},galleryPickerDialogTitle:(e,t)=>{const n=t?"Edit":"Add";switch(e){case qe.Asset:return`${n} asset card`;case qe.Folder:return`${n} folder card`;case qe.Page:return`${n} page card`;case qe.Space:return`${n} space card`;default:return`${n} slide`}},gap:"Gap",general:"General",generateResponse:"Generate response",goToSlide:(e,t)=>`Go to slide ${e} of ${t}`,grid:"Grid",groupBy:"Group by",header:"Header",headerSourceField:"Header source field",heading:e=>`Heading ${e}`,height:"Height",hideCode:"Hide code",hidePassword:"Hide password",history:"History",icon:"Icon",iconPicker:"Icon picker",image:"Image",imageFormat:"Image format",import:"Import",importTextFile:"Import text file",importTextFileDialogConfirm:"Import text",importTextFileDialogContent:"Imported text will replace the existing text",importTextFileDialogTitle:"Replace existing text",individualAssets:"Individual assets",individualAssetsHelpText:"Manually add assets as slides.",insertBreak:"Insert pause",inspectInFullScreen:"Inspect in fullscreen",install:"Install",interpretTextAs:"Interpret Text As",itCanTakeAFewMinutesForThisSettingToTakeEffect:"It can take a few minutes for this setting to take effect.",itemOfTotal:(e,t)=>`${e} of ${t}`,itemRangeOfTotal:(e,t,n)=>`${e} - ${t} of ${n}`,itemsGap:"Items gap",justify:"Justify",justifyContent:"Vertical alignment",keepAspectRatio:"Keep aspect ratio",label:"Label",labelAndIconColor:"Label and icon color",large:"Large",last:"Last",layout:"Layout",left:"Left",letterSpacing:"Letter spacing",lineAppearance:"Line appearance",lineColor:"Line color",lineHeight:"Line height",linear:"Linear",link:"Link",linkHelp:"Link that will open when button is clicked",listOfSections:"List of sections",loading:"Loading",location:"Location",logs:"Logs",loop:"Loop",male:"Male",marginBottom:"Margin Bottom",marginLeft:"Margin Left",marginRight:"Margin Right",marginTop:"Margin Top",max:"max",maxDownloadRate:"Max download rate",maxDownloadRateCannotBeNegative:"Max download rate cannot be negative.",maxRows:"Max rows",maxUploadRate:"Max upload rate",maxUploadRateCannotBeNegative:"Max upload rate cannot be negative.",maxWidth:"Max width",medium:"Medium",metadata:"Metadata",metadataHelpText:"By default, almost all embedded metadata will be stripped. Apply this option to preserve embedded metadata.",min:"min",minimize:"Minimize",more:"More",moreOptions:"More options",moveLeft:"Move left",moveRight:"Move right",moveSelectedItemLeft:"Move selected item(s) to the left",moveSelectedItemRight:"Move selected item(s) to the right",name:"Name",navigation:"Navigation",new:"New",newBlock:"New block",newVersionAvailable:e=>`New version ${e} available`,next:"Next",nextSlide:"Next slide",noDataAvailable:"No data available",noDownloads:"No downloads",noDownloadsMessage:"Your downloading assets will appear here.",noItemsAddedYet:e=>{switch(e){default:case"carousel":return"No slides added yet";case"gallery":return"No cards added yet"}},noResults:"No results",noSourceUrlProvided:"No source URL provided",noTemplatesAvailableForContentTeamHelpText:"No templates available. The content team can only add blocks with predefined templates which are created by the design team. Contact your administrator for further information.",nonAcceptedExtension:e=>`Invalid file(s) selected, please only choose ${e.join("/")} files.`,none:"None",notSelected:"Not selected",numOptionsSelected:e=>0===e?"No options selected":1===e?"1 option selected":`${e} options selected`,ok:"Ok",onHover:"On hover",onThisPage:"On this page",oopsSomethingWentWrong:"Oops! Something went wrong",openALink:"Open a link",openAssetInLibrary:"Open asset in the library",openAssetOverview:"Open asset overview",openDrive:"Open drive",openInDrive:"Open in drive",openInNewTab:"Open in new tab",options:"Options",overflowBehavior:"Overflow behavior",overlay:"Overlay",padding:"Padding",paddingBottom:"Padding Bottom",paddingLeft:"Padding Left",paddingRight:"Padding Right",paddingTop:"Padding Top",page:"Page",pagination:"Pagination",palette:"Palette",pantoneMatchingSystemName:"Pantone matching system name",paragraphSpacing:"Paragraph spacing",pause:"Pause",pauseAll:"Pause All",pauseTime:"Pause Time",paused:"Paused",pendingChangesSaveReminder:"Pending changes must be saved to export",pinFirstCard:"Pin first card",pinFirstCardHelpText:"Makes the first card double size. Only applies if 2 or more rows",pitchWithUnit:e=>e?`Pitch (${e})`:"Pitch",pixels:"Pixels",placeholder:"Placeholder",play:"Play",pleaseEnterAValidUrl:"Please enter a valid URL.",pleaseSelectAnAsset:"Please select an asset",position:"Position",positionInLargeCard:"Position in large card",positionInSmallCard:"Position in small card",preserveMetadata:"Preserve metadata",preview:"Preview",previewText:"Preview text",previewTooltip:"Preview the entire audio file or select text to preview the selection",previous:"Previous",previousSlide:"Previous slide",primary:"Primary",progress:"Progress",quad:"Quad",quality:"Quality",qualityHelpText:"From 1 to 100. 1 = Worst. 100 = Best. Supported Image Formats: JPG, JPEG.",radixPoint:"Radix Point",readyToUse:"Ready to use",recent:"Recent",redo:"Redo",refresh:"Refresh",remove:"Remove",removeFolder:e=>e>1?`Remove ${e} folders`:"Remove folder",renderAudio:"Render audio",reset:"Reset",resetPosition:"Reset position",resize:"Resize",resources:"Resources",responsive:"Responsive",responsiveHelpText:"Automatically adjust table on mobile devices",resume:"Resume",resumeAll:"Resume All",retry:"Retry",retryAll:"Retry all",ribbon:"Ribbon",right:"Right",rocketMode:"Rocket mode",rocketModeDefinition:"Download files faster. For better system/web performance turn this off.",rotate:"Rotate",rowsGap:"Rows gap",rowsPerPage:"Rows per page",running:"running",save:"Save",saveAllPendingEffects:"Save all pending effects. You cannot undo this.",saveAsNewTemplate:"Save as new template",scrollHint:"Peek slides width",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",search:"Search",searchDownloads:"Search downloads",searchFolders:"Search folders",secondary:"Secondary",sectionBackground:"Section background",selectAColorFromTheScreen:"Select a color from the screen",selectFolder:"Select folder",selectFolders:"Select folders",selected:"Selected",send:"Send",settings:"Settings",settingsTitle:e=>`${e} settings`,shadesPalette:e=>"No Palette"===e?"No Palette":`${e} Shades`,shadows:"Shadows",share:"Share",show:"Show",showAll:"Show all",showAllResources:"Show all resources",showCode:"Show code",showCodes:"Show codes",showControls:"Show controls",showDownloadIconsNextToEachFont:"Show download icons next to each font",showLess:"Show less",showMore:"Show more",showPassword:"Show password",showPeekSlides:"Show peek slides",showPeekSlidesHelpText:"Display side previews of neighboring slides",size:"Size",slide:"Slide",slideContent:"Slide content",slideDisplayTime:"Slide display time",slideNum:e=>`Slide ${e}`,slides:"Slides",small:"Small",software:"Software",solid:"Solid",sort:"Sort",source:"Source",space:"Space",spaceDefault:"Space default",speed:"Speed",splitIntoMultipleScreens:"Split into multiple screens",splitIntoMultipleScreensHelpText:"Creates a slideshow of images split into scrollable screens",start:"Start",status:"Status",statusDate:"Status date",stop:"Stop",style:"Style",syncing:"Syncing",tabBackground:"Tab background",table:"Table",template:"Template",templateDeletedInformation:"The template was deleted. The styling will fall back to the default styles.",templateDetachedSuccessfully:"Template was detached from the block",templateIsCurrentlyInUseInstruction:"In order to be deleted, a template must not be used by any of the blocks.",templateIsCurrentlyInUseOn:"This template is currently in use on the following pages",templateIsInUse:"Template is in use",templateName:"Template name",text:"Text",textAlign:"Alignment",textColor:"Text color",textEditor:"Text Editor",textInput:"Text content",textToSpeechUserGuide:"Rendering audio generates and saves the final text-to-speech audio file based on the selected settings.",textures:"Textures",thickness:"Thickness",thousandsSeparator:"Thousands Separator",thumbnail:"Thumbnail",thumbnailHelp:"Specify a custom image to use as a preview for the video before it has started playing. If unset, the first frame of the video will be used.",timeFormat:"Time Format",title:"Title",titleImage:"Title image",today:"Today",toggleColorFormat:"Toggle color format",tooManyFiles:"Only one file can be uploaded at a time. Please try again.",top:"Top",total:"Total",transformations:"Transformations",transitionDuration:"Transition duration",transitionToExisting:"Transition to existing",transitionType:"Transition type",trim:"Trim",tuneDisabled:"Select some texts to apply the effect",txtOnly:"Only text files are allowed",typeAMessage:"Type a message...",typeface:"Typeface",types:"Types",undo:"Undo",unfavorite:"Unfavorite",unit:"Unit",unlimitedDownloadRate:"Unlimited download rate",unlimitedUploadRate:"Unlimited upload rate",unlink:"Unlink",untitled:"Untitled",upToDate:"Up to date",updateChaptersSuccessfully:"Update chapters successfully",uploadDownload:"Upload & Download",uploadFailed:"Upload failed",uploads:"Uploads",userGuide:"User guide",variant:"Variant",variants:"Variants",video:"Video",videoChaptersEmptyPlaceholder:"This video doesn\u2019t have chapter yet",view:"View",viewAndSort:"view & sort",viewInAR:"View in AR",viewLogs:"View logs",virtualFolder:"Virtual folder",virtualFolderHelpText:"Sync slides with assets in the specified directory",voice:"Voice",voiceHelpText:(e,t)=>t?"does not support any formatting. All formatting will be removed upon previewing or rendering audio":`does not support: ${e.join(", ")}. These formatting will be removed upon previewing or rendering audio`,voiceSavedError:"An error occurred while saving the voice",voiceSavedSuccessfully:"Voice saved successfully",volumeWithUnit:e=>e?`Volume (${e})`:"Volume",welcomeToFileOnDemand:"Welcome to File On Demand",width:"Width",wireframe:"Wireframe",zoomIn:"Zoom in",zoomInAsset:"Zoom in on asset",zoomOut:"Zoom out",zoomToFit:"Zoom to fit"};Be(He);class We extends Ve{}Be(He);class Ke{constructor(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.slotNames=[],this.handleSlotChange=e=>{const t=e.target;(this.slotNames.includes("[default]")&&!t.name||t.name&&this.slotNames.includes(t.name))&&this.host.requestUpdate()},(this.host=e).addController(this),this.slotNames=n}hasDefaultSlot(){return[...this.host.childNodes].some((e=>{if(e.nodeType===e.TEXT_NODE&&""!==e.textContent.trim())return!0;if(e.nodeType===e.ELEMENT_NODE){const t=e;if("cx-visually-hidden"===t.tagName.toLowerCase())return!1;if(!t.hasAttribute("slot"))return!0}return!1}))}hasNamedSlot(e){return null!==this.host.querySelector(`:scope > [slot="${e}"]`)}test(e){return"[default]"===e?this.hasDefaultSlot():this.hasNamedSlot(e)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}}var $e="object"==typeof global&&global&&global.Object===Object&&global,Qe="object"==typeof self&&self&&self.Object===Object&&self,Ge=$e||Qe||Function("return this")(),Xe=Ge.Symbol,Ze=Object.prototype,Ye=Ze.hasOwnProperty,Je=Ze.toString,et=Xe?Xe.toStringTag:void 0;var tt=Object.prototype.toString;var nt=Xe?Xe.toStringTag:void 0;function rt(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":nt&&nt in Object(e)?function(e){var t=Ye.call(e,et),n=e[et];try{e[et]=void 0;var r=!0}catch{}var o=Je.call(e);return r&&(t?e[et]=n:delete e[et]),o}(e):function(e){return tt.call(e)}(e)}function ot(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function it(e){return null!=e&&"object"==typeof e}function at(e,t){return e===t||e!==e&&t!==t}function st(e,t){for(var n=e.length;n--;)if(at(e[n][0],t))return n;return-1}var lt=Array.prototype.splice;function ct(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ct.prototype.clear=function(){this.__data__=[],this.size=0},ct.prototype.delete=function(e){var t=this.__data__,n=st(t,e);return!(n<0)&&(n==t.length-1?t.pop():lt.call(t,n,1),--this.size,!0)},ct.prototype.get=function(e){var t=this.__data__,n=st(t,e);return n<0?void 0:t[n][1]},ct.prototype.has=function(e){return st(this.__data__,e)>-1},ct.prototype.set=function(e,t){var n=this.__data__,r=st(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function ut(e){if(!ot(e))return!1;var t=rt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var dt=Ge["__core-js_shared__"],ht=function(){var e=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var pt=Function.prototype.toString;function ft(e){if(null!=e){try{return pt.call(e)}catch{}try{return e+""}catch{}}return""}var mt=/^\[object .+?Constructor\]$/,gt=Function.prototype,vt=Object.prototype,bt=gt.toString,yt=vt.hasOwnProperty,xt=RegExp("^"+bt.call(yt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wt(e){return!(!ot(e)||function(e){return!!ht&&ht in e}(e))&&(ut(e)?xt:mt).test(ft(e))}function St(e,t){var n=function(e,t){return e?.[t]}(e,t);return wt(n)?n:void 0}var kt=St(Ge,"Map"),_t=St(Object,"create");var Ct=Object.prototype.hasOwnProperty;var Et=Object.prototype.hasOwnProperty;function At(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Tt(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function Ot(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}At.prototype.clear=function(){this.__data__=_t?_t(null):{},this.size=0},At.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},At.prototype.get=function(e){var t=this.__data__;if(_t){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ct.call(t,e)?t[e]:void 0},At.prototype.has=function(e){var t=this.__data__;return _t?void 0!==t[e]:Et.call(t,e)},At.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=_t&&void 0===t?"__lodash_hash_undefined__":t,this},Ot.prototype.clear=function(){this.size=0,this.__data__={hash:new At,map:new(kt||ct),string:new At}},Ot.prototype.delete=function(e){var t=Tt(this,e).delete(e);return this.size-=t?1:0,t},Ot.prototype.get=function(e){return Tt(this,e).get(e)},Ot.prototype.has=function(e){return Tt(this,e).has(e)},Ot.prototype.set=function(e,t){var n=Tt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Pt(e){var t=this.__data__=new ct(e);this.size=t.size}Pt.prototype.clear=function(){this.__data__=new ct,this.size=0},Pt.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Pt.prototype.get=function(e){return this.__data__.get(e)},Pt.prototype.has=function(e){return this.__data__.has(e)},Pt.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ct){var r=n.__data__;if(!kt||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ot(r)}return n.set(e,t),this.size=n.size,this};function zt(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ot;++t<n;)this.add(e[t])}function Dt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Rt(e,t){return e.has(t)}zt.prototype.add=zt.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},zt.prototype.has=function(e){return this.__data__.has(e)};function jt(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,h=!0,p=2&n?new zt:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var f=e[d],m=t[d];if(r)var g=a?r(m,f,d,t,e,i):r(f,m,d,e,t,i);if(void 0!==g){if(g)continue;h=!1;break}if(p){if(!Dt(t,(function(e,t){if(!Rt(p,t)&&(f===e||o(f,e,n,r,i)))return p.push(t)}))){h=!1;break}}else if(f!==m&&!o(f,m,n,r,i)){h=!1;break}}return i.delete(e),i.delete(t),h}var Nt=Ge.Uint8Array;function It(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Mt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var Ft=Xe?Xe.prototype:void 0,Lt=Ft?Ft.valueOf:void 0;var Bt=Array.isArray;var Ut=Object.prototype.propertyIsEnumerable,Vt=Object.getOwnPropertySymbols,qt=Vt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(Vt(e),(function(t){return Ut.call(e,t)})))}:function(){return[]};function Ht(e){return it(e)&&"[object Arguments]"==rt(e)}var Wt=Object.prototype,Kt=Wt.hasOwnProperty,$t=Wt.propertyIsEnumerable,Qt=Ht(function(){return arguments}())?Ht:function(e){return it(e)&&Kt.call(e,"callee")&&!$t.call(e,"callee")};var Gt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xt=Gt&&"object"==typeof module&&module&&!module.nodeType&&module,Zt=Xt&&Xt.exports===Gt?Ge.Buffer:void 0,Yt=(Zt?Zt.isBuffer:void 0)||function(){return!1},Jt=/^(?:0|[1-9]\d*)$/;function en(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&("number"==n||"symbol"!=n&&Jt.test(e))&&e>-1&&e%1==0&&e<t}function tn(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var nn={};nn["[object Float32Array]"]=nn["[object Float64Array]"]=nn["[object Int8Array]"]=nn["[object Int16Array]"]=nn["[object Int32Array]"]=nn["[object Uint8Array]"]=nn["[object Uint8ClampedArray]"]=nn["[object Uint16Array]"]=nn["[object Uint32Array]"]=!0,nn["[object Arguments]"]=nn["[object Array]"]=nn["[object ArrayBuffer]"]=nn["[object Boolean]"]=nn["[object DataView]"]=nn["[object Date]"]=nn["[object Error]"]=nn["[object Function]"]=nn["[object Map]"]=nn["[object Number]"]=nn["[object Object]"]=nn["[object RegExp]"]=nn["[object Set]"]=nn["[object String]"]=nn["[object WeakMap]"]=!1;var rn="object"==typeof exports&&exports&&!exports.nodeType&&exports,on=rn&&"object"==typeof module&&module&&!module.nodeType&&module,an=on&&on.exports===rn&&$e.process,sn=function(){try{return on&&on.require&&on.require("util").types||an&&an.binding&&an.binding("util")}catch{}}(),ln=sn&&sn.isTypedArray,cn=ln?function(e){return function(t){return e(t)}}(ln):function(e){return it(e)&&tn(e.length)&&!!nn[rt(e)]},un=Object.prototype.hasOwnProperty;function dn(e,t){var n=Bt(e),r=!n&&Qt(e),o=!n&&!r&&Yt(e),i=!n&&!r&&!o&&cn(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var c in e)(t||un.call(e,c))&&(!a||!("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||en(c,l)))&&s.push(c);return s}var hn=Object.prototype;var pn=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),fn=Object.prototype.hasOwnProperty;function mn(e){if(!function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||hn)}(e))return pn(e);var t=[];for(var n in Object(e))fn.call(e,n)&&"constructor"!=n&&t.push(n);return t}function gn(e){return function(e){return null!=e&&tn(e.length)&&!ut(e)}(e)?dn(e):mn(e)}function vn(e){return function(e,t,n){var r=t(e);return Bt(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,gn,qt)}var bn=Object.prototype.hasOwnProperty;var yn=St(Ge,"DataView"),xn=St(Ge,"Promise"),wn=St(Ge,"Set"),Sn=St(Ge,"WeakMap"),kn="[object Map]",_n="[object Promise]",Cn="[object Set]",En="[object WeakMap]",An="[object DataView]",Tn=ft(yn),On=ft(kt),Pn=ft(xn),zn=ft(wn),Dn=ft(Sn),Rn=rt;(yn&&Rn(new yn(new ArrayBuffer(1)))!=An||kt&&Rn(new kt)!=kn||xn&&Rn(xn.resolve())!=_n||wn&&Rn(new wn)!=Cn||Sn&&Rn(new Sn)!=En)&&(Rn=function(e){var t=rt(e),n="[object Object]"==t?e.constructor:void 0,r=n?ft(n):"";if(r)switch(r){case Tn:return An;case On:return kn;case Pn:return _n;case zn:return Cn;case Dn:return En}return t});var jn="[object Arguments]",Nn="[object Array]",In="[object Object]",Mn=Object.prototype.hasOwnProperty;function Fn(e,t,n,r,o,i){var a=Bt(e),s=Bt(t),l=a?Nn:Rn(e),c=s?Nn:Rn(t),u=(l=l==jn?In:l)==In,d=(c=c==jn?In:c)==In,h=l==c;if(h&&Yt(e)){if(!Yt(t))return!1;a=!0,u=!1}if(h&&!u)return i||(i=new Pt),a||cn(e)?jt(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Nt(e),new Nt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return at(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=It;case"[object Set]":var l=1&r;if(s||(s=Mt),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=jt(s(e),s(t),r,o,i,a);return a.delete(e),u;case"[object Symbol]":if(Lt)return Lt.call(e)==Lt.call(t)}return!1}(e,t,l,n,r,o,i);if(!(1&n)){var p=u&&Mn.call(e,"__wrapped__"),f=d&&Mn.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,g=f?t.value():t;return i||(i=new Pt),o(m,g,n,r,i)}}return!!h&&(i||(i=new Pt),function(e,t,n,r,o,i){var a=1&n,s=vn(e),l=s.length;if(l!=vn(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:bn.call(t,u)))return!1}var d=i.get(e),h=i.get(t);if(d&&h)return d==t&&h==e;var p=!0;i.set(e,t),i.set(t,e);for(var f=a;++c<l;){var m=e[u=s[c]],g=t[u];if(r)var v=a?r(g,m,u,t,e,i):r(m,g,u,e,t,i);if(!(void 0===v?m===g||o(m,g,n,r,i):v)){p=!1;break}f||(f="constructor"==u)}if(p&&!f){var b=e.constructor,y=t.constructor;b!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y)&&(p=!1)}return i.delete(e),i.delete(t),p}(e,t,n,r,o,i))}function Ln(e,t,n,r,o){return e===t||(null==e||null==t||!it(e)&&!it(t)?e!==e&&t!==t:Fn(e,t,n,r,Ln,o))}function Bn(e,t){const n={deepCompare:!1,waitUntilFirstUpdate:!1,...t};return(t,r)=>{const{update:o}=t,i=Array.isArray(e)?e:[e];t.update=function(e){i.forEach((t=>{const o=t;if(e.has(o)){const t=e.get(o),i=this[o];(n.deepCompare?!function(e,t){return Ln(e,t)}(t,i):t!==i)&&(!n.waitUntilFirstUpdate||this.hasUpdated)&&this[r](t,i)}})),o.call(this,e)}}}function Un(e){return fe({...e,state:!0,attribute:!1})}const Vn=(e,t,n)=>(n.configurable=!0,n.enumerable=!0,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,n),n);function qn(e,t){return(t,n,r)=>Vn(t,n,{get(){return(t=>t.renderRoot?.querySelector(e)??null)(this)}})}const Hn=1,Wn=2,Kn=3,$n=4,Qn=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return{_$litDirective$:e,values:n}};class Gn{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const Xn=Qn(class extends Gn{constructor(e){if(super(e),e.type!==Hn||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter((t=>e[t])).join(" ")+" "}update(e,t){let[n]=t;if(void 0===this.st){this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter((e=>""!==e))));for(const e in n)n[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(n)}const r=e.element.classList;for(const o of this.st)o in n||(r.remove(o),this.st.delete(o));for(const o in n){const e=!!n[o];e===this.st.has(o)||this.nt?.has(o)||(e?(r.add(o),this.st.add(o)):(r.remove(o),this.st.delete(o)))}return Q}}),Zn=e=>e??G;function Yn(e,t,n){return e?t(e):n?.(e)}const Jn=Symbol.for(""),er=e=>{if(e?.r===Jn)return e?._$litStatic$},tr=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];return{_$litStatic$:n.reduce(((t,n,r)=>t+(e=>{if(void 0!==e._$litStatic$)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(n)+e[r+1]),e[0]),r:Jn}},nr=new Map,rr=(e=>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];const i=r.length;let a,s;const l=[],c=[];let u,d=0,h=!1;for(;d<i;){for(u=t[d];d<i&&(s=r[d],void 0!==(a=er(s)));)u+=a+t[++d],h=!0;d!==i&&c.push(s),l.push(u),d++}if(d===i&&l.push(t[i]),h){const e=l.join("$$lit$$");void 0===(t=nr.get(e))&&(l.raw=l,nr.set(e,t=l)),r=c}return e(t,...r)})($),or=u`
1107
1107
  /*!
1108
1108
  * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
1109
1109
  * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
@@ -5213,7 +5213,7 @@
5213
5213
  :host([data-cx-button-group__button][checked]) {
5214
5214
  z-index: 2;
5215
5215
  }
5216
- `);var Hr=Object.defineProperty,Wr=Object.getOwnPropertyDescriptor,Kr=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?Wr(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Hr(t,n,i),i};let $r=class extends be{constructor(){super(...arguments),this.formControlController=new Ur(this,{assumeInteractionOn:["click"]}),this.hasSlotController=new Ke(this,"[default]","prefix","suffix"),this.localize=new We(this),this.hasFocus=!1,this.invalid=!1,this.isParentDropdownOpened=!1,this.title="",this.variant="default",this.size="medium",this.caret=!1,this.disabled=!1,this.loading=!1,this.outline=!1,this.pill=!1,this.circle=!1,this.type="button",this.name="",this.value="",this.href="",this.link="",this.rel="noreferrer noopener",this.form=void 0}get validity(){return this.isButton()?this.button.validity:Vr}get validationMessage(){return this.isButton()?this.button.validationMessage:""}runFirstUpdated(){this.isButton()&&this.formControlController.updateValidity(),this.syncStyles(),new MutationObserver((()=>this.syncStyles())).observe(this,{attributeFilter:["style"],attributes:!0});const e=this.closest("cx-dropdown");e&&new MutationObserver((()=>{"trigger"===this.slot&&(this.isParentDropdownOpened=e.open)})).observe(e,{attributeFilter:["open"],attributes:!0})}syncStyles(){const e=this.style.fontSize;e&&this.button&&(this.button.style.fontSize=e,this.style.fontSize="")}handleBlur(){this.hasFocus=!1,this.emit("cx-blur")}handleFocus(){this.hasFocus=!0,this.emit("cx-focus")}handleClick(){"submit"===this.type&&this.formControlController.submit(this),"reset"===this.type&&this.formControlController.reset(this)}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}isButton(){return!(this.link||this.href)}isLink(){return!(!this.link&&!this.href)}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}checkValidity(){return!this.isButton()||this.button.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return!this.isButton()||this.button.reportValidity()}setCustomValidity(e){this.isButton()&&(this.button.setCustomValidity(e),this.formControlController.updateValidity())}render(){const e=this.isLink(),t=e?tr`a`:tr`button`;return rr`
5216
+ `);var Hr=Object.defineProperty,Wr=Object.getOwnPropertyDescriptor,Kr=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?Wr(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Hr(t,n,i),i};let $r=class extends be{constructor(){super(...arguments),this.formControlController=new Ur(this,{assumeInteractionOn:["click"]}),this.hasSlotController=new Ke(this,"[default]","prefix","suffix"),this.localize=new We(this),this.hasFocus=!1,this.invalid=!1,this.isParentDropdownOpened=!1,this.title="",this.variant="default",this.size="medium",this.caret=!1,this.caretDirection="down",this.disabled=!1,this.loading=!1,this.outline=!1,this.pill=!1,this.circle=!1,this.type="button",this.name="",this.value="",this.href="",this.link="",this.rel="noreferrer noopener",this.form=void 0}get validity(){return this.isButton()?this.button.validity:Vr}get validationMessage(){return this.isButton()?this.button.validationMessage:""}runFirstUpdated(){this.isButton()&&this.formControlController.updateValidity(),this.syncStyles(),new MutationObserver((()=>this.syncStyles())).observe(this,{attributeFilter:["style"],attributes:!0});const e=this.closest("cx-dropdown");e&&new MutationObserver((()=>{"trigger"===this.slot&&(this.isParentDropdownOpened=e.open)})).observe(e,{attributeFilter:["open"],attributes:!0})}syncStyles(){const e=this.style.fontSize;e&&this.button&&(this.button.style.fontSize=e,this.style.fontSize="")}handleBlur(){this.hasFocus=!1,this.emit("cx-blur")}handleFocus(){this.hasFocus=!0,this.emit("cx-focus")}handleClick(){"submit"===this.type&&this.formControlController.submit(this),"reset"===this.type&&this.formControlController.reset(this)}handleInvalid(e){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(e)}isButton(){return!(this.link||this.href)}isLink(){return!(!this.link&&!this.href)}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}checkValidity(){return!this.isButton()||this.button.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return!this.isButton()||this.button.reportValidity()}setCustomValidity(e){this.isButton()&&(this.button.setCustomValidity(e),this.formControlController.updateValidity())}render(){const e=this.isLink(),t=e?tr`a`:tr`button`;return rr`
5217
5217
  <${t}
5218
5218
  part="base"
5219
5219
  class=${Xn({button:!0,"button--caret":this.caret,"button--circle":this.circle,"button--custom":"custom"===this.variant,"button--danger":"danger"===this.variant,"button--default":"default"===this.variant||"neutral"===this.variant,"button--disabled":this.disabled,"button--focused":this.hasFocus||this.isParentDropdownOpened,"button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix"),"button--large":"large"===this.size,"button--loading":this.loading,"button--medium":"medium"===this.size,"button--outline":this.outline,"button--pill":this.pill,"button--primary":"primary"===this.variant,"button--rtl":"rtl"===this.localize.dir(),"button--small":"small"===this.size,"button--standard":!this.outline,"button--success":"success"===this.variant,"button--tertiary":"tertiary"===this.variant,"button--text":"text"===this.variant,"button--warning":"warning"===this.variant,"button--x-large":"x-large"===this.size})}
@@ -5237,16 +5237,16 @@
5237
5237
  <slot name="prefix" part="prefix" class="button__prefix"></slot>
5238
5238
  <slot part="label" class="button__label"></slot>
5239
5239
  <slot name="suffix" part="suffix" class="button__suffix"></slot>
5240
- ${this.caret?rr`
5241
- <cx-icon
5242
- part="caret"
5243
- class="button__caret"
5244
- name="keyboard_arrow_down"
5245
- ></cx-icon>
5246
- `:""}
5247
- ${this.loading?rr`<cx-spinner part="spinner"></cx-spinner>`:""}
5240
+ ${Yn(this.caret,(()=>rr`
5241
+ <cx-icon
5242
+ part="caret"
5243
+ class="button__caret"
5244
+ name=${`keyboard_arrow_${this.caretDirection}`}
5245
+ ></cx-icon>
5246
+ `))}
5247
+ ${Yn(this.loading,(()=>rr`<cx-spinner part="spinner"></cx-spinner>`))}
5248
5248
  </${t}>
5249
- `}};$r.styles=[we,qr],$r.dependencies={"cx-icon":ur,"cx-spinner":pr},Kr([qn(".button")],$r.prototype,"button",2),Kr([Un()],$r.prototype,"hasFocus",2),Kr([Un()],$r.prototype,"invalid",2),Kr([Un()],$r.prototype,"isParentDropdownOpened",2),Kr([fe()],$r.prototype,"title",2),Kr([fe({reflect:!0})],$r.prototype,"variant",2),Kr([fe({reflect:!0})],$r.prototype,"size",2),Kr([fe({reflect:!0,type:Boolean})],$r.prototype,"caret",2),Kr([fe({reflect:!0,type:Boolean})],$r.prototype,"disabled",2),Kr([fe({reflect:!0,type:Boolean})],$r.prototype,"loading",2),Kr([fe({reflect:!0,type:Boolean})],$r.prototype,"outline",2),Kr([fe({reflect:!0,type:Boolean})],$r.prototype,"pill",2),Kr([fe({reflect:!0,type:Boolean})],$r.prototype,"circle",2),Kr([fe()],$r.prototype,"type",2),Kr([fe()],$r.prototype,"name",2),Kr([fe()],$r.prototype,"value",2),Kr([fe()],$r.prototype,"href",2),Kr([fe()],$r.prototype,"link",2),Kr([fe()],$r.prototype,"target",2),Kr([fe()],$r.prototype,"rel",2),Kr([fe()],$r.prototype,"download",2),Kr([fe({reflect:!1})],$r.prototype,"form",2),Kr([fe({attribute:"formaction"})],$r.prototype,"formAction",2),Kr([fe({attribute:"formenctype"})],$r.prototype,"formEnctype",2),Kr([fe({attribute:"formmethod"})],$r.prototype,"formMethod",2),Kr([fe({attribute:"formnovalidate",type:Boolean})],$r.prototype,"formNoValidate",2),Kr([fe({attribute:"formtarget"})],$r.prototype,"formTarget",2),Kr([Bn("disabled",{waitUntilFirstUpdate:!0})],$r.prototype,"handleDisabledChange",1),$r=Kr([xe("cx-button")],$r);const Qr=u`
5249
+ `}};$r.styles=[we,qr],$r.dependencies={"cx-icon":ur,"cx-spinner":pr},Kr([qn(".button")],$r.prototype,"button",2),Kr([Un()],$r.prototype,"hasFocus",2),Kr([Un()],$r.prototype,"invalid",2),Kr([Un()],$r.prototype,"isParentDropdownOpened",2),Kr([fe()],$r.prototype,"title",2),Kr([fe({reflect:!0})],$r.prototype,"variant",2),Kr([fe({reflect:!0})],$r.prototype,"size",2),Kr([fe({reflect:!0,type:Boolean})],$r.prototype,"caret",2),Kr([fe({attribute:"caret-direction",reflect:!0,type:String})],$r.prototype,"caretDirection",2),Kr([fe({reflect:!0,type:Boolean})],$r.prototype,"disabled",2),Kr([fe({reflect:!0,type:Boolean})],$r.prototype,"loading",2),Kr([fe({reflect:!0,type:Boolean})],$r.prototype,"outline",2),Kr([fe({reflect:!0,type:Boolean})],$r.prototype,"pill",2),Kr([fe({reflect:!0,type:Boolean})],$r.prototype,"circle",2),Kr([fe()],$r.prototype,"type",2),Kr([fe()],$r.prototype,"name",2),Kr([fe()],$r.prototype,"value",2),Kr([fe()],$r.prototype,"href",2),Kr([fe()],$r.prototype,"link",2),Kr([fe()],$r.prototype,"target",2),Kr([fe()],$r.prototype,"rel",2),Kr([fe()],$r.prototype,"download",2),Kr([fe({reflect:!1})],$r.prototype,"form",2),Kr([fe({attribute:"formaction"})],$r.prototype,"formAction",2),Kr([fe({attribute:"formenctype"})],$r.prototype,"formEnctype",2),Kr([fe({attribute:"formmethod"})],$r.prototype,"formMethod",2),Kr([fe({attribute:"formnovalidate",type:Boolean})],$r.prototype,"formNoValidate",2),Kr([fe({attribute:"formtarget"})],$r.prototype,"formTarget",2),Kr([Bn("disabled",{waitUntilFirstUpdate:!0})],$r.prototype,"handleDisabledChange",1),$r=Kr([xe("cx-button")],$r);const Qr=u`
5250
5250
  :host {
5251
5251
  display: inline-block;
5252
5252
  }
@@ -5940,7 +5940,7 @@ governing permissions and limitations under the License.
5940
5940
  var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0)
5941
5941
  );
5942
5942
  }
5943
- `;var Za=Object.defineProperty,Ya=Object.getOwnPropertyDescriptor,Ja=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?Ya(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Za(t,n,i),i};let es=class extends be{constructor(){super(...arguments),this.localize=new We(this),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.hide=!1,this.hideBoundaryStrategy="escaped",this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.autoWidthFactor=1,this.overlayOpened=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const e=this.anchorEl.getBoundingClientRect(),t=this.popup.getBoundingClientRect();let n=0,r=0,o=0,i=0,a=0,s=0,l=0,c=0;this.placement.includes("top")||this.placement.includes("bottom")||"center"===this.placement?e.top<t.top?(n=e.left,r=e.bottom,o=e.right,i=e.bottom,a=t.left,s=t.top,l=t.right,c=t.top):(n=t.left,r=t.bottom,o=t.right,i=t.bottom,a=e.left,s=e.top,l=e.right,c=e.top):e.left<t.left?(n=e.right,r=e.top,o=t.left,i=t.top,a=e.right,s=e.bottom,l=t.left,c=t.bottom):(n=t.right,r=t.top,o=e.left,i=e.top,a=t.right,s=t.bottom,l=e.left,c=e.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${n}px`),this.style.setProperty("--hover-bridge-top-left-y",`${r}px`),this.style.setProperty("--hover-bridge-top-right-x",`${o}px`),this.style.setProperty("--hover-bridge-top-right-y",`${i}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${a}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${s}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${l}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${c}px`)}}}get isSizeMiddleWareUsed(){return this.sync||this.autoSize}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async runFirstUpdated(){if(this.start(),"overlay"===this.strategy&&!wo){const e=function(e){return ko(e,(e=>{const t=window.getComputedStyle(e),n="none"!==t.clipPath&&""!==t.clipPath,r=e.hasAttribute("data-overlayscrollbars-viewport"),o="none"!==t.transform,i=["auto","scroll","hidden"].includes(t.overflow);return!!(n||r||o&&i)}))}(this);e&&(this.autoSizeBoundary=e,this.flipBoundary=e,this.shiftBoundary=e)}}async updated(e){super.updated(e),e.has("active")&&(this.active?(this.start(),"overlay"!==this.strategy&&(this.emit("cx-opened"),this.overlayOpened=!0)):this.stop()),e.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const e=this.getRootNode();this.anchorEl=e.getElementById(this.anchor)}else this.anchor instanceof Element||function(e){if(null==e||"object"!=typeof e)return!1;const t="contextElement"in e?e.contextElement.ownerDocument.defaultView:null;return"getBoundingClientRect"in e&&(!("contextElement"in e)||e.contextElement instanceof(t?.Element??Element))}(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl instanceof Element&&"cx-dialog"===this.anchorEl.tagName.toLowerCase()&&(this.anchorEl=this.anchorEl?.shadowRoot?.querySelector('[part="panel"]')),this.anchorEl&&this.start()}async handleOverlayOpened(e){e.target===this.overlay&&(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),this.reposition(),this.overlayOpened=!0,await this.updateComplete,this.emit("cx-opened"))}start(){this.anchorEl&&(this.cleanup=xa(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return this.active||(this.overlayOpened=!1),new Promise((e=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>e()))):e()}))}reposition(){if(!this.active||!this.anchorEl)return;const e=["center"===this.placement?wa((e=>{let{rects:t}=e;return-t.reference.height/2-t.floating.height/2})):wa({crossAxis:this.skidding,mainAxis:this.distance})];if(this.sync?e.push(_a({apply:e=>{let{rects:t}=e;const n="width"===this.sync||"both"===this.sync,r="height"===this.sync||"both"===this.sync;this.popup.style.width=n?`${t.reference.width}px`:"",this.popup.style.height=r?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&e.push(ka({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift){let t=this.shiftBoundary;!t&&["fixed","overlay"].includes(this.strategy)&&(t=document.body),e.push(Sa({boundary:t,padding:this.shiftPadding}))}this.autoSize?e.push(_a({apply:e=>{let{availableHeight:t,availableWidth:n}=e;"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${t}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",n*this.autoWidthFactor+"px"):this.style.removeProperty("--auto-size-available-width")},boundary:this.autoSizeBoundary,padding:this.autoSizePadding})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&e.push(Ea({element:this.arrowEl,padding:this.arrowPadding})),this.hide&&e.push(Ca({boundary:this.hideBoundary,strategy:this.hideBoundaryStrategy})),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),Aa(this.anchorEl,this.popup,{middleware:e,placement:"center"===this.placement?"bottom":this.placement,platform:{...ba,getOffsetParent:e=>"overlay"===this.strategy&&!wo||"fixed"===this.strategy&&(xo()||(()=>{const e=window.navigator&&window.navigator.userAgent||"";return/Firefox/i.test(e)})())?function(e){return ko(e,(e=>{const t=window.getComputedStyle(e),n="none"!==t.transform,r="none"!==t.backdropFilter;return!(!n&&!r)}))}(e)||window:"absolute"===this.strategy?ba.getOffsetParent(e,Qa):ba.getOffsetParent(e)},strategy:["overlay","fixed"].includes(this.strategy)?"fixed":"absolute"}).then((e=>{let{middlewareData:t,placement:n,x:r,y:o}=e;const i="rtl"===this.localize.dir(),a={bottom:"top",left:"right",right:"left",top:"bottom"}[n.split("-")[0]];if(this.setAttribute("data-current-placement",n),this.anchorEl===document.body&&"center"===this.placement){const e=window.innerWidth,t=window.innerHeight,n=(e-this.popup.offsetWidth)/2,r=(t-this.popup.offsetHeight)/2;Object.assign(this.popup.style,{left:`${n}px`,top:`${r}px`})}else Object.assign(this.popup.style,{left:`${r}px`,top:`${o}px`});if(this.arrow){const e=t.arrow.x,n=t.arrow.y;let r="",o="",s="",l="";if("start"===this.arrowPlacement){const t="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";r="number"==typeof n?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",o=i?t:"",l=i?"":t}else if("end"===this.arrowPlacement){const t="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";o=i?"":t,l=i?t:"",s="number"==typeof n?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":"",r="number"==typeof n?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof e?`${e}px`:"",r="number"==typeof n?`${n}px`:"");Object.assign(this.arrowEl.style,{bottom:s,left:l,right:o,top:r}),this.arrowEl.style.setProperty(a,"calc(var(--arrow-size-diagonal) * -1)")}t.hide&&Object.assign(this.popup.style,{visibility:t.hide.escaped?"hidden":"visible"})})),requestAnimationFrame((()=>{this.updateHoverBridge(),this.emit("cx-reposition")}))}render(){const e=$`<cx-overlay
5943
+ `;var Za=Object.defineProperty,Ya=Object.getOwnPropertyDescriptor,Ja=(e,t,n,r)=>{for(var o,i=r>1?void 0:r?Ya(t,n):t,a=e.length-1;a>=0;a--)(o=e[a])&&(i=(r?o(t,n,i):o(i))||i);return r&&i&&Za(t,n,i),i};let es=class extends be{constructor(){super(...arguments),this.localize=new We(this),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.hide=!1,this.hideBoundaryStrategy="escaped",this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.autoWidthFactor=1,this.overlayOpened=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const e=this.anchorEl.getBoundingClientRect(),t=this.popup.getBoundingClientRect();let n=0,r=0,o=0,i=0,a=0,s=0,l=0,c=0;this.placement.includes("top")||this.placement.includes("bottom")||"center"===this.placement?e.top<t.top?(n=e.left,r=e.bottom,o=e.right,i=e.bottom,a=t.left,s=t.top,l=t.right,c=t.top):(n=t.left,r=t.bottom,o=t.right,i=t.bottom,a=e.left,s=e.top,l=e.right,c=e.top):e.left<t.left?(n=e.right,r=e.top,o=t.left,i=t.top,a=e.right,s=e.bottom,l=t.left,c=t.bottom):(n=t.right,r=t.top,o=e.left,i=e.top,a=t.right,s=t.bottom,l=e.left,c=e.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${n}px`),this.style.setProperty("--hover-bridge-top-left-y",`${r}px`),this.style.setProperty("--hover-bridge-top-right-x",`${o}px`),this.style.setProperty("--hover-bridge-top-right-y",`${i}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${a}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${s}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${l}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${c}px`)}}}get isSizeMiddleWareUsed(){return this.sync||this.autoSize}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async runFirstUpdated(){if(this.start(),"overlay"===this.strategy&&!wo){const e=function(e){return ko(e,(e=>{const t=window.getComputedStyle(e),n="none"!==t.clipPath&&""!==t.clipPath,r=e.hasAttribute("data-overlayscrollbars-viewport"),o="none"!==t.transform,i=["auto","scroll","hidden"].includes(t.overflow);return!!(n||r||o&&i)}))}(this);e&&(this.autoSizeBoundary=e,this.flipBoundary=e,this.shiftBoundary=e)}}async updated(e){super.updated(e),e.has("active")&&(this.active?(this.start(),"overlay"!==this.strategy&&(this.emit("cx-opened"),this.overlayOpened=!0)):this.stop()),e.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const e=this.getRootNode();this.anchorEl=e.getElementById(this.anchor)}else this.anchor instanceof Element||function(e){if(null==e||"object"!=typeof e)return!1;const t="contextElement"in e?e.contextElement.ownerDocument.defaultView:null;return"getBoundingClientRect"in e&&(!("contextElement"in e)||e.contextElement instanceof(t?.Element??Element))}(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl instanceof Element&&"cx-dialog"===this.anchorEl.tagName.toLowerCase()&&(this.anchorEl=this.anchorEl?.shadowRoot?.querySelector('[part="panel"]')),this.anchorEl&&this.start()}async handleOverlayOpened(e){e.target===this.overlay&&(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),this.reposition(),this.overlayOpened=!0,await this.updateComplete,this.emit("cx-opened"))}start(){this.anchorEl&&(this.cleanup=xa(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return this.active||(this.overlayOpened=!1),new Promise((e=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>e()))):e()}))}reposition(){if(!this.active||!this.anchorEl)return;const e=["center"===this.placement?wa((e=>{let{rects:t}=e;return-t.reference.height/2-t.floating.height/2})):wa({crossAxis:this.skidding,mainAxis:this.distance})];if(this.sync?e.push(_a({apply:e=>{let{rects:t}=e;const n="width"===this.sync||"both"===this.sync,r="height"===this.sync||"both"===this.sync;this.popup.style.width=n?`${t.reference.width}px`:"",this.popup.style.height=r?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&e.push(ka({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift){let t=this.shiftBoundary;!t&&["fixed","overlay"].includes(this.strategy)&&(t=document.body),e.push(Sa({boundary:t,padding:this.shiftPadding}))}this.autoSize?e.push(_a({apply:e=>{let{availableHeight:t,availableWidth:n}=e;"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${t}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",n*this.autoWidthFactor+"px"):this.style.removeProperty("--auto-size-available-width")},boundary:this.autoSizeBoundary,padding:this.autoSizePadding})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&e.push(Ea({element:this.arrowEl,padding:this.arrowPadding})),this.hide&&e.push(Ca({boundary:this.hideBoundary,strategy:this.hideBoundaryStrategy})),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),Aa(this.anchorEl,this.popup,{middleware:e,placement:"center"===this.placement?"bottom":this.placement,platform:{...ba,getOffsetParent:e=>"overlay"===this.strategy&&!wo||"fixed"===this.strategy&&(xo()||(()=>{const e=window.navigator&&window.navigator.userAgent||"";return/Firefox/i.test(e)})())?function(e){return ko(e,(e=>{const t=window.getComputedStyle(e),n="none"!==t.transform,r="none"!==t.backdropFilter,o="normal"!==t.containerType;return!!(n||r||o)}))}(e)||window:"absolute"===this.strategy?ba.getOffsetParent(e,Qa):ba.getOffsetParent(e)},strategy:["overlay","fixed"].includes(this.strategy)?"fixed":"absolute"}).then((e=>{let{middlewareData:t,placement:n,x:r,y:o}=e;const i="rtl"===this.localize.dir(),a={bottom:"top",left:"right",right:"left",top:"bottom"}[n.split("-")[0]];if(this.setAttribute("data-current-placement",n),this.anchorEl===document.body&&"center"===this.placement){const e=window.innerWidth,t=window.innerHeight,n=(e-this.popup.offsetWidth)/2,r=(t-this.popup.offsetHeight)/2;Object.assign(this.popup.style,{left:`${n}px`,top:`${r}px`})}else Object.assign(this.popup.style,{left:`${r}px`,top:`${o}px`});if(this.arrow){const e=t.arrow.x,n=t.arrow.y;let r="",o="",s="",l="";if("start"===this.arrowPlacement){const t="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";r="number"==typeof n?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",o=i?t:"",l=i?"":t}else if("end"===this.arrowPlacement){const t="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";o=i?"":t,l=i?t:"",s="number"==typeof n?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":"",r="number"==typeof n?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof e?`${e}px`:"",r="number"==typeof n?`${n}px`:"");Object.assign(this.arrowEl.style,{bottom:s,left:l,right:o,top:r}),this.arrowEl.style.setProperty(a,"calc(var(--arrow-size-diagonal) * -1)")}t.hide&&Object.assign(this.popup.style,{visibility:t.hide.escaped?"hidden":"visible"})})),requestAnimationFrame((()=>{this.updateHoverBridge(),this.emit("cx-reposition")}))}render(){const e=$`<cx-overlay
5944
5944
  ?open=${this.active}
5945
5945
  placement="bottom"
5946
5946
  type="manual"
@@ -9386,6 +9386,7 @@ governing permissions and limitations under the License.
9386
9386
  strategy="overlay"
9387
9387
  auto-size="both"
9388
9388
  auto-size-padding="10"
9389
+ ?shift=${!!this.host.shiftBoundary}
9389
9390
  .flipBoundary=${this.host.flipBoundary}
9390
9391
  .shiftBoundary=${this.host.shiftBoundary}
9391
9392
  >