@clickview/exchange 0.62.0-rc.0 → 0.62.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +531 -531
- package/dist/bundles.json +1 -1
- package/dist/css/Crtlho0p.chunk.css +8 -0
- package/dist/en.json +1 -1
- package/dist/scripts/{cIPkkuhG.chunk.js → 1iKkdpYv.chunk.js} +2 -2
- package/dist/scripts/{cIPkkuhG.chunk.js.map → 1iKkdpYv.chunk.js.map} +1 -1
- package/dist/scripts/{uPFXIvcK2.chunk.js → 8pXw5z942.chunk.js} +2 -2
- package/dist/scripts/{uPFXIvcK2.chunk.js.map → 8pXw5z942.chunk.js.map} +1 -1
- package/dist/scripts/{DVVx1aiS2.chunk.js → B7m3cCi42.chunk.js} +2 -2
- package/dist/scripts/{DVVx1aiS2.chunk.js.map → B7m3cCi42.chunk.js.map} +1 -1
- package/dist/scripts/{DBJfKQKx.chunk.js → BAN6QE-X.chunk.js} +2 -2
- package/dist/scripts/{DBJfKQKx.chunk.js.map → BAN6QE-X.chunk.js.map} +1 -1
- package/dist/scripts/{YGLkoFLc.chunk.js → BHbt9wzx.chunk.js} +2 -2
- package/dist/scripts/{YGLkoFLc.chunk.js.map → BHbt9wzx.chunk.js.map} +1 -1
- package/dist/scripts/{DeevL6eQ.chunk.js → BINz0dmF.chunk.js} +2 -2
- package/dist/scripts/{DeevL6eQ.chunk.js.map → BINz0dmF.chunk.js.map} +1 -1
- package/dist/scripts/{Dg-h5qnR.chunk.js → BPYdRA7H.chunk.js} +2 -2
- package/dist/scripts/{Dg-h5qnR.chunk.js.map → BPYdRA7H.chunk.js.map} +1 -1
- package/dist/scripts/{CkH6ird3.chunk.js → BS8sYAAh.chunk.js} +2 -2
- package/dist/scripts/{CkH6ird3.chunk.js.map → BS8sYAAh.chunk.js.map} +1 -1
- package/dist/scripts/{CKrB9r9w.chunk.js → BaSi1pig.chunk.js} +2 -2
- package/dist/scripts/{CKrB9r9w.chunk.js.map → BaSi1pig.chunk.js.map} +1 -1
- package/dist/scripts/{BRQhDr-02.chunk.js → BbrEvwAi2.chunk.js} +2 -2
- package/dist/scripts/{BRQhDr-02.chunk.js.map → BbrEvwAi2.chunk.js.map} +1 -1
- package/dist/scripts/{Ct8ETEOn2.chunk.js → Bi8itw8v2.chunk.js} +2 -2
- package/dist/scripts/{Ct8ETEOn2.chunk.js.map → Bi8itw8v2.chunk.js.map} +1 -1
- package/dist/scripts/{Co_6cSBX2.chunk.js → BlOKamx72.chunk.js} +2 -2
- package/dist/scripts/{Co_6cSBX2.chunk.js.map → BlOKamx72.chunk.js.map} +1 -1
- package/dist/scripts/{B0hNKKDw2.chunk.js → BobZ5p_m2.chunk.js} +2 -2
- package/dist/scripts/{B0hNKKDw2.chunk.js.map → BobZ5p_m2.chunk.js.map} +1 -1
- package/dist/scripts/{Nx0q4bij.chunk.js → BsLLiG1-.chunk.js} +2 -2
- package/dist/scripts/{Nx0q4bij.chunk.js.map → BsLLiG1-.chunk.js.map} +1 -1
- package/dist/scripts/{D0H6Hjd-2.chunk.js → BtdygabL2.chunk.js} +2 -2
- package/dist/scripts/{D0H6Hjd-2.chunk.js.map → BtdygabL2.chunk.js.map} +1 -1
- package/dist/scripts/{UjMbny4R.chunk.js → Bue5_bLM.chunk.js} +2 -2
- package/dist/scripts/{UjMbny4R.chunk.js.map → Bue5_bLM.chunk.js.map} +1 -1
- package/dist/scripts/{DBKlntFN2.chunk.js → BvamDkjt2.chunk.js} +2 -2
- package/dist/scripts/{DBKlntFN2.chunk.js.map → BvamDkjt2.chunk.js.map} +1 -1
- package/dist/scripts/{NInuYe7b2.chunk.js → BzJLc19T2.chunk.js} +2 -2
- package/dist/scripts/{NInuYe7b2.chunk.js.map → BzJLc19T2.chunk.js.map} +1 -1
- package/dist/scripts/{DyRGf1o8.chunk.js → C03mMZ4k.chunk.js} +2 -2
- package/dist/scripts/{DyRGf1o8.chunk.js.map → C03mMZ4k.chunk.js.map} +1 -1
- package/dist/scripts/{BV2vTX2L.chunk.js → C2AXrtJf.chunk.js} +2 -2
- package/dist/scripts/{BV2vTX2L.chunk.js.map → C2AXrtJf.chunk.js.map} +1 -1
- package/dist/scripts/{Fu0bLEzl2.chunk.js → C3Hw2TpW2.chunk.js} +2 -2
- package/dist/scripts/{Fu0bLEzl2.chunk.js.map → C3Hw2TpW2.chunk.js.map} +1 -1
- package/dist/scripts/{DoTtsl0X.chunk.js → CKL4ViMC.chunk.js} +2 -2
- package/dist/scripts/{DoTtsl0X.chunk.js.map → CKL4ViMC.chunk.js.map} +1 -1
- package/dist/scripts/{DtYC8Udi2.chunk.js → CKZJ2qae2.chunk.js} +2 -2
- package/dist/scripts/{DtYC8Udi2.chunk.js.map → CKZJ2qae2.chunk.js.map} +1 -1
- package/dist/scripts/{CyAM5o2e.chunk.js → CK_CN_mA.chunk.js} +2 -2
- package/dist/scripts/{CyAM5o2e.chunk.js.map → CK_CN_mA.chunk.js.map} +1 -1
- package/dist/scripts/{B6mSouu5.chunk.js → CL9SkODG.chunk.js} +2 -2
- package/dist/scripts/{B6mSouu5.chunk.js.map → CL9SkODG.chunk.js.map} +1 -1
- package/dist/scripts/{BHKm8WQq2.chunk.js → Ca_-2JTE2.chunk.js} +2 -2
- package/dist/scripts/{BHKm8WQq2.chunk.js.map → Ca_-2JTE2.chunk.js.map} +1 -1
- package/dist/scripts/{C7OCN_w_.chunk.js → CfNYdg0m.chunk.js} +2 -2
- package/dist/scripts/{C7OCN_w_.chunk.js.map → CfNYdg0m.chunk.js.map} +1 -1
- package/dist/scripts/{CUdaR862.chunk.js → Ct_4zyE3.chunk.js} +2 -2
- package/dist/scripts/{CUdaR862.chunk.js.map → Ct_4zyE3.chunk.js.map} +1 -1
- package/dist/scripts/{RiPZGw_q2.chunk.js → CxUrOnxW2.chunk.js} +2 -2
- package/dist/scripts/{RiPZGw_q2.chunk.js.map → CxUrOnxW2.chunk.js.map} +1 -1
- package/dist/scripts/{BJxTZJOX.chunk.js → DFXpg6rF.chunk.js} +2 -2
- package/dist/scripts/{BJxTZJOX.chunk.js.map → DFXpg6rF.chunk.js.map} +1 -1
- package/dist/scripts/{CKNdXwxe2.chunk.js → DG6L7zHU2.chunk.js} +2 -2
- package/dist/scripts/{CKNdXwxe2.chunk.js.map → DG6L7zHU2.chunk.js.map} +1 -1
- package/dist/scripts/{CvQQNf_J2.chunk.js → DKz4jhnr2.chunk.js} +2 -2
- package/dist/scripts/{CvQQNf_J2.chunk.js.map → DKz4jhnr2.chunk.js.map} +1 -1
- package/dist/scripts/{BOvQpQ21.chunk.js → DSZkTUVU.chunk.js} +2 -2
- package/dist/scripts/{BOvQpQ21.chunk.js.map → DSZkTUVU.chunk.js.map} +1 -1
- package/dist/scripts/{D5qMnGHT2.chunk.js → D_k-Kl3-2.chunk.js} +2 -2
- package/dist/scripts/{D5qMnGHT2.chunk.js.map → D_k-Kl3-2.chunk.js.map} +1 -1
- package/dist/scripts/{Dp0gbhZx2.chunk.js → DfOgl-0-2.chunk.js} +2 -2
- package/dist/scripts/{Dp0gbhZx2.chunk.js.map → DfOgl-0-2.chunk.js.map} +1 -1
- package/dist/scripts/{CeCXhgoJ.chunk.js → DkB0qBxI.chunk.js} +2 -2
- package/dist/scripts/{CeCXhgoJ.chunk.js.map → DkB0qBxI.chunk.js.map} +1 -1
- package/dist/scripts/{CeHHO1Hv.chunk.js → DmVXt6_V.chunk.js} +2 -2
- package/dist/scripts/{CeHHO1Hv.chunk.js.map → DmVXt6_V.chunk.js.map} +1 -1
- package/dist/scripts/{aDegERgV2.chunk.js → DqM6hYTJ2.chunk.js} +2 -2
- package/dist/scripts/{aDegERgV2.chunk.js.map → DqM6hYTJ2.chunk.js.map} +1 -1
- package/dist/scripts/{BPgKK-d32.chunk.js → DsHiClyc2.chunk.js} +2 -2
- package/dist/scripts/{BPgKK-d32.chunk.js.map → DsHiClyc2.chunk.js.map} +1 -1
- package/dist/scripts/{D9zlZIWi2.chunk.js → DuPL-nK72.chunk.js} +2 -2
- package/dist/scripts/{D9zlZIWi2.chunk.js.map → DuPL-nK72.chunk.js.map} +1 -1
- package/dist/scripts/{ZSP3Vfha2.chunk.js → EIJf9JbR2.chunk.js} +2 -2
- package/dist/scripts/{ZSP3Vfha2.chunk.js.map → EIJf9JbR2.chunk.js.map} +1 -1
- package/dist/scripts/{CqNKzFA4.chunk.js → EO2xPuAQ.chunk.js} +2 -2
- package/dist/scripts/{CqNKzFA4.chunk.js.map → EO2xPuAQ.chunk.js.map} +1 -1
- package/dist/scripts/{o2htB_49.chunk.js → F1LOVRO_.chunk.js} +2 -2
- package/dist/scripts/{o2htB_49.chunk.js.map → F1LOVRO_.chunk.js.map} +1 -1
- package/dist/scripts/{BggsU83p2.chunk.js → G-hiM6b42.chunk.js} +2 -2
- package/dist/scripts/{BggsU83p2.chunk.js.map → G-hiM6b42.chunk.js.map} +1 -1
- package/dist/scripts/{B0VKYPiu.chunk.js → MYu2AEsL.chunk.js} +2 -2
- package/dist/scripts/{B0VKYPiu.chunk.js.map → MYu2AEsL.chunk.js.map} +1 -1
- package/dist/scripts/{B9Rb6IIb.chunk.js → NtrZI2Ef.chunk.js} +2 -2
- package/dist/scripts/{B9Rb6IIb.chunk.js.map → NtrZI2Ef.chunk.js.map} +1 -1
- package/dist/scripts/{CRHkMr9_2.chunk.js → OBYDGOgI2.chunk.js} +2 -2
- package/dist/scripts/{CRHkMr9_2.chunk.js.map → OBYDGOgI2.chunk.js.map} +1 -1
- package/dist/scripts/{zp5MUThO.chunk.js → Pixwk-h-.chunk.js} +2 -2
- package/dist/scripts/{zp5MUThO.chunk.js.map → Pixwk-h-.chunk.js.map} +1 -1
- package/dist/scripts/{Ds3cFntF2.chunk.js → SDRXIwM22.chunk.js} +3 -3
- package/dist/scripts/{Ds3cFntF2.chunk.js.map → SDRXIwM22.chunk.js.map} +1 -1
- package/dist/scripts/{C1u2qBZg2.chunk.js → U0UyGd9c2.chunk.js} +2 -2
- package/dist/scripts/{C1u2qBZg2.chunk.js.map → U0UyGd9c2.chunk.js.map} +1 -1
- package/dist/scripts/{CYUx40jk.chunk.js → amjwjus3.chunk.js} +2 -2
- package/dist/scripts/{CYUx40jk.chunk.js.map → amjwjus3.chunk.js.map} +1 -1
- package/dist/scripts/{app-DDrsm5nt.js → app-BGxmHvGl.js} +3 -3
- package/dist/scripts/{app-DDrsm5nt.js.map → app-BGxmHvGl.js.map} +1 -1
- package/dist/scripts/{CgGl8jzo.chunk.js → eUKFc6dK.chunk.js} +2 -2
- package/dist/scripts/{CgGl8jzo.chunk.js.map → eUKFc6dK.chunk.js.map} +1 -1
- package/dist/scripts/{CWsmm40y.chunk.js → l7UAnIb0.chunk.js} +2 -2
- package/dist/scripts/{CWsmm40y.chunk.js.map → l7UAnIb0.chunk.js.map} +1 -1
- package/dist/scripts/{BsSKrRku2.chunk.js → nMyWveQA2.chunk.js} +2 -2
- package/dist/scripts/{BsSKrRku2.chunk.js.map → nMyWveQA2.chunk.js.map} +1 -1
- package/dist/scripts/{CKUk2HqE.chunk.js → pOL5_XNC.chunk.js} +2 -2
- package/dist/scripts/{CKUk2HqE.chunk.js.map → pOL5_XNC.chunk.js.map} +1 -1
- package/dist/scripts/{eLmgigsW.chunk.js → sViLex0Q.chunk.js} +2 -2
- package/dist/scripts/{eLmgigsW.chunk.js.map → sViLex0Q.chunk.js.map} +1 -1
- package/dist/scripts/{Xs1Bv1h-.chunk.js → vvCGyl_q.chunk.js} +2 -2
- package/dist/scripts/{Xs1Bv1h-.chunk.js.map → vvCGyl_q.chunk.js.map} +1 -1
- package/dist/scripts/{BijIuzIs2.chunk.js → xEGWFFpD2.chunk.js} +2 -2
- package/dist/scripts/{BijIuzIs2.chunk.js.map → xEGWFFpD2.chunk.js.map} +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as e,D as t,St as n,mn as r}from"./CnnBLBPY.chunk.js";import{n as i,t as a}from"./Dn3hwC-o.chunk.js";import{D as o}from"./app-
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{C as e,D as t,St as n,mn as r}from"./CnnBLBPY.chunk.js";import{n as i,t as a}from"./Dn3hwC-o.chunk.js";import{D as o}from"./app-BGxmHvGl.js";var s=r(t()),c=e();function l(){let{exchangeTvProductOption:e,isLoadingSettings:t}=o(null);return s.useEffect(()=>{if(!t){if(e===`tv`){n.trigger({application:i.TV,action:a.Tv.INDEX});return}n.trigger({application:i.EXCHANGE,action:a.Exchange.INDEX})}},[e,t]),(0,c.jsx)(c.Fragment,{})}export{l as RedirectView};
|
|
2
|
+
//# sourceMappingURL=eUKFc6dK.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"eUKFc6dK.chunk.js","names":[],"sources":["../../src/apps/default/views/redirect/RedirectView.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { useSettings } from 'libs/shared/hooks/useSettings';\n\nimport { Actions } from 'shared/constants/ExchangeActions';\nimport { AppChannels } from 'shared/constants/ExchangeRadioChannels';\n\n// eslint-disable-next-line rulesdir/require-view-title\nexport function RedirectView() {\n const { exchangeTvProductOption, isLoadingSettings } = useSettings(null);\n\n React.useEffect(() => {\n if (isLoadingSettings) return;\n\n if (exchangeTvProductOption === 'tv') {\n Core.AppLinkHelper.trigger({\n application: AppChannels.TV,\n action: Actions.Tv.INDEX\n });\n return;\n }\n\n Core.AppLinkHelper.trigger({\n application: AppChannels.EXCHANGE,\n action: Actions.Exchange.INDEX\n });\n }, [ exchangeTvProductOption, isLoadingSettings ]);\n\n return (\n <></>\n );\n}\n"],"mappings":"uKAUA,SAAgB,GAAe,CAC7B,GAAM,CAAE,0BAAyB,qBAAsB,EAAY,KAAK,CAmBxE,OAjBA,EAAM,cAAgB,CAChB,MAEJ,IAAI,IAA4B,KAAM,CACpC,EAAmB,QAAQ,CACzB,YAAa,EAAY,GACzB,OAAQ,EAAQ,GAAG,MACpB,CAAC,CACF,OAGF,EAAmB,QAAQ,CACzB,YAAa,EAAY,SACzB,OAAQ,EAAQ,SAAS,MAC1B,CAAC,GACD,CAAE,EAAyB,EAAmB,CAAC,EAGhD,EAAA,EAAA,KAAA,EAAA,SAAA,EAAK,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as e,D as t,mn as n}from"./CnnBLBPY.chunk.js";import{g as r,n as i,t as a,v as o}from"./DW0w8_XN.chunk.js";import{t as s}from"./GN6vNflP.chunk.js";import{t as c}from"./BHEKlg6n.chunk.js";import{$ as l}from"./app-
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{C as e,D as t,mn as n}from"./CnnBLBPY.chunk.js";import{g as r,n as i,t as a,v as o}from"./DW0w8_XN.chunk.js";import{t as s}from"./GN6vNflP.chunk.js";import{t as c}from"./BHEKlg6n.chunk.js";import{$ as l}from"./app-BGxmHvGl.js";import{t as u}from"./B7KaaLVd.chunk.js";import{n as d,t as f}from"./DCtkVk2b.chunk.js";var p=n(t()),m=e(),h=s.encloseNamespace(`shared.breadcrumbComponent`),g=64,_=48,v=p.forwardRef((e,t)=>{let{breadcrumb:{name:n,appLink:o,active:s},withBackIcon:c,linkClassName:l}=e,u=n,f=null;return u.length>_&&(u=n.slice(0,_)+`...`,f=n),(0,m.jsx)(`li`,{className:`breadcrumb-item${s?` active`:``}`,title:f,children:s?(0,m.jsx)(`strong`,{children:u}):(0,m.jsxs)(r,{appLink:o,ref:t,className:o?l:``,children:[c&&(0,m.jsx)(a,{svg:d,size:i.Small}),(0,m.jsx)(`span`,{className:c?`ms-2`:``,children:u})]})})}),y=({breadcrumbs:e,linkClassName:t})=>{let n=c(u.XS),r=e?.length||0,[i,a]=p.useState(!1),[o,s]=p.useState(!1),l=p.useRef(null);p.useEffect(()=>{let t=e?.reduce((e,t)=>e+t.name.length,0)??0;r>4&&t>g&&a(!0)},[e?.length]),p.useLayoutEffect(()=>{o&&l.current?.focus()},[l.current,o]);function d(){a(!1),s(!0)}if(!r||n&&r<2)return(0,m.jsx)(m.Fragment,{});if(n)return(0,m.jsx)(`nav`,{"aria-label":`breadcrumb`,children:(0,m.jsx)(`ol`,{className:`breadcrumb m-0 p-0`,children:(0,m.jsx)(v,{breadcrumb:e[r-2],withBackIcon:!0,linkClassName:t})})});let f=(0,m.jsx)(v,{breadcrumb:e[0],linkClassName:t}),_=r>2?(0,m.jsx)(v,{breadcrumb:e[1],linkClassName:t}):(0,m.jsx)(m.Fragment,{}),y=r>3?(0,m.jsx)(v,{breadcrumb:e[r-2],linkClassName:t}):(0,m.jsx)(m.Fragment,{}),b=r>1?(0,m.jsx)(v,{breadcrumb:e[r-1],linkClassName:t}):(0,m.jsx)(m.Fragment,{}),x=e.slice(2,r-2);return(0,m.jsx)(`nav`,{"aria-label":`breadcrumb`,children:(0,m.jsxs)(`ol`,{className:`breadcrumb m-0 p-0`,children:[f,_,i?(0,m.jsx)(`li`,{className:`breadcrumb-item`,children:(0,m.jsx)(`button`,{className:`btn-link`,onClick:d,"aria-label":h(`expand`),children:`...`})}):x.map((e,n)=>(0,m.jsx)(v,{breadcrumb:e,ref:n===0?l:null,linkClassName:t},n)),y,b]})})},b=p.memo(function({numItems:e=3}){return c(u.XS)?(0,m.jsx)(`div`,{className:`partial-loading-background`,style:{height:`1.3125rem`,width:`6rem`}}):(0,m.jsx)(`nav`,{"aria-label":`breadcrumb`,children:(0,m.jsx)(`ol`,{className:`breadcrumb m-0 p-0`,children:f.getPartialLoadingItems({numItems:e}).map(({width:e},t)=>(0,m.jsx)(`li`,{className:`breadcrumb-item`,children:(0,m.jsx)(`span`,{className:`d-inline-block partial-loading-background`,style:{width:e},dangerouslySetInnerHTML:{__html:` `}})},t))})})}),x=`shared.videoSortSelect`,S=o.memoize(()=>({[l.RecentlyAdded]:{name:s.getPhrase(x,`recentlyAdded`)},[l.AtoZ]:{name:s.getPhrase(x,`atoz`)},[l.ZtoA]:{name:s.getPhrase(x,`ztoa`)},[l.Newest]:{name:s.getPhrase(x,`newest`)},[l.Oldest]:{name:s.getPhrase(x,`oldest`)},[l.Series]:{name:s.getPhrase(x,`series`)}}));function C(e){let t=S();return e&&(t={[l.ProductionYear]:{name:s.getPhrase(x,`productionYear`)},...t}),t}w.defaultProps={variant:`light`};function w(e){let t=e.sortTypes||C(e.includeProductionYear);return(0,m.jsxs)(`div`,{className:`dropdown`,children:[(0,m.jsx)(`button`,{className:`btn btn-${e.variant} ms-2 dropdown-toggle`,type:`button`,id:`sort-select`,"data-bs-toggle":`dropdown`,"aria-haspopup":`true`,"aria-expanded":`false`,children:t[e.type].name}),(0,m.jsx)(`ul`,{className:`dropdown-menu dropdown-menu-end`,"aria-labelledby":`sort-select`,children:Object.keys(t).map(n=>{let i=`dropdown-item`;return n===e.type&&(i+=` active`),(0,m.jsx)(`li`,{children:(0,m.jsx)(r,{className:i,appLink:e.getSortAppLink(n),analyticsData:{sort:t[n].name},analyticsOptions:e.analyticsOptions,children:t[n].name})},n)})})]})}export{y as n,b as r,w as t};
|
|
2
|
+
//# sourceMappingURL=l7UAnIb0.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CWsmm40y.chunk.js","names":[],"sources":["../../../../libs/shared/src/components/breadcrumbs/Breadcrumbs.tsx","../../../../libs/shared/src/components/video-sort-select/VideoSortSelect.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\nimport { useMediaQuery } from 'libs/shared/hooks/UseMediaQuery';\nimport { ChevronLeftSvg } from 'libs/shared/images/svg/arrows/ChevronLeftSvg';\nimport { PartialLoadingHelper } from 'libs/shared/utils/PartialLoadingHelper';\n\nimport { SvgContainer, SvgContainerSize } from '../svg-container/SvgContainer';\n\nconst namespace = 'shared.breadcrumbComponent';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nconst COLLAPSE_CHARACTER_COUNT = 64;\nconst MAX_SEGMENT_LENGTH = 48;\n\nexport interface Breadcrumb {\n name: string;\n appLink?: Core.AppLink;\n active?: boolean;\n}\n\ninterface BreadcrumbItemProps {\n breadcrumb: Breadcrumb;\n withBackIcon?: boolean;\n linkClassName?: string;\n}\n\nexport const BreadcrumbItem = React.forwardRef((\n props: BreadcrumbItemProps,\n ref: React.ForwardedRef<HTMLElement>\n) => {\n const { breadcrumb: { name, appLink, active }, withBackIcon, linkClassName } = props;\n\n let trimmedName = name;\n let title: string = null;\n\n if (trimmedName.length > MAX_SEGMENT_LENGTH) {\n trimmedName = name.slice(0, MAX_SEGMENT_LENGTH) + '...';\n\n // Only setting the title when we trim, because otherwise it's really not needed - Sha\n title = name;\n }\n\n return (\n <li\n className={`breadcrumb-item${active ? ' active' : ''}`}\n title={title}\n >\n {active ?\n <strong>{trimmedName}</strong> :\n <AppLink appLink={appLink} ref={ref} className={appLink ? linkClassName : ''}>\n {withBackIcon && <SvgContainer svg={ChevronLeftSvg} size={SvgContainerSize.Small} />}\n <span className={withBackIcon ? 'ms-2' : ''}>{trimmedName}</span>\n </AppLink>\n }\n </li>\n );\n});\n\ninterface BreadcrumbsProps {\n breadcrumbs: Breadcrumb[];\n linkClassName?: string;\n}\n\nexport const Breadcrumbs = ({ breadcrumbs, linkClassName }: BreadcrumbsProps) => {\n const isMobile = useMediaQuery(MediaQueryStrings.XS);\n\n const length = breadcrumbs?.length || 0;\n \n const [ collapse, setCollapse ] = React.useState(false);\n const [ shouldFocus, setShouldFocus ] = React.useState(false);\n const expandRef = React.useRef<HTMLElement>(null);\n\n React.useEffect(() => {\n const characterLength = breadcrumbs?.reduce((prev, next) => prev + next.name.length, 0) ?? 0;\n\n if (length > 4 && characterLength > COLLAPSE_CHARACTER_COUNT)\n setCollapse(true);\n }, [breadcrumbs?.length]);\n\n /**\n * Focus our first expanded item the first time it appears.\n */\n React.useLayoutEffect(() => {\n if (shouldFocus)\n expandRef.current?.focus();\n }, [ expandRef.current, shouldFocus ]);\n\n function onClickExpand() {\n setCollapse(false);\n setShouldFocus(true);\n }\n\n if (!length || (isMobile && length < 2))\n return <></>;\n\n if (isMobile)\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n <BreadcrumbItem breadcrumb={breadcrumbs[length - 2]} withBackIcon linkClassName={linkClassName} />\n </ol>\n </nav>\n );\n\n const first = <BreadcrumbItem breadcrumb={breadcrumbs[0]} linkClassName={linkClassName} />;\n const second = length > 2 ?\n <BreadcrumbItem breadcrumb={breadcrumbs[1]} linkClassName={linkClassName} /> :\n <></>;\n const secondLast = length > 3 ?\n <BreadcrumbItem breadcrumb={breadcrumbs[length - 2]} linkClassName={linkClassName} /> :\n <></>;\n const last = length > 1 ?\n <BreadcrumbItem breadcrumb={breadcrumbs[length - 1]} linkClassName={linkClassName} /> :\n <></>;\n const rest = breadcrumbs.slice(2, length - 2);\n\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n {first}\n {second}\n {collapse ?\n <li className='breadcrumb-item'>\n <button\n className='btn-link'\n onClick={onClickExpand}\n aria-label={getPhrase('expand')}\n >\n ...\n </button>\n </li> :\n rest.map((breadcrumb, idx) => (\n <BreadcrumbItem\n key={idx}\n breadcrumb={breadcrumb}\n ref={idx === 0 ? expandRef : null}\n linkClassName={linkClassName}\n />\n ))\n }\n {secondLast}\n {last}\n </ol>\n </nav>\n );\n};\n\nexport const PartialBreadcrumbs = React.memo(function({ numItems = 3 }: { numItems?: number }) {\n const isMobile = useMediaQuery(MediaQueryStrings.XS);\n\n if (isMobile) {\n return (\n <div className='partial-loading-background' style={{ height: '1.3125rem', width: '6rem' }} />\n );\n }\n\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n {PartialLoadingHelper.getPartialLoadingItems({ numItems }).map(({ width }, idx) => (\n <li key={idx} className='breadcrumb-item'>\n <span className='d-inline-block partial-loading-background' style={{ width }} dangerouslySetInnerHTML={{ __html: ' ' }} />\n </li>\n ))}\n </ol>\n </nav>\n );\n});\n","import * as React from 'react';\nimport { ButtonProps } from 'react-bootstrap';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { Core } from 'libs/common/core';\n\nimport { AnalyticsOptions } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { VideoSortType } from 'libs/shared/enums/VideoSortType';\n\nconst namespace = 'shared.videoSortSelect';\n\ntype SortTypes = {[sort: string]: { name: string } };\n\nconst getDefaultSortTypes: () => SortTypes = FunctionHelper.memoize(() => {\n return {\n [VideoSortType.RecentlyAdded]: {\n name: LanguageService.getPhrase(namespace, 'recentlyAdded')\n },\n [VideoSortType.AtoZ]: {\n name: LanguageService.getPhrase(namespace, 'atoz')\n },\n [VideoSortType.ZtoA]: {\n name: LanguageService.getPhrase(namespace, 'ztoa')\n },\n [VideoSortType.Newest]: {\n name: LanguageService.getPhrase(namespace, 'newest')\n },\n [VideoSortType.Oldest]: {\n name: LanguageService.getPhrase(namespace, 'oldest')\n },\n [VideoSortType.Series]: {\n name: LanguageService.getPhrase(namespace, 'series')\n }\n };\n});\n\nfunction getSortTypes(productionYear: boolean): SortTypes {\n let defaultSortTypes = getDefaultSortTypes();\n\n if (productionYear) {\n defaultSortTypes = {\n [VideoSortType.ProductionYear]: {\n name: LanguageService.getPhrase(namespace, 'productionYear')\n },\n ...defaultSortTypes\n };\n }\n \n return defaultSortTypes;\n}\n\ninterface VideoSortSelectProps {\n type: VideoSortType;\n getSortAppLink: (sort: string) => Core.AppLink;\n variant?: ButtonProps['variant'];\n sortTypes?: SortTypes;\n analyticsOptions: AnalyticsOptions;\n includeProductionYear?: boolean;\n}\n\nVideoSortSelect.defaultProps = {\n variant: 'light'\n};\n\nexport function VideoSortSelect(props: VideoSortSelectProps): JSX.Element {\n const sortTypes = props.sortTypes || getSortTypes(props.includeProductionYear);\n\n return (\n <div className='dropdown'>\n <button className={`btn btn-${props.variant} ms-2 dropdown-toggle`} type='button' id='sort-select' data-bs-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>\n {sortTypes[props.type].name}\n </button>\n <ul className='dropdown-menu dropdown-menu-end' aria-labelledby='sort-select'>\n {Object.keys(sortTypes).map(k => {\n let className = 'dropdown-item';\n\n if (k === props.type)\n className += ' active';\n\n return (\n <li key={k}>\n <AppLink\n className={className}\n appLink={props.getSortAppLink(k)}\n analyticsData={{\n sort: sortTypes[k].name\n }}\n analyticsOptions={props.analyticsOptions}\n >\n {sortTypes[k].name}\n </AppLink>\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n"],"mappings":"oVAcM,EAAY,EAAgB,iBADhB,6BAC2C,CAEvD,EAA2B,GAC3B,EAAqB,GAcd,EAAA,EAAuB,YAClC,EACA,IACG,CACH,GAAM,CAAE,WAAY,CAAE,OAAM,UAAS,UAAU,eAAc,iBAAkB,EAE3E,EAAc,EACd,EAAgB,KASpB,OAPI,EAAY,OAAS,IACvB,EAAc,EAAK,MAAM,EAAG,EAAmB,CAAG,MAGlD,EAAQ,IAIR,EAAA,EAAA,KAAC,KAAD,CACE,UAAW,kBAAkB,EAAS,UAAY,KAC3C,iBAEN,GACC,EAAA,EAAA,KAAC,SAAD,CAAA,SAAS,EAAqB,CAAA,EAC9B,EAAA,EAAA,MAAC,EAAD,CAAkB,UAAc,MAAK,UAAW,EAAU,EAAgB,YAA1E,CACG,IAAgB,EAAA,EAAA,KAAC,EAAD,CAAc,IAAK,EAAgB,KAAM,EAAiB,MAAS,CAAA,EACpF,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAe,OAAS,YAAK,EAAmB,CAAA,CAAA,GAGlE,CAAA,EAEP,CAOW,GAAe,CAAE,cAAa,mBAAsC,CAC/E,IAAM,EAAW,EAAc,EAAkB,GAAG,CAE9C,EAAS,GAAa,QAAU,EAEhC,CAAE,EAAU,GAAA,EAAsB,SAAS,GAAM,CACjD,CAAE,EAAa,GAAA,EAAyB,SAAS,GAAM,CACvD,EAAA,EAAkB,OAAoB,KAAK,CAEjD,EAAM,cAAgB,CACpB,IAAM,EAAkB,GAAa,QAAQ,EAAM,IAAS,EAAO,EAAK,KAAK,OAAQ,EAAE,EAAI,EAEvF,EAAS,GAAK,EAAkB,GAClC,EAAY,GAAK,EAClB,CAAC,GAAa,OAAO,CAAC,CAKzB,EAAM,oBAAsB,CACtB,GACF,EAAU,SAAS,OAAO,EAC3B,CAAE,EAAU,QAAS,EAAa,CAAC,CAEtC,SAAS,GAAgB,CACvB,EAAY,GAAM,CAClB,EAAe,GAAK,CAGtB,GAAI,CAAC,GAAW,GAAY,EAAS,EACnC,OAAO,EAAA,EAAA,KAAA,EAAA,SAAA,EAAK,CAAA,CAEd,GAAI,EACF,OACE,EAAA,EAAA,KAAC,MAAD,CAAK,aAAW,uBACd,EAAA,EAAA,KAAC,KAAD,CAAI,UAAU,+BACZ,EAAA,EAAA,KAAC,EAAD,CAAgB,WAAY,EAAY,EAAS,GAAI,aAAA,GAA4B,gBAAiB,CAAA,CAC/F,CAAA,CACD,CAAA,CAGV,IAAM,GAAQ,EAAA,EAAA,KAAC,EAAD,CAAgB,WAAY,EAAY,GAAmB,gBAAiB,CAAA,CACpF,EAAS,EAAS,GACtB,EAAA,EAAA,KAAC,EAAD,CAAgB,WAAY,EAAY,GAAmB,gBAAiB,CAAA,EAC5E,EAAA,EAAA,KAAA,EAAA,SAAA,EAAK,CAAA,CACD,EAAa,EAAS,GAC1B,EAAA,EAAA,KAAC,EAAD,CAAgB,WAAY,EAAY,EAAS,GAAmB,gBAAiB,CAAA,EACrF,EAAA,EAAA,KAAA,EAAA,SAAA,EAAK,CAAA,CACD,EAAO,EAAS,GACpB,EAAA,EAAA,KAAC,EAAD,CAAgB,WAAY,EAAY,EAAS,GAAmB,gBAAiB,CAAA,EACrF,EAAA,EAAA,KAAA,EAAA,SAAA,EAAK,CAAA,CACD,EAAO,EAAY,MAAM,EAAG,EAAS,EAAE,CAE7C,OACE,EAAA,EAAA,KAAC,MAAD,CAAK,aAAW,uBACd,EAAA,EAAA,MAAC,KAAD,CAAI,UAAU,8BAAd,CACG,EACA,EACA,GACC,EAAA,EAAA,KAAC,KAAD,CAAI,UAAU,4BACZ,EAAA,EAAA,KAAC,SAAD,CACE,UAAU,WACV,QAAS,EACT,aAAY,EAAU,SAAS,UAChC,MAEQ,CAAA,CACN,CAAA,CACL,EAAK,KAAK,EAAY,KACpB,EAAA,EAAA,KAAC,EAAD,CAEc,aACZ,IAAK,IAAQ,EAAI,EAAY,KACd,gBACf,CAJK,EAIL,CACF,CAEH,EACA,KAEC,CAAA,EAIG,EAAA,EAA2B,KAAK,SAAS,CAAE,WAAW,GAA4B,CAS7F,OARiB,EAAc,EAAkB,GAAG,EAIhD,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,6BAA6B,MAAO,CAAE,OAAQ,YAAa,MAAO,QAAY,CAAA,EAK/F,EAAA,EAAA,KAAC,MAAD,CAAK,aAAW,uBACd,EAAA,EAAA,KAAC,KAAD,CAAI,UAAU,8BACX,EAAqB,uBAAuB,CAAE,WAAU,CAAC,CAAC,KAAK,CAAE,SAAS,KACzE,EAAA,EAAA,KAAC,KAAD,CAAc,UAAU,4BACtB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,4CAA4C,MAAO,CAAE,QAAO,CAAE,wBAAyB,CAAE,OAAQ,QAAA,CAAa,CAAA,CAC3H,CAFI,EAEJ,CAAA,CAEJ,CAAA,CACD,CAAA,EAER,CChKI,EAAY,yBAIZ,EAAuC,EAAe,aACnD,EACJ,EAAc,eAAgB,CAC7B,KAAM,EAAgB,UAAU,EAAW,gBAAgB,CAC5D,EACA,EAAc,MAAO,CACpB,KAAM,EAAgB,UAAU,EAAW,OAAO,CACnD,EACA,EAAc,MAAO,CACpB,KAAM,EAAgB,UAAU,EAAW,OAAO,CACnD,EACA,EAAc,QAAS,CACtB,KAAM,EAAgB,UAAU,EAAW,SAAS,CACrD,EACA,EAAc,QAAS,CACtB,KAAM,EAAgB,UAAU,EAAW,SAAS,CACrD,EACA,EAAc,QAAS,CACtB,KAAM,EAAgB,UAAU,EAAW,SAAS,CAAA,CAEvD,EACD,CAEF,SAAS,EAAa,EAAoC,CACxD,IAAI,EAAmB,GAAqB,CAW5C,OATI,IACF,EAAmB,EAChB,EAAc,gBAAiB,CAC9B,KAAM,EAAgB,UAAU,EAAW,iBAAiB,CAC7D,CACD,GAAG,EACJ,EAGI,EAYT,EAAgB,aAAe,CAC7B,QAAS,QACV,CAED,SAAgB,EAAgB,EAA0C,CACxE,IAAM,EAAY,EAAM,WAAa,EAAa,EAAM,sBAAsB,CAE9E,OACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,oBAAf,EACE,EAAA,EAAA,KAAC,SAAD,CAAQ,UAAW,WAAW,EAAM,QAAQ,uBAAwB,KAAK,SAAS,GAAG,cAAc,iBAAe,WAAW,gBAAc,OAAO,gBAAc,iBAC7J,EAAU,EAAM,MAAM,KAChB,CAAA,EACT,EAAA,EAAA,KAAC,KAAD,CAAI,UAAU,kCAAkC,kBAAgB,uBAC7D,OAAO,KAAK,EAAU,CAAC,IAAI,GAAK,CAC/B,IAAI,EAAY,gBAKhB,OAHI,IAAM,EAAM,OACd,GAAa,YAGb,EAAA,EAAA,KAAC,KAAD,CAAA,UACE,EAAA,EAAA,KAAC,EAAD,CACa,YACX,QAAS,EAAM,eAAe,EAAE,CAChC,cAAe,CACb,KAAM,EAAU,GAAG,KACpB,CACD,iBAAkB,EAAM,0BAEvB,EAAU,GAAG,KACN,CAAA,CACP,CAXI,EAWJ,GAGN,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"l7UAnIb0.chunk.js","names":[],"sources":["../../../../libs/shared/src/components/breadcrumbs/Breadcrumbs.tsx","../../../../libs/shared/src/components/video-sort-select/VideoSortSelect.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\nimport { useMediaQuery } from 'libs/shared/hooks/UseMediaQuery';\nimport { ChevronLeftSvg } from 'libs/shared/images/svg/arrows/ChevronLeftSvg';\nimport { PartialLoadingHelper } from 'libs/shared/utils/PartialLoadingHelper';\n\nimport { SvgContainer, SvgContainerSize } from '../svg-container/SvgContainer';\n\nconst namespace = 'shared.breadcrumbComponent';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nconst COLLAPSE_CHARACTER_COUNT = 64;\nconst MAX_SEGMENT_LENGTH = 48;\n\nexport interface Breadcrumb {\n name: string;\n appLink?: Core.AppLink;\n active?: boolean;\n}\n\ninterface BreadcrumbItemProps {\n breadcrumb: Breadcrumb;\n withBackIcon?: boolean;\n linkClassName?: string;\n}\n\nexport const BreadcrumbItem = React.forwardRef((\n props: BreadcrumbItemProps,\n ref: React.ForwardedRef<HTMLElement>\n) => {\n const { breadcrumb: { name, appLink, active }, withBackIcon, linkClassName } = props;\n\n let trimmedName = name;\n let title: string = null;\n\n if (trimmedName.length > MAX_SEGMENT_LENGTH) {\n trimmedName = name.slice(0, MAX_SEGMENT_LENGTH) + '...';\n\n // Only setting the title when we trim, because otherwise it's really not needed - Sha\n title = name;\n }\n\n return (\n <li\n className={`breadcrumb-item${active ? ' active' : ''}`}\n title={title}\n >\n {active ?\n <strong>{trimmedName}</strong> :\n <AppLink appLink={appLink} ref={ref} className={appLink ? linkClassName : ''}>\n {withBackIcon && <SvgContainer svg={ChevronLeftSvg} size={SvgContainerSize.Small} />}\n <span className={withBackIcon ? 'ms-2' : ''}>{trimmedName}</span>\n </AppLink>\n }\n </li>\n );\n});\n\ninterface BreadcrumbsProps {\n breadcrumbs: Breadcrumb[];\n linkClassName?: string;\n}\n\nexport const Breadcrumbs = ({ breadcrumbs, linkClassName }: BreadcrumbsProps) => {\n const isMobile = useMediaQuery(MediaQueryStrings.XS);\n\n const length = breadcrumbs?.length || 0;\n \n const [ collapse, setCollapse ] = React.useState(false);\n const [ shouldFocus, setShouldFocus ] = React.useState(false);\n const expandRef = React.useRef<HTMLElement>(null);\n\n React.useEffect(() => {\n const characterLength = breadcrumbs?.reduce((prev, next) => prev + next.name.length, 0) ?? 0;\n\n if (length > 4 && characterLength > COLLAPSE_CHARACTER_COUNT)\n setCollapse(true);\n }, [breadcrumbs?.length]);\n\n /**\n * Focus our first expanded item the first time it appears.\n */\n React.useLayoutEffect(() => {\n if (shouldFocus)\n expandRef.current?.focus();\n }, [ expandRef.current, shouldFocus ]);\n\n function onClickExpand() {\n setCollapse(false);\n setShouldFocus(true);\n }\n\n if (!length || (isMobile && length < 2))\n return <></>;\n\n if (isMobile)\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n <BreadcrumbItem breadcrumb={breadcrumbs[length - 2]} withBackIcon linkClassName={linkClassName} />\n </ol>\n </nav>\n );\n\n const first = <BreadcrumbItem breadcrumb={breadcrumbs[0]} linkClassName={linkClassName} />;\n const second = length > 2 ?\n <BreadcrumbItem breadcrumb={breadcrumbs[1]} linkClassName={linkClassName} /> :\n <></>;\n const secondLast = length > 3 ?\n <BreadcrumbItem breadcrumb={breadcrumbs[length - 2]} linkClassName={linkClassName} /> :\n <></>;\n const last = length > 1 ?\n <BreadcrumbItem breadcrumb={breadcrumbs[length - 1]} linkClassName={linkClassName} /> :\n <></>;\n const rest = breadcrumbs.slice(2, length - 2);\n\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n {first}\n {second}\n {collapse ?\n <li className='breadcrumb-item'>\n <button\n className='btn-link'\n onClick={onClickExpand}\n aria-label={getPhrase('expand')}\n >\n ...\n </button>\n </li> :\n rest.map((breadcrumb, idx) => (\n <BreadcrumbItem\n key={idx}\n breadcrumb={breadcrumb}\n ref={idx === 0 ? expandRef : null}\n linkClassName={linkClassName}\n />\n ))\n }\n {secondLast}\n {last}\n </ol>\n </nav>\n );\n};\n\nexport const PartialBreadcrumbs = React.memo(function({ numItems = 3 }: { numItems?: number }) {\n const isMobile = useMediaQuery(MediaQueryStrings.XS);\n\n if (isMobile) {\n return (\n <div className='partial-loading-background' style={{ height: '1.3125rem', width: '6rem' }} />\n );\n }\n\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n {PartialLoadingHelper.getPartialLoadingItems({ numItems }).map(({ width }, idx) => (\n <li key={idx} className='breadcrumb-item'>\n <span className='d-inline-block partial-loading-background' style={{ width }} dangerouslySetInnerHTML={{ __html: ' ' }} />\n </li>\n ))}\n </ol>\n </nav>\n );\n});\n","import * as React from 'react';\nimport { ButtonProps } from 'react-bootstrap';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { Core } from 'libs/common/core';\n\nimport { AnalyticsOptions } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { VideoSortType } from 'libs/shared/enums/VideoSortType';\n\nconst namespace = 'shared.videoSortSelect';\n\ntype SortTypes = {[sort: string]: { name: string } };\n\nconst getDefaultSortTypes: () => SortTypes = FunctionHelper.memoize(() => {\n return {\n [VideoSortType.RecentlyAdded]: {\n name: LanguageService.getPhrase(namespace, 'recentlyAdded')\n },\n [VideoSortType.AtoZ]: {\n name: LanguageService.getPhrase(namespace, 'atoz')\n },\n [VideoSortType.ZtoA]: {\n name: LanguageService.getPhrase(namespace, 'ztoa')\n },\n [VideoSortType.Newest]: {\n name: LanguageService.getPhrase(namespace, 'newest')\n },\n [VideoSortType.Oldest]: {\n name: LanguageService.getPhrase(namespace, 'oldest')\n },\n [VideoSortType.Series]: {\n name: LanguageService.getPhrase(namespace, 'series')\n }\n };\n});\n\nfunction getSortTypes(productionYear: boolean): SortTypes {\n let defaultSortTypes = getDefaultSortTypes();\n\n if (productionYear) {\n defaultSortTypes = {\n [VideoSortType.ProductionYear]: {\n name: LanguageService.getPhrase(namespace, 'productionYear')\n },\n ...defaultSortTypes\n };\n }\n \n return defaultSortTypes;\n}\n\ninterface VideoSortSelectProps {\n type: VideoSortType;\n getSortAppLink: (sort: string) => Core.AppLink;\n variant?: ButtonProps['variant'];\n sortTypes?: SortTypes;\n analyticsOptions: AnalyticsOptions;\n includeProductionYear?: boolean;\n}\n\nVideoSortSelect.defaultProps = {\n variant: 'light'\n};\n\nexport function VideoSortSelect(props: VideoSortSelectProps): JSX.Element {\n const sortTypes = props.sortTypes || getSortTypes(props.includeProductionYear);\n\n return (\n <div className='dropdown'>\n <button className={`btn btn-${props.variant} ms-2 dropdown-toggle`} type='button' id='sort-select' data-bs-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>\n {sortTypes[props.type].name}\n </button>\n <ul className='dropdown-menu dropdown-menu-end' aria-labelledby='sort-select'>\n {Object.keys(sortTypes).map(k => {\n let className = 'dropdown-item';\n\n if (k === props.type)\n className += ' active';\n\n return (\n <li key={k}>\n <AppLink\n className={className}\n appLink={props.getSortAppLink(k)}\n analyticsData={{\n sort: sortTypes[k].name\n }}\n analyticsOptions={props.analyticsOptions}\n >\n {sortTypes[k].name}\n </AppLink>\n </li>\n );\n })}\n </ul>\n </div>\n );\n}\n"],"mappings":"oVAcM,EAAY,EAAgB,iBADhB,6BAC2C,CAEvD,EAA2B,GAC3B,EAAqB,GAcd,EAAA,EAAuB,YAClC,EACA,IACG,CACH,GAAM,CAAE,WAAY,CAAE,OAAM,UAAS,UAAU,eAAc,iBAAkB,EAE3E,EAAc,EACd,EAAgB,KASpB,OAPI,EAAY,OAAS,IACvB,EAAc,EAAK,MAAM,EAAG,EAAmB,CAAG,MAGlD,EAAQ,IAIR,EAAA,EAAA,KAAC,KAAD,CACE,UAAW,kBAAkB,EAAS,UAAY,KAC3C,iBAEN,GACC,EAAA,EAAA,KAAC,SAAD,CAAA,SAAS,EAAqB,CAAA,EAC9B,EAAA,EAAA,MAAC,EAAD,CAAkB,UAAc,MAAK,UAAW,EAAU,EAAgB,YAA1E,CACG,IAAgB,EAAA,EAAA,KAAC,EAAD,CAAc,IAAK,EAAgB,KAAM,EAAiB,MAAS,CAAA,EACpF,EAAA,EAAA,KAAC,OAAD,CAAM,UAAW,EAAe,OAAS,YAAK,EAAmB,CAAA,CAAA,GAGlE,CAAA,EAEP,CAOW,GAAe,CAAE,cAAa,mBAAsC,CAC/E,IAAM,EAAW,EAAc,EAAkB,GAAG,CAE9C,EAAS,GAAa,QAAU,EAEhC,CAAE,EAAU,GAAA,EAAsB,SAAS,GAAM,CACjD,CAAE,EAAa,GAAA,EAAyB,SAAS,GAAM,CACvD,EAAA,EAAkB,OAAoB,KAAK,CAEjD,EAAM,cAAgB,CACpB,IAAM,EAAkB,GAAa,QAAQ,EAAM,IAAS,EAAO,EAAK,KAAK,OAAQ,EAAE,EAAI,EAEvF,EAAS,GAAK,EAAkB,GAClC,EAAY,GAAK,EAClB,CAAC,GAAa,OAAO,CAAC,CAKzB,EAAM,oBAAsB,CACtB,GACF,EAAU,SAAS,OAAO,EAC3B,CAAE,EAAU,QAAS,EAAa,CAAC,CAEtC,SAAS,GAAgB,CACvB,EAAY,GAAM,CAClB,EAAe,GAAK,CAGtB,GAAI,CAAC,GAAW,GAAY,EAAS,EACnC,OAAO,EAAA,EAAA,KAAA,EAAA,SAAA,EAAK,CAAA,CAEd,GAAI,EACF,OACE,EAAA,EAAA,KAAC,MAAD,CAAK,aAAW,uBACd,EAAA,EAAA,KAAC,KAAD,CAAI,UAAU,+BACZ,EAAA,EAAA,KAAC,EAAD,CAAgB,WAAY,EAAY,EAAS,GAAI,aAAA,GAA4B,gBAAiB,CAAA,CAC/F,CAAA,CACD,CAAA,CAGV,IAAM,GAAQ,EAAA,EAAA,KAAC,EAAD,CAAgB,WAAY,EAAY,GAAmB,gBAAiB,CAAA,CACpF,EAAS,EAAS,GACtB,EAAA,EAAA,KAAC,EAAD,CAAgB,WAAY,EAAY,GAAmB,gBAAiB,CAAA,EAC5E,EAAA,EAAA,KAAA,EAAA,SAAA,EAAK,CAAA,CACD,EAAa,EAAS,GAC1B,EAAA,EAAA,KAAC,EAAD,CAAgB,WAAY,EAAY,EAAS,GAAmB,gBAAiB,CAAA,EACrF,EAAA,EAAA,KAAA,EAAA,SAAA,EAAK,CAAA,CACD,EAAO,EAAS,GACpB,EAAA,EAAA,KAAC,EAAD,CAAgB,WAAY,EAAY,EAAS,GAAmB,gBAAiB,CAAA,EACrF,EAAA,EAAA,KAAA,EAAA,SAAA,EAAK,CAAA,CACD,EAAO,EAAY,MAAM,EAAG,EAAS,EAAE,CAE7C,OACE,EAAA,EAAA,KAAC,MAAD,CAAK,aAAW,uBACd,EAAA,EAAA,MAAC,KAAD,CAAI,UAAU,8BAAd,CACG,EACA,EACA,GACC,EAAA,EAAA,KAAC,KAAD,CAAI,UAAU,4BACZ,EAAA,EAAA,KAAC,SAAD,CACE,UAAU,WACV,QAAS,EACT,aAAY,EAAU,SAAS,UAChC,MAEQ,CAAA,CACN,CAAA,CACL,EAAK,KAAK,EAAY,KACpB,EAAA,EAAA,KAAC,EAAD,CAEc,aACZ,IAAK,IAAQ,EAAI,EAAY,KACd,gBACf,CAJK,EAIL,CACF,CAEH,EACA,KAEC,CAAA,EAIG,EAAA,EAA2B,KAAK,SAAS,CAAE,WAAW,GAA4B,CAS7F,OARiB,EAAc,EAAkB,GAAG,EAIhD,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,6BAA6B,MAAO,CAAE,OAAQ,YAAa,MAAO,QAAY,CAAA,EAK/F,EAAA,EAAA,KAAC,MAAD,CAAK,aAAW,uBACd,EAAA,EAAA,KAAC,KAAD,CAAI,UAAU,8BACX,EAAqB,uBAAuB,CAAE,WAAU,CAAC,CAAC,KAAK,CAAE,SAAS,KACzE,EAAA,EAAA,KAAC,KAAD,CAAc,UAAU,4BACtB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,4CAA4C,MAAO,CAAE,QAAO,CAAE,wBAAyB,CAAE,OAAQ,QAAA,CAAa,CAAA,CAC3H,CAFI,EAEJ,CAAA,CAEJ,CAAA,CACD,CAAA,EAER,CChKI,EAAY,yBAIZ,EAAuC,EAAe,aACnD,EACJ,EAAc,eAAgB,CAC7B,KAAM,EAAgB,UAAU,EAAW,gBAAgB,CAC5D,EACA,EAAc,MAAO,CACpB,KAAM,EAAgB,UAAU,EAAW,OAAO,CACnD,EACA,EAAc,MAAO,CACpB,KAAM,EAAgB,UAAU,EAAW,OAAO,CACnD,EACA,EAAc,QAAS,CACtB,KAAM,EAAgB,UAAU,EAAW,SAAS,CACrD,EACA,EAAc,QAAS,CACtB,KAAM,EAAgB,UAAU,EAAW,SAAS,CACrD,EACA,EAAc,QAAS,CACtB,KAAM,EAAgB,UAAU,EAAW,SAAS,CAAA,CAEvD,EACD,CAEF,SAAS,EAAa,EAAoC,CACxD,IAAI,EAAmB,GAAqB,CAW5C,OATI,IACF,EAAmB,EAChB,EAAc,gBAAiB,CAC9B,KAAM,EAAgB,UAAU,EAAW,iBAAiB,CAC7D,CACD,GAAG,EACJ,EAGI,EAYT,EAAgB,aAAe,CAC7B,QAAS,QACV,CAED,SAAgB,EAAgB,EAA0C,CACxE,IAAM,EAAY,EAAM,WAAa,EAAa,EAAM,sBAAsB,CAE9E,OACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,oBAAf,EACE,EAAA,EAAA,KAAC,SAAD,CAAQ,UAAW,WAAW,EAAM,QAAQ,uBAAwB,KAAK,SAAS,GAAG,cAAc,iBAAe,WAAW,gBAAc,OAAO,gBAAc,iBAC7J,EAAU,EAAM,MAAM,KAChB,CAAA,EACT,EAAA,EAAA,KAAC,KAAD,CAAI,UAAU,kCAAkC,kBAAgB,uBAC7D,OAAO,KAAK,EAAU,CAAC,IAAI,GAAK,CAC/B,IAAI,EAAY,gBAKhB,OAHI,IAAM,EAAM,OACd,GAAa,YAGb,EAAA,EAAA,KAAC,KAAD,CAAA,UACE,EAAA,EAAA,KAAC,EAAD,CACa,YACX,QAAS,EAAM,eAAe,EAAE,CAChC,cAAe,CACb,KAAM,EAAU,GAAG,KACpB,CACD,iBAAkB,EAAM,0BAEvB,EAAU,GAAG,KACN,CAAA,CACP,CAXI,EAWJ,GAGN,CAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{D as e,_t as t,mn as n}from"./CnnBLBPY.chunk.js";import{k as r}from"./app-
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{D as e,_t as t,mn as n}from"./CnnBLBPY.chunk.js";import{k as r}from"./app-BGxmHvGl.js";var i=n(e());function a(...e){i.useEffect(()=>{e.length&&e.some(t.isStatusCodeError)&&t.throw(new r)},e)}export{a as t};
|
|
2
|
+
//# sourceMappingURL=nMyWveQA2.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"nMyWveQA2.chunk.js","names":[],"sources":["../../../../libs/shared/src/hooks/UseHandleDialogError.ts"],"sourcesContent":["import React from 'react';\n\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { Core } from 'libs/common/backbone/index';\n\nimport { UnspecifiedDialogError } from 'libs/shared/errors/general/unspecified-dialog/UnspecifiedDialogError';\n\nexport function useHandleDialogError(...statusCodes: HttpStatus[]): void {\n React.useEffect(() => {\n if (!statusCodes.length)\n return;\n\n const hasErrorCode = statusCodes.some(Core.ErrorHelper.isStatusCodeError);\n\n if (!hasErrorCode)\n return;\n\n Core.ErrorHelper.throw(new UnspecifiedDialogError());\n }, statusCodes);\n}\n"],"mappings":"2GAOA,SAAgB,EAAqB,GAAG,EAAiC,CACvE,EAAM,cAAgB,CACf,EAAY,QAGI,EAAY,KAAA,EAAsB,kBAAkB,EAKzE,EAAiB,MAAM,IAAI,EAAyB,EACnD,EAAY"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{C as e,D as t,Dt as n,O as r,S as i,_t as a,b as o,d as s,fn as c,mn as l,s as u,t as d,wt as f}from"./CnnBLBPY.chunk.js";import{_ as p,n as m,r as h,t as g,v as _,y as v}from"./DW0w8_XN.chunk.js";import{d as y,l as b,v as x,y as S}from"./D8clSITt.chunk.js";import{t as C}from"./CBDo4oAU.chunk.js";import{t as w}from"./GN6vNflP.chunk.js";import{b as T}from"./Cme1qeEa.chunk.js";import{n as E}from"./dawN348Z.chunk.js";import{t as D}from"./CrBD6Z4s.chunk.js";import{t as O}from"./CSWjqPcU.chunk.js";import{t as k}from"./CRRZVEmA.chunk.js";import{t as A}from"./Bc5CRVkD.chunk.js";import{t as j}from"./BHEKlg6n.chunk.js";import{t as M}from"./D_PyfoSL.chunk.js";import{t as N}from"./C4W8SQLT.chunk.js";import{C as P,E as ee,G as te,I as F,K as ne,M as I,U as re,W as ie,X as ae,_ as oe,at as se,b as ce,c as L,f as le,m as ue,p as de,s as fe,t as pe,tt as R,v as z,y as me,z as he}from"./app-DDrsm5nt.js";import{t as ge}from"./CtVGVkI72.chunk.js";import{i as B,n as _e,r as ve,t as ye}from"./BPgKK-d32.chunk.js";import{t as be}from"./D2DuwJJH2.chunk.js";import{n as xe,t as Se}from"./D9zlZIWi2.chunk.js";import{n as Ce,r as we,t as Te}from"./CatL8N7H2.chunk.js";import{t as Ee}from"./BITl6co82.chunk.js";import{i as De,n as Oe,r as ke,t as Ae}from"./bOXYmxXt2.chunk.js";import{t as je}from"./ELGa0n8y.chunk.js";import{t as Me}from"./DbuCsVvX.chunk.js";import{n as Ne,t as Pe}from"./C0URpAOn.chunk.js";import{t as Fe}from"./DeevL6eQ.chunk.js";import{t as Ie}from"./Osy3aOp3.chunk.js";import{t as Le}from"./B7KaaLVd.chunk.js";import{t as Re}from"./kMJHAtfK.chunk.js";var ze=l(le()),V=l(t()),Be=l(n()),Ve=function(e){return e[e.Other=0]=`Other`,e[e.SuggestImprovement=1]=`SuggestImprovement`,e[e.ReportBug=2]=`ReportBug`,e[e.RequestVideo=3]=`RequestVideo`,e[e.RaiseIssue=4]=`RaiseIssue`,e[e.GivePraise=5]=`GivePraise`,e[e.Footer=6]=`Footer`,e[e.RequestLivestream=7]=`RequestLivestream`,e}({}),He=function(e){return e.Subject=`Subject`,e.Curriculum=`Curriculum`,e.StreamableLearning=`StreamableLearning`,e}({}),Ue={presentationAudiences(e,t){let n={type:e};return{bootstrapName:`presentationAudiences`,url:D.urlBuilder(`{gateway}/v1/users/me/audiences`,n),publicUrl:D.urlBuilder(`/api/subjects/presentation/${t}/audiences`,n),key:`presentation:audiences:${t}:${e}`,normalize:!1}},audiencesByPresentationId(e){return{url:`{gateway}/v1/subjects/presentations/${e}/audiences`,publicUrl:D.urlBuilder(`/api/subjects/presentation/${e}/audiences`,{type:He.Subject.toLowerCase(),presentationId:e}),key:`presentation:${e}:audiences`,normalize:!1}}},We=function(e){return e.Playlists=`playlists`,e.Series=`series`,e.Videos=`videos`,e.PinnedVideos=`pinnedVideos`,e}({}),Ge=function(e){return e.Subject=`Subject`,e.Hub=`Hub`,e.CurriculumAudience=`CurriculumAudience`,e.CurriculumSubject=`CurriculumSubject`,e.CurriculumArea=`CurriculumArea`,e.CurriculumLeaf=`CurriculumLeaf`,e.CurriculumMetadata=`CurriculumMetadata`,e}({}),Ke=e=>`subjectpresentationaudiences.id:[${e.join(`,`)}]`,qe={topicsFromAllAvailablePresentations(e){let t={filterType:`topics`,presentationId:e};return{url:D.urlBuilder(`{gateway}/v1/search/filters`,t),publicUrl:D.urlBuilder(`/api/search/filters`,t),key:`classification:availableTopics`,normalize:!1}},availablePresentations(e){let t={type:e?.toLowerCase()};return{url:D.urlBuilder(`{gateway}/v1/users/me/presentations/available`,t),publicUrl:D.urlBuilder(`/api/subjects/presentations/available`,t),key:`available:presentations:${e}`,normalizeOptions:{namespace:`presentation`}}},hubTopics(e){return{url:`{gateway}/v1/subjects/presentations/${e}/types/hub/classifications`,key:`presentation:${e}:hub:classifications`,formatData:we.applyThemeAssets}},topLevelTopics(e){let t={query:L.CLASSIFICATION_COLLECTION,sort:`alphabetical`,type:Ge.Subject.toLowerCase()};return{url:D.urlBuilder(`{gateway}/v1/subjects/presentations/${e}/classifications`,t),publicUrl:D.urlBuilder(`/api/subjects/presentations/${e}/classifications`,t),key:`presentation:${e}:classifications`,formatData:we.applyThemeAssets}},presentationById(e){return{url:`{gateway}/v1/subjects/presentations/${e}`,publicUrl:`/api/subjects/presentations/${e}`,key:`presentation:${e}`}},presentationBySlug(e,t,n){let r={type:n.toLowerCase(),contentRegion:t};return{url:D.urlBuilder(`/api/subjects/presentations/${e}`,r),publicUrl:D.urlBuilder(`/api/subjects/presentations/${e}`,r),key:`current:presentation:${n.toLowerCase()}:${t}:${e??``}`,bootstrapName:`presentation`,normalizeOptions:{namespace:`presentation`}}},presentation(e,t){let n={type:e?.toLowerCase()};return{url:D.urlBuilder(`{gateway}/v1/users/me/presentations`,n),publicUrl:D.urlBuilder(`/api/subjects/presentations/${t}`,n),key:`current:presentation${e?`:${e.toLowerCase()}`:``}${t?`:${t}`:``}`,normalizeOptions:{namespace:`presentation`}}},classifications(){return{url:D.urlBuilder(`{gateway}/v1/users/me/classifications`,{query:L.CLASSIFICATION_COLLECTION,type:He.Subject.toLowerCase()}),publicUrl:D.urlBuilder(`/api/subjects/classifications`,{query:fe.CLASSIFICATION_COLLECTION,type:He.Subject.toLowerCase()}),key:`classifications`,formatData:we.applyThemeAssets}},classification(e,t,n){return{url:D.urlBuilder(`{gateway}/v1/subjects/classifications/${e}`,{query:L.CLASSIFICATION(t)}),publicUrl:D.urlBuilder(`/api/subjects/classifications/${e}`,{query:fe.CLASSIFICATION}),key:`classification:${e}`,formatData:we.applyThemeAssets,error:n}},path(e,t){let n={type:t};return{url:D.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/path`,n),publicUrl:`/api/subjects/classifications/${e}/path`,key:`classification:${e}:path`}},paths(e){return{url:`/api/subjects/classifications/${e}/paths`,key:`classification:${e}:paths`}},children(e){return{url:D.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/children`,{query:L.CLASSIFICATION_COLLECTION}),publicUrl:D.urlBuilder(`/api/subjects/classifications/${e}/children`,{query:fe.CLASSIFICATION_COLLECTION}),key:`classification:${e}:children`,formatData:we.applyThemeAssets}},videos(e,t,n){if(!t)return;let r=`limit:100,orderbydesc:timestamp`;n.length&&(r+=`,${Ke(n)}`);let i={query:`{${r}}(videoCollection),subjectpresentationaudiences{presentationId:${t}}`,permissionFilterOption:be.StripMetadata};return{url:D.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${We.PinnedVideos}`,i),publicUrl:D.urlBuilder(`/api/subjects/classifications/${e}/${We.PinnedVideos}`,i),key:`classification:${e}:${We.PinnedVideos}:${n.join(`:`)}`}},playlists(e,t,n){if(!t)return;let r=`limit:100,orderby:name`;n.length&&(r+=`,${Ke(n)}`);let i={query:`{${r}}${L.PLAYLIST_COLLECTION},subjectpresentationaudiences{presentationId:${t}}`,permissionFilterOption:be.StripMetadata};return{url:D.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${We.Playlists}`,i),publicUrl:D.urlBuilder(`/api/subjects/classifications/${e}/${We.Playlists}`,i),key:`classification:${e}:${We.Playlists}:${n.join(`:`)}`,formatData:e=>{if(e)return{...e,data:e.data?.filter(e=>e.cover?.url)}}}},series(e,t,n){if(!t)return;let r=`limit:100`;n.length&&(r+=`,${Ke(n)}`);let i={query:`{${r}}${L.SERIES},subjectpresentationaudiences{presentationId:${t}}`,permissionFilterOption:be.StripMetadata};return{url:D.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${We.Series}`,i),publicUrl:D.urlBuilder(`/api/subjects/classifications/${e}/${We.Series}`,i),key:`classification:${e}:${We.Series}:${n.join(`:`)}`,formatData:e=>{if(e)return{...e,data:e.data?.filter(e=>e.tallPoster?.url)}}}},curriculumLinks(e,t){return{url:D.urlBuilder(`/api/subjects/presentations/${t}/objects/${e}/classifications/paths`,{type:He.Curriculum.toLowerCase()}),publicUrl:D.urlBuilder(`/api/subjects/presentations/${t}/objects/${e}/classifications/paths`,{type:He.Curriculum.toLowerCase()}),key:`curriculum:links:${e}:${t}`,normalize:!1}},subjectLinks(e,t){let n=D.urlBuilder(`/api/subjects/presentations/${t}/objects/${e}/classifications/paths`,{type:He.Subject.toLowerCase()});return{url:n,publicUrl:n,key:`subject:links:${e}:${t}`,normalize:!1}},getMappedCurriculums(e,t){let n={type:He.Curriculum.toLowerCase()};return{url:D.urlBuilder(`{gateway}/v1/objects/${e}/presentations`,n),publicUrl:D.urlBuilder(`/api/subjects/${e}/presentations`,{...n,pid:t}),key:`mapped:curriculums:${e}:${t.join(`,`)}`,normalize:!1}},regionAlternatives(e,t,n,r){return{url:`/api/subjects/classifications/${e}/region-alternatives`,publicUrl:`/api/subjects/classifications/${e}/region-alternatives`,key:`classification:regionAlternatives:${e}`,normalize:!1,success:t,error:n,always:r}}},Je={submitFeedback(e,t){return{url:`{gateway}/v1/feedback`,key:`submit:feedback`,type:S.POST,data:{...e,...t}}}};function Ye(e,t,n=[]){let[,r]=V.useState(!1);return V.useEffect(()=>{let n=e();if(n)return n.off(`add remove change`),n.on(`add remove change`,()=>{r(e=>!e)}),t&&n.on(`remove`,t),()=>{n.off(`add remove change`)}},n),e()?.toJSON()}var Xe=w.encloseNamespace(`shared.studentRestrictedDialogError`),Ze=class extends A{constructor(){super(`Learner accessing feature that is for staff only`)}get name(){return`StudentRestrictedDialogError`}get dialogOptions(){return{title:Xe(`heading`),text:Xe(`description`),buttons:[{text:Xe(`close`),className:`btn btn-link`,close:!0}]}}};function Qe(){let{hasPermissions:e,isLoaded:t}=P();V.useEffect(()=>{if(!t||!e(M.StudentExperience))return;let n=new Ze;pe.logError(n),a.throw(n)},[t])}var $e=function(e){return e.AU=`au`,e.NZ=`nz`,e.UK=`uk`,e.US=`us`,e.CA=`ca`,e}({}),et={[$e.AU]:`au`,[$e.NZ]:`nz`,[$e.UK]:`uk`,[$e.US]:`us`,[$e.CA]:`ca`},tt={getUserInfo:(e,t)=>({id:e.id,username:e.username,email:e.email,userType:e.role===me.Admin?`Admin`:`Staff`,customerId:e.customerId,cvcId:t.crmId,customerName:t.name,instanceRegion:e.instanceRegion,contentRegion:e.contentRegion,firstName:e.givenName,lastName:e.familyName}),mapCountryCodeToTag:e=>et[e.toLowerCase()],getTags:(e,t,n,r)=>{let i=[t,...r];i.push(n?`student`:`staff`),e.role===me.Admin&&i.push(`administrator`);let a=tt.mapCountryCodeToTag(e.countryCode);return a&&i.push(a),i},categorizeFiles(e){return e.reduce((e,t)=>{let n=t.get(`fileInfo`);return ze.default.isValidFile(t.get(`file`),de.VIDEO)?e.videoUrls.push(n?.url):e.imageUrls.push(n?.url),e},{imageUrls:[],videoUrls:[]})}},H=function(e){return e.SUGGEST_IMPROVEMENT=`suggestImprovement`,e.REPORT_BUG=`reportBug`,e.REQUEST_VIDEO=`requestVideo`,e.REQUEST_LIVESTREAM=`requestLivestream`,e.GIVE_PRAISE=`givePraise`,e.RAISE_ISSUE=`raiseIssue`,e.OTHER=`other`,e}({}),nt=w.encloseNamespace(`shared.feedbackFormTitles`),rt=e=>{switch(e){case H.SUGGEST_IMPROVEMENT:return nt(e);case H.REPORT_BUG:return nt(e);case H.REQUEST_VIDEO:return nt(e);case H.REQUEST_LIVESTREAM:return nt(e);case H.GIVE_PRAISE:return nt(e);case H.RAISE_ISSUE:return nt(e);case H.OTHER:return nt(e)}},it={mailSent:`https://img.clickviewapp.com/v2/images/2mZ7L9`,mediaPreview:`https://img.clickviewapp.com/v2/images/ageRM0`,lightBulb:`https://img.clickviewapp.com/v2/images/Oqg3JN`,heartHands:`https://img.clickviewapp.com/v2/images/1ML8Oj`,videoAlert:`https://img.clickviewapp.com/v2/images/dq2oMq`,[H.REQUEST_VIDEO]:{default:`https://img.clickviewapp.com/v2/images/G1YGdn`,hover:`https://img.clickviewapp.com/v2/images/K6yPxz`},[H.REQUEST_LIVESTREAM]:{default:`https://img.clickviewapp.com/v2/images/G1YGdn`,hover:`https://img.clickviewapp.com/v2/images/K6yPxz`},[H.SUGGEST_IMPROVEMENT]:{default:`https://img.clickviewapp.com/v2/images/g7aR1l`,hover:`https://img.clickviewapp.com/v2/images/zMR0Dk`},[H.RAISE_ISSUE]:{default:`https://img.clickviewapp.com/v2/images/5boW78`,hover:`https://img.clickviewapp.com/v2/images/m6yRKr`},[H.GIVE_PRAISE]:{default:`https://img.clickviewapp.com/v2/images/nE1mdz`,hover:`https://img.clickviewapp.com/v2/images/JjEnmR`},[H.REPORT_BUG]:{default:`https://img.clickviewapp.com/v2/images/AOdYpo`,hover:`https://img.clickviewapp.com/v2/images/yro9NM`},[H.OTHER]:{default:`https://img.clickviewapp.com/v2/images/Eoaykj`,hover:`https://img.clickviewapp.com/v2/images/wN59Zg`}},at={image:`_image_1gpfb_1`},U=e();function ot(e){let[t,n]=Ee(),r=it[e.option];return(0,U.jsx)(p,{ref:t,className:`col-lg-4 col-sm-6 col-12`,onClick:()=>e.onSelectOption(e.option),children:(0,U.jsxs)(`div`,{className:`d-flex flex-column align-items-center h-100 rounded border py-3 gap-2`,children:[(0,U.jsx)(`img`,{className:at.image,src:n?r.hover:r.default,alt:rt(e.option)}),(0,U.jsx)(`p`,{className:`fw-semibold text-center mb-0`,children:rt(e.option)})]})})}function st(e){return(0,U.jsx)(`div`,{className:`row g-2`,children:e.options.map(t=>(0,U.jsx)(ot,{option:t,onSelectOption:e.onSelectOption},t))})}var ct=w.encloseNamespace(`shared.feedbackButtons`);function lt(e){let t=ve();return(0,U.jsxs)(I,{children:[e.formStage===`form`&&(0,U.jsxs)(U.Fragment,{children:[!e.hideCancelButton&&(0,U.jsx)(I.Cancel,{onClick:()=>e.setSelectedOption(null),text:ct(`cancel`)}),(0,U.jsx)(I.Submit,{variant:`dark`,text:e.submitText||ct(`submit`),disabled:!t.isValid})]}),e.formStage===`success`&&(0,U.jsx)(I.Cancel,{variant:`dark`,text:ct(`close`),onClick:e.closePopup})]})}var ut={successImage:`_successImage_3sso6_1`},dt=w.encloseNamespace(`shared.feedbackFormState`);function ft(e){return e.formStage===`form`||e.formStage===`error`?(0,U.jsx)(U.Fragment,{}):(0,U.jsxs)(`div`,{className:`text-center`,children:[(0,U.jsx)(`div`,{className:`mb-3`,children:(0,U.jsx)(`img`,{className:ut.successImage,src:e.successImageUrl||it.mailSent})}),(0,U.jsx)(`h4`,{className:`mb-3`,children:e.successHeading||dt(`successHeading`)}),(0,U.jsx)(`p`,{className:`mb-3`,children:e.successDescription||dt(`successDescription`)})]})}var W=l(ye()),pt=w.encloseNamespace(`shared.feedbackForm`),mt=5e3,ht=e=>{switch(e){case`requiredError`:return pt(e);case`minCharactersError`:return pt(e,{limit:10});case`maxCharactersError`:return pt(`maxCharactersError`,{limit:mt})}},gt=()=>W.string().min(10,ht(`minCharactersError`)).max(mt,ht(`maxCharactersError`)),_t=w.encloseNamespace(`shared.feedbackGivePraise`),vt={praise:``},yt=W.object().shape({praise:gt().required(ht(`requiredError`))}).noUnknown();function bt(){let e=ve();return(0,U.jsx)(U.Fragment,{children:(0,U.jsx)(B,{as:`textarea`,placeholder:_t(`givePraisePlaceholder`),label:_t(`givePraiseLabel`),name:`praise`,rows:5,value:e.values.praise,showRequiredStar:!0})})}function xt(e){return(0,U.jsx)(wa,{...e,initialValues:{...vt,...e.initialValues},validationSchema:yt,successImageUrl:it.heartHands,successHeading:_t(`successHeading`),successDescription:_t(`successDescription`),children:(0,U.jsx)(bt,{})})}var St=w.encloseNamespace(`shared.feedbackOther`),Ct={feedback:``},wt=W.object().shape({feedback:gt().required(ht(`requiredError`))}).noUnknown();function Tt(){let e=ve();return(0,U.jsx)(U.Fragment,{children:(0,U.jsx)(B,{as:`textarea`,placeholder:St(`otherPlaceholder`),label:St(`otherLabel`),name:`feedback`,rows:5,value:e.values.feedback,showRequiredStar:!0})})}function Et(e){return(0,U.jsx)(wa,{...e,initialValues:{...Ct,...e.initialValues},validationSchema:wt,children:(0,U.jsx)(Tt,{})})}var Dt=w.encloseNamespace(`shared.feedbackRaiseIssue`),Ot={issue:``},kt=W.object().shape({issue:gt().required(ht(`requiredError`))}).noUnknown();function At(){let e=ve();return(0,U.jsx)(U.Fragment,{children:(0,U.jsx)(B,{as:`textarea`,placeholder:Dt(`raiseIssuePlaceholder`),label:Dt(`raiseIssueLabel`),name:`issue`,rows:5,value:e.values.issue,showRequiredStar:!0})})}function jt(e){return(0,U.jsx)(wa,{...e,initialValues:{...Ot,...e.initialValues},validationSchema:kt,children:(0,U.jsx)(At,{})})}var Mt={[oe.AU]:{phone:`02 9509 2600`,email:`support@clickview.com.au`,website:`https://www.clickviewsupport.com/hc`},[oe.UK]:{phone:`+44 (0)333 207 6595`,email:`info@clickview.co.uk`,website:`https://www.clickviewsupport.com/hc`},[oe.NZ]:{phone:`09 916 1156`,email:`support@clickview.co.nz`,website:`https://www.clickviewsupport.com/hc`},[oe.US]:{phone:`+1 312-292-9322`,email:`info@clickvieweducation.com`,website:`https://www.clickviewsupport.com/hc`}};function Nt(e){return(0,U.jsx)(`svg`,{...e,children:(0,U.jsx)(`path`,{fill:`currentColor`,d:`M17.834 5.916a2.5 2.5 0 0 0-3.536 0L12.53 7.684a.5.5 0 0 1-.707-.707l1.768-1.768a3.5 3.5 0 1 1 4.95 4.95l-3.687 3.687a3.786 3.786 0 0 1-5.354 0l-.152-.152a.5.5 0 0 1 .707-.707l.152.152a2.786 2.786 0 0 0 3.94 0l3.687-3.687a2.5 2.5 0 0 0 0-3.536m-8.94 3.99a3.643 3.643 0 0 1 5.152 0l.606.607a.5.5 0 1 1-.707.707l-.607-.606a2.643 2.643 0 0 0-3.737 0l-3.435 3.434a2.5 2.5 0 1 0 3.536 3.536l1.414-1.415a.5.5 0 0 1 .707.707l-1.414 1.415a3.5 3.5 0 1 1-4.95-4.95z`})})}function Pt(e){return(0,U.jsx)(`svg`,{...e,children:(0,U.jsx)(`path`,{fill:`currentColor`,d:`M15.928 20c1.348 0 2.33-.38 3.185-1.297.051-.057.097-.114.139-.161.505-.547.742-1.102.742-1.62 0-.545-.3-1.057-.941-1.492l-2.444-1.687c-.695-.477-1.51-.553-2.247.163l-.61.605c-.189.189-.387.218-.615.09-.417-.249-1.35-1.014-2.067-1.727-.785-.78-1.34-1.42-1.678-2.01-.127-.23-.098-.427.09-.616l.612-.616c.716-.726.64-1.552.157-2.243L8.575 4.952c-.446-.646-.953-.94-1.503-.952-.512-.01-1.071.242-1.614.742-.057.052-.104.098-.157.145C4.39 5.727 4 6.714 4 8.047c0 2.358 1.53 5.21 4.143 7.815C10.736 18.45 13.569 20 15.928 20m.006-1.018c-2.146.023-4.837-1.6-7.046-3.81-2.226-2.214-3.9-4.976-3.87-7.127.013-.942.335-1.764 1.014-2.39l.13-.112c.306-.282.63-.432.897-.432.266 0 .495.124.674.394l1.635 2.44c.209.307.247.66-.107 1.002l-.693.689c-.5.5-.484 1.153-.135 1.66.403.593 1.182 1.497 1.95 2.262.765.775 1.733 1.605 2.321 2.009.512.348 1.16.364 1.659-.141l.684-.694c.348-.342.7-.309 1.014-.1l2.433 1.635c.276.18.389.402.389.668 0 .283-.14.597-.437.908a1 1 0 0 1-.102.12c-.63.689-1.462 1.006-2.41 1.018`})})}function Ft(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function It(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Lt(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Rt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var zt=new Map([[`aac`,`audio/aac`],[`abw`,`application/x-abiword`],[`arc`,`application/x-freearc`],[`avif`,`image/avif`],[`avi`,`video/x-msvideo`],[`azw`,`application/vnd.amazon.ebook`],[`bin`,`application/octet-stream`],[`bmp`,`image/bmp`],[`bz`,`application/x-bzip`],[`bz2`,`application/x-bzip2`],[`cda`,`application/x-cdf`],[`csh`,`application/x-csh`],[`css`,`text/css`],[`csv`,`text/csv`],[`doc`,`application/msword`],[`docx`,`application/vnd.openxmlformats-officedocument.wordprocessingml.document`],[`eot`,`application/vnd.ms-fontobject`],[`epub`,`application/epub+zip`],[`gz`,`application/gzip`],[`gif`,`image/gif`],[`heic`,`image/heic`],[`heif`,`image/heif`],[`htm`,`text/html`],[`html`,`text/html`],[`ico`,`image/vnd.microsoft.icon`],[`ics`,`text/calendar`],[`jar`,`application/java-archive`],[`jpeg`,`image/jpeg`],[`jpg`,`image/jpeg`],[`js`,`text/javascript`],[`json`,`application/json`],[`jsonld`,`application/ld+json`],[`mid`,`audio/midi`],[`midi`,`audio/midi`],[`mjs`,`text/javascript`],[`mp3`,`audio/mpeg`],[`mp4`,`video/mp4`],[`mpeg`,`video/mpeg`],[`mpkg`,`application/vnd.apple.installer+xml`],[`odp`,`application/vnd.oasis.opendocument.presentation`],[`ods`,`application/vnd.oasis.opendocument.spreadsheet`],[`odt`,`application/vnd.oasis.opendocument.text`],[`oga`,`audio/ogg`],[`ogv`,`video/ogg`],[`ogx`,`application/ogg`],[`opus`,`audio/opus`],[`otf`,`font/otf`],[`png`,`image/png`],[`pdf`,`application/pdf`],[`php`,`application/x-httpd-php`],[`ppt`,`application/vnd.ms-powerpoint`],[`pptx`,`application/vnd.openxmlformats-officedocument.presentationml.presentation`],[`rar`,`application/vnd.rar`],[`rtf`,`application/rtf`],[`sh`,`application/x-sh`],[`svg`,`image/svg+xml`],[`swf`,`application/x-shockwave-flash`],[`tar`,`application/x-tar`],[`tif`,`image/tiff`],[`tiff`,`image/tiff`],[`ts`,`video/mp2t`],[`ttf`,`font/ttf`],[`txt`,`text/plain`],[`vsd`,`application/vnd.visio`],[`wav`,`audio/wav`],[`weba`,`audio/webm`],[`webm`,`video/webm`],[`webp`,`image/webp`],[`woff`,`font/woff`],[`woff2`,`font/woff2`],[`xhtml`,`application/xhtml+xml`],[`xls`,`application/vnd.ms-excel`],[`xlsx`,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`],[`xml`,`application/xml`],[`xul`,`application/vnd.mozilla.xul+xml`],[`zip`,`application/zip`],[`7z`,`application/x-7z-compressed`],[`mkv`,`video/x-matroska`],[`mov`,`video/quicktime`],[`msg`,`application/vnd.ms-outlook`]]);function Bt(e,t){var n=Vt(e);if(typeof n.path!=`string`){var r=e.webkitRelativePath;Object.defineProperty(n,`path`,{value:typeof t==`string`?t:typeof r==`string`&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function Vt(e){var t=e.name;if(t&&t.lastIndexOf(`.`)!==-1&&!e.type){var n=t.split(`.`).pop().toLowerCase(),r=zt.get(n);r&&Object.defineProperty(e,`type`,{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}var Ht=[`.DS_Store`,`Thumbs.db`];function Ut(e){return Ft(this,void 0,void 0,function(){return It(this,function(t){return Kt(e)&&Wt(e.dataTransfer)?[2,Yt(e.dataTransfer,e.type)]:Gt(e)?[2,qt(e)]:Array.isArray(e)&&e.every(function(e){return`getFile`in e&&typeof e.getFile==`function`})?[2,Jt(e)]:[2,[]]})})}function Wt(e){return Kt(e)}function Gt(e){return Kt(e)&&Kt(e.target)}function Kt(e){return typeof e==`object`&&!!e}function qt(e){return Zt(e.target.files).map(function(e){return Bt(e)})}function Jt(e){return Ft(this,void 0,void 0,function(){var t;return It(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(e){return e.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(e){return Bt(e)})]}})})}function Yt(e,t){return Ft(this,void 0,void 0,function(){var n,r;return It(this,function(i){switch(i.label){case 0:return e.items?(n=Zt(e.items).filter(function(e){return e.kind===`file`}),t===`drop`?[4,Promise.all(n.map(Qt))]:[2,n]):[3,2];case 1:return r=i.sent(),[2,Xt($t(r))];case 2:return[2,Xt(Zt(e.files).map(function(e){return Bt(e)}))]}})})}function Xt(e){return e.filter(function(e){return Ht.indexOf(e.name)===-1})}function Zt(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function Qt(e){if(typeof e.webkitGetAsEntry!=`function`)return en(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?nn(t):en(e)}function $t(e){return e.reduce(function(e,t){return Rt(Rt([],Lt(e),!1),Lt(Array.isArray(t)?$t(t):[t]),!1)},[])}function en(e){var t=e.getAsFile();if(!t)return Promise.reject(`${e} is not a File`);var n=Bt(t);return Promise.resolve(n)}function tn(e){return Ft(this,void 0,void 0,function(){return It(this,function(t){return[2,e.isDirectory?nn(e):rn(e)]})})}function nn(e){var t=e.createReader();return new Promise(function(e,n){var r=[];function i(){var a=this;t.readEntries(function(t){return Ft(a,void 0,void 0,function(){var a,o,s;return It(this,function(c){switch(c.label){case 0:if(t.length)return[3,5];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return a=c.sent(),e(a),[3,4];case 3:return o=c.sent(),n(o),[3,4];case 4:return[3,6];case 5:s=Promise.all(t.map(tn)),r.push(s),i(),c.label=6;case 6:return[2]}})})},function(e){n(e)})}i()})}function rn(e){return Ft(this,void 0,void 0,function(){return It(this,function(t){return[2,new Promise(function(t,n){e.file(function(n){t(Bt(n,e.fullPath))},function(e){n(e)})})]})})}var an=c((e=>{e.__esModule=!0,e.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(`,`);if(n.length===0)return!0;var r=e.name||``,i=(e.type||``).toLowerCase(),a=i.replace(/\/.*$/,``);return n.some(function(e){var t=e.trim().toLowerCase();return t.charAt(0)===`.`?r.toLowerCase().endsWith(t):t.endsWith(`/*`)?a===t.replace(/\/.*$/,``):i===t})}return!0}})),G=l(T()),on=l(an());function sn(e){return un(e)||ln(e)||gn(e)||cn()}function cn(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1
|
+
import{C as e,D as t,Dt as n,O as r,S as i,_t as a,b as o,d as s,fn as c,mn as l,s as u,t as d,wt as f}from"./CnnBLBPY.chunk.js";import{_ as p,n as m,r as h,t as g,v as _,y as v}from"./DW0w8_XN.chunk.js";import{d as y,l as b,v as x,y as S}from"./D8clSITt.chunk.js";import{t as C}from"./CBDo4oAU.chunk.js";import{t as w}from"./GN6vNflP.chunk.js";import{b as T}from"./Cme1qeEa.chunk.js";import{n as E}from"./dawN348Z.chunk.js";import{t as D}from"./CrBD6Z4s.chunk.js";import{t as O}from"./CSWjqPcU.chunk.js";import{t as k}from"./CRRZVEmA.chunk.js";import{t as A}from"./Bc5CRVkD.chunk.js";import{t as j}from"./BHEKlg6n.chunk.js";import{t as M}from"./D_PyfoSL.chunk.js";import{t as N}from"./C4W8SQLT.chunk.js";import{C as P,E as ee,G as te,I as F,K as ne,M as I,U as re,W as ie,X as ae,_ as oe,at as se,b as ce,c as L,f as le,m as ue,p as de,s as fe,t as pe,tt as R,v as z,y as me,z as he}from"./app-BGxmHvGl.js";import{t as ge}from"./CtVGVkI72.chunk.js";import{i as B,n as _e,r as ve,t as ye}from"./DsHiClyc2.chunk.js";import{t as be}from"./D2DuwJJH2.chunk.js";import{n as xe,t as Se}from"./DuPL-nK72.chunk.js";import{n as Ce,r as we,t as Te}from"./CatL8N7H2.chunk.js";import{t as Ee}from"./BITl6co82.chunk.js";import{i as De,n as Oe,r as ke,t as Ae}from"./bOXYmxXt2.chunk.js";import{t as je}from"./ELGa0n8y.chunk.js";import{t as Me}from"./DbuCsVvX.chunk.js";import{n as Ne,t as Pe}from"./C0URpAOn.chunk.js";import{t as Fe}from"./BINz0dmF.chunk.js";import{t as Ie}from"./Osy3aOp3.chunk.js";import{t as Le}from"./B7KaaLVd.chunk.js";import{t as Re}from"./kMJHAtfK.chunk.js";var ze=l(le()),V=l(t()),Be=l(n()),Ve=function(e){return e[e.Other=0]=`Other`,e[e.SuggestImprovement=1]=`SuggestImprovement`,e[e.ReportBug=2]=`ReportBug`,e[e.RequestVideo=3]=`RequestVideo`,e[e.RaiseIssue=4]=`RaiseIssue`,e[e.GivePraise=5]=`GivePraise`,e[e.Footer=6]=`Footer`,e[e.RequestLivestream=7]=`RequestLivestream`,e}({}),He=function(e){return e.Subject=`Subject`,e.Curriculum=`Curriculum`,e.StreamableLearning=`StreamableLearning`,e}({}),Ue={presentationAudiences(e,t){let n={type:e};return{bootstrapName:`presentationAudiences`,url:D.urlBuilder(`{gateway}/v1/users/me/audiences`,n),publicUrl:D.urlBuilder(`/api/subjects/presentation/${t}/audiences`,n),key:`presentation:audiences:${t}:${e}`,normalize:!1}},audiencesByPresentationId(e){return{url:`{gateway}/v1/subjects/presentations/${e}/audiences`,publicUrl:D.urlBuilder(`/api/subjects/presentation/${e}/audiences`,{type:He.Subject.toLowerCase(),presentationId:e}),key:`presentation:${e}:audiences`,normalize:!1}}},We=function(e){return e.Playlists=`playlists`,e.Series=`series`,e.Videos=`videos`,e.PinnedVideos=`pinnedVideos`,e}({}),Ge=function(e){return e.Subject=`Subject`,e.Hub=`Hub`,e.CurriculumAudience=`CurriculumAudience`,e.CurriculumSubject=`CurriculumSubject`,e.CurriculumArea=`CurriculumArea`,e.CurriculumLeaf=`CurriculumLeaf`,e.CurriculumMetadata=`CurriculumMetadata`,e}({}),Ke=e=>`subjectpresentationaudiences.id:[${e.join(`,`)}]`,qe={topicsFromAllAvailablePresentations(e){let t={filterType:`topics`,presentationId:e};return{url:D.urlBuilder(`{gateway}/v1/search/filters`,t),publicUrl:D.urlBuilder(`/api/search/filters`,t),key:`classification:availableTopics`,normalize:!1}},availablePresentations(e){let t={type:e?.toLowerCase()};return{url:D.urlBuilder(`{gateway}/v1/users/me/presentations/available`,t),publicUrl:D.urlBuilder(`/api/subjects/presentations/available`,t),key:`available:presentations:${e}`,normalizeOptions:{namespace:`presentation`}}},hubTopics(e){return{url:`{gateway}/v1/subjects/presentations/${e}/types/hub/classifications`,key:`presentation:${e}:hub:classifications`,formatData:we.applyThemeAssets}},topLevelTopics(e){let t={query:L.CLASSIFICATION_COLLECTION,sort:`alphabetical`,type:Ge.Subject.toLowerCase()};return{url:D.urlBuilder(`{gateway}/v1/subjects/presentations/${e}/classifications`,t),publicUrl:D.urlBuilder(`/api/subjects/presentations/${e}/classifications`,t),key:`presentation:${e}:classifications`,formatData:we.applyThemeAssets}},presentationById(e){return{url:`{gateway}/v1/subjects/presentations/${e}`,publicUrl:`/api/subjects/presentations/${e}`,key:`presentation:${e}`}},presentationBySlug(e,t,n){let r={type:n.toLowerCase(),contentRegion:t};return{url:D.urlBuilder(`/api/subjects/presentations/${e}`,r),publicUrl:D.urlBuilder(`/api/subjects/presentations/${e}`,r),key:`current:presentation:${n.toLowerCase()}:${t}:${e??``}`,bootstrapName:`presentation`,normalizeOptions:{namespace:`presentation`}}},presentation(e,t){let n={type:e?.toLowerCase()};return{url:D.urlBuilder(`{gateway}/v1/users/me/presentations`,n),publicUrl:D.urlBuilder(`/api/subjects/presentations/${t}`,n),key:`current:presentation${e?`:${e.toLowerCase()}`:``}${t?`:${t}`:``}`,normalizeOptions:{namespace:`presentation`}}},classifications(){return{url:D.urlBuilder(`{gateway}/v1/users/me/classifications`,{query:L.CLASSIFICATION_COLLECTION,type:He.Subject.toLowerCase()}),publicUrl:D.urlBuilder(`/api/subjects/classifications`,{query:fe.CLASSIFICATION_COLLECTION,type:He.Subject.toLowerCase()}),key:`classifications`,formatData:we.applyThemeAssets}},classification(e,t,n){return{url:D.urlBuilder(`{gateway}/v1/subjects/classifications/${e}`,{query:L.CLASSIFICATION(t)}),publicUrl:D.urlBuilder(`/api/subjects/classifications/${e}`,{query:fe.CLASSIFICATION}),key:`classification:${e}`,formatData:we.applyThemeAssets,error:n}},path(e,t){let n={type:t};return{url:D.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/path`,n),publicUrl:`/api/subjects/classifications/${e}/path`,key:`classification:${e}:path`}},paths(e){return{url:`/api/subjects/classifications/${e}/paths`,key:`classification:${e}:paths`}},children(e){return{url:D.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/children`,{query:L.CLASSIFICATION_COLLECTION}),publicUrl:D.urlBuilder(`/api/subjects/classifications/${e}/children`,{query:fe.CLASSIFICATION_COLLECTION}),key:`classification:${e}:children`,formatData:we.applyThemeAssets}},videos(e,t,n){if(!t)return;let r=`limit:100,orderbydesc:timestamp`;n.length&&(r+=`,${Ke(n)}`);let i={query:`{${r}}(videoCollection),subjectpresentationaudiences{presentationId:${t}}`,permissionFilterOption:be.StripMetadata};return{url:D.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${We.PinnedVideos}`,i),publicUrl:D.urlBuilder(`/api/subjects/classifications/${e}/${We.PinnedVideos}`,i),key:`classification:${e}:${We.PinnedVideos}:${n.join(`:`)}`}},playlists(e,t,n){if(!t)return;let r=`limit:100,orderby:name`;n.length&&(r+=`,${Ke(n)}`);let i={query:`{${r}}${L.PLAYLIST_COLLECTION},subjectpresentationaudiences{presentationId:${t}}`,permissionFilterOption:be.StripMetadata};return{url:D.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${We.Playlists}`,i),publicUrl:D.urlBuilder(`/api/subjects/classifications/${e}/${We.Playlists}`,i),key:`classification:${e}:${We.Playlists}:${n.join(`:`)}`,formatData:e=>{if(e)return{...e,data:e.data?.filter(e=>e.cover?.url)}}}},series(e,t,n){if(!t)return;let r=`limit:100`;n.length&&(r+=`,${Ke(n)}`);let i={query:`{${r}}${L.SERIES},subjectpresentationaudiences{presentationId:${t}}`,permissionFilterOption:be.StripMetadata};return{url:D.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${We.Series}`,i),publicUrl:D.urlBuilder(`/api/subjects/classifications/${e}/${We.Series}`,i),key:`classification:${e}:${We.Series}:${n.join(`:`)}`,formatData:e=>{if(e)return{...e,data:e.data?.filter(e=>e.tallPoster?.url)}}}},curriculumLinks(e,t){return{url:D.urlBuilder(`/api/subjects/presentations/${t}/objects/${e}/classifications/paths`,{type:He.Curriculum.toLowerCase()}),publicUrl:D.urlBuilder(`/api/subjects/presentations/${t}/objects/${e}/classifications/paths`,{type:He.Curriculum.toLowerCase()}),key:`curriculum:links:${e}:${t}`,normalize:!1}},subjectLinks(e,t){let n=D.urlBuilder(`/api/subjects/presentations/${t}/objects/${e}/classifications/paths`,{type:He.Subject.toLowerCase()});return{url:n,publicUrl:n,key:`subject:links:${e}:${t}`,normalize:!1}},getMappedCurriculums(e,t){let n={type:He.Curriculum.toLowerCase()};return{url:D.urlBuilder(`{gateway}/v1/objects/${e}/presentations`,n),publicUrl:D.urlBuilder(`/api/subjects/${e}/presentations`,{...n,pid:t}),key:`mapped:curriculums:${e}:${t.join(`,`)}`,normalize:!1}},regionAlternatives(e,t,n,r){return{url:`/api/subjects/classifications/${e}/region-alternatives`,publicUrl:`/api/subjects/classifications/${e}/region-alternatives`,key:`classification:regionAlternatives:${e}`,normalize:!1,success:t,error:n,always:r}}},Je={submitFeedback(e,t){return{url:`{gateway}/v1/feedback`,key:`submit:feedback`,type:S.POST,data:{...e,...t}}}};function Ye(e,t,n=[]){let[,r]=V.useState(!1);return V.useEffect(()=>{let n=e();if(n)return n.off(`add remove change`),n.on(`add remove change`,()=>{r(e=>!e)}),t&&n.on(`remove`,t),()=>{n.off(`add remove change`)}},n),e()?.toJSON()}var Xe=w.encloseNamespace(`shared.studentRestrictedDialogError`),Ze=class extends A{constructor(){super(`Learner accessing feature that is for staff only`)}get name(){return`StudentRestrictedDialogError`}get dialogOptions(){return{title:Xe(`heading`),text:Xe(`description`),buttons:[{text:Xe(`close`),className:`btn btn-link`,close:!0}]}}};function Qe(){let{hasPermissions:e,isLoaded:t}=P();V.useEffect(()=>{if(!t||!e(M.StudentExperience))return;let n=new Ze;pe.logError(n),a.throw(n)},[t])}var $e=function(e){return e.AU=`au`,e.NZ=`nz`,e.UK=`uk`,e.US=`us`,e.CA=`ca`,e}({}),et={[$e.AU]:`au`,[$e.NZ]:`nz`,[$e.UK]:`uk`,[$e.US]:`us`,[$e.CA]:`ca`},tt={getUserInfo:(e,t)=>({id:e.id,username:e.username,email:e.email,userType:e.role===me.Admin?`Admin`:`Staff`,customerId:e.customerId,cvcId:t.crmId,customerName:t.name,instanceRegion:e.instanceRegion,contentRegion:e.contentRegion,firstName:e.givenName,lastName:e.familyName}),mapCountryCodeToTag:e=>et[e.toLowerCase()],getTags:(e,t,n,r)=>{let i=[t,...r];i.push(n?`student`:`staff`),e.role===me.Admin&&i.push(`administrator`);let a=tt.mapCountryCodeToTag(e.countryCode);return a&&i.push(a),i},categorizeFiles(e){return e.reduce((e,t)=>{let n=t.get(`fileInfo`);return ze.default.isValidFile(t.get(`file`),de.VIDEO)?e.videoUrls.push(n?.url):e.imageUrls.push(n?.url),e},{imageUrls:[],videoUrls:[]})}},H=function(e){return e.SUGGEST_IMPROVEMENT=`suggestImprovement`,e.REPORT_BUG=`reportBug`,e.REQUEST_VIDEO=`requestVideo`,e.REQUEST_LIVESTREAM=`requestLivestream`,e.GIVE_PRAISE=`givePraise`,e.RAISE_ISSUE=`raiseIssue`,e.OTHER=`other`,e}({}),nt=w.encloseNamespace(`shared.feedbackFormTitles`),rt=e=>{switch(e){case H.SUGGEST_IMPROVEMENT:return nt(e);case H.REPORT_BUG:return nt(e);case H.REQUEST_VIDEO:return nt(e);case H.REQUEST_LIVESTREAM:return nt(e);case H.GIVE_PRAISE:return nt(e);case H.RAISE_ISSUE:return nt(e);case H.OTHER:return nt(e)}},it={mailSent:`https://img.clickviewapp.com/v2/images/2mZ7L9`,mediaPreview:`https://img.clickviewapp.com/v2/images/ageRM0`,lightBulb:`https://img.clickviewapp.com/v2/images/Oqg3JN`,heartHands:`https://img.clickviewapp.com/v2/images/1ML8Oj`,videoAlert:`https://img.clickviewapp.com/v2/images/dq2oMq`,[H.REQUEST_VIDEO]:{default:`https://img.clickviewapp.com/v2/images/G1YGdn`,hover:`https://img.clickviewapp.com/v2/images/K6yPxz`},[H.REQUEST_LIVESTREAM]:{default:`https://img.clickviewapp.com/v2/images/G1YGdn`,hover:`https://img.clickviewapp.com/v2/images/K6yPxz`},[H.SUGGEST_IMPROVEMENT]:{default:`https://img.clickviewapp.com/v2/images/g7aR1l`,hover:`https://img.clickviewapp.com/v2/images/zMR0Dk`},[H.RAISE_ISSUE]:{default:`https://img.clickviewapp.com/v2/images/5boW78`,hover:`https://img.clickviewapp.com/v2/images/m6yRKr`},[H.GIVE_PRAISE]:{default:`https://img.clickviewapp.com/v2/images/nE1mdz`,hover:`https://img.clickviewapp.com/v2/images/JjEnmR`},[H.REPORT_BUG]:{default:`https://img.clickviewapp.com/v2/images/AOdYpo`,hover:`https://img.clickviewapp.com/v2/images/yro9NM`},[H.OTHER]:{default:`https://img.clickviewapp.com/v2/images/Eoaykj`,hover:`https://img.clickviewapp.com/v2/images/wN59Zg`}},at={image:`_image_1gpfb_1`},U=e();function ot(e){let[t,n]=Ee(),r=it[e.option];return(0,U.jsx)(p,{ref:t,className:`col-lg-4 col-sm-6 col-12`,onClick:()=>e.onSelectOption(e.option),children:(0,U.jsxs)(`div`,{className:`d-flex flex-column align-items-center h-100 rounded border py-3 gap-2`,children:[(0,U.jsx)(`img`,{className:at.image,src:n?r.hover:r.default,alt:rt(e.option)}),(0,U.jsx)(`p`,{className:`fw-semibold text-center mb-0`,children:rt(e.option)})]})})}function st(e){return(0,U.jsx)(`div`,{className:`row g-2`,children:e.options.map(t=>(0,U.jsx)(ot,{option:t,onSelectOption:e.onSelectOption},t))})}var ct=w.encloseNamespace(`shared.feedbackButtons`);function lt(e){let t=ve();return(0,U.jsxs)(I,{children:[e.formStage===`form`&&(0,U.jsxs)(U.Fragment,{children:[!e.hideCancelButton&&(0,U.jsx)(I.Cancel,{onClick:()=>e.setSelectedOption(null),text:ct(`cancel`)}),(0,U.jsx)(I.Submit,{variant:`dark`,text:e.submitText||ct(`submit`),disabled:!t.isValid})]}),e.formStage===`success`&&(0,U.jsx)(I.Cancel,{variant:`dark`,text:ct(`close`),onClick:e.closePopup})]})}var ut={successImage:`_successImage_3sso6_1`},dt=w.encloseNamespace(`shared.feedbackFormState`);function ft(e){return e.formStage===`form`||e.formStage===`error`?(0,U.jsx)(U.Fragment,{}):(0,U.jsxs)(`div`,{className:`text-center`,children:[(0,U.jsx)(`div`,{className:`mb-3`,children:(0,U.jsx)(`img`,{className:ut.successImage,src:e.successImageUrl||it.mailSent})}),(0,U.jsx)(`h4`,{className:`mb-3`,children:e.successHeading||dt(`successHeading`)}),(0,U.jsx)(`p`,{className:`mb-3`,children:e.successDescription||dt(`successDescription`)})]})}var W=l(ye()),pt=w.encloseNamespace(`shared.feedbackForm`),mt=5e3,ht=e=>{switch(e){case`requiredError`:return pt(e);case`minCharactersError`:return pt(e,{limit:10});case`maxCharactersError`:return pt(`maxCharactersError`,{limit:mt})}},gt=()=>W.string().min(10,ht(`minCharactersError`)).max(mt,ht(`maxCharactersError`)),_t=w.encloseNamespace(`shared.feedbackGivePraise`),vt={praise:``},yt=W.object().shape({praise:gt().required(ht(`requiredError`))}).noUnknown();function bt(){let e=ve();return(0,U.jsx)(U.Fragment,{children:(0,U.jsx)(B,{as:`textarea`,placeholder:_t(`givePraisePlaceholder`),label:_t(`givePraiseLabel`),name:`praise`,rows:5,value:e.values.praise,showRequiredStar:!0})})}function xt(e){return(0,U.jsx)(wa,{...e,initialValues:{...vt,...e.initialValues},validationSchema:yt,successImageUrl:it.heartHands,successHeading:_t(`successHeading`),successDescription:_t(`successDescription`),children:(0,U.jsx)(bt,{})})}var St=w.encloseNamespace(`shared.feedbackOther`),Ct={feedback:``},wt=W.object().shape({feedback:gt().required(ht(`requiredError`))}).noUnknown();function Tt(){let e=ve();return(0,U.jsx)(U.Fragment,{children:(0,U.jsx)(B,{as:`textarea`,placeholder:St(`otherPlaceholder`),label:St(`otherLabel`),name:`feedback`,rows:5,value:e.values.feedback,showRequiredStar:!0})})}function Et(e){return(0,U.jsx)(wa,{...e,initialValues:{...Ct,...e.initialValues},validationSchema:wt,children:(0,U.jsx)(Tt,{})})}var Dt=w.encloseNamespace(`shared.feedbackRaiseIssue`),Ot={issue:``},kt=W.object().shape({issue:gt().required(ht(`requiredError`))}).noUnknown();function At(){let e=ve();return(0,U.jsx)(U.Fragment,{children:(0,U.jsx)(B,{as:`textarea`,placeholder:Dt(`raiseIssuePlaceholder`),label:Dt(`raiseIssueLabel`),name:`issue`,rows:5,value:e.values.issue,showRequiredStar:!0})})}function jt(e){return(0,U.jsx)(wa,{...e,initialValues:{...Ot,...e.initialValues},validationSchema:kt,children:(0,U.jsx)(At,{})})}var Mt={[oe.AU]:{phone:`02 9509 2600`,email:`support@clickview.com.au`,website:`https://www.clickviewsupport.com/hc`},[oe.UK]:{phone:`+44 (0)333 207 6595`,email:`info@clickview.co.uk`,website:`https://www.clickviewsupport.com/hc`},[oe.NZ]:{phone:`09 916 1156`,email:`support@clickview.co.nz`,website:`https://www.clickviewsupport.com/hc`},[oe.US]:{phone:`+1 312-292-9322`,email:`info@clickvieweducation.com`,website:`https://www.clickviewsupport.com/hc`}};function Nt(e){return(0,U.jsx)(`svg`,{...e,children:(0,U.jsx)(`path`,{fill:`currentColor`,d:`M17.834 5.916a2.5 2.5 0 0 0-3.536 0L12.53 7.684a.5.5 0 0 1-.707-.707l1.768-1.768a3.5 3.5 0 1 1 4.95 4.95l-3.687 3.687a3.786 3.786 0 0 1-5.354 0l-.152-.152a.5.5 0 0 1 .707-.707l.152.152a2.786 2.786 0 0 0 3.94 0l3.687-3.687a2.5 2.5 0 0 0 0-3.536m-8.94 3.99a3.643 3.643 0 0 1 5.152 0l.606.607a.5.5 0 1 1-.707.707l-.607-.606a2.643 2.643 0 0 0-3.737 0l-3.435 3.434a2.5 2.5 0 1 0 3.536 3.536l1.414-1.415a.5.5 0 0 1 .707.707l-1.414 1.415a3.5 3.5 0 1 1-4.95-4.95z`})})}function Pt(e){return(0,U.jsx)(`svg`,{...e,children:(0,U.jsx)(`path`,{fill:`currentColor`,d:`M15.928 20c1.348 0 2.33-.38 3.185-1.297.051-.057.097-.114.139-.161.505-.547.742-1.102.742-1.62 0-.545-.3-1.057-.941-1.492l-2.444-1.687c-.695-.477-1.51-.553-2.247.163l-.61.605c-.189.189-.387.218-.615.09-.417-.249-1.35-1.014-2.067-1.727-.785-.78-1.34-1.42-1.678-2.01-.127-.23-.098-.427.09-.616l.612-.616c.716-.726.64-1.552.157-2.243L8.575 4.952c-.446-.646-.953-.94-1.503-.952-.512-.01-1.071.242-1.614.742-.057.052-.104.098-.157.145C4.39 5.727 4 6.714 4 8.047c0 2.358 1.53 5.21 4.143 7.815C10.736 18.45 13.569 20 15.928 20m.006-1.018c-2.146.023-4.837-1.6-7.046-3.81-2.226-2.214-3.9-4.976-3.87-7.127.013-.942.335-1.764 1.014-2.39l.13-.112c.306-.282.63-.432.897-.432.266 0 .495.124.674.394l1.635 2.44c.209.307.247.66-.107 1.002l-.693.689c-.5.5-.484 1.153-.135 1.66.403.593 1.182 1.497 1.95 2.262.765.775 1.733 1.605 2.321 2.009.512.348 1.16.364 1.659-.141l.684-.694c.348-.342.7-.309 1.014-.1l2.433 1.635c.276.18.389.402.389.668 0 .283-.14.597-.437.908a1 1 0 0 1-.102.12c-.63.689-1.462 1.006-2.41 1.018`})})}function Ft(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function It(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o=Object.create((typeof Iterator==`function`?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(s){if(r)throw TypeError(`Generator is already executing.`);for(;o&&(o=0,s[0]&&(n=0)),n;)try{if(r=1,i&&(a=s[0]&2?i.return:s[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,s[1])).done)return a;switch(i=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if((a=n.trys,!(a=a.length>0&&a[a.length-1]))&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1],a=s;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(s);break}a[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e],i=0}finally{r=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function Lt(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Rt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var zt=new Map([[`aac`,`audio/aac`],[`abw`,`application/x-abiword`],[`arc`,`application/x-freearc`],[`avif`,`image/avif`],[`avi`,`video/x-msvideo`],[`azw`,`application/vnd.amazon.ebook`],[`bin`,`application/octet-stream`],[`bmp`,`image/bmp`],[`bz`,`application/x-bzip`],[`bz2`,`application/x-bzip2`],[`cda`,`application/x-cdf`],[`csh`,`application/x-csh`],[`css`,`text/css`],[`csv`,`text/csv`],[`doc`,`application/msword`],[`docx`,`application/vnd.openxmlformats-officedocument.wordprocessingml.document`],[`eot`,`application/vnd.ms-fontobject`],[`epub`,`application/epub+zip`],[`gz`,`application/gzip`],[`gif`,`image/gif`],[`heic`,`image/heic`],[`heif`,`image/heif`],[`htm`,`text/html`],[`html`,`text/html`],[`ico`,`image/vnd.microsoft.icon`],[`ics`,`text/calendar`],[`jar`,`application/java-archive`],[`jpeg`,`image/jpeg`],[`jpg`,`image/jpeg`],[`js`,`text/javascript`],[`json`,`application/json`],[`jsonld`,`application/ld+json`],[`mid`,`audio/midi`],[`midi`,`audio/midi`],[`mjs`,`text/javascript`],[`mp3`,`audio/mpeg`],[`mp4`,`video/mp4`],[`mpeg`,`video/mpeg`],[`mpkg`,`application/vnd.apple.installer+xml`],[`odp`,`application/vnd.oasis.opendocument.presentation`],[`ods`,`application/vnd.oasis.opendocument.spreadsheet`],[`odt`,`application/vnd.oasis.opendocument.text`],[`oga`,`audio/ogg`],[`ogv`,`video/ogg`],[`ogx`,`application/ogg`],[`opus`,`audio/opus`],[`otf`,`font/otf`],[`png`,`image/png`],[`pdf`,`application/pdf`],[`php`,`application/x-httpd-php`],[`ppt`,`application/vnd.ms-powerpoint`],[`pptx`,`application/vnd.openxmlformats-officedocument.presentationml.presentation`],[`rar`,`application/vnd.rar`],[`rtf`,`application/rtf`],[`sh`,`application/x-sh`],[`svg`,`image/svg+xml`],[`swf`,`application/x-shockwave-flash`],[`tar`,`application/x-tar`],[`tif`,`image/tiff`],[`tiff`,`image/tiff`],[`ts`,`video/mp2t`],[`ttf`,`font/ttf`],[`txt`,`text/plain`],[`vsd`,`application/vnd.visio`],[`wav`,`audio/wav`],[`weba`,`audio/webm`],[`webm`,`video/webm`],[`webp`,`image/webp`],[`woff`,`font/woff`],[`woff2`,`font/woff2`],[`xhtml`,`application/xhtml+xml`],[`xls`,`application/vnd.ms-excel`],[`xlsx`,`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`],[`xml`,`application/xml`],[`xul`,`application/vnd.mozilla.xul+xml`],[`zip`,`application/zip`],[`7z`,`application/x-7z-compressed`],[`mkv`,`video/x-matroska`],[`mov`,`video/quicktime`],[`msg`,`application/vnd.ms-outlook`]]);function Bt(e,t){var n=Vt(e);if(typeof n.path!=`string`){var r=e.webkitRelativePath;Object.defineProperty(n,`path`,{value:typeof t==`string`?t:typeof r==`string`&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function Vt(e){var t=e.name;if(t&&t.lastIndexOf(`.`)!==-1&&!e.type){var n=t.split(`.`).pop().toLowerCase(),r=zt.get(n);r&&Object.defineProperty(e,`type`,{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}var Ht=[`.DS_Store`,`Thumbs.db`];function Ut(e){return Ft(this,void 0,void 0,function(){return It(this,function(t){return Kt(e)&&Wt(e.dataTransfer)?[2,Yt(e.dataTransfer,e.type)]:Gt(e)?[2,qt(e)]:Array.isArray(e)&&e.every(function(e){return`getFile`in e&&typeof e.getFile==`function`})?[2,Jt(e)]:[2,[]]})})}function Wt(e){return Kt(e)}function Gt(e){return Kt(e)&&Kt(e.target)}function Kt(e){return typeof e==`object`&&!!e}function qt(e){return Zt(e.target.files).map(function(e){return Bt(e)})}function Jt(e){return Ft(this,void 0,void 0,function(){var t;return It(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(e){return e.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(e){return Bt(e)})]}})})}function Yt(e,t){return Ft(this,void 0,void 0,function(){var n,r;return It(this,function(i){switch(i.label){case 0:return e.items?(n=Zt(e.items).filter(function(e){return e.kind===`file`}),t===`drop`?[4,Promise.all(n.map(Qt))]:[2,n]):[3,2];case 1:return r=i.sent(),[2,Xt($t(r))];case 2:return[2,Xt(Zt(e.files).map(function(e){return Bt(e)}))]}})})}function Xt(e){return e.filter(function(e){return Ht.indexOf(e.name)===-1})}function Zt(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function Qt(e){if(typeof e.webkitGetAsEntry!=`function`)return en(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?nn(t):en(e)}function $t(e){return e.reduce(function(e,t){return Rt(Rt([],Lt(e),!1),Lt(Array.isArray(t)?$t(t):[t]),!1)},[])}function en(e){var t=e.getAsFile();if(!t)return Promise.reject(`${e} is not a File`);var n=Bt(t);return Promise.resolve(n)}function tn(e){return Ft(this,void 0,void 0,function(){return It(this,function(t){return[2,e.isDirectory?nn(e):rn(e)]})})}function nn(e){var t=e.createReader();return new Promise(function(e,n){var r=[];function i(){var a=this;t.readEntries(function(t){return Ft(a,void 0,void 0,function(){var a,o,s;return It(this,function(c){switch(c.label){case 0:if(t.length)return[3,5];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return a=c.sent(),e(a),[3,4];case 3:return o=c.sent(),n(o),[3,4];case 4:return[3,6];case 5:s=Promise.all(t.map(tn)),r.push(s),i(),c.label=6;case 6:return[2]}})})},function(e){n(e)})}i()})}function rn(e){return Ft(this,void 0,void 0,function(){return It(this,function(t){return[2,new Promise(function(t,n){e.file(function(n){t(Bt(n,e.fullPath))},function(e){n(e)})})]})})}var an=c((e=>{e.__esModule=!0,e.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(`,`);if(n.length===0)return!0;var r=e.name||``,i=(e.type||``).toLowerCase(),a=i.replace(/\/.*$/,``);return n.some(function(e){var t=e.trim().toLowerCase();return t.charAt(0)===`.`?r.toLowerCase().endsWith(t):t.endsWith(`/*`)?a===t.replace(/\/.*$/,``):i===t})}return!0}})),G=l(T()),on=l(an());function sn(e){return un(e)||ln(e)||gn(e)||cn()}function cn(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ln(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function un(e){if(Array.isArray(e))return _n(e)}function dn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?dn(Object(n),!0).forEach(function(t){pn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mn(e,t){return yn(e)||vn(e,t)||gn(e,t)||hn()}function hn(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gn(e,t){if(e){if(typeof e==`string`)return _n(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _n(e,t)}}function _n(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vn(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function yn(e){if(Array.isArray(e))return e}var bn=`file-invalid-type`,xn=`file-too-large`,Sn=`file-too-small`,Cn=`too-many-files`,wn=function(e){return e=Array.isArray(e)&&e.length===1?e[0]:e,{code:bn,message:`File type must be ${Array.isArray(e)?`one of ${e.join(`, `)}`:e}`}},Tn=function(e){return{code:xn,message:`File is larger than ${e} ${e===1?`byte`:`bytes`}`}},En=function(e){return{code:Sn,message:`File is smaller than ${e} ${e===1?`byte`:`bytes`}`}},Dn={code:Cn,message:`Too many files`};function On(e,t){var n=e.type===`application/x-moz-file`||(0,on.default)(e,t);return[n,n?null:wn(t)]}function kn(e,t,n){if(An(e.size)){if(An(t)&&An(n)){if(e.size>n)return[!1,Tn(n)];if(e.size<t)return[!1,En(t)]}else if(An(t)&&e.size<t)return[!1,En(t)];else if(An(n)&&e.size>n)return[!1,Tn(n)]}return[!0,null]}function An(e){return e!=null}function jn(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles,s=e.validator;return!a&&t.length>1||a&&o>=1&&t.length>o?!1:t.every(function(e){var t=mn(On(e,n),1)[0],a=mn(kn(e,r,i),1)[0],o=s?s(e):null;return t&&a&&!o})}function Mn(e){return typeof e.isPropagationStopped==`function`?e.isPropagationStopped():e.cancelBubble===void 0?!1:e.cancelBubble}function Nn(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(e){return e===`Files`||e===`application/x-moz-file`}):!!e.target&&!!e.target.files}function Pn(e){e.preventDefault()}function Fn(e){return e.indexOf(`MSIE`)!==-1||e.indexOf(`Trident/`)!==-1}function In(e){return e.indexOf(`Edge/`)!==-1}function Ln(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Fn(e)||In(e)}function K(){var e=[...arguments];return function(t){var n=[...arguments].slice(1);return e.some(function(e){return!Mn(t)&&e&&e.apply(void 0,[t].concat(n)),Mn(t)})}}function Rn(){return`showOpenFilePicker`in window}function zn(e){return An(e)?[{description:`Files`,accept:Object.entries(e).filter(function(e){var t=mn(e,2),n=t[0],r=t[1],i=!0;return Un(n)||(console.warn(`Skipped "${n}" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.`),i=!1),(!Array.isArray(r)||!r.every(Wn))&&(console.warn(`Skipped "${n}" because an invalid file extension was provided.`),i=!1),i}).reduce(function(e,t){var n=mn(t,2),r=n[0],i=n[1];return fn(fn({},e),{},pn({},r,i))},{})}]:e}function Bn(e){if(An(e))return Object.entries(e).reduce(function(e,t){var n=mn(t,2),r=n[0],i=n[1];return[].concat(sn(e),[r],sn(i))},[]).filter(function(e){return Un(e)||Wn(e)}).join(`,`)}function Vn(e){return e instanceof DOMException&&(e.name===`AbortError`||e.code===e.ABORT_ERR)}function Hn(e){return e instanceof DOMException&&(e.name===`SecurityError`||e.code===e.SECURITY_ERR)}function Un(e){return e===`audio/*`||e===`video/*`||e===`image/*`||e===`text/*`||/\w+\/[-+.\w]+/g.test(e)}function Wn(e){return/^.*\.[\w]+$/.test(e)}var Gn=[`children`],Kn=[`open`],qn=[`refKey`,`role`,`onKeyDown`,`onFocus`,`onBlur`,`onClick`,`onDragEnter`,`onDragOver`,`onDragLeave`,`onDrop`],Jn=[`refKey`,`onChange`,`onClick`];function Yn(e){return Qn(e)||Zn(e)||tr(e)||Xn()}function Xn(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zn(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Qn(e){if(Array.isArray(e))return nr(e)}function $n(e,t){return ir(e)||rr(e,t)||tr(e,t)||er()}function er(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
5
5
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tr(e,t){if(e){if(typeof e==`string`)return nr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nr(e,t)}}function nr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function rr(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r=[],i=!0,a=!1,o,s;try{for(n=n.call(e);!(i=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));i=!0);}catch(e){a=!0,s=e}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}return r}}function ir(e){if(Array.isArray(e))return e}function ar(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?ar(Object(n),!0).forEach(function(t){or(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ar(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function or(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sr(e,t){if(e==null)return{};var n=cr(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cr(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var lr=(0,V.forwardRef)(function(e,t){var n=e.children,r=fr(sr(e,Gn)),i=r.open,a=sr(r,Kn);return(0,V.useImperativeHandle)(t,function(){return{open:i}},[i]),V.createElement(V.Fragment,null,n(q(q({},a),{},{open:i})))});lr.displayName=`Dropzone`;var ur={disabled:!1,getFilesFromEvent:Ut,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};lr.defaultProps=ur,lr.propTypes={children:G.default.func,accept:G.default.objectOf(G.default.arrayOf(G.default.string)),multiple:G.default.bool,preventDropOnDocument:G.default.bool,noClick:G.default.bool,noKeyboard:G.default.bool,noDrag:G.default.bool,noDragEventsBubbling:G.default.bool,minSize:G.default.number,maxSize:G.default.number,maxFiles:G.default.number,disabled:G.default.bool,getFilesFromEvent:G.default.func,onFileDialogCancel:G.default.func,onFileDialogOpen:G.default.func,useFsAccessApi:G.default.bool,autoFocus:G.default.bool,onDragEnter:G.default.func,onDragLeave:G.default.func,onDragOver:G.default.func,onDrop:G.default.func,onDropAccepted:G.default.func,onDropRejected:G.default.func,onError:G.default.func,validator:G.default.func};var dr={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function fr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=q(q({},ur),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,a=t.maxSize,o=t.minSize,s=t.multiple,c=t.maxFiles,l=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,m=t.onDropRejected,h=t.onFileDialogCancel,g=t.onFileDialogOpen,_=t.useFsAccessApi,v=t.autoFocus,y=t.preventDropOnDocument,b=t.noClick,x=t.noKeyboard,S=t.noDrag,C=t.noDragEventsBubbling,w=t.onError,T=t.validator,E=(0,V.useMemo)(function(){return Bn(n)},[n]),D=(0,V.useMemo)(function(){return zn(n)},[n]),O=(0,V.useMemo)(function(){return typeof g==`function`?g:mr},[g]),k=(0,V.useMemo)(function(){return typeof h==`function`?h:mr},[h]),A=(0,V.useRef)(null),j=(0,V.useRef)(null),M=$n((0,V.useReducer)(pr,dr),2),N=M[0],P=M[1],ee=N.isFocused,te=N.isFileDialogActive,F=(0,V.useRef)(typeof window<`u`&&window.isSecureContext&&_&&Rn()),ne=function(){!F.current&&te&&setTimeout(function(){j.current&&(j.current.files.length||(P({type:`closeDialog`}),k()))},300)};(0,V.useEffect)(function(){return window.addEventListener(`focus`,ne,!1),function(){window.removeEventListener(`focus`,ne,!1)}},[j,te,k,F]);var I=(0,V.useRef)([]),re=function(e){A.current&&A.current.contains(e.target)||(e.preventDefault(),I.current=[])};(0,V.useEffect)(function(){return y&&(document.addEventListener(`dragover`,Pn,!1),document.addEventListener(`drop`,re,!1)),function(){y&&(document.removeEventListener(`dragover`,Pn),document.removeEventListener(`drop`,re))}},[A,y]),(0,V.useEffect)(function(){return!r&&v&&A.current&&A.current.focus(),function(){}},[A,v,r]);var ie=(0,V.useCallback)(function(e){w?w(e):console.error(e)},[w]),ae=(0,V.useCallback)(function(e){e.preventDefault(),e.persist(),he(e),I.current=[].concat(Yn(I.current),[e.target]),Nn(e)&&Promise.resolve(i(e)).then(function(t){if(!(Mn(e)&&!C)){var n=t.length,r=n>0&&jn({files:t,accept:E,minSize:o,maxSize:a,multiple:s,maxFiles:c,validator:T});P({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:`setDraggedFiles`}),l&&l(e)}}).catch(function(e){return ie(e)})},[i,l,ie,C,E,o,a,s,c,T]),oe=(0,V.useCallback)(function(e){e.preventDefault(),e.persist(),he(e);var t=Nn(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect=`copy`}catch{}return t&&d&&d(e),!1},[d,C]),se=(0,V.useCallback)(function(e){e.preventDefault(),e.persist(),he(e);var t=I.current.filter(function(e){return A.current&&A.current.contains(e)}),n=t.indexOf(e.target);n!==-1&&t.splice(n,1),I.current=t,!(t.length>0)&&(P({type:`setDraggedFiles`,isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Nn(e)&&u&&u(e))},[A,u,C]),ce=(0,V.useCallback)(function(e,t){var n=[],r=[];e.forEach(function(e){var t=$n(On(e,E),2),i=t[0],s=t[1],c=$n(kn(e,o,a),2),l=c[0],u=c[1],d=T?T(e):null;if(i&&l&&!d)n.push(e);else{var f=[s,u];d&&(f=f.concat(d)),r.push({file:e,errors:f.filter(function(e){return e})})}}),(!s&&n.length>1||s&&c>=1&&n.length>c)&&(n.forEach(function(e){r.push({file:e,errors:[Dn]})}),n.splice(0)),P({acceptedFiles:n,fileRejections:r,type:`setFiles`}),f&&f(n,r,t),r.length>0&&m&&m(r,t),n.length>0&&p&&p(n,t)},[P,s,E,o,a,c,f,p,m,T]),L=(0,V.useCallback)(function(e){e.preventDefault(),e.persist(),he(e),I.current=[],Nn(e)&&Promise.resolve(i(e)).then(function(t){Mn(e)&&!C||ce(t,e)}).catch(function(e){return ie(e)}),P({type:`reset`})},[i,ce,ie,C]),le=(0,V.useCallback)(function(){if(F.current){P({type:`openDialog`}),O();var e={multiple:s,types:D};window.showOpenFilePicker(e).then(function(e){return i(e)}).then(function(e){ce(e,null),P({type:`closeDialog`})}).catch(function(e){Vn(e)?(k(e),P({type:`closeDialog`})):Hn(e)?(F.current=!1,j.current?(j.current.value=null,j.current.click()):ie(Error(`Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided.`))):ie(e)});return}j.current&&(P({type:`openDialog`}),O(),j.current.value=null,j.current.click())},[P,O,k,_,ce,ie,D,s]),ue=(0,V.useCallback)(function(e){!A.current||!A.current.isEqualNode(e.target)||(e.key===` `||e.key===`Enter`||e.keyCode===32||e.keyCode===13)&&(e.preventDefault(),le())},[A,le]),de=(0,V.useCallback)(function(){P({type:`focus`})},[]),fe=(0,V.useCallback)(function(){P({type:`blur`})},[]),pe=(0,V.useCallback)(function(){b||(Ln()?setTimeout(le,0):le())},[b,le]),R=function(e){return r?null:e},z=function(e){return x?null:R(e)},me=function(e){return S?null:R(e)},he=function(e){C&&e.stopPropagation()},ge=(0,V.useMemo)(function(){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.refKey,n=t===void 0?`ref`:t,i=e.role,a=e.onKeyDown,o=e.onFocus,s=e.onBlur,c=e.onClick,l=e.onDragEnter,u=e.onDragOver,d=e.onDragLeave,f=e.onDrop,p=sr(e,qn);return q(q(or({onKeyDown:z(K(a,ue)),onFocus:z(K(o,de)),onBlur:z(K(s,fe)),onClick:R(K(c,pe)),onDragEnter:me(K(l,ae)),onDragOver:me(K(u,oe)),onDragLeave:me(K(d,se)),onDrop:me(K(f,L)),role:typeof i==`string`&&i!==``?i:`presentation`},n,A),!r&&!x?{tabIndex:0}:{}),p)}},[A,ue,de,fe,pe,ae,oe,se,L,x,S,r]),B=(0,V.useCallback)(function(e){e.stopPropagation()},[]),_e=(0,V.useMemo)(function(){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.refKey,n=t===void 0?`ref`:t,r=e.onChange,i=e.onClick,a=sr(e,Jn);return q(q({},or({accept:E,multiple:s,type:`file`,style:{display:`none`},onChange:R(K(r,L)),onClick:R(K(i,B)),tabIndex:-1},n,j)),a)}},[j,n,s,L,r]);return q(q({},N),{},{isFocused:ee&&!r,getRootProps:ge,getInputProps:_e,rootRef:A,inputRef:j,open:R(le)})}function pr(e,t){switch(t.type){case`focus`:return q(q({},e),{},{isFocused:!0});case`blur`:return q(q({},e),{},{isFocused:!1});case`openDialog`:return q(q({},dr),{},{isFileDialogActive:!0});case`closeDialog`:return q(q({},e),{},{isFileDialogActive:!1});case`setDraggedFiles`:return q(q({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case`setFiles`:return q(q({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case`reset`:return q({},dr);default:return e}}function mr(){}var hr=function(e){return e.FileSelect=`file-select`,e.DragDrop=`drag-drop`,e}({}),gr={fileDrop:`_fileDrop_dm34f_1`,resourcePreview:`_resourcePreview_dm34f_4`},_r=`shared.feedbackFileUpload`;function vr(e){let{getRootProps:t,getInputProps:n,isDragActive:r}=fr({onDrop:t=>e.onFilesAdded(t,hr.DragDrop),noClick:!0,noKeyboard:!0,multiple:!!e.acceptMultiple,noDragEventsBubbling:!0}),i=V.useRef(null),a=V.useCallback(e=>{e&&(i.current=e)},[]),o=()=>{i.current.value=null,i.current.click()},s=`${gr.fileDrop} text-center p-2 rounded-1`;return e.uploadError&&(s+=` border-red`),r&&(s+=` border-blue bg-light-blue`),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{...t({className:s}),children:[(0,U.jsx)(`img`,{className:gr.resourcePreview,src:e.imageUrl,draggable:!1}),(0,U.jsxs)(`div`,{className:`position-relative`,children:[r&&(0,U.jsx)(`p`,{className:`position-absolute font-size-md translate-middle top-50 start-50 mb-0`,children:(0,U.jsx)(F,{namespace:_r,phrase:`dropUpload`})}),(0,U.jsxs)(`div`,{className:r?`opacity-0`:``,children:[(0,U.jsx)(`p`,{className:`mb-0`,children:(0,U.jsx)(F,{namespace:_r,phrase:`dragDrop`})}),(0,U.jsx)(`button`,{type:`button`,className:`btn btn-link text-underline p-0`,onClick:o,children:(0,U.jsx)(F,{namespace:_r,phrase:`upload`})})]})]}),(0,U.jsx)(`input`,{type:`file`,name:`fileUpload`,className:`file-select d-none`,multiple:!!e.acceptMultiple,accept:e.mimeType,ref:a,onChange:t=>e.onFilesAdded([...t.target.files],hr.FileSelect),"aria-errormessage":`fileUploadError`}),(0,U.jsx)(`input`,{...n()})]}),e.uploadError&&(0,U.jsx)(je,{name:`fileUpload`,children:e.uploadError})]})}var yr={progress:`_progress_w7ph2_1`};function br(e){let t=e.upload.progress===100;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(g,{svg:Ne,className:`svg-container me-2`}),(0,U.jsx)(`span`,{className:`align-middle`,children:e.upload.name}),t&&(0,U.jsx)(g,{svg:Ce,className:`svg-container float-end text-success`}),!t&&(0,U.jsx)(`div`,{role:`button`,"aria-label":`close`,onClick:()=>e.cancelUpload(e.upload.id),className:`float-end description`,children:(0,U.jsx)(g,{svg:Me})})]}),(0,U.jsx)(`div`,{className:`${yr.progress} progress my-2`,children:(0,U.jsx)(`div`,{className:`progress-bar bg-blue`,role:`progressbar`,style:{width:`${e.upload.progress}%`},"aria-valuenow":e.upload.progress,"aria-valuemin":0,"aria-valuemax":100})})]})}function xr(e){return e.uploads?.length?(0,U.jsx)(U.Fragment,{children:e.uploads.map((t,n)=>(0,U.jsx)(br,{upload:t,cancelUpload:e.cancelUpload},n))}):(0,U.jsx)(U.Fragment,{})}function Sr(e){return(0,U.jsxs)(`div`,{className:`bg-gray-100 rounded p-2`,children:[(0,U.jsx)(g,{className:`d-inline-block align-middle svg-container icon-purple me-2`,svg:Pe}),(0,U.jsx)(`span`,{className:`align-middle`,children:e.file.get(`name`)}),(0,U.jsx)(`button`,{className:`btn p-0 border-0 float-end`,onClick:()=>e.deleteFile(e.file.get(`id`)),children:(0,U.jsx)(g,{svg:ke})})]})}function Cr(e){return(0,U.jsx)(`div`,{className:`d-flex flex-column gap-2`,children:e.uploadedFiles.map(t=>(0,U.jsx)(Sr,{file:t,deleteFile:e.deleteFile},t.id))})}var wr=`shared.feedbackReportBug`,Tr=w.encloseNamespace(wr),Er={issue:``,stepsToReproduce:``},Dr=W.object().shape({issue:gt().required(ht(`requiredError`)),stepsToReproduce:gt()}).noUnknown();function Or(e){let t=ve();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`form-group`,children:[(0,U.jsx)(`label`,{className:`form-label mb-1`,children:(0,U.jsx)(F,{namespace:wr,phrase:`mixedMediaLabel`})}),(0,U.jsx)(`p`,{className:`text-secondary font-size-sm`,children:(0,U.jsx)(F,{namespace:wr,phrase:`mixedMediaDescription`})}),(0,U.jsx)(`div`,{className:`mb-3`,children:(0,U.jsx)(vr,{mimeType:de.MIXED_MEDIA,onFilesAdded:e.onFilesAdded,imageUrl:e.previewImageUrl,uploadError:e.uploadError,acceptMultiple:!0})}),(0,U.jsx)(xr,{uploads:e.uploadingFiles,cancelUpload:e.cancelUpload}),(0,U.jsx)(Cr,{uploadedFiles:e.uploadedFiles,deleteFile:e.deleteFile})]}),(0,U.jsx)(B,{as:`textarea`,placeholder:Tr(`issuePlaceholder`),label:Tr(`issueLabel`),name:`issue`,value:t.values.issue,showRequiredStar:!0}),(0,U.jsx)(B,{as:`textarea`,placeholder:Tr(`stepsPlaceholder`),label:Tr(`stepsLabel`),name:`stepsToReproduce`,value:t.values.stepsToReproduce}),(0,U.jsxs)(`div`,{className:`rounded bg-light-yellow p-2 mb-3`,children:[(0,U.jsx)(`p`,{className:`fw-semibold mb-2`,children:(0,U.jsx)(F,{namespace:wr,phrase:`help`})}),(0,U.jsxs)(`div`,{className:`d-flex gap-1 mb-2`,children:[(0,U.jsx)(g,{svg:Nt}),(0,U.jsx)(`a`,{href:Mt[e.instanceRegion].website,target:`_blank`,className:`text-underline`,children:(0,U.jsx)(F,{namespace:wr,phrase:`visitHelpCentre`})})]}),(0,U.jsx)(`p`,{className:`mb-2`,children:(0,U.jsx)(F,{namespace:wr,phrase:`supportTeam`})}),(0,U.jsxs)(`div`,{className:`d-flex gap-1 mb-2`,children:[(0,U.jsx)(g,{svg:Pt}),(0,U.jsx)(`span`,{children:Mt[e.instanceRegion].phone})]}),(0,U.jsxs)(`div`,{className:`d-flex gap-1 mb-2`,children:[(0,U.jsx)(g,{svg:De}),(0,U.jsx)(`span`,{children:Mt[e.instanceRegion].email})]})]})]})}function kr(e){let{onFilesAdded:t,cancelUpload:n,uploadingFiles:r,uploadedFiles:i,deleteFile:a,...o}=e;return(0,U.jsx)(wa,{...o,initialValues:{...Er,...e.initialValues},validationSchema:Dr,submitText:Tr(`submit`),children:(0,U.jsx)(Or,{onFilesAdded:t,previewImageUrl:it.mediaPreview,cancelUpload:n,uploadingFiles:r,uploadedFiles:i,deleteFile:a,uploadError:e.uploadError,instanceRegion:e.instanceRegion})})}var Ar=function(e){return e.Pink=`colour:0`,e.Orange=`colour:1`,e.Green=`colour:2`,e.Blue=`colour:3`,e.Purple=`colour:4`,e.Indigo=`colour:5`,e}({});function jr(e){switch(e){case Ar.Pink:return`pink`;case Ar.Orange:return`orange`;case Ar.Green:return`green`;case Ar.Blue:return`blue`;case Ar.Purple:return`purple`;case Ar.Indigo:return`indigo`;default:return`pink`}}var Mr={avatar:`_avatar_rpeug_1`};function Nr(e){let{imageUrl:t,initials:n}=e,r={};return t&&(r.backgroundImage=`url('${t}')`),(0,U.jsx)(`div`,{className:Mr.avatar,style:r,children:t?(0,U.jsx)(U.Fragment,{children:`\xA0`}):n})}function Pr(e){return(0,U.jsx)(`svg`,{...e,children:(0,U.jsx)(`path`,{d:`M11 11V7.002a.999.999 0 1 1 2 0V11h3.998a.999.999 0 1 1 0 2H13v3.998a.999.999 0 1 1-2 0V13H7.002a.999.999 0 1 1 0-2z`,fill:`currentColor`})})}var J={svgContainer:`_svgContainer_kq46n_1`,selection:`_selection_kq46n_5`,expander:`_expander_kq46n_8`,iconContainer:`_iconContainer_kq46n_14`,icon:`_icon_kq46n_14`,bubble:`_bubble_kq46n_30`,spinnerContainer:`_spinnerContainer_kq46n_46`,remove:`_remove_kq46n_51`,removeBubble:`_removeBubble_kq46n_60`},Fr=w.encloseNamespace(`shared.inputSelection`);function Ir(e){switch(e.typeId){case R.Classroom:return`text-teal-hover`;case R.ClassroomGroup:return`text-${jr(e.metadata?.colour)}-hover`}}function Lr(e){let t=`${J.svgContainer} ${J.icon}`;return e.typeId===R.Classroom?t+=` text-teal`:t+=` text-${jr(e.metadata?.colour)}`,t}function Rr(e){let t=Ir(e.selection),n=e.selection.typeId===R.Classroom;if(!e.canExpand){if(!e.selection.typeId||e.selection.typeId===R.User){let t=e.selection;return(0,U.jsx)(`div`,{className:J.svgContainer,children:(0,U.jsx)(Nr,{imageUrl:t.avatar?.url,initials:z.getInitials(e.selection.name,e.selection.surname)})})}return(0,U.jsx)(h,{title:Fr(n?`emptyClassroom`:`emptyGroup`),children:(0,U.jsx)(`div`,{className:`align-items-center border border-white bg-white ${J.iconContainer}`,children:(0,U.jsx)(g,{className:Lr(e.selection),svg:n?Oe:Ae})})})}return e.hasExpanded?(0,U.jsx)(`div`,{className:`d-flex align-items-center text-white ${J.spinnerContainer} ${J.svgContainer}`,children:(0,U.jsx)(E,{as:`div`,size:`sm`,animation:`border`,role:`status`})}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(p,{className:`align-items-center cursor-pointer text-white border border-white rounded-circle ${J.expander} ${t}`,onClick:e.onClickExpand,children:(0,U.jsx)(g,{svg:Pr,className:`d-flex align-items-center ${J.svgContainer}`})}),(0,U.jsx)(`div`,{className:`align-items-center border border-white bg-white ${J.iconContainer}`,children:(0,U.jsx)(g,{className:Lr(e.selection),svg:n?Oe:Ae})})]})}function zr(e){if(!e.typeId)return`ultramarine`;switch(e.typeId){case R.User:return typeof e.userType==`number`?e.userType===2?`ultramarine`:`indigo`:e.userType===ce.Learner?`ultramarine`:`indigo`;case R.Classroom:return`teal`;case R.ClassroomGroup:return jr(e.metadata?.colour)}}function Br(e){let t=Fe.isType(e.selection,R.Classroom),n=Fe.isType(e.selection,R.ClassroomGroup),r=e.onClickExpand&&(t||n),i=!!(e.selection.users||e.selection.enrolments)?.count,a=!!e.selection.users?.data?.length,[o,s]=V.useState(!1),[c,l]=V.useState(r&&i);V.useEffect(()=>{l(r&&i)},[r,i]);function u(){s(!0),e.onClickExpand(e.selection.id)}if(a){let t=e.selection,n=zr(e.selection);return(0,U.jsxs)(`div`,{className:`d-flex align-items-center flex-wrap me-1 mt-1 pb-1 ps-1 pe-4 position-relative border-${n} text-${n} ${J.bubble}`,children:[t.users.data.map(t=>(0,U.jsx)(Vr,{selection:t,colourVariant:n,hasStudentExperience:e.hasStudentExperience},`${t.id}:${e.selection.id}`)),(0,U.jsx)(p,{className:`cursor-pointer position-absolute text-${n} ${J.removeBubble}`,onClick:()=>e.onClickRemove(e.selection),children:(0,U.jsx)(g,{svg:Me,className:`d-flex align-items-center ${J.svgContainer}`})})]})}return(0,U.jsx)(Vr,{selection:e.selection,canExpand:c,hasExpanded:o,onClickExpand:u,onClickRemove:e.onClickRemove,colourVariant:zr(e.selection),hasStudentExperience:e.hasStudentExperience})}function Vr(e){let t=e.colourVariant||zr(e.selection),n=e.selection.name;return e.selection.typeId===R.User&&(n=e.hasStudentExperience?z.getDisplayName(e.selection):z.getFullName(e.selection)),(0,U.jsxs)(`div`,{className:`${J.selection} bg-${t} rounded-pill text-${t} d-flex align-items-center me-1 mt-1 overflow-hidden`,children:[!e.hideExpander&&(0,U.jsx)(Rr,{canExpand:e.canExpand,hasExpanded:e.hasExpanded,onClickExpand:e.onClickExpand,selection:e.selection}),(0,U.jsx)(`span`,{className:`mx-1 text-white text-truncate`,children:n}),_.isFunction(e.onClickRemove)&&(0,U.jsx)(p,{className:`d-flex align-items-center cursor-pointer align-self-stretch text-white ${J.remove}`,onClick:()=>e.onClickRemove(e.selection),children:(0,U.jsx)(g,{svg:Me,className:`d-flex align-items-center ${J.svgContainer}`})})]})}var Hr={removeRecipient:`_removeRecipient_3yabf_1`,recipientItem:`_recipientItem_3yabf_5`,showSpinner:`_showSpinner_3yabf_8`,avatarContainer:`_avatarContainer_3yabf_11`,recipientDetails:`_recipientDetails_3yabf_15`,recipientDetailsWithRemoveButton:`_recipientDetailsWithRemoveButton_3yabf_18`},Ur=`shared.classroomGroupRecipientItemMetadata`;function Wr(e){let t=e.users?.count??0,n=e.classroom?.name;return n?w.getPhrase(Ur,`subheading`,{classroomName:n,smartCount:t}):``}function Gr(e){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`${Hr.avatarContainer} d-inline-block`,children:(0,U.jsx)(Te,{svg:Ae,variant:jr(e.classroomGroup.metadata?.colour)})}),(0,U.jsxs)(`div`,{className:e.detailsClassName,children:[(0,U.jsx)(`h4`,{className:`font-size-normal fw-normal m-0`,children:e.classroomGroup.name}),(0,U.jsx)(`p`,{className:`text-secondary m-0`,children:Wr(e.classroomGroup)})]})]})}var Kr=`shared.classroomRecipientItemMetadata`;function qr(e){let t=e.users?.count??e.enrolments?.count;return Number.isInteger(t)?w.getPhrase(Kr,`subheading`,{smartCount:t}):``}function Jr(e){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`${Hr.avatarContainer} d-inline-block`,children:(0,U.jsx)(Te,{svg:Oe,variant:`teal`})}),(0,U.jsxs)(`div`,{className:e.detailsClassName,children:[(0,U.jsx)(`h4`,{className:`font-size-normal fw-normal m-0`,children:e.classroom.name}),(0,U.jsx)(`p`,{className:`text-secondary m-0`,children:qr(e.classroom)})]})]})}var Yr={colours:`amber.apricot.aqua.azure.black.blue.bronze.brown.chocolate.copper.coral.cream.crimson.cyan.emerald.gold.green.grey.indigo.ivory.jade.lavender.lime.maroon.mint.navy.olive.orange.peach.pink.plum.purple.red.rose.ruby.sage.salmon.sapphire.scarlet.silver.sky.teal.turquoise.violet.white.yellow`.split(`.`),animals:`aardvark.albatross.alligator.alpaca.ant.anteater.antelope.ape.armadillo.baboon.badger.bat.bear.beaver.bee.beetle.bison.blackbird.boar.bobcat.bonobo.buffalo.butterfly.camel.canary.capybara.caribou.cat.caterpillar.chameleon.cheetah.chimpanzee.chinchilla.chipmunk.clownfish.cockatoo.cougar.cow.coyote.crab.crane.crocodile.crow.deer.dingo.dog.dolphin.donkey.dove.dragonfly.duck.eagle.elephant.elk.emu.falcon.ferret.finch.firefly.fish.flamingo.fox.frog.gazelle.gecko.gerbil.giraffe.goat.goldfish.goose.gorilla.grasshopper.gull.hamster.hare.hawk.hedgehog.heron.hippopotamus.horse.hummingbird.iguana.impala.jaguar.jellyfish.kangaroo.kingfisher.kiwi.koala.koi.ladybug.lemur.leopard.lion.lizard.llama.lobster.lynx.macaw.magpie.manatee.mandrill.marlin.meerkat.mole.mongoose.monkey.moose.mouse.mule.narwhal.newt.nightingale.ocelot.octopus.orangutan.orca.ostrich.otter.owl.ox.panda.panther.parakeet.parrot.peacock.pelican.penguin.pheasant.pigeon.platypus.pony.porcupine.possum.pufferfish.puffin.puma.quail.rabbit.raccoon.raven.reindeer.rhinoceros.roadrunner.robin.rooster.salamander.salmon.seahorse.seal.shark.sheep.sloth.snail.snake.sparrow.squid.squirrel.starfish.stingray.stork.swallow.swan.swordfish.tapir.tiger.toad.tortoise.toucan.trout.tuna.turtle.wallaby.walrus.weasel.whale.wildebeest.wolf.wolverine.woodpecker.yak.zebra`.split(`.`)},Xr=w.encloseNamespace(`shared.analyticsUtils`);function Zr(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Qr(e){if(!e)return 0;let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}return Math.abs(t)}function $r(e,t){let n=Math.floor(new Date().getMinutes()/5),r=Qr(`${e||t}-${n}`),i=Yr.colours[r%Yr.colours.length],a=Yr.animals[Math.floor(r/Yr.colours.length)%Yr.animals.length];return`${Zr(i)} ${Zr(a)}`}function ei(e,t){return e?t?$r(e.id,e.sessionId):e.deleted?Xr(`deleted`):z.getFullName(e)||Xr(`anonUser`):Xr(`anonUser`)}function ti(e){return(0,U.jsx)(`svg`,{...e,children:(0,U.jsx)(`path`,{d:`m16.837 9.842-1.138-3.678a1.65 1.65 0 0 0-.887-1.01 1.67 1.67 0 0 0-1.348-.02l-1.14.486a.8.8 0 0 1-.647 0l-1.14-.488a1.67 1.67 0 0 0-1.348.021 1.65 1.65 0 0 0-.887 1.01L7.164 9.842a7.17 7.17 0 0 0-3.062 1.85.41.41 0 0 0 .314.683h15.17c.162 0 .31-.094.376-.241a.41.41 0 0 0-.064-.44 7.17 7.17 0 0 0-3.061-1.852M9.094 6.404a.836.836 0 0 1 1.117-.516l1.135.484c.416.181.89.181 1.306 0l1.137-.485a.836.836 0 0 1 1.117.516l.976 3.153a16.17 16.17 0 0 0-7.764 0zm-3.59 5.148c1.455-1.019 3.866-1.645 6.497-1.645a14.5 14.5 0 0 1 4.41.651c.74.229 1.444.563 2.087.994zm9.807 1.645a2.9 2.9 0 0 0-2.508 1.447 1.61 1.61 0 0 0-1.604 0c-.763-1.323-2.425-1.835-3.807-1.173s-2.016 2.272-1.452 3.69a2.93 2.93 0 0 0 3.6 1.704 2.906 2.906 0 0 0 1.968-3.445.88.88 0 0 1 .986 0 2.87 2.87 0 0 0 1.269 3.088 2.91 2.91 0 0 0 3.351-.176c.966-.762 1.341-2.048.935-3.204s-1.505-1.932-2.738-1.93m-6.62 4.936c-1.143 0-2.07-.92-2.07-2.056s.927-2.057 2.07-2.057 2.069.92 2.069 2.057a2.065 2.065 0 0 1-2.07 2.056m6.62 0c-1.142 0-2.069-.92-2.069-2.056s.927-2.057 2.07-2.057 2.068.92 2.068 2.057a2.065 2.065 0 0 1-2.069 2.056`,fill:`currentColor`})})}var ni={iconCircle:`_iconCircle_186sk_1`,dot:`_dot_186sk_8`};function ri(e){let t=e.type===`anon`;return e.type===`student-reach`?(0,U.jsx)(`div`,{className:`position-relative h-100 w-100`,children:(0,U.jsx)(`div`,{className:`${ni.iconCircle} bg-orange text-light ${e.extraClasses||``}`,children:(0,U.jsx)(g,{svg:Ae,size:e.anonymousSvgSize||m.Large,className:`svg-container w-100 h-100`})})}):t?(0,U.jsxs)(`div`,{className:`position-relative h-100 w-100`,children:[(0,U.jsx)(`div`,{className:`${ni.iconCircle} bg-gray-700 text-light ${e.extraClasses||``}`,children:(0,U.jsx)(g,{svg:ti,size:e.anonymousSvgSize||m.Large,className:`svg-container w-100 h-100`})}),e.showDot&&(0,U.jsx)(`div`,{className:`${ni.dot} rounded-circle bg-danger`})]}):(0,U.jsx)(ee,{imageCdnUrl:e.imageCdnUrl,initials:e.initials,imageUrl:e.imageUrl,extraClasses:e.extraClasses,showDot:e.showDot,anonymiseUsers:e.anonymiseUsers})}var ii=w.encloseNamespace(`shared.userRecipientItemMetadata`);function ai(e){let t=z.getUserType(e),n=z.getUserRole(e);if(t===ce.Staff)return n===me.Admin?ii(`admin`):ii(`staff`);let r=z.getYearGroup(e);return r?.name&&r.name!==`Learners`?r.name:ii(`student`)}function oi({user:e,anonymiseUsers:t,showDisplayName:n}){if(e.sessionId||e.deleted){let n=ei(e,t);return{name:n,surname:n.split(` `).filter(e=>!!e).slice(1).join(` `),avatarUrl:null}}return{name:t?ei(e,!0):n?z.getDisplayName(e):z.getFullName(e),surname:e.surname,avatarUrl:e.avatar?.url}}si.defaults={showSubText:!0};function si(e){let{name:t,surname:n,avatarUrl:r}=oi(e);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`${Hr.avatarContainer} ${e.avatarClassName} d-inline-block flex-shrink-0`,children:(0,U.jsx)(ri,{imageUrl:r,imageCdnUrl:e.imageCdnUrl,initials:z.getInitials(t,n),type:!e.anonymiseUsers&&(e.user.sessionId||e.user.deleted)?`anon`:void 0,anonymiseUsers:e.anonymiseUsers,anonymousSvgSize:m.Small})}),(0,U.jsxs)(`div`,{className:e.detailsClassName,children:[(0,U.jsx)(`h4`,{className:v(`font-size-normal fw-normal m-0`,e.nameClassName),children:t}),e.showSubText&&`id`in e.user&&(0,U.jsx)(`p`,{className:`text-secondary m-0`,children:e.getSubText?e.getSubText(e.user):ai(e.user)})]})]})}var ci=w.encloseNamespace(`share.recipientItem`);function li(e){switch(e){case R.User:return ci(`removeUser`);case R.Classroom:return ci(`removeClassroom`);case R.ClassroomGroup:return ci(`removeGroup`)}return null}function ui(e){let[t,n]=V.useState(!1),r=`${Hr.recipientItem} d-flex`;t&&(r+=` ${Hr.showSpinner}`);let i=`${e.removeRecipient?Hr.recipientDetailsWithRemoveButton:Hr.recipientDetails} d-inline-block ms-2`;function a(){n(!0),e.removeRecipient(e.entity.id,()=>n(!1))}return(0,U.jsxs)(`div`,{className:r,children:[(()=>{if(Fe.isType(e.entity,R.User))return(0,U.jsx)(si,{user:e.entity,imageCdnUrl:e.imageCdnUrl,detailsClassName:i,showDisplayName:e.showDisplayName,getSubText:e.getSubText,showSubText:!0});if(Fe.isType(e.entity,R.Classroom))return(0,U.jsx)(Jr,{classroom:e.entity,detailsClassName:i});if(Fe.isType(e.entity,R.ClassroomGroup))return(0,U.jsx)(Gr,{classroomGroup:e.entity,detailsClassName:i})})(),_.isFunction(e.removeRecipient)&&(0,U.jsx)(`div`,{className:`${Hr.removeRecipient} d-inline-flex justify-content-center align-items-center`,children:t?(0,U.jsx)(E,{as:`div`,size:`sm`,animation:`border`,role:`status`}):(0,U.jsx)(h,{title:li(e.entity.typeId),spanHack:!0,children:(0,U.jsx)(`div`,{className:`btn-close cursor-pointer`,role:`button`,"aria-label":`Close`,onClick:a})})})]})}var di=c(((e,t)=>{function n(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}t.exports=n})),fi=c(((e,t)=>{var n=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}();t.exports=function(e){var t=e.data,r=e.multiSection;function i(e){for(e===null?e=0:e++;e<t.length&&t[e]===0;)e++;return e===t.length?null:e}function a(e){for(e===null?e=t.length-1:e--;e>=0&&t[e]===0;)e--;return e===-1?null:e}function o(e){var a=n(e,2),o=a[0],s=a[1];return r?s===null||s===t[o]-1?(o=i(o),o===null?[null,null]:[o,0]):[o,s+1]:t===0||s===t-1?[null,null]:s===null?[null,0]:[null,s+1]}function s(e){var i=n(e,2),o=i[0],s=i[1];return r?s===null||s===0?(o=a(o),o===null?[null,null]:[o,t[o]-1]):[o,s-1]:t===0||s===0?[null,null]:s===null?[null,t-1]:[null,s-1]}function c(e){return o(e)[1]===null}return{next:o,prev:s,isLast:c}}})),pi=c(((e,t)=>{var n=Object.prototype.propertyIsEnumerable;function r(e){if(e==null)throw TypeError(`Object.assign cannot be called with null or undefined`);return Object(e)}function i(e){var t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e))),t.filter(function(t){return n.call(e,t)})}t.exports=Object.assign||function(e,t){for(var n,a,o=r(e),s=1;s<arguments.length;s++){n=arguments[s],a=i(Object(n));for(var c=0;c<a.length;c++)o[a[c]]=n[a[c]]}return o}})),mi=c(((e,t)=>{Object.defineProperty(e,`__esModule`,{value:!0});var n=(function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}})();function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}else return Array.from(e)}var a=r(pi()),o=function(e){return e};e.default=function(e){var t=n(Array.isArray(e)&&e.length===2?e:[e,null],2),r=t[0],s=t[1];return function(e){var t=[...arguments].slice(1).map(function(e){return r[e]}).filter(o);return typeof t[0]==`string`||typeof s==`function`?{key:e,className:s?s.apply(void 0,i(t)):t.join(` `)}:{key:e,style:a.default.apply(void 0,[{}].concat(i(t)))}}},t.exports=e.default})),hi=c((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=n;function t(e){"@babel/helpers - typeof";return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e===n)return!1;var i=Object.keys(e),a=Object.keys(n);if(i.length!==a.length)return!0;var o={},s,c;for(s=0,c=r.length;s<c;s++)o[r[s]]=!0;for(s=0,c=i.length;s<c;s++){var l=i[s],u=e[l],d=n[l];if(u!==d){if(!o[l]||u===null||d===null||t(u)!==`object`||t(d)!==`object`)return!0;var f=Object.keys(u),p=Object.keys(d);if(f.length!==p.length)return!0;for(var m=0,h=f.length;m<h;m++){var g=f[m];if(u[g]!==d[g])return!0}}}return!1}})),gi=c((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=s(t()),r=a(T()),i=a(hi());function a(e){return e&&e.__esModule?e:{default:e}}function o(){if(typeof WeakMap!=`function`)return null;var e=new WeakMap;return o=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(e===null||c(e)!==`object`&&typeof e!=`function`)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function c(e){"@babel/helpers - typeof";return c=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},c(e)}function l(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function f(e){return function(){var t=g(e),n;if(h()){var r=g(this).constructor;n=Reflect.construct(t,arguments,r)}else n=t.apply(this,arguments);return p(this,n)}}function p(e,t){return t&&(c(t)===`object`||typeof t==`function`)?t:m(e)}function m(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function h(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function _(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(e){_(r,e);var t=f(r);function r(){return l(this,r),t.apply(this,arguments)}return d(r,[{key:`shouldComponentUpdate`,value:function(e){return(0,i.default)(e,this.props)}},{key:`render`,value:function(){var e=this.props,t=e.section,r=e.renderSectionTitle,i=e.theme,a=e.sectionKeyPrefix,o=r(t);return o?n.default.createElement(`div`,i(`${a}title`,`sectionTitle`),o):null}}]),r}(n.Component);e.default=b,y(b,`propTypes`,{section:r.default.any.isRequired,renderSectionTitle:r.default.func.isRequired,theme:r.default.func.isRequired,sectionKeyPrefix:r.default.string.isRequired})})),_i=c((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=s(t()),r=a(T()),i=a(hi());function a(e){return e&&e.__esModule?e:{default:e}}function o(){if(typeof WeakMap!=`function`)return null;var e=new WeakMap;return o=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(e===null||c(e)!==`object`&&typeof e!=`function`)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function c(e){"@babel/helpers - typeof";return c=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},c(e)}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?u(Object(n),!0).forEach(function(t){w(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function f(e,t){if(e==null)return{};var n=p(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function p(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function m(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),e}function _(e){return function(){var t=x(e),n;if(b()){var r=x(this).constructor;n=Reflect.construct(t,arguments,r)}else n=t.apply(this,arguments);return v(this,n)}}function v(e,t){return t&&(c(t)===`object`||typeof t==`function`)?t:y(e)}function y(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function b(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function S(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&C(e,t)}function C(e,t){return C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},C(e,t)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(e){S(r,e);var t=_(r);function r(){var e;m(this,r);var n=[...arguments];return e=t.call.apply(t,[this].concat(n)),w(y(e),`storeItemReference`,function(t){t!==null&&(e.item=t)}),w(y(e),`onMouseEnter`,function(t){var n=e.props,r=n.sectionIndex,i=n.itemIndex;e.props.onMouseEnter(t,{sectionIndex:r,itemIndex:i})}),w(y(e),`onMouseLeave`,function(t){var n=e.props,r=n.sectionIndex,i=n.itemIndex;e.props.onMouseLeave(t,{sectionIndex:r,itemIndex:i})}),w(y(e),`onMouseDown`,function(t){var n=e.props,r=n.sectionIndex,i=n.itemIndex;e.props.onMouseDown(t,{sectionIndex:r,itemIndex:i})}),w(y(e),`onClick`,function(t){var n=e.props,r=n.sectionIndex,i=n.itemIndex;e.props.onClick(t,{sectionIndex:r,itemIndex:i})}),e}return g(r,[{key:`shouldComponentUpdate`,value:function(e){return(0,i.default)(e,this.props,[`renderItemData`])}},{key:`render`,value:function(){var e=this.props,t=e.isHighlighted,r=e.item,i=e.renderItem,a=e.renderItemData,o=f(e,[`isHighlighted`,`item`,`renderItem`,`renderItemData`]);return delete o.sectionIndex,delete o.itemIndex,typeof o.onMouseEnter==`function`&&(o.onMouseEnter=this.onMouseEnter),typeof o.onMouseLeave==`function`&&(o.onMouseLeave=this.onMouseLeave),typeof o.onMouseDown==`function`&&(o.onMouseDown=this.onMouseDown),typeof o.onClick==`function`&&(o.onClick=this.onClick),n.default.createElement(`li`,l({role:`option`},o,{ref:this.storeItemReference}),i(r,d({isHighlighted:t},a)))}}]),r}(n.Component);e.default=E,w(E,`propTypes`,{sectionIndex:r.default.number,isHighlighted:r.default.bool.isRequired,itemIndex:r.default.number.isRequired,item:r.default.any.isRequired,renderItem:r.default.func.isRequired,renderItemData:r.default.object.isRequired,onMouseEnter:r.default.func,onMouseLeave:r.default.func,onMouseDown:r.default.func,onClick:r.default.func})})),vi=c((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=c(t()),r=o(T()),i=o(_i()),a=o(hi());function o(e){return e&&e.__esModule?e:{default:e}}function s(){if(typeof WeakMap!=`function`)return null;var e=new WeakMap;return s=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(e===null||l(e)!==`object`&&typeof e!=`function`)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function l(e){"@babel/helpers - typeof";return l=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},l(e)}function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?d(Object(n),!0).forEach(function(t){C(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),e}function g(e){return function(){var t=b(e),n;if(y()){var r=b(this).constructor;n=Reflect.construct(t,arguments,r)}else n=t.apply(this,arguments);return _(this,n)}}function _(e,t){return t&&(l(t)===`object`||typeof t==`function`)?t:v(e)}function v(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function y(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function x(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}function S(e,t){return S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},S(e,t)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=function(e){x(r,e);var t=g(r);function r(){var e;p(this,r);var n=[...arguments];return e=t.call.apply(t,[this].concat(n)),C(v(e),`storeHighlightedItemReference`,function(t){e.props.onHighlightedItemChange(t===null?null:t.item)}),e}return h(r,[{key:`shouldComponentUpdate`,value:function(e){return(0,a.default)(e,this.props,[`itemProps`])}},{key:`render`,value:function(){var e=this,t=this.props,r=t.items,a=t.itemProps,o=t.renderItem,s=t.renderItemData,c=t.sectionIndex,l=t.highlightedItemIndex,d=t.getItemId,p=t.theme,m=t.keyPrefix,h=c===null?m:`${m}section-${c}-`,g=typeof a==`function`;return n.default.createElement(`ul`,u({role:`listbox`},p(`${h}items-list`,`itemsList`)),r.map(function(t,r){var m=r===0,_=r===l,v=`${h}item-${r}`,y=g?a({sectionIndex:c,itemIndex:r}):a,b=f({id:d(c,r),"aria-selected":_},p(v,`item`,m&&`itemFirst`,_&&`itemHighlighted`),{},y);return _&&(b.ref=e.storeHighlightedItemReference),n.default.createElement(i.default,u({},b,{sectionIndex:c,isHighlighted:_,itemIndex:r,item:t,renderItem:o,renderItemData:s}))}))}}]),r}(n.Component);e.default=w,C(w,`propTypes`,{items:r.default.array.isRequired,itemProps:r.default.oneOfType([r.default.object,r.default.func]),renderItem:r.default.func.isRequired,renderItemData:r.default.object.isRequired,sectionIndex:r.default.number,highlightedItemIndex:r.default.number,onHighlightedItemChange:r.default.func.isRequired,getItemId:r.default.func.isRequired,theme:r.default.func.isRequired,keyPrefix:r.default.string.isRequired}),C(w,`defaultProps`,{sectionIndex:null})})),yi=c((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=u(t()),r=c(T()),i=c(fi()),a=c(mi()),o=c(gi()),s=c(vi());function c(e){return e&&e.__esModule?e:{default:e}}function l(){if(typeof WeakMap!=`function`)return null;var e=new WeakMap;return l=function(){return e},e}function u(e){if(e&&e.__esModule)return e;if(e===null||y(e)!==`object`&&typeof e!=`function`)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?d(Object(n),!0).forEach(function(t){j(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p(e,t){return v(e)||_(e,t)||h(e,t)||m()}function m(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
6
6
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h(e,t){if(e){if(typeof e==`string`)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(n);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}}function g(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _(e,t){if(!(typeof Symbol>`u`||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function v(e){if(Array.isArray(e))return e}function y(e){"@babel/helpers - typeof";return y=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},y(e)}function b(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t,n){return t&&x(e.prototype,t),n&&x(e,n),e}function C(e){return function(){var t=O(e),n;if(D()){var r=O(this).constructor;n=Reflect.construct(t,arguments,r)}else n=t.apply(this,arguments);return w(this,n)}}function w(e,t){return t&&(y(t)===`object`||typeof t==`function`)?t:E(e)}function E(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function D(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function k(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&A(e,t)}function A(e,t){return A=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},A(e,t)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M={},N=function(e){return n.default.createElement(`input`,e)},P=function(e){var t=e.containerProps,r=e.children;return n.default.createElement(`div`,t,r)},ee={container:`react-autowhatever__container`,containerOpen:`react-autowhatever__container--open`,input:`react-autowhatever__input`,inputOpen:`react-autowhatever__input--open`,inputFocused:`react-autowhatever__input--focused`,itemsContainer:`react-autowhatever__items-container`,itemsContainerOpen:`react-autowhatever__items-container--open`,itemsList:`react-autowhatever__items-list`,item:`react-autowhatever__item`,itemFirst:`react-autowhatever__item--first`,itemHighlighted:`react-autowhatever__item--highlighted`,sectionContainer:`react-autowhatever__section-container`,sectionContainerFirst:`react-autowhatever__section-container--first`,sectionTitle:`react-autowhatever__section-title`},te=function(e){k(r,e);var t=C(r);function r(e){var n;return b(this,r),n=t.call(this,e),j(E(n),`storeInputReference`,function(e){e!==null&&(n.input=e);var t=n.props.inputProps.ref;t&&(typeof t==`function`?t(e):y(t)===`object`&&Object.prototype.hasOwnProperty.call(t,`current`)&&(t.current=e))}),j(E(n),`storeItemsContainerReference`,function(e){e!==null&&(n.itemsContainer=e)}),j(E(n),`onHighlightedItemChange`,function(e){n.highlightedItem=e}),j(E(n),`getItemId`,function(e,t){return t===null?null:`react-autowhatever-${n.props.id}-${e===null?``:`section-${e}`}-item-${t}`}),j(E(n),`onFocus`,function(e){var t=n.props.inputProps;n.setState({isInputFocused:!0}),t.onFocus&&t.onFocus(e)}),j(E(n),`onBlur`,function(e){var t=n.props.inputProps;n.setState({isInputFocused:!1}),t.onBlur&&t.onBlur(e)}),j(E(n),`onKeyDown`,function(e){var t=n.props,r=t.inputProps,i=t.highlightedSectionIndex,a=t.highlightedItemIndex,o=e.keyCode;switch(o){case 40:case 38:var s=o===40?`next`:`prev`,c=p(n.sectionIterator[s]([i,a]),2),l=c[0],u=c[1];r.onKeyDown(e,{newHighlightedSectionIndex:l,newHighlightedItemIndex:u});break;default:r.onKeyDown(e,{highlightedSectionIndex:i,highlightedItemIndex:a})}}),n.highlightedItem=null,n.state={isInputFocused:!1},n.setSectionsItems(e),n.setSectionIterator(e),n.setTheme(e),n}return S(r,[{key:`componentDidMount`,value:function(){this.ensureHighlightedItemIsVisible()}},{key:`UNSAFE_componentWillReceiveProps`,value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),(e.items!==this.props.items||e.multiSection!==this.props.multiSection)&&this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:`componentDidUpdate`,value:function(){this.ensureHighlightedItemIsVisible()}},{key:`setSectionsItems`,value:function(e){e.multiSection&&(this.sectionsItems=e.items.map(function(t){return e.getSectionItems(t)}),this.sectionsLengths=this.sectionsItems.map(function(e){return e.length}),this.allSectionsAreEmpty=this.sectionsLengths.every(function(e){return e===0}))}},{key:`setSectionIterator`,value:function(e){this.sectionIterator=(0,i.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:`setTheme`,value:function(e){this.theme=(0,a.default)(e.theme)}},{key:`renderSections`,value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,r=this.props,i=r.id,a=r.items,c=r.renderItem,l=r.renderItemData,u=r.renderSectionTitle,d=r.highlightedSectionIndex,f=r.highlightedItemIndex,p=r.itemProps;return a.map(function(r,a){var m=`react-autowhatever-${i}-`,h=`${m}section-${a}-`,g=a===0;return n.default.createElement(`div`,t(`${h}container`,`sectionContainer`,g&&`sectionContainerFirst`),n.default.createElement(o.default,{section:r,renderSectionTitle:u,theme:t,sectionKeyPrefix:h}),n.default.createElement(s.default,{items:e.sectionsItems[a],itemProps:p,renderItem:c,renderItemData:l,sectionIndex:a,highlightedItemIndex:d===a?f:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:m,ref:e.storeItemsListReference}))})}},{key:`renderItems`,value:function(){var e=this.props.items;if(e.length===0)return null;var t=this.theme,r=this.props,i=r.id,a=r.renderItem,o=r.renderItemData,c=r.highlightedSectionIndex,l=r.highlightedItemIndex,u=r.itemProps;return n.default.createElement(s.default,{items:e,itemProps:u,renderItem:a,renderItemData:o,highlightedItemIndex:c===null?l:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:`react-autowhatever-${i}-`})}},{key:`ensureHighlightedItemIsVisible`,value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:`render`,value:function(){var e=this.theme,t=this.props,r=t.id,i=t.multiSection,a=t.renderInputComponent,o=t.renderItemsContainer,s=t.highlightedSectionIndex,c=t.highlightedItemIndex,l=this.state.isInputFocused,u=i?this.renderSections():this.renderItems(),d=u!==null,p=this.getItemId(s,c),m=`react-autowhatever-${r}`,h=f({role:`combobox`,"aria-haspopup":`listbox`,"aria-owns":m,"aria-expanded":d},e(`react-autowhatever-${r}-container`,`container`,d&&`containerOpen`),{},this.props.containerProps),g=a(f({type:`text`,value:``,autoComplete:`off`,"aria-autocomplete":`list`,"aria-controls":m,"aria-activedescendant":p},e(`react-autowhatever-${r}-input`,`input`,d&&`inputOpen`,l&&`inputFocused`),{},this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),_=o({containerProps:f({id:m,role:`listbox`},e(`react-autowhatever-${r}-items-container`,`itemsContainer`,d&&`itemsContainerOpen`),{ref:this.storeItemsContainerReference}),children:u});return n.default.createElement(`div`,h,g,_)}}]),r}(n.Component);e.default=te,j(te,`propTypes`,{id:r.default.string,multiSection:r.default.bool,renderInputComponent:r.default.func,renderItemsContainer:r.default.func,items:r.default.array.isRequired,renderItem:r.default.func,renderItemData:r.default.object,renderSectionTitle:r.default.func,getSectionItems:r.default.func,containerProps:r.default.object,inputProps:r.default.object,itemProps:r.default.oneOfType([r.default.object,r.default.func]),highlightedSectionIndex:r.default.number,highlightedItemIndex:r.default.number,theme:r.default.oneOfType([r.default.object,r.default.array])}),j(te,`defaultProps`,{id:`1`,multiSection:!1,renderInputComponent:N,renderItemsContainer:P,renderItem:function(){throw Error("`renderItem` must be provided")},renderItemData:M,renderSectionTitle:function(){throw Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw Error("`getSectionItems` must be provided")},containerProps:M,inputProps:M,itemProps:M,highlightedSectionIndex:null,highlightedItemIndex:null,theme:ee})})),bi=c((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.mapToAutowhateverTheme=e.defaultTheme=void 0,e.defaultTheme={container:`react-autosuggest__container`,containerOpen:`react-autosuggest__container--open`,input:`react-autosuggest__input`,inputOpen:`react-autosuggest__input--open`,inputFocused:`react-autosuggest__input--focused`,suggestionsContainer:`react-autosuggest__suggestions-container`,suggestionsContainerOpen:`react-autosuggest__suggestions-container--open`,suggestionsList:`react-autosuggest__suggestions-list`,suggestion:`react-autosuggest__suggestion`,suggestionFirst:`react-autosuggest__suggestion--first`,suggestionHighlighted:`react-autosuggest__suggestion--highlighted`,sectionContainer:`react-autosuggest__section-container`,sectionContainerFirst:`react-autosuggest__section-container--first`,sectionTitle:`react-autosuggest__section-title`},e.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case`suggestionsContainer`:t.itemsContainer=e[n];break;case`suggestionsContainerOpen`:t.itemsContainerOpen=e[n];break;case`suggestion`:t.item=e[n];break;case`suggestionFirst`:t.itemFirst=e[n];break;case`suggestionHighlighted`:t.itemHighlighted=e[n];break;case`suggestionsList`:t.itemsList=e[n];break;default:t[n]=e[n]}return t}})),xi=c((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.default=void 0;var n=l(t()),r=s(T()),i=s(di()),a=s(yi()),o=bi();function s(e){return e&&e.__esModule?e:{default:e}}function c(){if(typeof WeakMap!=`function`)return null;var e=new WeakMap;return c=function(){return e},e}function l(e){if(e&&e.__esModule)return e;if(e===null||u(e)!==`object`&&typeof e!=`function`)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=r?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function u(e){"@babel/helpers - typeof";return u=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},u(e)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?d(Object(n),!0).forEach(function(t){C(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),e}function g(e){return function(){var t=b(e),n;if(y()){var r=b(this).constructor;n=Reflect.construct(t,arguments,r)}else n=t.apply(this,arguments);return _(this,n)}}function _(e,t){return t&&(u(t)===`object`||typeof t==`function`)?t:v(e)}function v(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function y(){if(typeof Reflect>`u`||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy==`function`)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function x(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}function S(e,t){return S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},S(e,t)}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=function(){return!0},E=function(e){return e.trim().length>0},D=function(e){var t=e.containerProps,r=e.children;return n.default.createElement(`div`,t,r)},O=`suggestions-revealed`,k=`suggestions-updated`,A=`suggestion-selected`,j=`input-focused`,M=`input-changed`,N=`input-blurred`,P=`escape-pressed`,ee=function(e){x(r,e);var t=g(r);function r(e){var n,i=e.alwaysRenderSuggestions;return p(this,r),n=t.call(this),C(v(n),`onDocumentMouseDown`,function(e){n.justClickedOnSuggestionsContainer=!1;for(var t=e.detail&&e.detail.target||e.target;t!==null&&t!==document;){if(t.getAttribute&&t.getAttribute(`data-suggestion-index`)!==null)return;if(t===n.suggestionsContainer){n.justClickedOnSuggestionsContainer=!0;return}t=t.parentNode}}),C(v(n),`storeAutowhateverRef`,function(e){e!==null&&(n.autowhatever=e)}),C(v(n),`onSuggestionMouseEnter`,function(e,t){var r=t.sectionIndex,i=t.itemIndex;n.updateHighlightedSuggestion(r,i),e.target===n.pressedSuggestion&&(n.justSelectedSuggestion=!0),n.justMouseEntered=!0,setTimeout(function(){n.justMouseEntered=!1})}),C(v(n),`highlightFirstSuggestion`,function(){n.updateHighlightedSuggestion(n.props.multiSection?0:null,0)}),C(v(n),`onDocumentMouseUp`,function(){n.pressedSuggestion&&!n.justSelectedSuggestion&&n.input.focus(),n.pressedSuggestion=null}),C(v(n),`onSuggestionMouseDown`,function(e){n.justSelectedSuggestion||(n.justSelectedSuggestion=!0,n.pressedSuggestion=e.target)}),C(v(n),`onSuggestionsClearRequested`,function(){var e=n.props.onSuggestionsClearRequested;e&&e()}),C(v(n),`onSuggestionSelected`,function(e,t){var r=n.props,i=r.alwaysRenderSuggestions,a=r.onSuggestionSelected,o=r.onSuggestionsFetchRequested;a&&a(e,t);var s=n.props.shouldKeepSuggestionsOnSelect(t.suggestion);i||s?o({value:t.suggestionValue,reason:A}):n.onSuggestionsClearRequested(),n.resetHighlightedSuggestion()}),C(v(n),`onSuggestionClick`,function(e){var t=n.props,r=t.alwaysRenderSuggestions,i=t.focusInputOnSuggestionClick,a=n.getSuggestionIndices(n.findSuggestionElement(e.target)),o=a.sectionIndex,s=a.suggestionIndex,c=n.getSuggestion(o,s),l=n.props.getSuggestionValue(c);n.maybeCallOnChange(e,l,`click`),n.onSuggestionSelected(e,{suggestion:c,suggestionValue:l,suggestionIndex:s,sectionIndex:o,method:`click`});var u=n.props.shouldKeepSuggestionsOnSelect(c);r||u||n.closeSuggestions(),i===!0?n.input.focus():n.onBlur(),setTimeout(function(){n.justSelectedSuggestion=!1})}),C(v(n),`onBlur`,function(){var e=n.props,t=e.inputProps,r=e.shouldRenderSuggestions,i=t.value,a=t.onBlur,o=n.getHighlightedSuggestion(),s=r(i,N);n.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!s}),a&&a(n.blurEvent,{highlightedSuggestion:o})}),C(v(n),`onSuggestionMouseLeave`,function(e){n.resetHighlightedSuggestion(!1),n.justSelectedSuggestion&&e.target===n.pressedSuggestion&&(n.justSelectedSuggestion=!1)}),C(v(n),`onSuggestionTouchStart`,function(){n.justSelectedSuggestion=!0}),C(v(n),`onSuggestionTouchMove`,function(){n.justSelectedSuggestion=!1,n.pressedSuggestion=null,n.input.focus()}),C(v(n),`itemProps`,function(e){var t=e.sectionIndex,r=e.itemIndex;return{"data-section-index":t,"data-suggestion-index":r,onMouseEnter:n.onSuggestionMouseEnter,onMouseLeave:n.onSuggestionMouseLeave,onMouseDown:n.onSuggestionMouseDown,onTouchStart:n.onSuggestionTouchStart,onTouchMove:n.onSuggestionTouchMove,onClick:n.onSuggestionClick}}),C(v(n),`renderSuggestionsContainer`,function(e){var t=e.containerProps,r=e.children,i=n.props.renderSuggestionsContainer;return i({containerProps:t,children:r,query:n.getQuery()})}),n.state={isFocused:!1,isCollapsed:!i,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},n.justPressedUpDown=!1,n.justMouseEntered=!1,n.pressedSuggestion=null,n}return h(r,[{key:`componentDidMount`,value:function(){document.addEventListener(`mousedown`,this.onDocumentMouseDown),document.addEventListener(`mouseup`,this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:`UNSAFE_componentWillReceiveProps`,value:function(e){var t=this.state.highlightedSuggestionIndex===0&&this.props.highlightFirstSuggestion&&!e.highlightFirstSuggestion;(0,i.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&this.justPressedUpDown===!1&&this.justMouseEntered===!1?this.highlightFirstSuggestion():t&&this.resetHighlightedSuggestion():this.willRenderSuggestions(e,k)?(this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions(),t&&this.resetHighlightedSuggestion()):this.resetHighlightedSuggestion()}},{key:`componentDidUpdate`,value:function(e,t){var n=this.props,r=n.suggestions,a=n.onSuggestionHighlighted,o=n.highlightFirstSuggestion;if(!(0,i.default)(r,e.suggestions)&&r.length>0&&o){this.highlightFirstSuggestion();return}if(a){var s=this.getHighlightedSuggestion();s!=t.highlightedSuggestion&&a({suggestion:s})}}},{key:`componentWillUnmount`,value:function(){document.removeEventListener(`mousedown`,this.onDocumentMouseDown),document.removeEventListener(`mouseup`,this.onDocumentMouseUp)}},{key:`updateHighlightedSuggestion`,value:function(e,t,n){var r=this;this.setState(function(i){var a=i.valueBeforeUpDown;return t===null?a=null:a===null&&n!==void 0&&(a=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:t===null?null:r.getSuggestion(e,t),valueBeforeUpDown:a}})}},{key:`resetHighlightedSuggestion`,value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.setState(function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}})}},{key:`revealSuggestions`,value:function(){this.setState({isCollapsed:!1})}},{key:`closeSuggestions`,value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:`getSuggestion`,value:function(e,t){var n=this.props,r=n.suggestions,i=n.multiSection,a=n.getSectionSuggestions;return i?a(r[e])[t]:r[t]}},{key:`getHighlightedSuggestion`,value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return n===null?null:this.getSuggestion(t,n)}},{key:`getSuggestionValueByIndex`,value:function(e,t){var n=this.props.getSuggestionValue;return n(this.getSuggestion(e,t))}},{key:`getSuggestionIndices`,value:function(e){var t=e.getAttribute(`data-section-index`),n=e.getAttribute(`data-suggestion-index`);return{sectionIndex:typeof t==`string`?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:`findSuggestionElement`,value:function(e){var t=e;do{if(t.getAttribute&&t.getAttribute(`data-suggestion-index`)!==null)return t;t=t.parentNode}while(t!==null);throw console.error(`Clicked element:`,e),Error(`Couldn't find suggestion element`)}},{key:`maybeCallOnChange`,value:function(e,t,n){var r=this.props.inputProps,i=r.value,a=r.onChange;t!==i&&a(e,{newValue:t,method:n})}},{key:`willRenderSuggestions`,value:function(e,t){var n=e.suggestions,r=e.inputProps,i=e.shouldRenderSuggestions,a=r.value;return n.length>0&&i(a,t)}},{key:`getQuery`,value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(t===null?e:t).trim()}},{key:`render`,value:function(){var e=this,t=this.props,r=t.suggestions,i=t.renderInputComponent,s=t.onSuggestionsFetchRequested,c=t.renderSuggestion,l=t.inputProps,u=t.multiSection,d=t.renderSectionTitle,p=t.id,m=t.getSectionSuggestions,h=t.theme,g=t.getSuggestionValue,_=t.alwaysRenderSuggestions,v=t.highlightFirstSuggestion,y=t.containerProps,b=this.state,x=b.isFocused,S=b.isCollapsed,C=b.highlightedSectionIndex,T=b.highlightedSuggestionIndex,E=b.valueBeforeUpDown,D=_?w:this.props.shouldRenderSuggestions,k=l.value,A=l.onFocus,N=l.onKeyDown,ee=this.willRenderSuggestions(this.props,`render`),te=_||x&&!S&&ee,F=te?r:[],ne=f({},l,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=D(k,j);e.setState({isFocused:!0,isCollapsed:!n}),A&&A(t),n&&s({value:k,reason:j})}},onBlur:function(t){if(e.justClickedOnSuggestionsContainer){e.input.focus();return}e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested())},onChange:function(t){var n=t.target.value,r=D(n,M);e.maybeCallOnChange(t,n,`type`),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(f({},v?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!r})),r?s({value:n,reason:M}):e.onSuggestionsClearRequested()},onKeyDown:function(t,n){var i=t.keyCode;switch(i){case 40:case 38:if(S)D(k,O)&&(s({value:k,reason:O}),e.revealSuggestions(),t.preventDefault());else if(r.length>0){var a=n.newHighlightedSectionIndex,o=n.newHighlightedItemIndex,c=o===null?E===null?k:E:e.getSuggestionValueByIndex(a,o);e.updateHighlightedSuggestion(a,o,k),e.maybeCallOnChange(t,c,i===40?`down`:`up`),t.preventDefault()}e.justPressedUpDown=!0,setTimeout(function(){e.justPressedUpDown=!1});break;case 13:if(t.keyCode===229)break;var l=e.getHighlightedSuggestion();if(te&&!_&&e.closeSuggestions(),l!=null){t.preventDefault();var u=g(l);e.maybeCallOnChange(t,u,`enter`),e.onSuggestionSelected(t,{suggestion:l,suggestionValue:u,suggestionIndex:T,sectionIndex:C,method:`enter`}),e.justSelectedSuggestion=!0,setTimeout(function(){e.justSelectedSuggestion=!1})}break;case 27:te&&t.preventDefault();var d=te&&!_;if(E===null){if(!d){var f=``;e.maybeCallOnChange(t,f,`escape`),D(f,P)?s({value:f,reason:P}):e.onSuggestionsClearRequested()}}else e.maybeCallOnChange(t,E,`escape`);d?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion();break}N&&N(t)}}),I={query:this.getQuery()};return n.default.createElement(a.default,{multiSection:u,items:F,renderInputComponent:i,renderItemsContainer:this.renderSuggestionsContainer,renderItem:c,renderItemData:I,renderSectionTitle:d,getSectionItems:m,highlightedSectionIndex:C,highlightedItemIndex:T,containerProps:y,inputProps:ne,itemProps:this.itemProps,theme:(0,o.mapToAutowhateverTheme)(h),id:p,ref:this.storeAutowhateverRef})}}]),r}(n.Component);e.default=ee,C(ee,`propTypes`,{suggestions:r.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){if(typeof e[t]!=`function`)throw Error(`'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp`)},onSuggestionsClearRequested:function(e,t){var n=e[t];if(e.alwaysRenderSuggestions===!1&&typeof n!=`function`)throw Error(`'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp`)},shouldKeepSuggestionsOnSelect:r.default.func,onSuggestionSelected:r.default.func,onSuggestionHighlighted:r.default.func,renderInputComponent:r.default.func,renderSuggestionsContainer:r.default.func,getSuggestionValue:r.default.func.isRequired,renderSuggestion:r.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n)throw Error(`'inputProps' must be passed.`);if(!Object.prototype.hasOwnProperty.call(n,`value`))throw Error(`'inputProps' must have 'value'.`);if(!Object.prototype.hasOwnProperty.call(n,`onChange`))throw Error(`'inputProps' must have 'onChange'.`)},shouldRenderSuggestions:r.default.func,alwaysRenderSuggestions:r.default.bool,multiSection:r.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(e.multiSection===!0&&typeof n!=`function`)throw Error(`'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp`)},getSectionSuggestions:function(e,t){var n=e[t];if(e.multiSection===!0&&typeof n!=`function`)throw Error(`'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp`)},focusInputOnSuggestionClick:r.default.bool,highlightFirstSuggestion:r.default.bool,theme:r.default.object,id:r.default.string,containerProps:r.default.object}),C(ee,`defaultProps`,{renderSuggestionsContainer:D,shouldRenderSuggestions:E,alwaysRenderSuggestions:!1,multiSection:!1,shouldKeepSuggestionsOnSelect:function(){return!1},focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:o.defaultTheme,id:`1`,containerProps:{}})})),Si=l(c(((e,t)=>{t.exports=xi().default}))()),Ci=ge(),Y={inputWithoutHighlight:`_inputWithoutHighlight_1gh2d_1`,suggestionsContainerOpen:`_suggestionsContainerOpen_1gh2d_5`,sectionContainer:`_sectionContainer_1gh2d_12`,suggestionHighlighted:`_suggestionHighlighted_1gh2d_15`,clearButton:`_clearButton_1gh2d_18`,inputWithLeftIcon:`_inputWithLeftIcon_1gh2d_21`,inputWithRightIcon:`_inputWithRightIcon_1gh2d_24`,inputWithTwoRightIcons:`_inputWithTwoRightIcons_1gh2d_27`,iconContainer:`_iconContainer_1gh2d_30`,leftIconContainer:`_leftIconContainer_1gh2d_35`,rightIconContainer:`_rightIconContainer_1gh2d_38`};function wi(e,t,n,r,i){let a=`form-control text-truncate`;return n||(a+=` ${Y.inputWithoutHighlight}`),e===`left`&&(a+=` ${Y.inputWithLeftIcon}`),(e===`right`&&!t||e===`left`&&t||t)&&(a+=` ${Y.inputWithRightIcon}`),e===`right`&&t&&(a+=` ${Y.inputWithTwoRightIcons}`),i===`lg`&&(a+=` form-control-lg`),i===`sm`&&(a+=` form-control-sm`),r&&(a+=` ${r}`),a}function Ti(e){let t=`d-inline-block svg-container`;return _.isFunction(e)?t+` cursor-pointer`:t}function Ei(e){let{onClickSearchIcon:t,searchIconPlacement:n,showClearInputIcon:r,onClickClearInput:i,highlightOnFocus:a,className:o,formSize:s,...c}=e,l=()=>(0,U.jsx)(`div`,{className:`d-inline-block`,children:(0,U.jsx)(g,{svg:Ie,size:m.Standard,onClick:t,className:Ti(t)})}),u=()=>(0,U.jsx)(`button`,{className:`d-inline-block text-secondary ${Y.clearButton}`,onMouseUp:i,children:(0,U.jsx)(g,{svg:Me,size:m.Standard,className:Ti(i)})});return(0,U.jsxs)(`div`,{className:`position-relative ${Y.inputContainer}`,children:[n===`left`&&(0,U.jsx)(`div`,{className:`${Y.iconContainer} ${Y.leftIconContainer}`,children:(0,U.jsx)(l,{})}),(0,U.jsx)(`input`,{className:wi(n,r,a,o,s),...c}),(n===`right`||!!r)&&(0,U.jsxs)(`div`,{className:`${Y.iconContainer} ${Y.rightIconContainer}`,children:[!!r&&(0,U.jsx)(u,{}),n===`right`&&(0,U.jsx)(l,{})]})]})}var X=function(e){return e.Local=`local`,e.Recent=`recent`,e.Remote=`remote`,e.Generic=`generic`,e}({});function Di(e,t){return{[X.Recent]:t,[X.Local]:e,[X.Remote]:[],[X.Generic]:[]}}function Oi(e,t){return r.isObject(e)&&e.hasOwnProperty(t)&&Re.isString(e[t])}function ki(e,t,n,r){let i=e.trim().toLowerCase();return i.length<r?[]:t.filter(e=>!Oi(e,n)||!Re.isString(e[n])?!1:e[n].trim().toLowerCase().includes(i))}function Ai(e,t,n,r,i,a){let o=_.isFunction(e)&&e(t);if(o){if(a){x({resource:o,type:S.POST,success:n,error:r,headers:i,data:a(t)});return}x({resource:o,type:S.GET,success:n,error:r,headers:i})}}function ji(e,t){e({...Di([],[]),[X.Generic]:[{type:t,generic:!0}]})}function Mi(e,t,n){let r=_.isFunction(t.formatRemoteSuggestions)?t.formatRemoteSuggestions(e):e;if(!r.length&&t.getEmptyStateComponent){ji(n,`empty`);return}n(e=>({...e,[X.Remote]:r,[X.Generic]:[]}))}function Ni(e,t,n){return({value:r,reason:i})=>{if((e.allowableSuggestionFetchRequestedReasons?.includes(i)??!0)&&(r.length||n(),!(r.length<e.activationLength))){if(e.local){let n=_.isFunction(e.getLocalSuggestions)?e.getLocalSuggestions(r,e.local):ki(r,e.local,e.valueKey,e.activationLength);if(!n.length&&e.getEmptyStateComponent){ji(t,`empty`);return}t(e=>({...e,[X.Local]:n,[X.Generic]:[]}))}if(typeof e.handleFetchSuggestions==`function`){e.replacePreviousRemoteSuggestions?t(e=>({...Di([],[]),[X.Remote]:e.remote})):ji(t,`loading`),e.handleFetchSuggestions(r,n=>Mi(n,e,t),()=>ji(t,`errored`));return}e.getRemoteUrl&&(e.replacePreviousRemoteSuggestions?t(e=>({...Di([],[]),[X.Remote]:e.remote})):ji(t,`loading`),Ai(e.getRemoteUrl,r,n=>Mi(n,e,t),()=>{ji(t,`errored`)},e.requestHeaders,e.getRemotePostBody))}}}function Pi(e,t){return Oi(t,e)?t[e]:``}function Fi(e,t){return Oi(t,e)?(0,U.jsx)(U.Fragment,{children:t[e]}):(0,U.jsx)(U.Fragment,{})}function Ii(e){function t(e){e.stopPropagation()}return(0,U.jsx)(`div`,{className:`d-flex justify-content-center cursor-default ${e??``}`,onClick:t,children:(0,U.jsx)(E,{as:`span`,animation:`border`,role:`status`})})}function Li(e,t,n,r,i,a){let o=t=>{let n=e[t];return n?n.map(e=>({...e,suggestionType:t})):[]},s=o(X.Recent),c=o(X.Local),l=o(X.Remote),u=o(X.Generic);if(u.length)return[{data:u,suggestionType:X.Generic}];if(_.isFunction(r))return r([...c,...l,...s]);let d=[];return c?.length&&d.push({title:t,data:zi(c,Ri(X.Local,i)),suggestionType:X.Local}),l?.length&&d.push({title:t,data:zi(l,Ri(X.Remote,i)),suggestionType:X.Remote}),s?.length&&d.push({title:n,data:zi(s,Ri(X.Recent,i)),suggestionType:X.Recent}),typeof a==`function`?a(d):d}function Ri(e,t){return typeof t==`number`||typeof t==`boolean`?t:t[e]||!1}function zi(e,t){return typeof t==`boolean`||e.length<=t?e:e.slice(0,t)}function Bi(e){return e.data}function Vi(e,t){if(e.title)return(0,U.jsx)(`div`,{className:`pb-1 ${t??``}`,children:(0,U.jsx)(`strong`,{children:e.title})})}function Hi(e){return{container:`position-relative`,suggestionsContainerOpen:`bg-white py-1 border rounded ${Y.suggestionsContainerOpen}`,suggestionsList:`list-unstyled m-0`,suggestion:`${e?``:`cursor-pointer`} py-1 px-2`,suggestionHighlighted:e?``:Y.suggestionHighlighted,sectionContainer:`border-bottom py-1 ${Y.sectionContainer}`}}function Ui(e,t){let n=typeof e==`function`?e(t):e,r=Hi(t);return Object.assign(r,n)}function Wi(e,t,n,r,i,a){V.useEffect(()=>{!e||e.current||(e.current={resetQuery:t,setQuery:n,focusInput:r,blurInput:i,setInputProperty:a})},[e?.current])}function Gi(e){let[t,n]=N(`lite:search:bar:focus`,{focus:!1});return V.useEffect(()=>{!t.focus||!e?.current||(e.current.focus(),n({focus:!1}))},[t.focus]),{focusSearchBar:()=>n({focus:!0}),shouldFocus:t.focus}}var Ki=`shared.searchBar`,qi=_.isFunction;function Ji(e){return e.renderAsForm?(0,U.jsx)(`form`,{onSubmit:e.onSubmit,children:e.children}):(0,U.jsx)(`div`,{className:`w-100`,children:e.children})}Yi.defaultProps={valueKey:`name`,activationLength:3,suggestionLimit:5,recentSearches:[],initialLocalSuggestions:[],searchIconPlacement:`right`,renderAsForm:!0,onSuggestionDependencies:[],shouldUpdateQueryOnSelection:!0,focusInputOnSuggestionClick:!0,resetQueryOnEscape:!0};function Yi(e){let t=Di(e.initialLocalSuggestions,e.recentSearches),[n,i]=V.useState(e.initialQuery||``),[a,o]=V.useState(t),s=V.useMemo(()=>Li(a,e.suggestionsHeading,e.recentSearchHeading||w.getPhrase(Ki,`recentSearchesHeading`),e.getSections,e.suggestionLimit,e.transformSections),[a]);V.useEffect(()=>{r.isEqual(t,a)||n&&n.length>=e?.activationLength||o(t)},[t]),V.useEffect(()=>{typeof e.onSuggestionUpdated==`function`&&e.onSuggestionUpdated(s)},[s]);let c=V.useRef(null),l=V.useRef(!1);Gi(c);let[u,d]=V.useState(e.initialQuery||``),[f,p]=V.useState(`none`),m=j(Le.XS);V.useEffect(()=>{!e.resetSuggestionsOnNoActivation||!n||n.length>=e.activationLength||h()},[n]),V.useEffect(()=>{n.length||o(Di(e.initialLocalSuggestions,e.recentSearches))},[e.initialLocalSuggestions,e.recentSearches]),V.useEffect(()=>{let t=e.initialQuery||``;n!==t&&(i(t),d(t))},[e.initialQuery]),V.useEffect(()=>{!c.current||!e.autoFocusInput||c.current.focus()},[e.autoFocusInput]);let h=()=>{o(Di(e.initialLocalSuggestions,e.recentSearches))},g=()=>{i(``),d(``)};Wi(e.controlsRef,g,i,()=>{c.current?.focus()},()=>{c.current?.blur()},(e,t)=>{c.current&&c.current?.style?.setProperty?.(e,t)});let v=(t,{newValue:n,method:r})=>{r===`type`&&d(n),!(r===`escape`&&(p(`none`),!e?.resetQueryOnEscape))&&([`up`,`down`].includes(r)||(i(n),qi(e.onQueryChange)&&e.onQueryChange(n)))},y=()=>{p(`none`)},b=t=>{t.preventDefault(),qi(e.onSubmit)&&e.onSubmit(n,c.current),e.clearQueryOnSelect&&g()},x=t=>{if(t.key===`Backspace`&&e.onBackspace&&!n){e.onBackspace();return}if(t.key===`ArrowUp`||t.key===`ArrowDown`){l.current=!0;return}},S=()=>{g(),e.resetSuggestionsOnClear&&h(),qi(e.onClickClearInput)&&e.onClickClearInput()},C=({suggestion:t})=>{f===`none`&&!t||(l.current&&e.onArrowKeyUpOrDown&&(l.current=!1,e.onArrowKeyUpOrDown()),p(t?`suggestion`:`custom`))};function T(t){return qi(e.shouldUpdateQueryOnSelection)?e.shouldUpdateQueryOnSelection(t):e.shouldUpdateQueryOnSelection}let E=V.useMemo(()=>e.debounceTime?_.debounce(Ni(e,o,h),e.debounceTime):Ni(e,o,h),[e.debounceTime,...e.onSuggestionDependencies]);function D(t){return qi(e.renderSectionTitle)?e.renderSectionTitle(t,e.sectionTitleClassName):Vi(t,e.sectionTitleClassName)}function O(){return qi(e.renderSuggestionsOnInputFocus)?e.renderSuggestionsOnInputFocus(n):e.renderSuggestionsOnInputFocus}function k(){e.onBlur&&e.onBlur(n)}function A(){e.onFocus&&e.onFocus(n)}function M(e){e!==null&&!c.current&&(c.current=e.input)}function N(){return typeof e.alwaysRenderSuggestions==`boolean`?e.alwaysRenderSuggestions:e.alwaysRenderSuggestionsWhenFocused&&n.length>=e.activationLength?document.activeElement===c.current:!1}return(0,U.jsx)(Ji,{onSubmit:b,renderAsForm:!!e.renderAsForm,children:(0,U.jsx)(Si.default,{ref:M,suggestions:s,onSuggestionsFetchRequested:E,onSuggestionHighlighted:C,onSuggestionsClearRequested:()=>{N()||h()},onSuggestionSelected:(t,{suggestion:n})=>{n.generic||(e.clearQueryOnSelect&&g(),e.onSuggestionSelected(n,c.current,t))},getSuggestionValue:t=>T(t)?Pi(e.valueKey,t):n,renderSuggestion:(t,r)=>{if(t.generic){if(t.type===`empty`)return n.length>=e.activationLength&&qi(e.getEmptyStateComponent)?e.getEmptyStateComponent(n):(0,U.jsx)(U.Fragment,{});if(t.type===`errored`&&qi(e.getErrorStateComponent)){let t=Ni(e,o,h);return e.getErrorStateComponent(()=>t({value:n,reason:`input-changed`}))}if(t.type===`loading`)return Ii(e.loadingComponentClassName)}return qi(e.getSuggestionComponent)?e.getSuggestionComponent(t,r):Fi(e.valueKey,t)},renderSuggestionsContainer:t=>{let{ref:r,...i}=t.containerProps;if(!e.customScrollbarProps){let o={suggestions:a,query:n,isDropdownOpen:!!t.children};return(0,U.jsxs)(`div`,{ref:r,...i,onMouseOut:y,children:[t.children,e.getCreateComponent&&e.getCreateComponent({userInput:u,isActive:f===`custom`,resetQuery:g,resetSuggestions:h,...o}),e.getFooterComponent&&e.getFooterComponent(o)]})}return(0,U.jsx)(Ci.Scrollbars,{ref:r,...e.customScrollbarProps,...i,children:t.children})},alwaysRenderSuggestions:N(),focusInputOnSuggestionClick:!m&&e.focusInputOnSuggestionClick,inputProps:{id:e.id,name:e.id,"aria-errormessage":`${e.id}Error`,"aria-label":e.label,placeholder:e.placeholder||w.getPhrase(Ki,`placeholder`),value:n,onChange:v,onKeyDown:x,autoFocus:!!e.autoFocusInput,highlightOnFocus:e.highlightInputOnFocus,onClickSearchIcon:!!e.submitOnClickSearchIcon&&b,searchIconPlacement:e.searchIconPlacement,showClearInputIcon:typeof e.showClearInputIcon==`boolean`?e.showClearInputIcon:!!n.length,onClickClearInput:S,formSize:e.size,onBlur:k,onFocus:A,disabled:e.disabled},renderInputComponent:Ei,theme:Ui(e.theme,!!a.generic.length),multiSection:!0,renderSectionTitle:D,getSectionSuggestions:Bi,...e.renderSuggestionsOnInputFocus?{shouldRenderSuggestions:O}:{}})})}var Xi={emptyState:`_emptyState_1lwjl_1`},Zi=`shared.typeaheadErrorState`;function Qi(e){function t(e){e.stopPropagation()}function n(t){t.stopPropagation(),e.onClickTryAgain()}return(0,U.jsxs)(`div`,{className:`d-flex flex-column align-items-center text-center`,onClick:t,children:[(0,U.jsx)(`img`,{alt:``,role:`presentation`,src:e.imageUrl,className:`pb-2 ${Xi.emptyState}`}),(0,U.jsx)(`h2`,{className:`h6`,role:`alert`,children:(0,U.jsx)(F,{namespace:Zi,phrase:`error`})}),(0,U.jsx)(p,{onClick:n,className:`btn btn-link info-link p-0`,children:(0,U.jsx)(F,{namespace:Zi,phrase:`tryAgain`})})]})}var $i={container:`_container_sxosy_1`,suggestionsContainerOpen:`_suggestionsContainerOpen_sxosy_11`,selectionContainer:`_selectionContainer_sxosy_18`,sectionContainer:`_sectionContainer_sxosy_28`},ea=`shared.tokenizedTypeahead`;ta.defaultProps={renderSuggestionsOnInputFocus:!0};function ta(e){return(0,U.jsxs)(`div`,{className:`form-control h-auto d-flex align-items-top position-relative ${e.hideIcon?``:`py-1 px-0`} ${e.className}`,children:[!e.hideIcon&&(0,U.jsx)(g,{className:`svg-container m-1`,svg:Ie}),(0,U.jsxs)(`div`,{className:`${$i.selectionContainer} d-flex flex-wrap align-items-center mt-n1`,children:[e.selections.map(t=>e.getInputTokenComponent?e.getInputTokenComponent(t):(0,U.jsx)(Br,{selection:t,onClickRemove:e.removeSelection,onClickExpand:e.fetchSelectionMembers,hasStudentExperience:e.hasStudentExperience},t.id)),(0,U.jsx)(Yi,{...e,onBackspace:()=>{e.selections.length&&e.removeSelection(C.last(e.selections))},recentSearchHeading:e.recentSearchHeading||w.getPhrase(ea,`recentSearchHeading`),placeholder:e.selections?.length?` `:e.placeholder,searchIconPlacement:!1,clearQueryOnSelect:!0,getSuggestionComponent:t=>e.getSuggestionComponent?e.getSuggestionComponent(t):(0,U.jsx)(ui,{entity:t,imageCdnUrl:e.imageCdnUrl,showDisplayName:e.hasStudentExperience}),getEmptyStateComponent:t=>{if(e.getEmptyStateComponent)return e.getEmptyStateComponent(t);e.emptyStateImageUrl&&e.emptyStateImageUrl},getErrorStateComponent:t=>(0,U.jsx)(Qi,{imageUrl:e.errorStateImageUrl,onClickTryAgain:t}),theme:{container:$i.container,suggestionsContainerOpen:`bg-white py-1 rounded border mt-1 ${$i.suggestionsContainerOpen}`,sectionContainer:`border-bottom py-1 ${$i.sectionContainer}`},sectionTitleClassName:`ps-2`,renderSuggestionsOnInputFocus:e.renderSuggestionsOnInputFocus,onSuggestionDependencies:[e.selections]})]}),!!e.sharePermissionsDescription&&(0,U.jsx)(`span`,{className:`px-2 text-secondary text-nowrap`,children:e.sharePermissionsDescription})]})}var na=`shared.feedbackRequestLivestream`,ra=w.encloseNamespace(na),ia={topic:``,studentLevel:[],producerCompany:``,additionalInfo:``},aa=W.string().max(mt,ht(`maxCharactersError`)),oa=W.object().shape({producerCompany:aa.required(()=>ra(`companyError`)),topic:aa,studentLevel:W.array(W.string()),additionalInfo:gt()}).noUnknown();function sa(e){let t=ve(),n=t.values.studentLevel.map(t=>e.audiences.find(e=>e.name===t))||[];function r(e){t.setFieldValue(`studentLevel`,C.addOrRemoveImmutable(t.values.studentLevel,e.name)),requestAnimationFrame(()=>t.setFieldTouched(`studentLevel`))}function i(e,t){let r=t.find(t=>t.name===e);return ki(r?``:e,t,`name`,0).filter(e=>!(n.find(t=>t.name===e.name)||e.name===r?.name))}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(B,{placeholder:ra(`companyPlaceholder`),label:ra(`companyLabel`),name:`producerCompany`,value:t.values.producerCompany,showRequiredStar:!0}),(0,U.jsx)(B,{placeholder:ra(`topicPlaceholder`),label:ra(`topicLabel`),name:`topic`,value:t.values.topic}),(0,U.jsxs)(`div`,{className:`form-group`,children:[(0,U.jsx)(`label`,{className:`form-label`,children:(0,U.jsx)(F,{namespace:na,phrase:`audiencesLabel`})}),(0,U.jsx)(ta,{id:`audiences`,placeholder:ra(`audiencesPlaceholder`),local:e.audiences,valueKey:`name`,selections:n,onSuggestionSelected:r,removeSelection:e=>r(e),errorStateImageUrl:null,emptyStateImageUrl:null,activationLength:0,suggestionLimit:!1,getInputTokenComponent:e=>(0,U.jsx)(Vr,{selection:{name:e.name,masterId:e.masterId},colourVariant:`teal`,onClickRemove:e=>r(e),hideExpander:!0},e.name),getSuggestionComponent:e=>Fi(`name`,e),onSuggestionDependencies:[e.audiences,t.values.studentLevel,n],getLocalSuggestions:i,focusInputOnSuggestionClick:!1,renderAsForm:!1,hideIcon:!0,onBlur:()=>t.setFieldTouched(`studentLevel`),className:`p-2 ${t.touched.studentLevel&&t.errors.studentLevel?`is-invalid`:``}`}),t.touched.studentLevel&&t.errors.studentLevel&&(0,U.jsx)(je,{name:`audiences`,children:t.errors.studentLevel})]}),(0,U.jsx)(B,{as:`textarea`,placeholder:ra(`otherPlaceholder`),label:ra(`otherLabel`),name:`additionalInfo`,value:t.values.additionalInfo})]})}function ca(e){return(0,U.jsx)(wa,{...e,initialValues:{...ia,...e.initialValues},validationSchema:oa,children:(0,U.jsx)(sa,{audiences:e.audiences})})}var la={image:`_image_1d4la_1`},ua=`shared.feedbackBeforeRequesting`,da=w.encloseNamespace(ua);function fa(e){let[t,n]=V.useState(!1);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`d-flex flex-column align-items-center my-4`,children:[(0,U.jsx)(`img`,{className:`${la.image} mb-3`,src:it.videoAlert}),(0,U.jsx)(`h4`,{className:`mb-3`,children:(0,U.jsx)(F,{namespace:ua,phrase:`beforeRequesting`})}),(0,U.jsx)(`p`,{children:(0,U.jsx)(F,{namespace:ua,phrase:`haveYouSearched`,options:{exchangeUrl:`${e.exchangeTvUrl}/exchange`}})}),e.instanceRegion===oe.UK?(0,U.jsx)(`p`,{children:(0,U.jsx)(F,{namespace:ua,phrase:`bbcArchiveRequestsNote`,options:{exchangeTvUrl:`${e.exchangeTvUrl}/tv?requestVideo=true`}})}):(0,U.jsx)(`p`,{children:(0,U.jsx)(F,{namespace:ua,phrase:`foxtelRequestsNote`,options:{exchangeTvUrl:`${e.exchangeTvUrl}/tv?requestVideo=true`}})})]}),(0,U.jsxs)(I,{children:[(0,U.jsx)(I.Checkbox,{id:`confirmExchange`,checked:t,onToggle:()=>n(!t),label:da(`exchangeCheck`)}),(0,U.jsx)(I.Cancel,{onClick:()=>e.setSelectedOption(null),text:da(`back`)}),(0,U.jsx)(I.Submit,{variant:`dark`,text:da(`continue`),disabled:!t,onClick:()=>e.setConfirmed(!0)})]})]})}var pa=`shared.feedbackRequestVideo`,Z=w.encloseNamespace(pa),Q=function(e){return e.VideosTopic=`videosTopic`,e.VideoOrSeries=`videoOrSeries`,e.YouTubeVideo=`youtubeVideo`,e}(Q||{}),ma={videoRequestType:``,topic:``,studentLevel:[],videoTitle:``,seriesName:``,producerCompany:``,websiteOrTrailer:``,additionalInfo:``,youtubeChannelLink:``,youtubeVideoLink:``},$=()=>W.string().max(mt,ht(`maxCharactersError`)),ha=W.object().shape({videoRequestType:W.string().required(Z(`videoRequestTypeRequiredError`)),topic:$().when(`videoRequestType`,{is:e=>e===Q.VideosTopic,then:$().required(Z(`topicRequiredError`)),otherwise:$().notRequired()}),studentLevel:W.array(W.string()),videoTitle:$().when([`videoRequestType`,`seriesName`],{is:(e,t)=>e===Q.VideoOrSeries&&!t,then:$().required(Z(`videoRequiredError`)),otherwise:$().notRequired()}),seriesName:$(),producerCompany:$(),websiteOrTrailer:$(),additionalInfo:gt(),youtubeChannelLink:$().when(`videoRequestType`,{is:e=>e===Q.YouTubeVideo,then:$().required(Z(`youtubeChannelLinkRequiredError`)).url(Z(`invalidUrlError`)),otherwise:$().notRequired()}),youtubeVideoLink:$().when(`videoRequestType`,{is:e=>e===Q.YouTubeVideo,then:$().required(Z(`youtubeVideoLinkRequiredError`)).url(Z(`invalidUrlError`)),otherwise:$().notRequired()})}).noUnknown();function ga(e){let t=ve(),n=t.values.studentLevel.map(t=>e.audiences?.find(e=>e.name===t))||[];function r(e){t.setFieldValue(`studentLevel`,C.addOrRemoveImmutable(t.values.studentLevel,e.name)),requestAnimationFrame(()=>t.setFieldTouched(`studentLevel`))}function i(e,t){let r=t.find(t=>t.name===e);return ki(r?``:e,t,`name`,0).filter(e=>!(n.find(t=>t.name===e.name)||e.name===r?.name))}return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(B,{as:`select`,label:Z(`videoRequestTypeLabel`),name:`videoRequestType`,value:t.values.videoRequestType,children:[(0,U.jsx)(`option`,{value:``,disabled:!0,hidden:!0,children:Z(`videoRequestTypePlaceholder`)}),(0,U.jsx)(`option`,{value:Q.VideosTopic,children:Z(`videosTopicType`)}),(0,U.jsx)(`option`,{value:Q.VideoOrSeries,children:Z(`videoOrSeriesType`)}),(0,U.jsx)(`option`,{value:Q.YouTubeVideo,children:Z(`youtubeVideoType`)})]}),t.values.videoRequestType===Q.YouTubeVideo&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(B,{placeholder:Z(`youtubeChannelLinkPlaceholder`),label:Z(`youtubeChannelLinkLabel`),name:`youtubeChannelLink`,value:t.values.youtubeChannelLink,showRequiredStar:!0}),(0,U.jsx)(B,{placeholder:Z(`youtubeVideoLinkPlaceholder`),label:Z(`youtubeVideoLinkLabel`),name:`youtubeVideoLink`,value:t.values.youtubeVideoLink,showRequiredStar:!0}),(0,U.jsx)(B,{as:`textarea`,placeholder:Z(`otherPlaceholder`),label:Z(`otherLabel`),name:`additionalInfo`,value:t.values.additionalInfo})]}),t.values.videoRequestType===Q.VideosTopic&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(B,{placeholder:Z(`videoTopicPlaceholder`),label:Z(`videoTopicLabel`),name:`topic`,value:t.values.topic,showRequiredStar:!0}),(0,U.jsxs)(`div`,{className:`form-group`,children:[(0,U.jsx)(`label`,{className:`form-label`,children:(0,U.jsx)(F,{namespace:pa,phrase:`audiencesLabel`})}),(0,U.jsx)(ta,{id:`audiences`,placeholder:Z(`audiencesPlaceholder`),local:e.audiences,valueKey:`name`,selections:n,onSuggestionSelected:r,removeSelection:e=>r(e),errorStateImageUrl:null,emptyStateImageUrl:null,activationLength:0,suggestionLimit:!1,getInputTokenComponent:e=>(0,U.jsx)(Vr,{selection:{name:e.name,masterId:e.masterId},colourVariant:`teal`,onClickRemove:e=>r(e),hideExpander:!0},e.name),getSuggestionComponent:e=>Fi(`name`,e),onSuggestionDependencies:[e.audiences,t.values.studentLevel,n],getLocalSuggestions:i,focusInputOnSuggestionClick:!1,renderAsForm:!1,hideIcon:!0,onBlur:()=>t.setFieldTouched(`studentLevel`),className:`p-2 ${t.touched.studentLevel&&t.errors.studentLevel?`is-invalid`:``}`}),t.touched.studentLevel&&t.errors.studentLevel&&(0,U.jsx)(je,{name:`audiences`,children:t.errors.studentLevel})]}),(0,U.jsx)(B,{as:`textarea`,placeholder:Z(`otherPlaceholder`),label:Z(`otherLabel`),name:`additionalInfo`,value:t.values.additionalInfo})]}),t.values.videoRequestType===Q.VideoOrSeries&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(B,{placeholder:Z(`videoTitlePlaceholder`),label:Z(`videoTitleLabel`),name:`videoTitle`,value:t.values.videoTitle}),(0,U.jsx)(B,{placeholder:Z(`seriesPlaceholder`),label:Z(`seriesLabel`),name:`seriesName`,value:t.values.seriesName}),(0,U.jsx)(B,{placeholder:Z(`companyPlaceholder`),label:Z(`companyLabel`),name:`producerCompany`,value:t.values.producerCompany}),(0,U.jsx)(B,{placeholder:Z(`videoTopicPlaceholder`),label:Z(`topicLabel`),name:`topic`,value:t.values.topic}),(0,U.jsx)(B,{placeholder:Z(`websiteOrTrailerPlaceholder`),label:Z(`websiteOrTrailerLabel`),name:`websiteOrTrailer`,value:t.values.websiteOrTrailer}),(0,U.jsx)(B,{as:`textarea`,placeholder:Z(`otherPlaceholder`),label:Z(`otherLabel`),name:`additionalInfo`,value:t.values.additionalInfo})]})]})}function _a(e){let[t,n]=V.useState(!!e.skipBeforeRequesting),r=e.hasExchangeTvProduct&&!t;return(0,U.jsxs)(wa,{...e,initialValues:{...ma,...e.initialValues},validationSchema:ha,hideButtons:e.hasExchangeTvProduct&&!t,hideCancelButton:e.skipBeforeRequesting,children:[r&&(0,U.jsx)(fa,{setConfirmed:n,setSelectedOption:e.setSelectedOption,exchangeTvUrl:e.exchangeTvUrl,instanceRegion:e.instanceRegion}),!r&&(0,U.jsx)(ga,{audiences:e.audiences})]})}var va=`shared.feedbackSuggestImprovement`,ya=w.encloseNamespace(va),ba={suggestion:``,importance:``},xa=W.object().shape({suggestion:gt().required(ht(`requiredError`)),importance:gt()}).noUnknown();function Sa(e){let t=ve();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(B,{as:`textarea`,placeholder:ya(`suggestionPlaceholder`),label:ya(`suggestionLabel`),name:`suggestion`,value:t.values.suggestion,showRequiredStar:!0}),(0,U.jsx)(B,{as:`textarea`,placeholder:ya(`whySuggestionPlaceholder`),label:ya(`whySuggestionLabel`),name:`importance`,rows:5,value:t.values.importance}),(0,U.jsxs)(`p`,{children:[(0,U.jsx)(F,{namespace:va,phrase:`contactSupport`}),`\xA0`,(0,U.jsx)(`button`,{className:`btn btn-link text-underline p-0`,onClick:()=>e.setSelectedOption(H.RAISE_ISSUE),children:(0,U.jsx)(F,{namespace:va,phrase:`raiseIssue`})})]})]})}function Ca(e){return(0,U.jsx)(wa,{...e,initialValues:{...ba,...e.initialValues},validationSchema:xa,successImageUrl:it.lightBulb,successHeading:ya(`successHeading`),successDescription:ya(`successDescription`),children:(0,U.jsx)(Sa,{setSelectedOption:e.setSelectedOption})})}function wa(e){let t=V.useRef(null);function n(n){e.setFormState(e=>({...e,...t.current?.values})),e.setSelectedOption(n)}return(0,U.jsx)(_e,{onSubmit:e.onSubmit,initialValues:e.initialValues,validationSchema:e.validationSchema,validateOnMount:!0,innerRef:t,children:(0,U.jsxs)(he,{children:[e.formStage===`form`&&e.children,(0,U.jsx)(ft,{formStage:e.formStage,successImageUrl:e.successImageUrl,successHeading:e.successHeading,successDescription:e.successDescription}),!e.hideButtons&&(0,U.jsx)(lt,{setSelectedOption:n,submitText:e.submitText,formStage:e.formStage,closePopup:e.closePopup,hideCancelButton:e.hideCancelButton})]})})}function Ta(e){let t={formStage:e.formStage,initialValues:e.initialValues,setFormState:e.setFormState,onSubmit:e.onSubmit,setSelectedOption:e.setSelectedOption,closePopup:e.closePopup};switch(e.selectedOption){case H.SUGGEST_IMPROVEMENT:return(0,U.jsx)(Ca,{...t});case H.REPORT_BUG:return(0,U.jsx)(kr,{...t,onFilesAdded:e.onFilesAdded,cancelUpload:e.cancelUpload,uploadingFiles:e.uploadingFiles,uploadedFiles:e.uploadedFiles,deleteFile:e.deleteFile,uploadError:e.uploadError,instanceRegion:e.instanceRegion});case H.REQUEST_VIDEO:return(0,U.jsx)(_a,{...t,audiences:e.audiences,hasExchangeTvProduct:e.hasExchangeTvProduct,exchangeTvUrl:e.exchangeTvUrl,instanceRegion:e.instanceRegion,skipBeforeRequesting:e.skipBeforeRequesting,hideCancelButton:e.hideCancelButton});case H.REQUEST_LIVESTREAM:return(0,U.jsx)(ca,{...t,audiences:e.audiences});case H.RAISE_ISSUE:return(0,U.jsx)(jt,{...t});case H.GIVE_PRAISE:return(0,U.jsx)(xt,{...t});case H.OTHER:return(0,U.jsx)(Et,{...t})}}var Ea=`shared.giveFeedback`,Da=w.encloseNamespace(Ea),Oa=5,ka=60,Aa=1e6;function ja(e){let t=Se(),n=y(),r=b(k.currentUser()),a=b(r.data&&ue.customer(r.data.customerId)),c=b(r.data&&k.user(r.data.id)),[l,p]=V.useState(e.selectedOption),[m,h]=V.useState(`form`),[g,_]=V.useState(null),v=xe(O.MixedMediaUpload),x=Ye(()=>v.getCollection(),null),S=V.useRef(null),C=V.useRef(0),w=V.useRef([]),[T,E]=V.useState([]),[D,A]=V.useState(``),j=e.product===se.StreamableLearning?He.StreamableLearning:He.Subject,M=b(qe.presentation(j)),N=b(Ue.presentationAudiences(j)),P=b(ae.userProducts()).data?.find(e=>e.id===se.Exchange);ie(Be.default.channel(te.MIXED_MEDIA_UPLOAD),ne.UPLOAD_COMPLETE,I),Qe();function ee(e,t){if(e.some(e=>e.size>ka*Aa)){A(Da(`maxFileSizeUploadError`,{limit:ka}));return}if(e.length>Oa-x.length){A(Da(`maxFilesUploadError`,{limit:Oa}));return}if(e.some(e=>!ze.default.isValidFile(e,de.MIXED_MEDIA))){A(Da(`invalidTypeUploadError`));return}A(``),C.current+=e.length,t&&(S.current=t),v.addFiles(e)}function I(e){let n=e.toJSON();if(w.current.push(n),C.current--,C.current>0)return;let r=w.current.length;w.current.forEach(e=>{setTimeout(()=>{r--;let n=v.getCollection().filter(t=>t.get(`fileInfo`)?.id===e.fileInfo.id);v.getCollection().remove(n),E(e=>[...e,...n]),!(r>0)&&(d.logUserAction({fileInfo:e.fileInfo},{location:s.GiveFeedbackPopup,actionType:o.Upload,entity:u.MixedMedia,descriptor:d.mapInteractionType(S.current)}),t.success(Da(`mixedMediaUploadSuccess`)))})}),w.current=[]}function oe(e){E(t=>t.filter(t=>t.id!==e))}function ce(e){p(e),e&&d.logUserAction({type:e},{actionType:o.Click,entity:u.Feedback,location:s.GiveFeedbackPopup,workflowPhase:i.Start})}function L(e){switch(e){case H.SUGGEST_IMPROVEMENT:return Ve.SuggestImprovement;case H.REPORT_BUG:return Ve.ReportBug;case H.REQUEST_VIDEO:return Ve.RequestVideo;case H.REQUEST_LIVESTREAM:return Ve.RequestLivestream;case H.GIVE_PRAISE:return Ve.GivePraise;case H.RAISE_ISSUE:return Ve.RaiseIssue;case H.OTHER:return Ve.Other}}async function le(p,m){let g={type:L(l),user:tt.getUserInfo(r.data,a.data),tags:tt.getTags(r.data,e.product,!1,[`give feedback`,rt(l).toLowerCase(),M.data?.description?.toLowerCase().trim(),c.data?.userProfile?.metadata?.jobTitle?.toLowerCase()].filter(Boolean))},_={...p,currentPageUrl:f.GetCurrentUrl()};l===H.REPORT_BUG&&T.length&&(_={..._,...tt.categorizeFiles(T)});try{await n(Je.submitFeedback(g,_)),d.logUserAction({...g,..._},{actionType:o.Submit,entity:u.Feedback,location:s.GiveFeedbackPopup,workflowPhase:i.Complete}),h(`success`)}catch{t.error(Da(`error`))}finally{m()}}return(0,U.jsxs)(re,{size:`lg`,title:l?rt(l):Da(`title`),closePopup:e.closePopup,backdrop:`static`,children:[!l&&(0,U.jsx)(`p`,{children:(0,U.jsx)(F,{namespace:Ea,phrase:`description`})}),!l&&(0,U.jsx)(st,{onSelectOption:ce,options:[H.SUGGEST_IMPROVEMENT,H.REPORT_BUG,e.product===se.StreamableLearning?H.REQUEST_LIVESTREAM:H.REQUEST_VIDEO,H.GIVE_PRAISE,H.RAISE_ISSUE,H.OTHER]}),l&&(0,U.jsx)(Ta,{selectedOption:l,formStage:m,onSubmit:le,setSelectedOption:ce,closePopup:e.closePopup,onFilesAdded:ee,uploadingFiles:x,uploadedFiles:T,deleteFile:oe,cancelUpload:e=>v.cancelUpload(e),audiences:N.data,uploadError:D,initialValues:g,setFormState:_,instanceRegion:r.data?.instanceRegion,hasExchangeTvProduct:!!P,exchangeTvUrl:P?.url,skipBeforeRequesting:!!e.skipBeforeRequestingVideoStep,hideCancelButton:!!e.selectedOption})]})}export{ja as GiveFeedbackView};
|
|
7
|
-
//# sourceMappingURL=
|
|
7
|
+
//# sourceMappingURL=pOL5_XNC.chunk.js.map
|