@clickview/exchange 0.43.1-dev.0 → 0.43.1-dev.2
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/bundles.json +4 -0
- package/dist/css/137-exchange-8c1b8716b3.chunk.css +25 -0
- package/dist/css/212-exchange-d71527fc65.chunk.css +1 -0
- package/dist/css/226-exchange-9ab9f14b3c.chunk.css +57 -0
- package/dist/css/291-exchange-be9d9f0cdb.chunk.css +11 -0
- package/dist/css/298-exchange-78ece5c7c5.chunk.css +37 -0
- package/dist/css/332-exchange-e4754ae27a.chunk.css +1 -0
- package/dist/css/489-exchange-6ecb1e7adc.chunk.css +85 -0
- package/dist/css/494-exchange-02d7a0249c.chunk.css +2 -0
- package/dist/css/522-exchange-1387f35e92.chunk.css +14 -0
- package/dist/css/538-exchange-4cbfe56ba3.chunk.css +1 -0
- package/dist/css/589-exchange-fa098d9131.chunk.css +11 -0
- package/dist/css/611-exchange-cbf2bb5621.chunk.css +5 -0
- package/dist/css/669-exchange-e80e6c6649.chunk.css +10 -0
- package/dist/css/68-exchange-b5eaf8af44.chunk.css +35 -0
- package/dist/css/75-exchange-6d2304419c.chunk.css +5 -0
- package/dist/css/759-exchange-23bb5dd175.chunk.css +8 -0
- package/dist/css/858-exchange-06944bdfa4.chunk.css +1 -0
- package/dist/css/904-exchange-0eab318199.chunk.css +40 -0
- package/dist/css/95-exchange-4cbfe56ba3.chunk.css +1 -0
- package/dist/css/lite-exchange-ed6bd260c5.css +14 -0
- package/dist/languages/en.json +1 -0
- package/dist/scripts/117-259130ac0e-exchange.chunk.js +1 -0
- package/dist/scripts/127-4a3c8f9725-exchange.chunk.js +1 -0
- package/dist/scripts/136-fd99ef4c9d-exchange.chunk.js +2 -0
- package/dist/scripts/136-fd99ef4c9d-exchange.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/137-51b4dab452-exchange.chunk.js +1 -0
- package/dist/scripts/156-7e4d78c20a-exchange.chunk.js +1 -0
- package/dist/scripts/170-9db7c3b12e-exchange.chunk.js +1 -0
- package/dist/scripts/173-3668db114a-exchange.chunk.js +1 -0
- package/dist/scripts/212-6ed71b2797-exchange.chunk.js +1 -0
- package/dist/scripts/226-889bef8e6c-exchange.chunk.js +1 -0
- package/dist/scripts/267-7daf64f8a1-exchange.chunk.js +1 -0
- package/dist/scripts/291-7e85a6e844-exchange.chunk.js +1 -0
- package/dist/scripts/298-ed8e8b8328-exchange.chunk.js +1 -0
- package/dist/scripts/312-69afcbbc39-exchange.chunk.js +1 -0
- package/dist/scripts/325-76baea117f-exchange.chunk.js +1 -0
- package/dist/scripts/332-08d48debc2-exchange.chunk.js +1 -0
- package/dist/scripts/414-567e121c75-exchange.chunk.js +2 -0
- package/dist/scripts/414-567e121c75-exchange.chunk.js.LICENSE.txt +60 -0
- package/dist/scripts/442-fcba36183d-exchange.chunk.js +1 -0
- package/dist/scripts/455-ceeb969c54-exchange.chunk.js +1 -0
- package/dist/scripts/484-08c82c5a88-exchange.chunk.js +1 -0
- package/dist/scripts/489-8b40fa92cc-exchange.chunk.js +2 -0
- package/dist/scripts/489-8b40fa92cc-exchange.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/494-abba46b945-exchange.chunk.js +2 -0
- package/dist/scripts/494-abba46b945-exchange.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/507-b6e119c8e2-exchange.chunk.js +1 -0
- package/dist/scripts/522-cb18547130-exchange.chunk.js +2 -0
- package/dist/scripts/522-cb18547130-exchange.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/536-b915864d5f-exchange.chunk.js +1 -0
- package/dist/scripts/538-ccc01a623f-exchange.chunk.js +2 -0
- package/dist/scripts/538-ccc01a623f-exchange.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/558-1bdbbc1f64-exchange.chunk.js +1 -0
- package/dist/scripts/589-17d73ab116-exchange.chunk.js +1 -0
- package/dist/scripts/601-a3c22b0a9f-exchange.chunk.js +1 -0
- package/dist/scripts/611-d8bd3e98dc-exchange.chunk.js +1 -0
- package/dist/scripts/619-1abac6cb1d-exchange.chunk.js +1 -0
- package/dist/scripts/648-485af12c37-exchange.chunk.js +1 -0
- package/dist/scripts/659-d08f206e1d-exchange.chunk.js +1 -0
- package/dist/scripts/669-a49a0838ff-exchange.chunk.js +1 -0
- package/dist/scripts/68-d0da8f3bd8-exchange.chunk.js +1 -0
- package/dist/scripts/725-9ddf1084b6-exchange.chunk.js +1 -0
- package/dist/scripts/726-868a877381-exchange.chunk.js +1 -0
- package/dist/scripts/75-9780e4300e-exchange.chunk.js +1 -0
- package/dist/scripts/759-f1a9db4868-exchange.chunk.js +1 -0
- package/dist/scripts/782-2c340d8404-exchange.chunk.js +1 -0
- package/dist/scripts/831-8808647fc7-exchange.chunk.js +1 -0
- package/dist/scripts/851-61f77ce4aa-exchange.chunk.js +2 -0
- package/dist/scripts/851-61f77ce4aa-exchange.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/858-70085ed3b1-exchange.chunk.js +1 -0
- package/dist/scripts/866-14ce8a3a4d-exchange.chunk.js +1 -0
- package/dist/scripts/87-d569a1463e-exchange.chunk.js +1 -0
- package/dist/scripts/877-5b357aeb63-exchange.chunk.js +1 -0
- package/dist/scripts/904-bd1dfd39e0-exchange.chunk.js +1 -0
- package/dist/scripts/925-f70ee1c7f9-exchange.chunk.js +1 -0
- package/dist/scripts/937-2e1f1f330e-exchange.chunk.js +1 -0
- package/dist/scripts/95-841a847f54-exchange.chunk.js +2 -0
- package/dist/scripts/95-841a847f54-exchange.chunk.js.LICENSE.txt +1 -0
- package/dist/scripts/bundle-7065b184e2.min.js +2 -0
- package/dist/scripts/bundle-7065b184e2.min.js.LICENSE.txt +108 -0
- package/package.json +3 -12
- package/typings/utils/imports.d.ts +1 -1
- package/dist/Actions-BtMRNMuv.cjs +0 -1
- package/dist/Actions-DfeKDy3k.js +0 -178
- package/dist/AddToLibraryView-BoCLtcWV.js +0 -508
- package/dist/AddToLibraryView-MpkcVgoR.cjs +0 -1
- package/dist/Badge-3MW5GacP.cjs +0 -1
- package/dist/Badge-Ddz0Il5v.js +0 -326
- package/dist/BadgeListContainer-CqwUuWKL.js +0 -19
- package/dist/BadgeListContainer-DLrBuDpU.cjs +0 -1
- package/dist/ButtonGroup-C-z2yWvb.cjs +0 -1
- package/dist/ButtonGroup-zaxEq7ZK.js +0 -24
- package/dist/Caret-Cpx0uvJ0.js +0 -36
- package/dist/Caret-Dgjy7YHO.cjs +0 -1
- package/dist/ChevronDownSvg-BI6xUNrZ.cjs +0 -1
- package/dist/ChevronDownSvg-BfijmId7.js +0 -13
- package/dist/ClassNameHelper-aJ0BDnVo.js +0 -29
- package/dist/ClassNameHelper-n4BHW-GR.cjs +0 -1
- package/dist/CloseSvg-2PKjla1T.js +0 -13
- package/dist/CloseSvg-B7rizkGp.cjs +0 -1
- package/dist/CurationStatus-BGjsO3l8.cjs +0 -1
- package/dist/CurationStatus-DZn3C9Qe.js +0 -4
- package/dist/DevErrorView-Bg1Ufy6-.js +0 -79
- package/dist/DevErrorView-CpXfV0V4.cjs +0 -1
- package/dist/DialogView-B5FEh3e8.cjs +0 -1
- package/dist/DialogView-RcNOylD7.js +0 -22
- package/dist/DownloadHelper-ChKHN-Le.cjs +0 -1
- package/dist/DownloadHelper-dL46n0Kq.js +0 -32
- package/dist/DownloadVideoView-CvDFi8HI.cjs +0 -1
- package/dist/DownloadVideoView-HSnwAYLp.js +0 -32
- package/dist/DragDropMoveWrapper-B_dy7ady.cjs +0 -1
- package/dist/DragDropMoveWrapper-TdzJqiqv.js +0 -462
- package/dist/ExchangeAddView-BRLjRe3p.js +0 -63
- package/dist/ExchangeAddView-CWfp5W52.cjs +0 -1
- package/dist/ExchangeFolderView-4ArEcQvn.js +0 -159
- package/dist/ExchangeFolderView-_ldS0uwf.cjs +0 -1
- package/dist/ExchangeMostRecentView-BMAosIXz.js +0 -61
- package/dist/ExchangeMostRecentView-s1iLfclz.cjs +0 -1
- package/dist/ExchangeNotFoundView-C_dtuc6J.cjs +0 -1
- package/dist/ExchangeNotFoundView-Cb-rmQH1.js +0 -7
- package/dist/ExchangePreviewView-hztBChIE.js +0 -82
- package/dist/ExchangePreviewView-kjDv-uqf.cjs +0 -1
- package/dist/ExchangeRequests-B3wRfv5Y.cjs +0 -1
- package/dist/ExchangeRequests-DV7BD3HZ.js +0 -115
- package/dist/ExchangeSearchBar-CNtU_swT.js +0 -32
- package/dist/ExchangeSearchBar-Ci1_Sc2S.cjs +0 -1
- package/dist/ExchangeSearchResultsView-CEueb9Li.js +0 -1641
- package/dist/ExchangeSearchResultsView-CGSIyjiV.cjs +0 -2
- package/dist/ExchangeSeriesView-BGBgwgMW.cjs +0 -1
- package/dist/ExchangeSeriesView-DMr_mCAH.js +0 -143
- package/dist/ExchangeSuggestEditView-B3P-nGFE.js +0 -307
- package/dist/ExchangeSuggestEditView-D1m5Z20N.cjs +0 -1
- package/dist/ExchangeTabs-CrA22PjN.js +0 -46
- package/dist/ExchangeTabs-KgrROs1d.cjs +0 -1
- package/dist/ExchangeUtils-BRDE3b9w.cjs +0 -1
- package/dist/ExchangeUtils-CCCrn5oQ.js +0 -65
- package/dist/ExchangeView-Cui4zZ4D.js +0 -30
- package/dist/ExchangeView-Dql8pHzi.cjs +0 -1
- package/dist/FormButtons-CDOsf9A-.cjs +0 -1
- package/dist/FormButtons-fQkvwYsy.js +0 -20
- package/dist/FormFeedback-5Dd3bMCl.js +0 -7
- package/dist/FormFeedback-BU7vSBqB.cjs +0 -1
- package/dist/FormField-Cb2l2GMO.cjs +0 -5
- package/dist/FormField-DYeERWxm.js +0 -3353
- package/dist/GiveFeedbackView-0tH6h1s3.js +0 -5436
- package/dist/GiveFeedbackView-DirGDc2a.cjs +0 -7
- package/dist/GroupSvg-BmwXO6yT.js +0 -53
- package/dist/GroupSvg-DVAq4iNX.cjs +0 -1
- package/dist/HardCoded-25AFj2sZ.js +0 -51
- package/dist/HardCoded-BbbeCQNt.cjs +0 -1
- package/dist/HttpErrorHandlers-CBhvfsvb.cjs +0 -1
- package/dist/HttpErrorHandlers-DKqNIMOg.js +0 -76
- package/dist/IconCircle-BVHFUBGt.cjs +0 -1
- package/dist/IconCircle-CxFLsbLY.js +0 -26
- package/dist/InstanceRegion-C7aJEkFV.cjs +0 -1
- package/dist/InstanceRegion-DQlzs4EK.js +0 -4
- package/dist/LazyImage-DBQklqeJ.js +0 -163
- package/dist/LazyImage-lv36coda.cjs +0 -1
- package/dist/LibraryRequests-BHAZPSUw.js +0 -186
- package/dist/LibraryRequests-DKCsJHbr.cjs +0 -1
- package/dist/LinkifyHelper-DPHYATPc.js +0 -925
- package/dist/LinkifyHelper-EOfbsqdi.cjs +0 -4
- package/dist/MasterTypeHelper-Y_SDsEUF.cjs +0 -1
- package/dist/MasterTypeHelper-uSKy6GZd.js +0 -16
- package/dist/MediaQueries-9caJ2eG6.js +0 -4
- package/dist/MediaQueries-CE9Kbs0e.cjs +0 -1
- package/dist/PartialLoadingHelper-D42uOdDd.cjs +0 -1
- package/dist/PartialLoadingHelper-DIas6hnM.js +0 -29
- package/dist/PermissionFilterOption-B-QrMVdA.js +0 -4
- package/dist/PermissionFilterOption-BIA__Q_O.cjs +0 -1
- package/dist/PillTabSelector-B5V2rqf0.js +0 -64
- package/dist/PillTabSelector-yR52s5ix.cjs +0 -14
- package/dist/PreviewVideoDetails-BQ0lYYbK.cjs +0 -362
- package/dist/PreviewVideoDetails-DJXB4vV3.js +0 -68337
- package/dist/ProgramType-DHk-SlRZ.cjs +0 -1
- package/dist/ProgramType-FpE5cuZV.js +0 -60
- package/dist/RatingRequests-BNPZAxXm.cjs +0 -1
- package/dist/RatingRequests-Dr3w3-z8.js +0 -11
- package/dist/RedirectView-BK8yU-PU.js +0 -22
- package/dist/RedirectView-OEJhJrvf.cjs +0 -1
- package/dist/RestrictionHelper-BSceJYz-.js +0 -112
- package/dist/RestrictionHelper-C5u_CmoL.cjs +0 -1
- package/dist/ScrollHelper-Dg7bDIH7.js +0 -10
- package/dist/ScrollHelper-ESsjtyv8.cjs +0 -1
- package/dist/SearchFilters-C_yEnumc.js +0 -3046
- package/dist/SearchFilters-D3fLjseM.cjs +0 -1
- package/dist/SearchSvg-BB6oXs1v.js +0 -13
- package/dist/SearchSvg-BU6G1Fs0.cjs +0 -1
- package/dist/SharedSearchHelper-BuVD-GvT.js +0 -159
- package/dist/SharedSearchHelper-D5GJJwW7.cjs +0 -1
- package/dist/TagItem-BBc3HmnI.cjs +0 -1
- package/dist/TagItem-BFnSikAz.js +0 -1125
- package/dist/TvAdFreeBadge-BDFn2ujd.js +0 -11
- package/dist/TvAdFreeBadge-X2iSf6B3.cjs +0 -1
- package/dist/TvAdFreeRequestView-CEAvozfO.js +0 -46
- package/dist/TvAdFreeRequestView-DgnMCKX4.cjs +0 -1
- package/dist/TvAddView-Bv12wfX7.js +0 -276
- package/dist/TvAddView-CA7Yappn.cjs +0 -1
- package/dist/TvAlreadyAddedView-C240rLQ7.js +0 -56
- package/dist/TvAlreadyAddedView-X4KElzJA.cjs +0 -1
- package/dist/TvBroadcastContentView-DizJHvTQ.js +0 -52
- package/dist/TvBroadcastContentView-g8i0Cy-k.cjs +0 -1
- package/dist/TvChannelBadge-B4a1wkQI.cjs +0 -1
- package/dist/TvChannelBadge-Doqs12s9.js +0 -11
- package/dist/TvChannelView-CSn0VleL.js +0 -177
- package/dist/TvChannelView-Ds_F3Mmp.cjs +0 -1
- package/dist/TvChannelsView-CM_T5E3j.js +0 -171
- package/dist/TvChannelsView-r3NO_BRv.cjs +0 -1
- package/dist/TvGuideView-B8vS-8lS.cjs +0 -1
- package/dist/TvGuideView-BLlQJiZ3.js +0 -54
- package/dist/TvHomeView-C_h4DZw_.cjs +0 -1
- package/dist/TvHomeView-CbNg8AyI.js +0 -15
- package/dist/TvPreviewView-DhXD3H__.js +0 -114
- package/dist/TvPreviewView-hGq7_Bzs.cjs +0 -1
- package/dist/TvProgramTimeBadge-BtQKNLz2.js +0 -18
- package/dist/TvProgramTimeBadge-DPJu73xG.cjs +0 -1
- package/dist/TvProgramsView-Ba9VPnEh.cjs +0 -1
- package/dist/TvProgramsView-DO4WnPJx.js +0 -223
- package/dist/TvRadioDownloadView-ByABG_YW.js +0 -41
- package/dist/TvRadioDownloadView-CitV60kZ.cjs +0 -1
- package/dist/TvRequestProgramView-CYc5nAEt.cjs +0 -1
- package/dist/TvRequestProgramView-Dm5Bra4d.js +0 -267
- package/dist/TvRequests-Bcy68aT5.js +0 -227
- package/dist/TvRequests-l_Xv-rcr.cjs +0 -1
- package/dist/TvSearchBar-5J6420z2.cjs +0 -1
- package/dist/TvSearchBar-KZqcg7G0.js +0 -95
- package/dist/TvSearchResultsView-BTONTtMg.cjs +0 -1
- package/dist/TvSearchResultsView-CMsq8ehS.js +0 -212
- package/dist/TvTabs-CrQVKuod.js +0 -88
- package/dist/TvTabs-JuCI2Ea7.cjs +0 -1
- package/dist/TypeHelper-Dt2Y9Wc4.js +0 -14
- package/dist/TypeHelper-Z2rqPzup.cjs +0 -1
- package/dist/UseAlerts-B2BbQeN3.js +0 -39
- package/dist/UseAlerts-pIg83NsO.cjs +0 -1
- package/dist/UseFetchAll-BaDVJFdj.cjs +0 -1
- package/dist/UseFetchAll-DYGA8s5a.js +0 -147
- package/dist/UseGetMediaQueryString-BLeJTZt2.cjs +0 -1
- package/dist/UseGetMediaQueryString-Dc_jP0rr.js +0 -226
- package/dist/UseHandleDialogError-BJHsOnKn.js +0 -9
- package/dist/UseHandleDialogError-PbyWsVaT.cjs +0 -1
- package/dist/UseHandleObjectError-CBFN1Ill.cjs +0 -1
- package/dist/UseHandleObjectError-DAhDbPEo.js +0 -16
- package/dist/UseHover-CLOLtbUV.cjs +0 -1
- package/dist/UseHover-Cc_d5rRf.js +0 -85
- package/dist/UseSelectAllPages-04737Rdu.cjs +0 -1
- package/dist/UseSelectAllPages-Cnk3MEAt.js +0 -149
- package/dist/VideoHelper-3AKe5Jyy.js +0 -477
- package/dist/VideoHelper-BQ7rWUw0.cjs +0 -1
- package/dist/VideoList-SNG1hmoL.cjs +0 -49
- package/dist/VideoList-s7lvSqSs.js +0 -2622
- package/dist/VideoRequests-CpDXl7E_.cjs +0 -1
- package/dist/VideoRequests-DlUeYLjl.js +0 -225
- package/dist/VideoSortSelect-3JfrvPfj.cjs +0 -1
- package/dist/VideoSortSelect-DS9Uvc-S.js +0 -116
- package/dist/VisibleOnSvg-BisjF586.cjs +0 -1
- package/dist/VisibleOnSvg-WDCQPPvV.js +0 -33
- package/dist/app-2U039aX_.js +0 -67680
- package/dist/app-DcIbciDa.cjs +0 -454
- package/dist/app.js +0 -1
- package/dist/en.json +0 -1
- package/dist/exchange.css +0 -1
- package/dist/getRegionInfo-B_h_jjAy.js +0 -31
- package/dist/getRegionInfo-Bs5JKG7h.cjs +0 -1
- package/dist/index-CGkY5YVS.cjs +0 -1
- package/dist/index-DUgR-v-j.js +0 -885
- package/dist/toLocalTime-Bt8Uy4Kq.js +0 -15
- package/dist/toLocalTime-DF9SIfIt.cjs +0 -1
- package/dist/useBreakpoints-37V489ap.js +0 -66
- package/dist/useBreakpoints-B-bcgx-L.cjs +0 -1
- package/dist/useGetExchangeActions-BwXrBSH-.cjs +0 -1
- package/dist/useGetExchangeActions-C8Y1FNSl.js +0 -176
- package/dist/useGetTvActions-CmEBdHbw.cjs +0 -1
- package/dist/useGetTvActions-DENrO3wZ.js +0 -54
- package/dist/useHandleRegionError-BNRrs6y8.cjs +0 -1
- package/dist/useHandleRegionError-BNxhNPKP.js +0 -10
- package/dist/usePreviewContext--ihfEi4P.js +0 -14
- package/dist/usePreviewContext-DjpFhe3I.cjs +0 -1
- package/dist/useSelectedRegion-7_2s4QQF.js +0 -16
- package/dist/useSelectedRegion-D3Xsu2Ut.cjs +0 -1
- package/dist/useVerifiedEmailRequiredErrorHandler-CSkvs-EW.cjs +0 -1
- package/dist/useVerifiedEmailRequiredErrorHandler-DFLs3cQc.js +0 -57
- package/vite-i18n-plugin.ts +0 -113
- package/vite.config.ts +0 -59
|
@@ -1,3046 +0,0 @@
|
|
|
1
|
-
import { j as i, w as ge, B as b, r as C, aJ as he, c as D, aS as St, aT as ae, R as N, J as lt, L as V, N as w, G as Ee, v as Me, O as jt, I as Ct, Y as kt, q as It, aD as Dt, a4 as Ge, aU as wt, M as Tt, ay as Nt, aV as P, aW as U, aX as Ft, a9 as Ce, ad as _t, aa as Ot, X as le, ae as Rt, A as dt, F as ve, aC as $e, Q as Lt, aL as Et, ai as $t } from "./app-2U039aX_.js";
|
|
2
|
-
import { F as Pt, c as Ve } from "./ClassNameHelper-aJ0BDnVo.js";
|
|
3
|
-
import { C as ke, G as Ut, a as Mt } from "./UseGetMediaQueryString-Dc_jP0rr.js";
|
|
4
|
-
import { u as Gt } from "./UseHover-Cc_d5rRf.js";
|
|
5
|
-
import { B as Vt } from "./ButtonGroup-zaxEq7ZK.js";
|
|
6
|
-
import { S as J, F as Yt, C as Ht, T as Wt, s as zt, W as Qt, b as Ie, c as Xt } from "./TagItem-BFnSikAz.js";
|
|
7
|
-
import { M as ee } from "./Badge-Ddz0Il5v.js";
|
|
8
|
-
import { u as Bt } from "./UseAlerts-B2BbQeN3.js";
|
|
9
|
-
import { D as Ye, G as Kt, E as He, C as Zt } from "./GroupSvg-BmwXO6yT.js";
|
|
10
|
-
import { a as ut } from "./SharedSearchHelper-BuVD-GvT.js";
|
|
11
|
-
import { C as qt, P as Jt } from "./PartialLoadingHelper-DIas6hnM.js";
|
|
12
|
-
import { u as en } from "./LazyImage-DBQklqeJ.js";
|
|
13
|
-
import { M as De } from "./MediaQueries-9caJ2eG6.js";
|
|
14
|
-
var S = /* @__PURE__ */ ((e) => (e.Holiday = "Holiday", e.SportingEvent = "SportingEvent", e.Observance = "Observance", e.NaturalDisaster = "NaturalDisaster", e.HistoricalEvent = "HistoricalEvent", e.BreakingNews = "BreakingNews", e.Informal = "Informal", e.ReligiousEvent = "ReligiousEvent", e.Livestream = "Livestream", e.Other = "Other", e))(S || {});
|
|
15
|
-
const xe = ["video", "clip", "interactive"], me = ["playlist", "series", "clip", "classification", "interactive", "video", "company", "category"], pe = ["user"], We = "search.filterActions";
|
|
16
|
-
Pe.defaultProps = {
|
|
17
|
-
active: !1,
|
|
18
|
-
className: ""
|
|
19
|
-
};
|
|
20
|
-
function Pe(e) {
|
|
21
|
-
return /* @__PURE__ */ i.jsxs("div", { className: `d-flex justify-content-between ${e.className}`, children: [
|
|
22
|
-
e.active ? /* @__PURE__ */ i.jsx(ge, { className: "text-secondary hover-text-underline cursor-pointer", onClick: e.onClickReset, children: /* @__PURE__ */ i.jsx(b, { namespace: We, phrase: "reset" }) }) : /* @__PURE__ */ i.jsx("div", { className: "invisible" }),
|
|
23
|
-
/* @__PURE__ */ i.jsx(ge, { className: "info-link", onClick: e.onClickApply, children: /* @__PURE__ */ i.jsx(b, { namespace: We, phrase: "apply" }) })
|
|
24
|
-
] });
|
|
25
|
-
}
|
|
26
|
-
const de = C.createContext(null);
|
|
27
|
-
function tn(e, t) {
|
|
28
|
-
switch (t.type) {
|
|
29
|
-
case "update":
|
|
30
|
-
return t.payload;
|
|
31
|
-
default:
|
|
32
|
-
return e;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function re(e) {
|
|
36
|
-
return /* @__PURE__ */ i.jsx("label", { htmlFor: e.id, className: "mb-0", children: /* @__PURE__ */ i.jsx("h3", { className: "h6 mb-2", children: e.title }) });
|
|
37
|
-
}
|
|
38
|
-
function mt(e) {
|
|
39
|
-
const t = e.draftState.selection;
|
|
40
|
-
function n(a, o) {
|
|
41
|
-
if (o) {
|
|
42
|
-
let r = -1;
|
|
43
|
-
t.find((u, g) => {
|
|
44
|
-
r > -1 || u.id.toString() === a.id.toString() && (r = g);
|
|
45
|
-
});
|
|
46
|
-
const l = [...t.slice(0, r), ...t.slice(r + 1)];
|
|
47
|
-
e.setDraftState({ active: !!l.length, selection: l });
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
const c = [...t];
|
|
51
|
-
c.push(a), e.setDraftState({
|
|
52
|
-
active: !!c.length,
|
|
53
|
-
selection: c
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
const s = e.options.map((a) => {
|
|
57
|
-
const o = e.filter.disabled || a.disabled, c = !!e.draftState.selection.find((l) => l.id.toString() === a.id.toString()), r = Array.isArray(a.id) ? a.id.join("_") : a.id;
|
|
58
|
-
return /* @__PURE__ */ i.jsx("li", { className: `my-1 ${e.displayOptionsIn2Columns ? "col-md-6 col-12" : ""}`, children: /* @__PURE__ */ i.jsx(
|
|
59
|
-
ke,
|
|
60
|
-
{
|
|
61
|
-
label: a.name,
|
|
62
|
-
name: r,
|
|
63
|
-
id: r,
|
|
64
|
-
onChange: () => n(a, c),
|
|
65
|
-
checked: !o && c,
|
|
66
|
-
isLabelEllipsis: e.displayOptionsIn2Columns,
|
|
67
|
-
disabled: o
|
|
68
|
-
}
|
|
69
|
-
) }, r);
|
|
70
|
-
});
|
|
71
|
-
return /* @__PURE__ */ i.jsx("ul", { className: `list-unstyled ${e.displayOptionsIn2Columns ? "d-flex flex-wrap" : ""}`, children: s });
|
|
72
|
-
}
|
|
73
|
-
function nn(e) {
|
|
74
|
-
const t = j.displayTwoColumns(e.filter);
|
|
75
|
-
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
76
|
-
/* @__PURE__ */ i.jsx(re, { title: e.filter.name }),
|
|
77
|
-
/* @__PURE__ */ i.jsx(he, { className: "mb-3", children: /* @__PURE__ */ i.jsx(
|
|
78
|
-
mt,
|
|
79
|
-
{
|
|
80
|
-
displayOptionsIn2Columns: t,
|
|
81
|
-
options: e.filter.options,
|
|
82
|
-
filter: e.filter,
|
|
83
|
-
draftState: e.draftState,
|
|
84
|
-
setDraftState: e.setDraftState
|
|
85
|
-
}
|
|
86
|
-
) })
|
|
87
|
-
] });
|
|
88
|
-
}
|
|
89
|
-
function sn(e) {
|
|
90
|
-
var n;
|
|
91
|
-
const t = [];
|
|
92
|
-
for (const s of e.filter.options) {
|
|
93
|
-
const a = e.filter.disabled || s.disabled, o = (n = e.draftState.selection) == null ? void 0 : n.find((g) => (g == null ? void 0 : g.id) === s.id), c = s.secondLayerOptions ?? [], r = an(o, c), l = !r && !!o;
|
|
94
|
-
t.push(
|
|
95
|
-
/* @__PURE__ */ i.jsx(
|
|
96
|
-
ke,
|
|
97
|
-
{
|
|
98
|
-
label: s.name,
|
|
99
|
-
name: s.id,
|
|
100
|
-
id: s.id,
|
|
101
|
-
indeterminate: r,
|
|
102
|
-
onChange: () => e.onToggleItem(s, l || r),
|
|
103
|
-
checked: !a && l,
|
|
104
|
-
className: "my-1",
|
|
105
|
-
disabled: a
|
|
106
|
-
},
|
|
107
|
-
s.id
|
|
108
|
-
)
|
|
109
|
-
), j.hasManyFilterOptions(c) && t.push(
|
|
110
|
-
...c.map((g) => {
|
|
111
|
-
var v;
|
|
112
|
-
const m = a || g.disabled, h = !!((v = o == null ? void 0 : o.secondLayerSelection) != null && v.find((A) => A.id === g.id));
|
|
113
|
-
return /* @__PURE__ */ i.jsx(
|
|
114
|
-
ke,
|
|
115
|
-
{
|
|
116
|
-
label: g.name,
|
|
117
|
-
name: g.id,
|
|
118
|
-
id: g.id,
|
|
119
|
-
onChange: () => e.onToggleChildItem(g, h, s),
|
|
120
|
-
checked: !m && h,
|
|
121
|
-
className: "my-1 ms-3",
|
|
122
|
-
disabled: m
|
|
123
|
-
},
|
|
124
|
-
g.id
|
|
125
|
-
);
|
|
126
|
-
})
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
return /* @__PURE__ */ i.jsx(i.Fragment, { children: t });
|
|
130
|
-
}
|
|
131
|
-
function an(e, t) {
|
|
132
|
-
var a, o;
|
|
133
|
-
const n = ((a = e == null ? void 0 : e.secondLayerSelection) == null ? void 0 : a.length) > 0, s = ((o = e == null ? void 0 : e.secondLayerSelection) == null ? void 0 : o.length) === t.length;
|
|
134
|
-
return n && !s;
|
|
135
|
-
}
|
|
136
|
-
function rn(e) {
|
|
137
|
-
var t;
|
|
138
|
-
for (const n of e.filter.options) {
|
|
139
|
-
const s = e.filter.disabled || n.disabled, a = (t = e.draftState.selection) == null ? void 0 : t.find((r) => (r == null ? void 0 : r.id) === n.id), c = (n.secondLayerOptions ?? []).map((r) => {
|
|
140
|
-
var g;
|
|
141
|
-
const l = s || r.disabled, u = !!((g = a == null ? void 0 : a.secondLayerSelection) != null && g.find((m) => m.id === r.id));
|
|
142
|
-
return /* @__PURE__ */ i.jsx(
|
|
143
|
-
ke,
|
|
144
|
-
{
|
|
145
|
-
label: r.name,
|
|
146
|
-
name: r.id,
|
|
147
|
-
id: r.id,
|
|
148
|
-
onChange: () => e.onToggleChildItem(r, u, n),
|
|
149
|
-
checked: !l && u,
|
|
150
|
-
className: "my-1",
|
|
151
|
-
disabled: l
|
|
152
|
-
},
|
|
153
|
-
r.id
|
|
154
|
-
);
|
|
155
|
-
});
|
|
156
|
-
return /* @__PURE__ */ i.jsx(i.Fragment, { children: c });
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
function on(e) {
|
|
160
|
-
const t = e.filter.options;
|
|
161
|
-
function n(a, o) {
|
|
162
|
-
var u;
|
|
163
|
-
const { selection: c } = e.draftState, r = c.findIndex((g) => g.id === a.id);
|
|
164
|
-
if (!o) {
|
|
165
|
-
const g = (u = t == null ? void 0 : t.find((h) => h.id === a.id).secondLayerOptions) == null ? void 0 : u.filter((h) => !h.disabled), m = { ...a, secondLayerSelection: g };
|
|
166
|
-
if (c.length === 0 || r === -1) {
|
|
167
|
-
const h = [...c, m];
|
|
168
|
-
e.setDraftState({
|
|
169
|
-
active: !0,
|
|
170
|
-
selection: h
|
|
171
|
-
});
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
if (r !== -1) {
|
|
175
|
-
const h = c.map((v) => v.id === a.id ? m : v);
|
|
176
|
-
e.setDraftState({
|
|
177
|
-
active: !!h.length,
|
|
178
|
-
selection: h
|
|
179
|
-
});
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
const l = D.removeItemFromIndex(
|
|
184
|
-
c,
|
|
185
|
-
c.findIndex((g) => g.id === a.id)
|
|
186
|
-
);
|
|
187
|
-
e.setDraftState({
|
|
188
|
-
active: !!l.length,
|
|
189
|
-
selection: l
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
function s(a, o, c) {
|
|
193
|
-
var g;
|
|
194
|
-
const { selection: r } = e.draftState, l = r.findIndex((m) => m.id === c.id);
|
|
195
|
-
if (!o) {
|
|
196
|
-
const m = [...((g = r[l]) == null ? void 0 : g.secondLayerSelection) ?? [], a];
|
|
197
|
-
if (r.length === 0 || l === -1) {
|
|
198
|
-
const h = {
|
|
199
|
-
...c,
|
|
200
|
-
secondLayerSelection: m
|
|
201
|
-
}, v = [...r, h];
|
|
202
|
-
e.setDraftState({
|
|
203
|
-
active: !!v.length,
|
|
204
|
-
selection: v
|
|
205
|
-
});
|
|
206
|
-
return;
|
|
207
|
-
}
|
|
208
|
-
if (l !== -1) {
|
|
209
|
-
const h = r.map((v) => v.id === c.id ? {
|
|
210
|
-
...v,
|
|
211
|
-
secondLayerSelection: m
|
|
212
|
-
} : v);
|
|
213
|
-
e.setDraftState({
|
|
214
|
-
active: !!h.length,
|
|
215
|
-
selection: h
|
|
216
|
-
});
|
|
217
|
-
return;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
let u = r.map((m) => {
|
|
221
|
-
if (m.id === c.id) {
|
|
222
|
-
const h = D.removeItem(m.secondLayerSelection, a);
|
|
223
|
-
return { ...c, secondLayerSelection: h };
|
|
224
|
-
}
|
|
225
|
-
return m;
|
|
226
|
-
});
|
|
227
|
-
u[l].secondLayerSelection.length === 0 && (u = D.removeItem(u, c)), e.setDraftState({
|
|
228
|
-
active: !!u.length,
|
|
229
|
-
selection: u
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
233
|
-
/* @__PURE__ */ i.jsx(re, { title: e.filter.name }),
|
|
234
|
-
/* @__PURE__ */ i.jsx(he, { className: "mb-3", children: j.hasManyFilterOptions(t) ? /* @__PURE__ */ i.jsx(sn, { onToggleItem: n, onToggleChildItem: s, ...e }) : /* @__PURE__ */ i.jsx(rn, { onToggleChildItem: s, ...e }) })
|
|
235
|
-
] });
|
|
236
|
-
}
|
|
237
|
-
function cn(e) {
|
|
238
|
-
const t = e.draftState.active;
|
|
239
|
-
function n() {
|
|
240
|
-
e.setDraftState({ active: !t });
|
|
241
|
-
}
|
|
242
|
-
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
243
|
-
/* @__PURE__ */ i.jsx(re, { id: e.filter.id, title: e.filter.name }),
|
|
244
|
-
/* @__PURE__ */ i.jsxs("div", { className: "d-flex align-items-start justify-content-between", children: [
|
|
245
|
-
/* @__PURE__ */ i.jsx("p", { className: "d-inline-block w-75", children: e.filter.description }),
|
|
246
|
-
/* @__PURE__ */ i.jsx(St, { id: e.filter.id, disabled: e.filter.disabled, onClick: n, on: t })
|
|
247
|
-
] })
|
|
248
|
-
] });
|
|
249
|
-
}
|
|
250
|
-
function ln(e) {
|
|
251
|
-
function t(n) {
|
|
252
|
-
e.setDraftState({
|
|
253
|
-
active: !n.default,
|
|
254
|
-
selection: [n]
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
return /* @__PURE__ */ i.jsx(i.Fragment, { children: e.filter.options.map((n) => /* @__PURE__ */ i.jsx(
|
|
258
|
-
ae.Item,
|
|
259
|
-
{
|
|
260
|
-
onClick: () => t(n),
|
|
261
|
-
disabled: e.filter.disabled || n.disabled,
|
|
262
|
-
children: n.name
|
|
263
|
-
},
|
|
264
|
-
n.id
|
|
265
|
-
)) });
|
|
266
|
-
}
|
|
267
|
-
const dn = "_radioFilter_fxy7p_1", un = {
|
|
268
|
-
radioFilter: dn
|
|
269
|
-
};
|
|
270
|
-
function mn(e) {
|
|
271
|
-
function t(n) {
|
|
272
|
-
e.setDraftState({
|
|
273
|
-
active: !n.default,
|
|
274
|
-
selection: [n]
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
278
|
-
/* @__PURE__ */ i.jsx(re, { title: e.filter.name }),
|
|
279
|
-
/* @__PURE__ */ i.jsx(he, { children: /* @__PURE__ */ i.jsx("ul", { className: `${e.isOnMoreFilters ? "d-flex flex-wrap" : ""} list-unstyled`, children: e.filter.options.map((n) => {
|
|
280
|
-
var o;
|
|
281
|
-
const s = e.filter.disabled || n.disabled, a = ((o = D.first(e.draftState.selection)) == null ? void 0 : o.id.toString()) === n.id.toString();
|
|
282
|
-
return /* @__PURE__ */ i.jsx("li", { className: `${e.isOnMoreFilters ? "w-50" : ""}`, children: /* @__PURE__ */ i.jsx(
|
|
283
|
-
he.Check,
|
|
284
|
-
{
|
|
285
|
-
type: "radio",
|
|
286
|
-
label: n.name,
|
|
287
|
-
name: n.id,
|
|
288
|
-
id: n.id,
|
|
289
|
-
value: n.id,
|
|
290
|
-
onChange: () => t(n),
|
|
291
|
-
checked: !s && a,
|
|
292
|
-
className: `${un.radioFilter}`,
|
|
293
|
-
disabled: s
|
|
294
|
-
}
|
|
295
|
-
) }, n.id);
|
|
296
|
-
}) }) })
|
|
297
|
-
] });
|
|
298
|
-
}
|
|
299
|
-
function fn(e) {
|
|
300
|
-
const [t, n] = Gt({ delay: 1 });
|
|
301
|
-
if (N.useEffect(() => {
|
|
302
|
-
e.onHover(n ? e.rating : null);
|
|
303
|
-
}, [n]), !e.rating.code)
|
|
304
|
-
return /* @__PURE__ */ i.jsx(i.Fragment, {});
|
|
305
|
-
const s = /* @__PURE__ */ i.jsx(
|
|
306
|
-
ge,
|
|
307
|
-
{
|
|
308
|
-
ref: t,
|
|
309
|
-
className: e.getButtonClasses(e.rating, e.isActive, n),
|
|
310
|
-
onClick: e.onClick,
|
|
311
|
-
disabled: e.disabled,
|
|
312
|
-
children: e.rating.code
|
|
313
|
-
}
|
|
314
|
-
);
|
|
315
|
-
return e.disabled ? s : /* @__PURE__ */ i.jsx(lt, { title: e.rating.name, spanHack: !0, children: s });
|
|
316
|
-
}
|
|
317
|
-
ft.defaultProps = {
|
|
318
|
-
selections: []
|
|
319
|
-
};
|
|
320
|
-
function ft(e) {
|
|
321
|
-
const [t, n] = N.useState([]);
|
|
322
|
-
function s(r) {
|
|
323
|
-
return e.ratings.filter((l) => l.code && l.value <= r.value);
|
|
324
|
-
}
|
|
325
|
-
function a(r) {
|
|
326
|
-
e.onSelectRange(s(r));
|
|
327
|
-
}
|
|
328
|
-
function o(r) {
|
|
329
|
-
if (!r || e.isDisabled(r)) {
|
|
330
|
-
n([]);
|
|
331
|
-
return;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
function c(r) {
|
|
335
|
-
return t.length ? !!t.find((l) => l.id === r.id) : !!e.selections.find((l) => l.id === r.id);
|
|
336
|
-
}
|
|
337
|
-
return /* @__PURE__ */ i.jsx("div", { children: /* @__PURE__ */ i.jsx(Vt, { as: "ul", className: "list-unstyled mb-0", children: e.ratings.map((r) => {
|
|
338
|
-
var l;
|
|
339
|
-
return /* @__PURE__ */ i.jsx("li", { children: /* @__PURE__ */ i.jsx(
|
|
340
|
-
fn,
|
|
341
|
-
{
|
|
342
|
-
rating: r,
|
|
343
|
-
onClick: () => a(r),
|
|
344
|
-
onHover: o,
|
|
345
|
-
isActive: c(r),
|
|
346
|
-
disabled: e.disabled || ((l = e.isDisabled) == null ? void 0 : l.call(e, r)),
|
|
347
|
-
getButtonClasses: e.getButtonClasses
|
|
348
|
-
}
|
|
349
|
-
) }, r.id);
|
|
350
|
-
}) }) });
|
|
351
|
-
}
|
|
352
|
-
const gn = "_firstButton_tcosn_1", hn = "_lastButton_tcosn_6", ze = {
|
|
353
|
-
firstButton: gn,
|
|
354
|
-
lastButton: hn
|
|
355
|
-
};
|
|
356
|
-
function vn(e) {
|
|
357
|
-
const t = e.filter.options;
|
|
358
|
-
function n(c) {
|
|
359
|
-
e.setDraftState({
|
|
360
|
-
active: !!c.length,
|
|
361
|
-
selection: c
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
const s = t.filter((c) => c.code), [a] = s, o = s[s.length - 1];
|
|
365
|
-
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
366
|
-
/* @__PURE__ */ i.jsx(re, { title: e.filter.name }),
|
|
367
|
-
/* @__PURE__ */ i.jsx("div", { className: "mb-2", children: /* @__PURE__ */ i.jsx(
|
|
368
|
-
ft,
|
|
369
|
-
{
|
|
370
|
-
ratings: t,
|
|
371
|
-
selections: e.draftState.selection,
|
|
372
|
-
onSelectRange: n,
|
|
373
|
-
disabled: e.filter.disabled,
|
|
374
|
-
isDisabled: (c) => c.disabled,
|
|
375
|
-
getButtonClasses: (c, r, l) => {
|
|
376
|
-
let u = "btn border text-nowrap";
|
|
377
|
-
return r || l ? u += " btn-dark" : u += " btn-outline-dark", l && (u += " active"), s.length === 1 ? u += " rounded" : a.id === c.id ? u += " " + ze.firstButton : o.id === c.id ? u += " " + ze.lastButton : u += " rounded-0", u;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
) })
|
|
381
|
-
] });
|
|
382
|
-
}
|
|
383
|
-
const ne = {
|
|
384
|
-
FILTER_PARAM_PREFIX: "filters.",
|
|
385
|
-
MAX_CHECKBOXES_PER_COLUMN: 10
|
|
386
|
-
}, xn = "sharedSearch.utils", ye = V.encloseNamespace(xn), fe = `${ne.FILTER_PARAM_PREFIX}library`;
|
|
387
|
-
function pn(e) {
|
|
388
|
-
return e.reduce((t, n) => ({
|
|
389
|
-
...t,
|
|
390
|
-
[n.type]: !0
|
|
391
|
-
}), {});
|
|
392
|
-
}
|
|
393
|
-
const yn = {
|
|
394
|
-
getOptions(e) {
|
|
395
|
-
const { libraries: t, isLearner: n, hasCustomLibraries: s } = e, a = [], o = pn(t);
|
|
396
|
-
return o[ee.Workspace] && a.push({ id: J.MyVideos, name: ye("myVideos") }), o[ee.CustomLibrary] && (!n || s) && a.push({ id: J.School, name: ye("schoolVideos") }), o[ee.Exchange] && a.push({ id: J.ExchangeArchive, name: ye("exchangeArchiveVideos") }), o[ee.HostedLibrary] && a.push({ id: J.ClickView, name: ye("clickViewVideos") }), a;
|
|
397
|
-
},
|
|
398
|
-
getBackendParamValue(e, t) {
|
|
399
|
-
return (Array.isArray(e) ? e : [e]).reduce((s, a) => t.reduce((o, c) => {
|
|
400
|
-
const r = o[fe] || [];
|
|
401
|
-
return a === J.MyVideos && c.type === ee.Workspace ? { ...o, [fe]: [...r, c.id.toString()] } : a === J.School && c.type === ee.CustomLibrary ? { ...o, [fe]: [...r, c.id.toString()] } : a === J.ExchangeArchive && c.type === ee.Exchange ? { ...o, [fe]: [...r, c.id.toString()] } : a === J.ClickView && c.type === ee.HostedLibrary ? { ...o, [fe]: [...r, c.id.toString()] } : o;
|
|
402
|
-
}, s), {});
|
|
403
|
-
}
|
|
404
|
-
};
|
|
405
|
-
var ie = /* @__PURE__ */ ((e) => (e[e.Unclassified = 0] = "Unclassified", e[e.Active = 1] = "Active", e[e.Prospect = 2] = "Prospect", e[e.LostCustomer = 3] = "LostCustomer", e[e.Disabled = 4] = "Disabled", e[e.Other = 5] = "Other", e))(ie || {}), se = /* @__PURE__ */ ((e) => (e.Unclassified = "Unclassified", e.Active = "Active", e.Prospect = "Prospect", e.LostCustomer = "LostCustomer", e.Disabled = "Disabled", e.Other = "Other", e))(se || {});
|
|
406
|
-
const Q = {
|
|
407
|
-
[S.BreakingNews]: "Breaking news",
|
|
408
|
-
[S.HistoricalEvent]: "Historical event",
|
|
409
|
-
[S.Holiday]: "Holiday",
|
|
410
|
-
[S.Informal]: "Informal",
|
|
411
|
-
[S.Livestream]: "Livestream",
|
|
412
|
-
[S.NaturalDisaster]: "Natural disaster",
|
|
413
|
-
[S.Observance]: "Observance",
|
|
414
|
-
[S.ReligiousEvent]: "Religious event",
|
|
415
|
-
[S.SportingEvent]: "Sporting event",
|
|
416
|
-
[S.Other]: "Other"
|
|
417
|
-
};
|
|
418
|
-
function Z(e) {
|
|
419
|
-
return /* @__PURE__ */ i.jsx("div", { className: "alert text-dark bg-light-blue px-2 rounded-3", children: e.children });
|
|
420
|
-
}
|
|
421
|
-
const be = "userManager.bulkUserActivationActionInfo";
|
|
422
|
-
function bn(e) {
|
|
423
|
-
return /* @__PURE__ */ i.jsxs(Z, { children: [
|
|
424
|
-
/* @__PURE__ */ i.jsx("h4", { className: "h5", children: /* @__PURE__ */ i.jsx(b, { namespace: be, phrase: "deactivate" }) }),
|
|
425
|
-
/* @__PURE__ */ i.jsx("p", { children: /* @__PURE__ */ i.jsx(b, { namespace: be, phrase: e.userType === w.Learner ? "deactivateInfoStudent" : "deactivateInfoStaff" }) }),
|
|
426
|
-
/* @__PURE__ */ i.jsx("h4", { className: "h5", children: /* @__PURE__ */ i.jsx(b, { namespace: be, phrase: "reactivate" }) }),
|
|
427
|
-
/* @__PURE__ */ i.jsx("p", { className: "mb-0", children: /* @__PURE__ */ i.jsx(b, { namespace: be, phrase: e.userType === w.Learner ? "reactivateInfoStudent" : "reactivateInfoStaff" }) })
|
|
428
|
-
] });
|
|
429
|
-
}
|
|
430
|
-
const Qe = "userManager.bulkUserActivationEmailActionInfo";
|
|
431
|
-
function An() {
|
|
432
|
-
return /* @__PURE__ */ i.jsxs(Z, { children: [
|
|
433
|
-
/* @__PURE__ */ i.jsx("h4", { className: "h5", children: /* @__PURE__ */ i.jsx(b, { namespace: Qe, phrase: "heading" }) }),
|
|
434
|
-
/* @__PURE__ */ i.jsx("p", { className: "mb-0", children: /* @__PURE__ */ i.jsx(b, { namespace: Qe, phrase: "info" }) })
|
|
435
|
-
] });
|
|
436
|
-
}
|
|
437
|
-
const Xe = "userManager.addToClassroomActionInfo";
|
|
438
|
-
function Sn() {
|
|
439
|
-
return /* @__PURE__ */ i.jsxs(Z, { children: [
|
|
440
|
-
/* @__PURE__ */ i.jsx("h4", { className: "h5", children: /* @__PURE__ */ i.jsx(b, { namespace: Xe, phrase: "heading" }) }),
|
|
441
|
-
/* @__PURE__ */ i.jsx("p", { className: "mb-0", children: /* @__PURE__ */ i.jsx(b, { namespace: Xe, phrase: "info" }) })
|
|
442
|
-
] });
|
|
443
|
-
}
|
|
444
|
-
const Be = "userManager.changeYearGroupActionInfo";
|
|
445
|
-
function jn() {
|
|
446
|
-
return /* @__PURE__ */ i.jsxs(Z, { children: [
|
|
447
|
-
/* @__PURE__ */ i.jsx("h4", { className: "h5", children: /* @__PURE__ */ i.jsx(b, { namespace: Be, phrase: "heading" }) }),
|
|
448
|
-
/* @__PURE__ */ i.jsx("p", { className: "mb-0", children: /* @__PURE__ */ i.jsx(b, { namespace: Be, phrase: "info" }) })
|
|
449
|
-
] });
|
|
450
|
-
}
|
|
451
|
-
const Ke = "userManager.bulkUserDeleteActionInfo";
|
|
452
|
-
function Cn(e) {
|
|
453
|
-
return /* @__PURE__ */ i.jsxs(Z, { children: [
|
|
454
|
-
/* @__PURE__ */ i.jsx("h4", { className: "h5", children: /* @__PURE__ */ i.jsx(b, { namespace: Ke, phrase: "delete" }) }),
|
|
455
|
-
/* @__PURE__ */ i.jsx("p", { className: "mb-0", children: /* @__PURE__ */ i.jsx(b, { namespace: Ke, phrase: e.userType === w.Learner ? "infoStudent" : "infoStaff" }) })
|
|
456
|
-
] });
|
|
457
|
-
}
|
|
458
|
-
const Ze = "userManager.bulkUserRemoveActionInfo";
|
|
459
|
-
function kn(e) {
|
|
460
|
-
return /* @__PURE__ */ i.jsxs(Z, { children: [
|
|
461
|
-
/* @__PURE__ */ i.jsx("h4", { className: "h5", children: /* @__PURE__ */ i.jsx(b, { namespace: Ze, phrase: "remove" }) }),
|
|
462
|
-
/* @__PURE__ */ i.jsx("p", { className: "mb-0", children: /* @__PURE__ */ i.jsx(b, { namespace: Ze, phrase: e.userType === w.Learner ? "infoStudent" : "infoStaff" }) })
|
|
463
|
-
] });
|
|
464
|
-
}
|
|
465
|
-
const qe = "userManager.bulkUserResetEmailActionInfo";
|
|
466
|
-
function In() {
|
|
467
|
-
return /* @__PURE__ */ i.jsxs(Z, { children: [
|
|
468
|
-
/* @__PURE__ */ i.jsx("h4", { className: "h5", children: /* @__PURE__ */ i.jsx(b, { namespace: qe, phrase: "heading" }) }),
|
|
469
|
-
/* @__PURE__ */ i.jsx("p", { className: "mb-0", children: /* @__PURE__ */ i.jsx(b, { namespace: qe, phrase: "info" }) })
|
|
470
|
-
] });
|
|
471
|
-
}
|
|
472
|
-
const Je = "userManager.bulkResetPasswordActionInfo";
|
|
473
|
-
function Dn() {
|
|
474
|
-
return /* @__PURE__ */ i.jsxs(Z, { children: [
|
|
475
|
-
/* @__PURE__ */ i.jsx("h4", { className: "h5", children: /* @__PURE__ */ i.jsx(b, { namespace: Je, phrase: "heading" }) }),
|
|
476
|
-
/* @__PURE__ */ i.jsx("p", { className: "mb-0", children: /* @__PURE__ */ i.jsx(b, { namespace: Je, phrase: "info" }) })
|
|
477
|
-
] });
|
|
478
|
-
}
|
|
479
|
-
const et = "userManager.bulkUserYearGroupRolloverActionInfo";
|
|
480
|
-
function wn() {
|
|
481
|
-
return /* @__PURE__ */ i.jsxs(Z, { children: [
|
|
482
|
-
/* @__PURE__ */ i.jsx("h4", { className: "h5", children: /* @__PURE__ */ i.jsx(b, { namespace: et, phrase: "heading" }) }),
|
|
483
|
-
/* @__PURE__ */ i.jsx("p", { className: "mb-0", children: /* @__PURE__ */ i.jsx(b, { namespace: et, phrase: "info" }) })
|
|
484
|
-
] });
|
|
485
|
-
}
|
|
486
|
-
function Tn(e) {
|
|
487
|
-
return /* @__PURE__ */ i.jsx("svg", { ...e, children: /* @__PURE__ */ i.jsx(
|
|
488
|
-
"path",
|
|
489
|
-
{
|
|
490
|
-
fill: "currentColor",
|
|
491
|
-
d: "M12 3c4.972 0 9 4.028 9 9s-4.028 9-9 9-9-4.028-9-9 4.028-9 9-9m4.244 5.578a.77.77 0 0 0-1.058.068l-4.722 5.18-1.684-1.615a.77.77 0 0 0-1.06 0 .7.7 0 0 0 0 1.018l2.25 2.16a.77.77 0 0 0 1.094-.035l5.25-5.76a.7.7 0 0 0-.07-1.016"
|
|
492
|
-
}
|
|
493
|
-
) });
|
|
494
|
-
}
|
|
495
|
-
var Ne = /* @__PURE__ */ ((e) => (e.Disabled = "Disabled", e.Active = "Active", e.Inactive = "Inactive", e))(Ne || {});
|
|
496
|
-
const Nn = "_badge_tx2yc_1", Fn = "_pending_tx2yc_5", _n = "_name_tx2yc_8", On = "_username_tx2yc_11", Rn = "_pillContainer_tx2yc_20", Ln = "_avatarContainer_tx2yc_23", En = "_verifiedEmail_tx2yc_28", B = {
|
|
497
|
-
badge: Nn,
|
|
498
|
-
pending: Fn,
|
|
499
|
-
name: _n,
|
|
500
|
-
username: On,
|
|
501
|
-
pillContainer: Rn,
|
|
502
|
-
avatarContainer: Ln,
|
|
503
|
-
verifiedEmail: En
|
|
504
|
-
}, Ae = "userManager.userList";
|
|
505
|
-
function $n(e) {
|
|
506
|
-
var t;
|
|
507
|
-
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
508
|
-
e.user.status === Ne.Disabled && /* @__PURE__ */ i.jsx("div", { className: `text-white px-1 ${B.badge} bg-danger ${e.className ?? ""}`, children: /* @__PURE__ */ i.jsx(b, { namespace: Ae, phrase: "deactivated" }) }),
|
|
509
|
-
e.user.status === Ne.Inactive && /* @__PURE__ */ i.jsx("div", { className: `text-white px-1 ${B.badge} ${B.pending} ${e.className ?? ""}`, children: /* @__PURE__ */ i.jsx(lt, { title: V.getPhrase(Ae, "pendingTooltip"), spanHack: !0, children: /* @__PURE__ */ i.jsx(b, { namespace: Ae, phrase: "pending" }) }) }),
|
|
510
|
-
e.user.id == ((t = e.currentUser) == null ? void 0 : t.id) && /* @__PURE__ */ i.jsx("div", { className: `text-white px-1 ${B.badge} bg-blue ${e.className ?? ""}`, children: /* @__PURE__ */ i.jsx(b, { namespace: Ae, phrase: "thatsYou" }) })
|
|
511
|
-
] });
|
|
512
|
-
}
|
|
513
|
-
const we = "userManager.userList";
|
|
514
|
-
function Pn(e) {
|
|
515
|
-
var s;
|
|
516
|
-
const { user: t, currentUser: n } = e;
|
|
517
|
-
return /* @__PURE__ */ i.jsxs("div", { className: `d-flex flex-column justify-content-center me-auto w-100 ${e.wrapperClassName}`, children: [
|
|
518
|
-
/* @__PURE__ */ i.jsxs("div", { className: "pb-1 d-flex align-items-center", children: [
|
|
519
|
-
/* @__PURE__ */ i.jsxs("div", { className: `d-flex ${B.name}`, children: [
|
|
520
|
-
t.name ? /* @__PURE__ */ i.jsxs(
|
|
521
|
-
"h2",
|
|
522
|
-
{
|
|
523
|
-
className: "h5 m-0 me-1 d-inline-block align-middle text-truncate",
|
|
524
|
-
title: `${t.name} ${t.surname || ""}`,
|
|
525
|
-
children: [
|
|
526
|
-
t.name,
|
|
527
|
-
" ",
|
|
528
|
-
t.surname || ""
|
|
529
|
-
]
|
|
530
|
-
}
|
|
531
|
-
) : /* @__PURE__ */ i.jsx("span", { className: "fst-italic text-muted me-2", children: /* @__PURE__ */ i.jsx(b, { namespace: we, phrase: "noName" }) }),
|
|
532
|
-
t.username && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
533
|
-
"(",
|
|
534
|
-
/* @__PURE__ */ i.jsx("p", { title: t.username, className: `m-0 d-inline-block align-middle text-truncate ${B.username}`, children: t.username }),
|
|
535
|
-
")"
|
|
536
|
-
] })
|
|
537
|
-
] }),
|
|
538
|
-
/* @__PURE__ */ i.jsx($n, { user: t, currentUser: n, className: "ms-2" })
|
|
539
|
-
] }),
|
|
540
|
-
/* @__PURE__ */ i.jsxs("div", { className: "d-flex", children: [
|
|
541
|
-
!!((s = t.metadata) != null && s.isEmailVerified) && /* @__PURE__ */ i.jsx(
|
|
542
|
-
Ee,
|
|
543
|
-
{
|
|
544
|
-
className: `svg-container text-secondary ms-n1 ${B.verifiedEmail}`,
|
|
545
|
-
svg: Tn,
|
|
546
|
-
title: V.getPhrase(we, "emailVerified"),
|
|
547
|
-
tooltipSpanHack: !0,
|
|
548
|
-
tooltipPlacement: "top"
|
|
549
|
-
}
|
|
550
|
-
),
|
|
551
|
-
/* @__PURE__ */ i.jsx("p", { className: "text-truncate mb-0 overflow-visible", children: t.email ? t.email : /* @__PURE__ */ i.jsx("span", { className: "fst-italic", children: /* @__PURE__ */ i.jsx(b, { namespace: we, phrase: "noEmail" }) }) })
|
|
552
|
-
] })
|
|
553
|
-
] });
|
|
554
|
-
}
|
|
555
|
-
const tt = "userManager.userList";
|
|
556
|
-
function Un(e) {
|
|
557
|
-
var t, n, s, a, o;
|
|
558
|
-
if (e.userType === w.Learner)
|
|
559
|
-
return (t = e.user.masterYearGroup) != null && t.name ? e.user.masterYearGroup.name : (s = (n = e.user.yearGroups) == null ? void 0 : n.data) != null && s.length ? D.first(e.user.yearGroups.data).name : null;
|
|
560
|
-
if (e.userType === w.Staff)
|
|
561
|
-
return ((a = e.user.userProfile) == null ? void 0 : a.role) === Me.Admin ? V.getPhrase(tt, "admin") : ((o = e.user.userProfile) == null ? void 0 : o.role) === Me.SuperAdmin ? V.getPhrase(tt, e.countryCode === "US" ? "superAdminUs" : "superAdmin") : null;
|
|
562
|
-
}
|
|
563
|
-
function Mn(e) {
|
|
564
|
-
const t = Un(e);
|
|
565
|
-
return t ? /* @__PURE__ */ i.jsx("span", { className: `${B.pillContainer} me-3 text-end`, children: /* @__PURE__ */ i.jsx("span", { className: "rounded-pill px-2 text-nowrap bg-white border border-dark", children: t }) }) : /* @__PURE__ */ i.jsx(i.Fragment, {});
|
|
566
|
-
}
|
|
567
|
-
function Gn(e) {
|
|
568
|
-
var t;
|
|
569
|
-
return /* @__PURE__ */ i.jsx("div", { className: `${B.avatarContainer} mx-2`, children: /* @__PURE__ */ i.jsx(
|
|
570
|
-
jt,
|
|
571
|
-
{
|
|
572
|
-
imageUrl: (t = e.user.avatar) == null ? void 0 : t.url,
|
|
573
|
-
imageCdnUrl: e.imageCdnUrl,
|
|
574
|
-
initials: Ct.getInitials(e.user.name, e.user.surname)
|
|
575
|
-
}
|
|
576
|
-
) });
|
|
577
|
-
}
|
|
578
|
-
function Vn(e) {
|
|
579
|
-
return /* @__PURE__ */ i.jsxs("li", { className: "d-flex align-items-center p-2", children: [
|
|
580
|
-
/* @__PURE__ */ i.jsx(Gn, { user: e.user, imageCdnUrl: e.imageCdnUrl }),
|
|
581
|
-
/* @__PURE__ */ i.jsx(Pn, { user: e.user, currentUser: e.currentUser }),
|
|
582
|
-
/* @__PURE__ */ i.jsx(Mn, { userType: e.userType, user: e.user }),
|
|
583
|
-
/* @__PURE__ */ i.jsx("p", { className: "mb-0 mx-2 text-danger", children: e.errorMessage })
|
|
584
|
-
] });
|
|
585
|
-
}
|
|
586
|
-
var Fe = /* @__PURE__ */ ((e) => (e.Online = "online", e.Primary = "primary", e.Curator = "curator", e))(Fe || {});
|
|
587
|
-
const Yn = N.createContext({});
|
|
588
|
-
var ce = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Staff = 1] = "Staff", e[e.Learner = 2] = "Learner", e[e.MasterVideo = 3] = "MasterVideo", e[e.Rostering = 8] = "Rostering", e[e.MarketingProfile = 16] = "MarketingProfile", e))(ce || {}), M = /* @__PURE__ */ ((e) => (e.YearGroupRollover = "year-group-rollover", e.ChangeYearGroup = "change-year-group", e.DeleteUser = "delete-user", e.RemoveUser = "remove-user", e.DeactivateUser = "deactivate-user", e.ActivateUser = "activate-user", e.AddToClassroom = "add-to-classroom", e.ResetPassword = "reset-password", e.SendResetPasswordEmail = "send-reset-password-email", e.SendAccountActivationEmail = "send-account-activation-email", e.CreateUser = "create-user", e.AddToAudience = "add-to-audience", e.AddToBackboneClassification = "add-to-backbone-classification", e.AddToBackboneAudience = "add-to-backbone-audience", e.AddToClassification = "add-to-classification", e.AddToSeries = "add-to-series", e.AddToDirector = "add-to-director", e.AddToDistributor = "add-to-distributor", e.AddToProductionCompany = "add-to-production-company", e.AddToProducer = "add-to-producer", e.SetProductionYear = "set-production-year", e.AddToLibrary = "add-to-library", e.AddToCurationTag = "add-to-curation-tag", e.AddToSkillTag = "add-to-skill-tag", e.AddToPedagogyTag = "add-to-pedagogy-tag", e.AddToNormalTag = "add-to-normal-tag", e.AddToHiddenTag = "add-to-hidden-tag", e.AddResourceAndLink = "add-resource-and-link", e.Rostering = "rostering", e.MarketingProfile = "marketing-profile", e))(M || {}), G = /* @__PURE__ */ ((e) => (e[e.NoAction = 1] = "NoAction", e[e.Succeed = 1] = "Succeed", e[e.Unknown = 10] = "Unknown", e[e.CustomerNotFound = 100] = "CustomerNotFound", e[e.UserNotFound = 101] = "UserNotFound", e[e.EmailNotVerified = 131] = "EmailNotVerified", e[e.UserDisabled = 133] = "UserDisabled", e[e.InvalidYearGroup = 200] = "InvalidYearGroup", e[e.MissingYearGroup = 201] = "MissingYearGroup", e[e.NewYearGroupNotSet = 202] = "NewYearGroupNotSet", e[e.ObjectNotFoundInBackboneClassification = 300] = "ObjectNotFoundInBackboneClassification", e[e.ObjectNotFoundInBackboneAudience = 301] = "ObjectNotFoundInBackboneAudience", e))(G || {}), x = /* @__PURE__ */ ((e) => (e[e.RolloverYearGroup = 1] = "RolloverYearGroup", e[e.DeactivateUser = 2] = "DeactivateUser", e[e.ChangeYearGroup = 3] = "ChangeYearGroup", e[e.DeleteUser = 4] = "DeleteUser", e[e.CreateUser = 5] = "CreateUser", e[e.ResetPassword = 6] = "ResetPassword", e[e.AddUsersClassroom = 7] = "AddUsersClassroom", e[e.SendAccountReminderEmail = 8] = "SendAccountReminderEmail", e[e.ActivateUser = 9] = "ActivateUser", e[e.AddToBackboneClassification = 10] = "AddToBackboneClassification", e[e.AddToClassification = 11] = "AddToClassification", e[e.AddToBackboneAudience = 12] = "AddToBackboneAudience", e[e.AddToAudience = 13] = "AddToAudience", e[e.AddVideosSeries = 14] = "AddVideosSeries", e[e.AddVideosDistributor = 15] = "AddVideosDistributor", e[e.AddVideosProductionCompany = 16] = "AddVideosProductionCompany", e[e.AddVideosProducer = 17] = "AddVideosProducer", e[e.AddVideosDirector = 18] = "AddVideosDirector", e[e.AddVideosLibrary = 19] = "AddVideosLibrary", e[e.AddVideosResourceAndLinks = 21] = "AddVideosResourceAndLinks", e[e.AddVideosTag = 22] = "AddVideosTag", e[e.SendAccountActivationEmail = 23] = "SendAccountActivationEmail", e[e.RemoveUser = 24] = "RemoveUser", e[e.Rostering = 25] = "Rostering", e[e.MarketingProfile = 26] = "MarketingProfile", e[e.SetProductionYear = 28] = "SetProductionYear", e))(x || {});
|
|
589
|
-
function Hn(e) {
|
|
590
|
-
return /* @__PURE__ */ i.jsx("svg", { ...e, children: /* @__PURE__ */ i.jsx(
|
|
591
|
-
"path",
|
|
592
|
-
{
|
|
593
|
-
fill: "currentColor",
|
|
594
|
-
fillRule: "evenodd",
|
|
595
|
-
d: "M18.492 5.508a5.163 5.163 0 0 0-7.293 0 5.16 5.16 0 0 0-1.256 5.234l-5.806 5.806a.47.47 0 0 0-.137.331v2.652c0 .26.21.469.469.469H7.12c.124 0 .243-.05.331-.137l.664-.663a.47.47 0 0 0 .134-.386l-.083-.712.987-.093a.47.47 0 0 0 .423-.423l.093-.987.712.083a.468.468 0 0 0 .523-.466v-.873h.857a.47.47 0 0 0 .33-.135l1.164-1.152a5.16 5.16 0 0 0 5.236-1.255 5.163 5.163 0 0 0 0-7.293m-.663 6.63a4.22 4.22 0 0 1-4.522.941.47.47 0 0 0-.5.103l-1.238 1.223h-1.133a.47.47 0 0 0-.469.47v.815l-.665-.078a.47.47 0 0 0-.52.422l-.102 1.078-1.078.101a.47.47 0 0 0-.422.521l.112.963-.365.365h-1.99v-1.989l5.879-5.878a.47.47 0 0 0 .105-.502 4.22 4.22 0 0 1 .94-4.522 4.224 4.224 0 0 1 5.968 0 4.224 4.224 0 0 1 0 5.967M15.5 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3m0-2a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1",
|
|
596
|
-
clipRule: "evenodd"
|
|
597
|
-
}
|
|
598
|
-
) });
|
|
599
|
-
}
|
|
600
|
-
const f = V.encloseNamespace("userManager.utils");
|
|
601
|
-
x.ActivateUser, x.AddUsersClassroom, x.ChangeYearGroup, x.DeactivateUser, x.DeleteUser, x.ResetPassword, x.RolloverYearGroup, x.SendAccountReminderEmail, x.CreateUser, x.SendAccountActivationEmail, x.RemoveUser;
|
|
602
|
-
const E = {
|
|
603
|
-
getSteps(e, t, n, s) {
|
|
604
|
-
var c, r;
|
|
605
|
-
const a = [
|
|
606
|
-
{
|
|
607
|
-
id: "select-action",
|
|
608
|
-
text: f("choose"),
|
|
609
|
-
appLink: n == null ? void 0 : n.bulkActionsSelectAction
|
|
610
|
-
},
|
|
611
|
-
{
|
|
612
|
-
id: "action-details",
|
|
613
|
-
text: f("details"),
|
|
614
|
-
appLink: (c = n == null ? void 0 : n.bulkActionsActionDetails) == null ? void 0 : c[s],
|
|
615
|
-
disabled: !((r = n == null ? void 0 : n.bulkActionsActionDetails) != null && r[s])
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
id: "confirmation",
|
|
619
|
-
text: f("confirmation")
|
|
620
|
-
},
|
|
621
|
-
{
|
|
622
|
-
id: "status",
|
|
623
|
-
text: f("status")
|
|
624
|
-
}
|
|
625
|
-
], o = {
|
|
626
|
-
id: "review-accounts",
|
|
627
|
-
text: f(e === w.Learner ? "reviewStudents" : "reviewStaff"),
|
|
628
|
-
subText: f(e === w.Learner ? "reviewSubTextStudents" : "reviewSubTextStaff", { smartCount: t }),
|
|
629
|
-
appLink: n == null ? void 0 : n.bulkActionsReviewAccounts
|
|
630
|
-
};
|
|
631
|
-
return typeof t != "number" && delete o.subText, a.unshift(o), a;
|
|
632
|
-
},
|
|
633
|
-
getActionOptions({
|
|
634
|
-
userType: e,
|
|
635
|
-
allowYearGroupRollover: t,
|
|
636
|
-
countsByStatus: n,
|
|
637
|
-
client: s,
|
|
638
|
-
products: a,
|
|
639
|
-
yearGroups: o,
|
|
640
|
-
hasClassroomsFeature: c
|
|
641
|
-
}) {
|
|
642
|
-
const r = [];
|
|
643
|
-
r.push({
|
|
644
|
-
order: 40,
|
|
645
|
-
id: "activation",
|
|
646
|
-
icon: Pt,
|
|
647
|
-
name: f("deactivateReactivate"),
|
|
648
|
-
infoComponent: () => /* @__PURE__ */ i.jsx(bn, { userType: e })
|
|
649
|
-
});
|
|
650
|
-
const l = !(n != null && n.Disabled) && !(n != null && n.Inactive);
|
|
651
|
-
return (s !== Fe.Primary || (a == null ? void 0 : a.includes(Ge.Online))) && r.push({
|
|
652
|
-
order: 50,
|
|
653
|
-
id: "delete",
|
|
654
|
-
icon: Ye,
|
|
655
|
-
name: f("delete"),
|
|
656
|
-
infoComponent: () => /* @__PURE__ */ i.jsx(Cn, { userType: e }),
|
|
657
|
-
disabled: l,
|
|
658
|
-
tooltip: l ? f("deleteDisabledTooltip") : ""
|
|
659
|
-
}), s !== Fe.Online && !(a != null && a.includes(Ge.Online)) && r.push({
|
|
660
|
-
order: 50,
|
|
661
|
-
id: "removeFromSchool",
|
|
662
|
-
icon: Ye,
|
|
663
|
-
name: f("removeFromSchool"),
|
|
664
|
-
infoComponent: () => /* @__PURE__ */ i.jsx(kn, { userType: e }),
|
|
665
|
-
disabled: l,
|
|
666
|
-
tooltip: l ? f("removeFromSchoolDisabledTooltip") : ""
|
|
667
|
-
}), e === w.Learner && ((o == null ? void 0 : o.length) > 1 && r.push({
|
|
668
|
-
order: 20,
|
|
669
|
-
id: "changeYearGroup",
|
|
670
|
-
icon: Kt,
|
|
671
|
-
name: f("changeYearGroup"),
|
|
672
|
-
infoComponent: () => /* @__PURE__ */ i.jsx(jn, {})
|
|
673
|
-
}), r.push({
|
|
674
|
-
order: 30,
|
|
675
|
-
id: "resetPassword",
|
|
676
|
-
icon: Hn,
|
|
677
|
-
name: f("resetPassword"),
|
|
678
|
-
// TODO: Replace all of these info components with a shared component that accepts a heading and message prop
|
|
679
|
-
infoComponent: () => /* @__PURE__ */ i.jsx(Dn, {})
|
|
680
|
-
}), r.push({
|
|
681
|
-
order: 35,
|
|
682
|
-
id: "activationEmail",
|
|
683
|
-
icon: He,
|
|
684
|
-
name: f("activationEmail"),
|
|
685
|
-
infoComponent: () => /* @__PURE__ */ i.jsx(An, {})
|
|
686
|
-
}), c && r.push({
|
|
687
|
-
order: 60,
|
|
688
|
-
id: "addToClassroom",
|
|
689
|
-
icon: Zt,
|
|
690
|
-
name: f("addToClassroom"),
|
|
691
|
-
infoComponent: () => /* @__PURE__ */ i.jsx(Sn, {})
|
|
692
|
-
}), (o == null ? void 0 : o.length) > 1 && r.push({
|
|
693
|
-
order: 70,
|
|
694
|
-
id: "yearGroupRollover",
|
|
695
|
-
icon: Ut,
|
|
696
|
-
name: f("yearGroupRollover"),
|
|
697
|
-
infoComponent: () => /* @__PURE__ */ i.jsx(wn, {}),
|
|
698
|
-
disabled: !(t != null && t.canRollover),
|
|
699
|
-
tooltip: Xn(t)
|
|
700
|
-
})), e === w.Staff && r.push({
|
|
701
|
-
order: 60,
|
|
702
|
-
id: "resetEmail",
|
|
703
|
-
icon: He,
|
|
704
|
-
name: f("resetEmail"),
|
|
705
|
-
infoComponent: () => /* @__PURE__ */ i.jsx(In, {})
|
|
706
|
-
}), r.sort((m, h) => m.order - h.order);
|
|
707
|
-
},
|
|
708
|
-
mapSubActionToDisplayName(e) {
|
|
709
|
-
switch (e) {
|
|
710
|
-
case "yearGroupRollover":
|
|
711
|
-
return f("yearGroupRolloverDisplayName");
|
|
712
|
-
case "changeYearGroup":
|
|
713
|
-
return f("changeYearGroupDisplayName");
|
|
714
|
-
case "deactivate":
|
|
715
|
-
return f("deactivateDisplayName");
|
|
716
|
-
case "reactivate":
|
|
717
|
-
return f("reactivateDisplayName");
|
|
718
|
-
case "delete":
|
|
719
|
-
return f("deleteDisplayName");
|
|
720
|
-
case "addToClassroom":
|
|
721
|
-
return f("addToClassroomDisplayName");
|
|
722
|
-
case "resetPassword":
|
|
723
|
-
return f("resetPasswordDisplayName");
|
|
724
|
-
case "resetEmail":
|
|
725
|
-
return f("resetEmailDisplayName");
|
|
726
|
-
case "activationEmail":
|
|
727
|
-
return f("activationEmailDisplayName");
|
|
728
|
-
case "removeFromSchool":
|
|
729
|
-
return f("removeFromSchoolDisplayName");
|
|
730
|
-
default:
|
|
731
|
-
return "";
|
|
732
|
-
}
|
|
733
|
-
},
|
|
734
|
-
getWizardAppLinks(e) {
|
|
735
|
-
const t = Object.keys(e.bulkActionsActionDetails).map((a) => e.bulkActionsActionDetails[a]), n = Object.keys(e.bulkActionsConfirmation).map((a) => e.bulkActionsConfirmation[a]), s = Object.keys(e.bulkActionsStatus).map((a) => e.bulkActionsStatus[a]);
|
|
736
|
-
return [
|
|
737
|
-
e.bulkActionsReviewAccounts,
|
|
738
|
-
e.bulkActionsSelectAction,
|
|
739
|
-
...t,
|
|
740
|
-
...n,
|
|
741
|
-
...s
|
|
742
|
-
];
|
|
743
|
-
},
|
|
744
|
-
getErrorListItem(e, t, n) {
|
|
745
|
-
const s = this.getUserErrorMessage(e.errorCode);
|
|
746
|
-
return /* @__PURE__ */ i.jsx(
|
|
747
|
-
Vn,
|
|
748
|
-
{
|
|
749
|
-
user: e,
|
|
750
|
-
userType: e.userType,
|
|
751
|
-
imageCdnUrl: t,
|
|
752
|
-
errorMessage: s,
|
|
753
|
-
currentUser: n
|
|
754
|
-
}
|
|
755
|
-
);
|
|
756
|
-
},
|
|
757
|
-
getUserErrorMessage(e) {
|
|
758
|
-
switch (e) {
|
|
759
|
-
case G.NoAction:
|
|
760
|
-
case G.Succeed:
|
|
761
|
-
return "";
|
|
762
|
-
case G.InvalidYearGroup:
|
|
763
|
-
return f("invalidYearGroupError");
|
|
764
|
-
case G.MissingYearGroup:
|
|
765
|
-
return f("missingYearGroupError");
|
|
766
|
-
case G.NewYearGroupNotSet:
|
|
767
|
-
return f("yearGroupUpdateError");
|
|
768
|
-
case G.EmailNotVerified:
|
|
769
|
-
return f("emailNotVerifiedError");
|
|
770
|
-
case G.UserDisabled:
|
|
771
|
-
return f("userDeactivatedError");
|
|
772
|
-
/**
|
|
773
|
-
* I feel like by the this point, none of these errors should be getting thrown.
|
|
774
|
-
* If they do get thrown, we use a generic error message and append the error code
|
|
775
|
-
* in case it does happen and a screenshot is sent to support (hoping this helps).
|
|
776
|
-
*/
|
|
777
|
-
case G.Unknown:
|
|
778
|
-
case G.CustomerNotFound:
|
|
779
|
-
case G.UserNotFound:
|
|
780
|
-
default:
|
|
781
|
-
return f("genericUnexpectedError", { errorCode: e });
|
|
782
|
-
}
|
|
783
|
-
},
|
|
784
|
-
getCreateJobRequestData(e, t, n, s) {
|
|
785
|
-
switch (e.subAction) {
|
|
786
|
-
case "yearGroupRollover":
|
|
787
|
-
return {
|
|
788
|
-
name: M.YearGroupRollover,
|
|
789
|
-
type: x.RolloverYearGroup,
|
|
790
|
-
dataType: E.mapUserTypeToDataType(n),
|
|
791
|
-
customerId: t,
|
|
792
|
-
metadata: Wn(
|
|
793
|
-
e,
|
|
794
|
-
t
|
|
795
|
-
)
|
|
796
|
-
};
|
|
797
|
-
case "changeYearGroup":
|
|
798
|
-
return {
|
|
799
|
-
name: M.ChangeYearGroup,
|
|
800
|
-
type: x.ChangeYearGroup,
|
|
801
|
-
dataType: E.mapUserTypeToDataType(n),
|
|
802
|
-
customerId: t,
|
|
803
|
-
metadata: zn(
|
|
804
|
-
e
|
|
805
|
-
)
|
|
806
|
-
};
|
|
807
|
-
case "delete":
|
|
808
|
-
return {
|
|
809
|
-
name: M.DeleteUser,
|
|
810
|
-
type: x.DeleteUser,
|
|
811
|
-
dataType: E.mapUserTypeToDataType(n),
|
|
812
|
-
customerId: t,
|
|
813
|
-
metadata: X(e)
|
|
814
|
-
};
|
|
815
|
-
case "removeFromSchool":
|
|
816
|
-
return {
|
|
817
|
-
name: M.RemoveUser,
|
|
818
|
-
type: x.RemoveUser,
|
|
819
|
-
dataType: E.mapUserTypeToDataType(n),
|
|
820
|
-
customerId: t,
|
|
821
|
-
metadata: X(e)
|
|
822
|
-
};
|
|
823
|
-
case "deactivate":
|
|
824
|
-
return {
|
|
825
|
-
name: M.DeactivateUser,
|
|
826
|
-
type: x.DeactivateUser,
|
|
827
|
-
dataType: E.mapUserTypeToDataType(n),
|
|
828
|
-
customerId: t,
|
|
829
|
-
metadata: Kn(e, s)
|
|
830
|
-
};
|
|
831
|
-
case "reactivate":
|
|
832
|
-
return {
|
|
833
|
-
name: M.ActivateUser,
|
|
834
|
-
type: x.ActivateUser,
|
|
835
|
-
dataType: E.mapUserTypeToDataType(n),
|
|
836
|
-
customerId: t,
|
|
837
|
-
metadata: X(e)
|
|
838
|
-
};
|
|
839
|
-
case "addToClassroom":
|
|
840
|
-
return {
|
|
841
|
-
name: M.AddToClassroom,
|
|
842
|
-
type: x.AddUsersClassroom,
|
|
843
|
-
dataType: E.mapUserTypeToDataType(n),
|
|
844
|
-
customerId: t,
|
|
845
|
-
metadata: Bn(
|
|
846
|
-
e
|
|
847
|
-
)
|
|
848
|
-
};
|
|
849
|
-
case "resetPassword":
|
|
850
|
-
return {
|
|
851
|
-
name: M.ResetPassword,
|
|
852
|
-
type: x.ResetPassword,
|
|
853
|
-
dataType: E.mapUserTypeToDataType(n),
|
|
854
|
-
customerId: t,
|
|
855
|
-
metadata: Qn(e)
|
|
856
|
-
};
|
|
857
|
-
case "resetEmail":
|
|
858
|
-
return {
|
|
859
|
-
name: M.SendResetPasswordEmail,
|
|
860
|
-
type: x.SendAccountReminderEmail,
|
|
861
|
-
dataType: E.mapUserTypeToDataType(n),
|
|
862
|
-
customerId: t,
|
|
863
|
-
metadata: X(e)
|
|
864
|
-
};
|
|
865
|
-
case "activationEmail":
|
|
866
|
-
return {
|
|
867
|
-
name: M.SendAccountActivationEmail,
|
|
868
|
-
type: x.SendAccountActivationEmail,
|
|
869
|
-
dataType: E.mapUserTypeToDataType(n),
|
|
870
|
-
customerId: t,
|
|
871
|
-
metadata: X(e)
|
|
872
|
-
};
|
|
873
|
-
default:
|
|
874
|
-
It.throw(
|
|
875
|
-
new Dt(`No handler for type ${e.subAction} in BulkUserActionsHelper.getCreateJobRequestData`)
|
|
876
|
-
);
|
|
877
|
-
}
|
|
878
|
-
return null;
|
|
879
|
-
},
|
|
880
|
-
useSetWizardConfirmationCallback(e) {
|
|
881
|
-
const { setOnClickConfirm: t } = N.useContext(Yn), [n] = kt(wt.BULK_USER_ACTIONS);
|
|
882
|
-
N.useEffect(() => {
|
|
883
|
-
t(() => e);
|
|
884
|
-
}, [n == null ? void 0 : n.subAction]);
|
|
885
|
-
},
|
|
886
|
-
useCreateJobErrorAlert() {
|
|
887
|
-
const e = Bt();
|
|
888
|
-
return () => {
|
|
889
|
-
e.error(f("failedToCreateJob"));
|
|
890
|
-
};
|
|
891
|
-
},
|
|
892
|
-
mapDataTypeToUserType(e) {
|
|
893
|
-
switch (e) {
|
|
894
|
-
case ce.Staff:
|
|
895
|
-
return w.Staff;
|
|
896
|
-
case ce.Learner:
|
|
897
|
-
return w.Learner;
|
|
898
|
-
default:
|
|
899
|
-
return w.Unknown;
|
|
900
|
-
}
|
|
901
|
-
},
|
|
902
|
-
mapUserTypeToDataType(e) {
|
|
903
|
-
switch (e) {
|
|
904
|
-
case w.Learner:
|
|
905
|
-
return ce.Learner;
|
|
906
|
-
case w.Staff:
|
|
907
|
-
return ce.Staff;
|
|
908
|
-
case w.Unknown:
|
|
909
|
-
return ce.Unknown;
|
|
910
|
-
}
|
|
911
|
-
},
|
|
912
|
-
getActionTypeFilterOptions() {
|
|
913
|
-
return [{
|
|
914
|
-
id: x.ActivateUser,
|
|
915
|
-
name: f("activate")
|
|
916
|
-
}, {
|
|
917
|
-
id: x.DeactivateUser,
|
|
918
|
-
name: f("deactivate")
|
|
919
|
-
}, {
|
|
920
|
-
id: x.DeleteUser,
|
|
921
|
-
name: f("deleteUser")
|
|
922
|
-
}, {
|
|
923
|
-
id: x.RolloverYearGroup,
|
|
924
|
-
name: f("yearGroupRollover")
|
|
925
|
-
}, {
|
|
926
|
-
id: x.ChangeYearGroup,
|
|
927
|
-
name: f("changeYearGroup")
|
|
928
|
-
}, {
|
|
929
|
-
id: x.CreateUser,
|
|
930
|
-
name: f("createUser")
|
|
931
|
-
}, {
|
|
932
|
-
id: x.ResetPassword,
|
|
933
|
-
name: f("resetPassword")
|
|
934
|
-
}, {
|
|
935
|
-
id: x.SendAccountReminderEmail,
|
|
936
|
-
name: f("resetEmail")
|
|
937
|
-
}, {
|
|
938
|
-
id: x.AddUsersClassroom,
|
|
939
|
-
name: f("addToClassroom")
|
|
940
|
-
}, {
|
|
941
|
-
id: x.SendAccountActivationEmail,
|
|
942
|
-
name: f("activationEmail")
|
|
943
|
-
}, {
|
|
944
|
-
id: x.RemoveUser,
|
|
945
|
-
name: f("removeFromSchool")
|
|
946
|
-
}];
|
|
947
|
-
},
|
|
948
|
-
getUserTypeFilterOptions() {
|
|
949
|
-
return [{
|
|
950
|
-
id: w.Staff,
|
|
951
|
-
name: f("staff")
|
|
952
|
-
}, {
|
|
953
|
-
id: w.Learner,
|
|
954
|
-
name: f("students")
|
|
955
|
-
}];
|
|
956
|
-
},
|
|
957
|
-
mapSubActionToVerb(e) {
|
|
958
|
-
return e === "delete" ? "Delete" : e === "removeFromSchool" ? "Remove" : e === "resetEmail" || e === "activationEmail" ? "Email" : e === "addToClassroom" ? "Add" : "Update";
|
|
959
|
-
},
|
|
960
|
-
mapJobTypeToName(e) {
|
|
961
|
-
switch (e) {
|
|
962
|
-
case x.ActivateUser:
|
|
963
|
-
return f("activate");
|
|
964
|
-
case x.AddUsersClassroom:
|
|
965
|
-
return f("addToClassroom");
|
|
966
|
-
case x.ChangeYearGroup:
|
|
967
|
-
return f("changeYearGroup");
|
|
968
|
-
case x.DeactivateUser:
|
|
969
|
-
return f("deactivate");
|
|
970
|
-
case x.DeleteUser:
|
|
971
|
-
return f("delete");
|
|
972
|
-
case x.ResetPassword:
|
|
973
|
-
return f("resetPassword");
|
|
974
|
-
case x.RolloverYearGroup:
|
|
975
|
-
return f("yearGroupRollover");
|
|
976
|
-
case x.SendAccountReminderEmail:
|
|
977
|
-
return f("sendAccountReminderEmail");
|
|
978
|
-
case x.CreateUser:
|
|
979
|
-
return f("bulkUpload");
|
|
980
|
-
case x.SendAccountActivationEmail:
|
|
981
|
-
return f("sendAccountActivationEmail");
|
|
982
|
-
case x.RemoveUser:
|
|
983
|
-
return f("removeUser");
|
|
984
|
-
default:
|
|
985
|
-
return f("unknown");
|
|
986
|
-
}
|
|
987
|
-
},
|
|
988
|
-
hasFilterOrQuery(e) {
|
|
989
|
-
return !!(e.query || e.isAdmin || e.status || e.yearGroup);
|
|
990
|
-
}
|
|
991
|
-
};
|
|
992
|
-
function X(e) {
|
|
993
|
-
return {
|
|
994
|
-
batchObjectIds: [...e.userIdMap.keys()],
|
|
995
|
-
fullBatchObjects: void 0
|
|
996
|
-
};
|
|
997
|
-
}
|
|
998
|
-
function Wn(e, t) {
|
|
999
|
-
return {
|
|
1000
|
-
fullBatchObjects: {
|
|
1001
|
-
source: "UserApi",
|
|
1002
|
-
ownerId: t,
|
|
1003
|
-
objectType: Tt.User,
|
|
1004
|
-
query: `{userType:${w.Learner}}`
|
|
1005
|
-
},
|
|
1006
|
-
finalYearGroupId: e.yearGroup.id
|
|
1007
|
-
};
|
|
1008
|
-
}
|
|
1009
|
-
function zn(e) {
|
|
1010
|
-
const t = X(e);
|
|
1011
|
-
return t.newYearGroupId = e.yearGroup.id, t;
|
|
1012
|
-
}
|
|
1013
|
-
function Qn(e) {
|
|
1014
|
-
const t = X(e);
|
|
1015
|
-
return t.newPassword = e.password, t.changeOnNextLogin = e.changeOnNextLogin, t;
|
|
1016
|
-
}
|
|
1017
|
-
function Xn(e) {
|
|
1018
|
-
if (e.canRollover)
|
|
1019
|
-
return "";
|
|
1020
|
-
switch (e.reason) {
|
|
1021
|
-
case "select-all-students":
|
|
1022
|
-
return f("selectAllStudents");
|
|
1023
|
-
case "cooldown":
|
|
1024
|
-
return f("rolloverCooldown", {
|
|
1025
|
-
date: Nt.format(e.lastRolloverDate, "DD/MM/YYYY")
|
|
1026
|
-
});
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
function Bn(e) {
|
|
1030
|
-
const t = X(e);
|
|
1031
|
-
return t.classroomIds = [e.classroom.id], t;
|
|
1032
|
-
}
|
|
1033
|
-
function Kn(e, t) {
|
|
1034
|
-
var s;
|
|
1035
|
-
const n = X(e);
|
|
1036
|
-
return t != null && t.id && (n.batchObjectIds = ((s = n.batchObjectIds) == null ? void 0 : s.filter((a) => a.toString() !== t.id.toString())) ?? []), n;
|
|
1037
|
-
}
|
|
1038
|
-
const Zn = "search.durationFilter";
|
|
1039
|
-
function qn(e) {
|
|
1040
|
-
let t = "";
|
|
1041
|
-
switch (e.id) {
|
|
1042
|
-
case "bite-sized":
|
|
1043
|
-
t = "rangeBiteSized";
|
|
1044
|
-
break;
|
|
1045
|
-
case "short":
|
|
1046
|
-
t = "rangeShort";
|
|
1047
|
-
break;
|
|
1048
|
-
case "medium":
|
|
1049
|
-
t = "rangeMedium";
|
|
1050
|
-
break;
|
|
1051
|
-
case "long":
|
|
1052
|
-
t = "rangeLong";
|
|
1053
|
-
break;
|
|
1054
|
-
}
|
|
1055
|
-
return V.getPhrase(Zn, t);
|
|
1056
|
-
}
|
|
1057
|
-
function Jn(e) {
|
|
1058
|
-
return /* @__PURE__ */ i.jsxs("li", { className: "d-flex flex-fill flex-column align-items-center mb-2 mb-md-0 mx-1", children: [
|
|
1059
|
-
/* @__PURE__ */ i.jsx(
|
|
1060
|
-
"button",
|
|
1061
|
-
{
|
|
1062
|
-
onClick: () => e.onClick(e.option),
|
|
1063
|
-
className: `btn w-100 text-center btn-${e.active ? "dark" : "outline-dark"} mb-1`,
|
|
1064
|
-
disabled: e.disabled,
|
|
1065
|
-
children: e.option.name
|
|
1066
|
-
}
|
|
1067
|
-
),
|
|
1068
|
-
/* @__PURE__ */ i.jsx("span", { children: qn(e.option) })
|
|
1069
|
-
] });
|
|
1070
|
-
}
|
|
1071
|
-
function ei(e) {
|
|
1072
|
-
const t = D.first(e.draftState.selection);
|
|
1073
|
-
function n(s) {
|
|
1074
|
-
if ((t == null ? void 0 : t.id) === s.id) {
|
|
1075
|
-
e.setDraftState({
|
|
1076
|
-
active: !1,
|
|
1077
|
-
selection: []
|
|
1078
|
-
});
|
|
1079
|
-
return;
|
|
1080
|
-
}
|
|
1081
|
-
e.setDraftState({
|
|
1082
|
-
active: !0,
|
|
1083
|
-
selection: [s]
|
|
1084
|
-
});
|
|
1085
|
-
}
|
|
1086
|
-
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
1087
|
-
/* @__PURE__ */ i.jsx(re, { title: e.filter.name }),
|
|
1088
|
-
/* @__PURE__ */ i.jsx("ul", { className: "d-flex list-unstyled flex-column flex-md-row mx-n1 mb-2", children: e.filter.options.map((s) => /* @__PURE__ */ i.jsx(
|
|
1089
|
-
Jn,
|
|
1090
|
-
{
|
|
1091
|
-
option: s,
|
|
1092
|
-
onClick: n,
|
|
1093
|
-
active: (t == null ? void 0 : t.id) === s.id,
|
|
1094
|
-
disabled: e.filter.disabled || s.disabled
|
|
1095
|
-
},
|
|
1096
|
-
s.id
|
|
1097
|
-
)) })
|
|
1098
|
-
] });
|
|
1099
|
-
}
|
|
1100
|
-
const ti = "_icon_bcwaq_1", ni = "_activeIcon_bcwaq_5", ii = "_text_bcwaq_11", si = "_floatingIcon_bcwaq_14", ai = "_active_bcwaq_5", oe = {
|
|
1101
|
-
icon: ti,
|
|
1102
|
-
activeIcon: ni,
|
|
1103
|
-
text: ii,
|
|
1104
|
-
floatingIcon: si,
|
|
1105
|
-
default: "_default_bcwaq_18",
|
|
1106
|
-
active: ai
|
|
1107
|
-
}, ri = "search.moviesAndTvFilter";
|
|
1108
|
-
function oi(e) {
|
|
1109
|
-
const t = e.filter, { state: n } = N.useContext(de), s = n[t.id], a = s == null ? void 0 : s.active, [o, c] = N.useState(!1), r = N.useRef(o);
|
|
1110
|
-
N.useEffect(() => {
|
|
1111
|
-
a !== r.current && (r.current = a), o !== r.current && c(r.current);
|
|
1112
|
-
}, [a]);
|
|
1113
|
-
function l(u) {
|
|
1114
|
-
j.applyFilter(
|
|
1115
|
-
[t],
|
|
1116
|
-
s,
|
|
1117
|
-
{ [e.filter.id]: u },
|
|
1118
|
-
n.appLink
|
|
1119
|
-
);
|
|
1120
|
-
}
|
|
1121
|
-
return /* @__PURE__ */ i.jsxs(
|
|
1122
|
-
ge,
|
|
1123
|
-
{
|
|
1124
|
-
onClick: () => {
|
|
1125
|
-
c(!a), l({ active: !a });
|
|
1126
|
-
},
|
|
1127
|
-
className: `mx-1 btn ${a ? "btn-dark" : "btn-outline-dark"} position-relative fw-semibold d-flex align-items-center flex-shrink-0`,
|
|
1128
|
-
children: [
|
|
1129
|
-
/* @__PURE__ */ i.jsx("img", { src: e.iconUrl, className: `${oe.icon} position-absolute ${a ? oe.activeIcon : ""}` }),
|
|
1130
|
-
/* @__PURE__ */ i.jsx("div", { className: oe.text, children: /* @__PURE__ */ i.jsx(b, { namespace: ri, phrase: "title" }) }),
|
|
1131
|
-
/* @__PURE__ */ i.jsx("img", { src: e.extraIconUrl, className: `position-absolute ${oe.floatingIcon} ${o ? oe.active : oe.default}` })
|
|
1132
|
-
]
|
|
1133
|
-
}
|
|
1134
|
-
);
|
|
1135
|
-
}
|
|
1136
|
-
function ci(e) {
|
|
1137
|
-
const t = {};
|
|
1138
|
-
for (const n of e.filter.options)
|
|
1139
|
-
n.group && (t[n.group] || (t[n.group] = []), t[n.group].push(n));
|
|
1140
|
-
return /* @__PURE__ */ i.jsx(he, { className: "mb-3", children: Object.entries(t).map(([n, s]) => /* @__PURE__ */ i.jsxs("ul", { className: "list-unstyled", children: [
|
|
1141
|
-
/* @__PURE__ */ i.jsx(re, { title: n }),
|
|
1142
|
-
/* @__PURE__ */ i.jsx(
|
|
1143
|
-
mt,
|
|
1144
|
-
{
|
|
1145
|
-
filter: e.filter,
|
|
1146
|
-
options: s,
|
|
1147
|
-
draftState: e.draftState,
|
|
1148
|
-
setDraftState: e.setDraftState,
|
|
1149
|
-
displayOptionsIn2Columns: !1
|
|
1150
|
-
}
|
|
1151
|
-
)
|
|
1152
|
-
] }, n)) });
|
|
1153
|
-
}
|
|
1154
|
-
const li = {
|
|
1155
|
-
deriveInitialClassificationFilterStateFromQueryParams(e, t) {
|
|
1156
|
-
var n;
|
|
1157
|
-
return ((n = e == null ? void 0 : e.options) == null ? void 0 : n.filter((s) => s.id.split(":").every((o) => t.find(
|
|
1158
|
-
(r) => r.toString() === o.toString()
|
|
1159
|
-
)))) ?? [];
|
|
1160
|
-
}
|
|
1161
|
-
}, di = "sharedSearch.utils", Se = V.encloseNamespace(di), gt = {
|
|
1162
|
-
getOptions() {
|
|
1163
|
-
return [
|
|
1164
|
-
{
|
|
1165
|
-
id: "bite-sized",
|
|
1166
|
-
name: Se("durationBiteSized")
|
|
1167
|
-
},
|
|
1168
|
-
{
|
|
1169
|
-
id: "short",
|
|
1170
|
-
name: Se("durationShort")
|
|
1171
|
-
},
|
|
1172
|
-
{
|
|
1173
|
-
id: "medium",
|
|
1174
|
-
name: Se("durationMedium")
|
|
1175
|
-
},
|
|
1176
|
-
{
|
|
1177
|
-
id: "long",
|
|
1178
|
-
name: Se("durationLong")
|
|
1179
|
-
}
|
|
1180
|
-
];
|
|
1181
|
-
},
|
|
1182
|
-
getBackendParamValue(e) {
|
|
1183
|
-
switch (e) {
|
|
1184
|
-
case "bite-sized":
|
|
1185
|
-
return "...179999";
|
|
1186
|
-
// 3 minutes in ms
|
|
1187
|
-
case "short":
|
|
1188
|
-
return "180000...299999";
|
|
1189
|
-
// 3 - 5 minutes in ms
|
|
1190
|
-
case "medium":
|
|
1191
|
-
return "300000...899999";
|
|
1192
|
-
// 5 - 15 minutes in ms
|
|
1193
|
-
case "long":
|
|
1194
|
-
return "900000...";
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
}, ui = {
|
|
1198
|
-
deriveInitialPresentationFilterStateFromQueryParams: (e, t, n) => Oe(e, t).map((s) => {
|
|
1199
|
-
const a = n.audience;
|
|
1200
|
-
if (!(a != null && a.length))
|
|
1201
|
-
return s;
|
|
1202
|
-
const o = Oe(s.secondLayerOptions, a);
|
|
1203
|
-
return { ...s, secondLayerSelection: o };
|
|
1204
|
-
}).filter((s) => {
|
|
1205
|
-
var a;
|
|
1206
|
-
return !!((a = s.secondLayerSelection) != null && a.length);
|
|
1207
|
-
})
|
|
1208
|
-
}, mi = "sharedSearch.utils", je = V.encloseNamespace(mi), ht = {
|
|
1209
|
-
getOptions() {
|
|
1210
|
-
return [
|
|
1211
|
-
{
|
|
1212
|
-
id: "any-year",
|
|
1213
|
-
name: je("anyYear"),
|
|
1214
|
-
default: !0
|
|
1215
|
-
},
|
|
1216
|
-
{
|
|
1217
|
-
id: "this-year",
|
|
1218
|
-
name: je("thisYear")
|
|
1219
|
-
},
|
|
1220
|
-
{
|
|
1221
|
-
id: "last-3-years",
|
|
1222
|
-
name: je("last3Years")
|
|
1223
|
-
},
|
|
1224
|
-
{
|
|
1225
|
-
id: "last-5-years",
|
|
1226
|
-
name: je("last5Years")
|
|
1227
|
-
}
|
|
1228
|
-
];
|
|
1229
|
-
},
|
|
1230
|
-
getBackendParamValue(e) {
|
|
1231
|
-
const t = (/* @__PURE__ */ new Date()).getFullYear();
|
|
1232
|
-
switch (e) {
|
|
1233
|
-
case "any-year":
|
|
1234
|
-
return "";
|
|
1235
|
-
case "this-year":
|
|
1236
|
-
return `${t}...`;
|
|
1237
|
-
case "last-3-years":
|
|
1238
|
-
return `${t - 3}...`;
|
|
1239
|
-
case "last-5-years":
|
|
1240
|
-
return `${t - 5}...`;
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
}, _e = {
|
|
1244
|
-
deriveInitialRatingFilterStateFromQueryParams(e, t) {
|
|
1245
|
-
if (Array.isArray(e))
|
|
1246
|
-
return e;
|
|
1247
|
-
const n = t.options, s = nt(e, n);
|
|
1248
|
-
if (!s.length)
|
|
1249
|
-
return [];
|
|
1250
|
-
const a = D.last(s);
|
|
1251
|
-
return n.filter((o) => o.value > 0 && o.value <= a.value);
|
|
1252
|
-
},
|
|
1253
|
-
getFrontendParamValue(e) {
|
|
1254
|
-
if (!(e != null && e.length))
|
|
1255
|
-
return "";
|
|
1256
|
-
const t = D.first(e), n = D.last(e);
|
|
1257
|
-
return e.length === 1 ? t.code : `${t.code}-to-${n.code}`;
|
|
1258
|
-
},
|
|
1259
|
-
getBackendParamValue(e, t) {
|
|
1260
|
-
const n = nt(e, t);
|
|
1261
|
-
return n.length ? n.length === 1 ? `0...${D.first(n).value}` : `0...${D.last(n).value}` : void 0;
|
|
1262
|
-
},
|
|
1263
|
-
getStudentMaxRating(e, t) {
|
|
1264
|
-
var s;
|
|
1265
|
-
const n = D.findWhere(
|
|
1266
|
-
e,
|
|
1267
|
-
{ value: (s = t.masterYearGroup) == null ? void 0 : s.value }
|
|
1268
|
-
);
|
|
1269
|
-
return n == null ? void 0 : n.rating;
|
|
1270
|
-
}
|
|
1271
|
-
};
|
|
1272
|
-
function nt(e, t) {
|
|
1273
|
-
const s = e.split("-to-").map((a) => t.find((o) => o.code === a));
|
|
1274
|
-
return s.every((a) => !!a) ? s : [];
|
|
1275
|
-
}
|
|
1276
|
-
const d = V.encloseNamespace("sharedSearch.utils"), fi = {
|
|
1277
|
-
classification: !0,
|
|
1278
|
-
categoryId: !0,
|
|
1279
|
-
channel: !0
|
|
1280
|
-
}, it = {
|
|
1281
|
-
series: !0,
|
|
1282
|
-
video: !0,
|
|
1283
|
-
playlist: !0,
|
|
1284
|
-
classification: !0,
|
|
1285
|
-
clip: !0,
|
|
1286
|
-
interactive: !0,
|
|
1287
|
-
company: !0,
|
|
1288
|
-
category: !0
|
|
1289
|
-
}, Fs = {
|
|
1290
|
-
SortBy: (e, t) => ({
|
|
1291
|
-
id: "sort",
|
|
1292
|
-
name: d("newest"),
|
|
1293
|
-
type: "dropdown",
|
|
1294
|
-
options: e,
|
|
1295
|
-
compatibleIndices: [...me, ...pe],
|
|
1296
|
-
labelPrefix: t
|
|
1297
|
-
}),
|
|
1298
|
-
Presentation: (e, t) => ({
|
|
1299
|
-
id: "presentation",
|
|
1300
|
-
secondaryId: "audience",
|
|
1301
|
-
name: d("schoolLevels"),
|
|
1302
|
-
type: "nested-checkbox",
|
|
1303
|
-
options: gi(e),
|
|
1304
|
-
compatibleIndices: t ? ["playlist", "series", "clip", "interactive", "video", "company", "category"] : me
|
|
1305
|
-
}),
|
|
1306
|
-
Topics: (e) => ({
|
|
1307
|
-
compatibleIndices: ["playlist", "series", "clip", "classification", "interactive", "video"],
|
|
1308
|
-
options: e,
|
|
1309
|
-
type: "checkbox",
|
|
1310
|
-
name: d("topicsFilter"),
|
|
1311
|
-
id: "classification"
|
|
1312
|
-
}),
|
|
1313
|
-
Source: (e) => ({
|
|
1314
|
-
id: "source",
|
|
1315
|
-
type: "checkbox",
|
|
1316
|
-
name: d("sources"),
|
|
1317
|
-
options: e,
|
|
1318
|
-
compatibleIndices: ["video", "clip", "interactive", "category"]
|
|
1319
|
-
}),
|
|
1320
|
-
MoviesAndTv: (e, t) => ({
|
|
1321
|
-
id: "moviesAndTv",
|
|
1322
|
-
name: d("moviesAndTv"),
|
|
1323
|
-
type: "button",
|
|
1324
|
-
compatibleIndices: ["video", "series", "clip", "interactive", "classification", "playlist", "company"],
|
|
1325
|
-
customComponent: (n) => /* @__PURE__ */ i.jsx(
|
|
1326
|
-
oi,
|
|
1327
|
-
{
|
|
1328
|
-
...n,
|
|
1329
|
-
filter: n.filter,
|
|
1330
|
-
iconUrl: e,
|
|
1331
|
-
extraIconUrl: t
|
|
1332
|
-
}
|
|
1333
|
-
)
|
|
1334
|
-
}),
|
|
1335
|
-
YearGroup: (e) => ({
|
|
1336
|
-
id: "yearGroup",
|
|
1337
|
-
// "id" should match the state keys in `FilterReducer`
|
|
1338
|
-
name: d("yearGroup"),
|
|
1339
|
-
type: "checkbox",
|
|
1340
|
-
options: e,
|
|
1341
|
-
compatibleIndices: pe
|
|
1342
|
-
}),
|
|
1343
|
-
ObjectTypes: (e = [], t = !1) => ({
|
|
1344
|
-
id: "type",
|
|
1345
|
-
name: d("types"),
|
|
1346
|
-
type: t ? "grouped-checkbox" : "checkbox",
|
|
1347
|
-
options: j.getObjectTypeOptions(e, t),
|
|
1348
|
-
disableOptions: j.getIsObjectTypeOptionDisabled,
|
|
1349
|
-
compatibleIndices: me
|
|
1350
|
-
}),
|
|
1351
|
-
Rating: (e, t) => ({
|
|
1352
|
-
id: "rating",
|
|
1353
|
-
name: d("rating"),
|
|
1354
|
-
type: "rating",
|
|
1355
|
-
options: e && t ? e.filter((n) => n.value <= t.value) : e,
|
|
1356
|
-
compatibleIndices: ["video", "series"]
|
|
1357
|
-
}),
|
|
1358
|
-
Interactives: () => ({
|
|
1359
|
-
id: "interactives",
|
|
1360
|
-
name: d("interactives"),
|
|
1361
|
-
type: "switch",
|
|
1362
|
-
description: d("interactivesDescription"),
|
|
1363
|
-
compatibleIndices: ["video", "clip"]
|
|
1364
|
-
}),
|
|
1365
|
-
Clips: () => ({
|
|
1366
|
-
id: "clips",
|
|
1367
|
-
name: d("clips"),
|
|
1368
|
-
type: "switch",
|
|
1369
|
-
description: d("clipsDescription"),
|
|
1370
|
-
compatibleIndices: ["video"]
|
|
1371
|
-
}),
|
|
1372
|
-
HasResources: () => ({
|
|
1373
|
-
id: "hasResources",
|
|
1374
|
-
name: d("resources"),
|
|
1375
|
-
type: "switch",
|
|
1376
|
-
description: d("resourcesDescription"),
|
|
1377
|
-
compatibleIndices: ["video", "clip"]
|
|
1378
|
-
}),
|
|
1379
|
-
HasSubtitles: () => ({
|
|
1380
|
-
id: "hasSubtitles",
|
|
1381
|
-
name: d("subtitles"),
|
|
1382
|
-
type: "switch",
|
|
1383
|
-
description: d("subtitlesDescription"),
|
|
1384
|
-
compatibleIndices: xe
|
|
1385
|
-
}),
|
|
1386
|
-
ProductionYear: () => ({
|
|
1387
|
-
id: "productionYear",
|
|
1388
|
-
name: d("productionYear"),
|
|
1389
|
-
type: "radio",
|
|
1390
|
-
options: ht.getOptions(),
|
|
1391
|
-
compatibleIndices: [...xe, "series"]
|
|
1392
|
-
}),
|
|
1393
|
-
IsHD: () => ({
|
|
1394
|
-
id: "isHd",
|
|
1395
|
-
name: d("isHd"),
|
|
1396
|
-
type: "switch",
|
|
1397
|
-
description: d("isHdDescription"),
|
|
1398
|
-
compatibleIndices: xe
|
|
1399
|
-
}),
|
|
1400
|
-
IsClickViewContent: () => ({
|
|
1401
|
-
id: "producedByClickView",
|
|
1402
|
-
name: d("producedByClickView"),
|
|
1403
|
-
type: "switch",
|
|
1404
|
-
description: d("producedByClickViewDescription"),
|
|
1405
|
-
compatibleIndices: me
|
|
1406
|
-
}),
|
|
1407
|
-
Duration: () => ({
|
|
1408
|
-
id: "duration",
|
|
1409
|
-
name: d("duration"),
|
|
1410
|
-
type: "radio",
|
|
1411
|
-
customComponent: ei,
|
|
1412
|
-
options: gt.getOptions(),
|
|
1413
|
-
compatibleIndices: xe
|
|
1414
|
-
}),
|
|
1415
|
-
TagOrClassification: (e) => ({
|
|
1416
|
-
id: "tagOrClassification",
|
|
1417
|
-
type: "tag",
|
|
1418
|
-
options: e && e.map((t) => ({
|
|
1419
|
-
id: t,
|
|
1420
|
-
name: t
|
|
1421
|
-
})),
|
|
1422
|
-
compatibleIndices: me
|
|
1423
|
-
}),
|
|
1424
|
-
Status: (e) => ({
|
|
1425
|
-
id: "status",
|
|
1426
|
-
name: d("status"),
|
|
1427
|
-
type: "checkbox",
|
|
1428
|
-
compatibleIndices: [...pe, "customer"],
|
|
1429
|
-
options: e || j.getStatusOptions()
|
|
1430
|
-
}),
|
|
1431
|
-
JobStatus: () => ({
|
|
1432
|
-
id: "jobStatus",
|
|
1433
|
-
name: d("status"),
|
|
1434
|
-
type: "checkbox",
|
|
1435
|
-
compatibleIndices: [],
|
|
1436
|
-
options: j.getJobStatusOptions()
|
|
1437
|
-
}),
|
|
1438
|
-
IsAdmin: (e, t) => {
|
|
1439
|
-
const n = !!(e != null && e.organisation), a = d(n ? t === "US" ? "isAdminDescriptionOrgUs" : "isAdminDescriptionOrg" : "isAdminDescription");
|
|
1440
|
-
return {
|
|
1441
|
-
id: "isAdmin",
|
|
1442
|
-
name: d("isAdmin"),
|
|
1443
|
-
type: "switch",
|
|
1444
|
-
compatibleIndices: pe,
|
|
1445
|
-
description: a
|
|
1446
|
-
};
|
|
1447
|
-
},
|
|
1448
|
-
BulkActionType: () => ({
|
|
1449
|
-
id: "bulkActionType",
|
|
1450
|
-
name: d("actionType"),
|
|
1451
|
-
type: "checkbox",
|
|
1452
|
-
options: E.getActionTypeFilterOptions(),
|
|
1453
|
-
compatibleIndices: []
|
|
1454
|
-
}),
|
|
1455
|
-
UserType: () => ({
|
|
1456
|
-
id: "userType",
|
|
1457
|
-
name: d("users"),
|
|
1458
|
-
type: "checkbox",
|
|
1459
|
-
options: E.getUserTypeFilterOptions(),
|
|
1460
|
-
compatibleIndices: []
|
|
1461
|
-
}),
|
|
1462
|
-
TvFields: () => ({
|
|
1463
|
-
id: "filter",
|
|
1464
|
-
name: d("tvFields"),
|
|
1465
|
-
type: "radio",
|
|
1466
|
-
options: j.getTvFieldsOptions(),
|
|
1467
|
-
compatibleIndices: []
|
|
1468
|
-
}),
|
|
1469
|
-
TvChannel: (e) => ({
|
|
1470
|
-
id: "channel",
|
|
1471
|
-
name: d("tvChannel"),
|
|
1472
|
-
type: "checkbox",
|
|
1473
|
-
options: j.getTvChannelOptions(e),
|
|
1474
|
-
compatibleIndices: []
|
|
1475
|
-
}),
|
|
1476
|
-
TvDateBroadcast: () => ({
|
|
1477
|
-
id: "dateBroadcast",
|
|
1478
|
-
name: d("tvDateBroadcast"),
|
|
1479
|
-
type: "radio",
|
|
1480
|
-
options: j.getTvDateBroadcastOptions(),
|
|
1481
|
-
compatibleIndices: []
|
|
1482
|
-
}),
|
|
1483
|
-
Categories: (e) => ({
|
|
1484
|
-
id: "categoryId",
|
|
1485
|
-
name: d("categories"),
|
|
1486
|
-
type: "checkbox",
|
|
1487
|
-
options: j.getCategoriesOptions(e),
|
|
1488
|
-
compatibleIndices: []
|
|
1489
|
-
}),
|
|
1490
|
-
CustomerStatus: () => ({
|
|
1491
|
-
id: "customerStatus",
|
|
1492
|
-
name: d("customerStatus"),
|
|
1493
|
-
type: "radio",
|
|
1494
|
-
options: j.getCustomerStatusOptions(),
|
|
1495
|
-
compatibleIndices: []
|
|
1496
|
-
}),
|
|
1497
|
-
SpecialEventTypes: () => ({
|
|
1498
|
-
id: "specialEventType",
|
|
1499
|
-
type: "checkbox",
|
|
1500
|
-
name: "Event Type",
|
|
1501
|
-
compatibleIndices: [],
|
|
1502
|
-
options: j.getSpecialEventTypeOptions()
|
|
1503
|
-
}),
|
|
1504
|
-
CustomerType: () => ({
|
|
1505
|
-
id: "customerType",
|
|
1506
|
-
name: d("customerType"),
|
|
1507
|
-
type: "radio",
|
|
1508
|
-
options: j.getCustomerTypeOptions(),
|
|
1509
|
-
compatibleIndices: []
|
|
1510
|
-
})
|
|
1511
|
-
};
|
|
1512
|
-
function gi(e) {
|
|
1513
|
-
return e ? e.map((t) => ({
|
|
1514
|
-
...t,
|
|
1515
|
-
id: t.id.toString(),
|
|
1516
|
-
secondLayerOptions: t.audiences.map((n) => ({ ...n, id: n.id.toString() }))
|
|
1517
|
-
})) : [];
|
|
1518
|
-
}
|
|
1519
|
-
const j = {
|
|
1520
|
-
displayTwoLayers(e) {
|
|
1521
|
-
return !(e.type !== "nested-checkbox" || !this.hasManyFilterOptions(e.options) || e.options.every((t) => !this.hasManyFilterOptions(t == null ? void 0 : t.secondLayerOptions)));
|
|
1522
|
-
},
|
|
1523
|
-
hasManyFilterOptions(e) {
|
|
1524
|
-
return e.length >= Wt.MULTI_PRESENTATION_THRESHOLD;
|
|
1525
|
-
},
|
|
1526
|
-
displayTwoColumns(e) {
|
|
1527
|
-
var t;
|
|
1528
|
-
return fi[e.id] && ((t = e.options) == null ? void 0 : t.length) >= ne.MAX_CHECKBOXES_PER_COLUMN;
|
|
1529
|
-
},
|
|
1530
|
-
showPresentationFilter(e) {
|
|
1531
|
-
var t, n;
|
|
1532
|
-
return (t = e.options) != null && t.length ? e.options.length > 1 || ((n = D.first(e.options).secondLayerOptions) == null ? void 0 : n.length) > 1 : !1;
|
|
1533
|
-
},
|
|
1534
|
-
getMoreFilters(e) {
|
|
1535
|
-
return {
|
|
1536
|
-
id: "moreFilters",
|
|
1537
|
-
name: d("moreFilters"),
|
|
1538
|
-
type: "more-filters",
|
|
1539
|
-
filters: e
|
|
1540
|
-
};
|
|
1541
|
-
},
|
|
1542
|
-
mapTypeToComponent(e) {
|
|
1543
|
-
switch (e) {
|
|
1544
|
-
case "switch":
|
|
1545
|
-
return (t) => /* @__PURE__ */ i.jsx(cn, { ...t }, t.id);
|
|
1546
|
-
case "checkbox":
|
|
1547
|
-
return (t) => /* @__PURE__ */ i.jsx(nn, { ...t }, t.id);
|
|
1548
|
-
case "nested-checkbox":
|
|
1549
|
-
return (t) => /* @__PURE__ */ i.jsx(on, { ...t }, t.id);
|
|
1550
|
-
case "grouped-checkbox":
|
|
1551
|
-
return (t) => /* @__PURE__ */ i.jsx(ci, { ...t }, t.id);
|
|
1552
|
-
case "radio":
|
|
1553
|
-
return (t) => /* @__PURE__ */ i.jsx(mn, { ...t }, t.id);
|
|
1554
|
-
case "rating":
|
|
1555
|
-
return (t) => /* @__PURE__ */ i.jsx(vn, { ...t }, t.id);
|
|
1556
|
-
case "dropdown":
|
|
1557
|
-
return (t) => /* @__PURE__ */ i.jsx(ln, { ...t }, t.id);
|
|
1558
|
-
default:
|
|
1559
|
-
return () => /* @__PURE__ */ i.jsx(i.Fragment, {});
|
|
1560
|
-
}
|
|
1561
|
-
},
|
|
1562
|
-
deriveInitialStateFromQuery(e = {}, t = null, n = null, s) {
|
|
1563
|
-
var r, l, u, g, m, h, v, A;
|
|
1564
|
-
const a = {
|
|
1565
|
-
sort: {
|
|
1566
|
-
active: !!e.sort,
|
|
1567
|
-
selection: I(e, t, "sort")
|
|
1568
|
-
},
|
|
1569
|
-
classification: {
|
|
1570
|
-
active: !!e.classification,
|
|
1571
|
-
selection: I(e, t, "classification")
|
|
1572
|
-
},
|
|
1573
|
-
presentation: {
|
|
1574
|
-
active: !!e.presentation,
|
|
1575
|
-
selection: I(e, t, "presentation")
|
|
1576
|
-
},
|
|
1577
|
-
type: {
|
|
1578
|
-
active: !!e.type,
|
|
1579
|
-
selection: I(e, t, "type")
|
|
1580
|
-
},
|
|
1581
|
-
specialEventType: {
|
|
1582
|
-
active: !!e.specialEventType,
|
|
1583
|
-
selection: I(e, t, "specialEventType")
|
|
1584
|
-
},
|
|
1585
|
-
rating: {
|
|
1586
|
-
active: !!e.rating,
|
|
1587
|
-
selection: I(e, t, "rating")
|
|
1588
|
-
},
|
|
1589
|
-
interactives: {
|
|
1590
|
-
active: ((r = e.interactives) == null ? void 0 : r.toString()) === "true"
|
|
1591
|
-
},
|
|
1592
|
-
clips: {
|
|
1593
|
-
active: ((l = e.clips) == null ? void 0 : l.toString()) === "true"
|
|
1594
|
-
},
|
|
1595
|
-
yearGroup: {
|
|
1596
|
-
active: !!e.yearGroup,
|
|
1597
|
-
selection: I(e, t, "yearGroup")
|
|
1598
|
-
},
|
|
1599
|
-
moviesAndTv: {
|
|
1600
|
-
active: ((u = e.moviesAndTv) == null ? void 0 : u.toString()) === "true"
|
|
1601
|
-
},
|
|
1602
|
-
classroom: {
|
|
1603
|
-
active: !!e.classroom,
|
|
1604
|
-
selection: I(e, t, "classroom")
|
|
1605
|
-
},
|
|
1606
|
-
audience: {
|
|
1607
|
-
active: !!e.audience,
|
|
1608
|
-
selection: I(e, t, "audience")
|
|
1609
|
-
},
|
|
1610
|
-
hasResources: {
|
|
1611
|
-
active: ((g = e.hasResources) == null ? void 0 : g.toString()) === "true"
|
|
1612
|
-
},
|
|
1613
|
-
hasSubtitles: {
|
|
1614
|
-
active: ((m = e.hasSubtitles) == null ? void 0 : m.toString()) === "true"
|
|
1615
|
-
},
|
|
1616
|
-
productionYear: {
|
|
1617
|
-
active: !!e.productionYear,
|
|
1618
|
-
selection: I(e, n == null ? void 0 : n.filters, "productionYear")
|
|
1619
|
-
},
|
|
1620
|
-
isHd: {
|
|
1621
|
-
active: ((h = e.isHd) == null ? void 0 : h.toString()) === "true"
|
|
1622
|
-
},
|
|
1623
|
-
producedByClickView: {
|
|
1624
|
-
active: ((v = e.producedByClickView) == null ? void 0 : v.toString()) === "true"
|
|
1625
|
-
},
|
|
1626
|
-
duration: {
|
|
1627
|
-
active: e.duration,
|
|
1628
|
-
selection: I(e, n == null ? void 0 : n.filters, "duration")
|
|
1629
|
-
},
|
|
1630
|
-
tagOrClassification: {
|
|
1631
|
-
active: !!e.tagOrClassification,
|
|
1632
|
-
selection: I(e, t, "tagOrClassification")
|
|
1633
|
-
},
|
|
1634
|
-
status: {
|
|
1635
|
-
active: !!e.status,
|
|
1636
|
-
selection: I(e, t, "status")
|
|
1637
|
-
},
|
|
1638
|
-
jobStatus: {
|
|
1639
|
-
active: !!e.jobStatus,
|
|
1640
|
-
selection: I(e, t, "jobStatus")
|
|
1641
|
-
},
|
|
1642
|
-
isAdmin: {
|
|
1643
|
-
active: ((A = e.isAdmin) == null ? void 0 : A.toString()) === "true"
|
|
1644
|
-
},
|
|
1645
|
-
bulkActionType: {
|
|
1646
|
-
active: !!e.bulkActionType,
|
|
1647
|
-
selection: I(e, t, "bulkActionType")
|
|
1648
|
-
},
|
|
1649
|
-
userType: {
|
|
1650
|
-
active: !!e.userType,
|
|
1651
|
-
selection: I(e, t, "userType")
|
|
1652
|
-
},
|
|
1653
|
-
filter: {
|
|
1654
|
-
active: !!e.filter,
|
|
1655
|
-
selection: I(e, t, "filter")
|
|
1656
|
-
},
|
|
1657
|
-
channel: {
|
|
1658
|
-
active: !!e.channel,
|
|
1659
|
-
selection: I(e, t, "channel")
|
|
1660
|
-
},
|
|
1661
|
-
dateBroadcast: {
|
|
1662
|
-
active: !!e.dateBroadcast,
|
|
1663
|
-
selection: I(e, t, "dateBroadcast")
|
|
1664
|
-
},
|
|
1665
|
-
categoryId: {
|
|
1666
|
-
active: !!e.categoryId,
|
|
1667
|
-
selection: I(e, t, "categoryId")
|
|
1668
|
-
},
|
|
1669
|
-
hasInteractives: {
|
|
1670
|
-
active: !!e.hasInteractives,
|
|
1671
|
-
selection: I(e, t, "hasInteractives")
|
|
1672
|
-
},
|
|
1673
|
-
source: {
|
|
1674
|
-
active: !!e.source,
|
|
1675
|
-
selection: I(e, t, "source")
|
|
1676
|
-
},
|
|
1677
|
-
customerStatus: {
|
|
1678
|
-
active: !!e.customerStatus,
|
|
1679
|
-
selection: I(e, t, "customerStatus")
|
|
1680
|
-
},
|
|
1681
|
-
customerType: {
|
|
1682
|
-
active: !!e.customerType,
|
|
1683
|
-
selection: I(e, t, "customerType")
|
|
1684
|
-
}
|
|
1685
|
-
}, o = (T, $) => {
|
|
1686
|
-
var y;
|
|
1687
|
-
const p = a[$.id];
|
|
1688
|
-
return p.active && "selection" in p && !((y = p.selection) != null && y.length) && (p.active = !1), T[$.id] = a[$.id], T;
|
|
1689
|
-
}, c = t.reduce(o, {});
|
|
1690
|
-
return n != null && n.filters && (c.moreFilters = n.filters.reduce(o, {})), c.appLink = s, c;
|
|
1691
|
-
},
|
|
1692
|
-
hasActiveFilters(e) {
|
|
1693
|
-
const t = Object.keys(e);
|
|
1694
|
-
return t.length ? !!t.filter((s) => !(s === "query" || s === "cursor" || s === "page" || s === ut || Array.isArray(e[s]) && !e[s].length)).length : !1;
|
|
1695
|
-
},
|
|
1696
|
-
getLabel(e, t) {
|
|
1697
|
-
var n, s;
|
|
1698
|
-
if (!((n = t == null ? void 0 : t.selection) != null && n.length))
|
|
1699
|
-
return e.name;
|
|
1700
|
-
if (e.type === "dropdown")
|
|
1701
|
-
return D.first(t.selection).name;
|
|
1702
|
-
if (e.type === "radio") {
|
|
1703
|
-
const a = D.first(t.selection);
|
|
1704
|
-
return !a || a.default ? e.name : a.name;
|
|
1705
|
-
}
|
|
1706
|
-
if (e.type === "nested-checkbox" || e.type === "checkbox" || e.type === "grouped-checkbox") {
|
|
1707
|
-
if (e.options.find((o) => o.default && t.selection.find((c) => c.id === o.id)))
|
|
1708
|
-
return e.name;
|
|
1709
|
-
if (e.secondaryId) {
|
|
1710
|
-
const o = (s = t.selection) == null ? void 0 : s.reduce((c, r) => {
|
|
1711
|
-
var g, m;
|
|
1712
|
-
const l = e.options, u = l.findIndex((h) => h.id === r.id);
|
|
1713
|
-
return ((g = l[u].secondLayerOptions) == null ? void 0 : g.length) === 0 ? c + 1 : c + (((m = r.secondLayerSelection) == null ? void 0 : m.length) ?? 0);
|
|
1714
|
-
}, 0);
|
|
1715
|
-
return `${e.name} - ${o}`;
|
|
1716
|
-
}
|
|
1717
|
-
return `${e.name} - ${t.selection.length}`;
|
|
1718
|
-
}
|
|
1719
|
-
if (e.type === "rating") {
|
|
1720
|
-
if (!t.selection.length)
|
|
1721
|
-
return e.name;
|
|
1722
|
-
const a = D.first(t.selection), o = D.last(t.selection);
|
|
1723
|
-
return t.selection.length === 1 ? `${e.name}: ${a.code}` : `${e.name}: ${a.code} to ${o.code}`;
|
|
1724
|
-
}
|
|
1725
|
-
},
|
|
1726
|
-
buildFrontendFilterParams(e, t) {
|
|
1727
|
-
const n = { ...e };
|
|
1728
|
-
return t.forEach((s) => {
|
|
1729
|
-
var l, u;
|
|
1730
|
-
if (!(s != null && s.filter))
|
|
1731
|
-
return;
|
|
1732
|
-
const { id: a, type: o } = s.filter, { active: c, selection: r } = s.state;
|
|
1733
|
-
switch (o) {
|
|
1734
|
-
case "switch":
|
|
1735
|
-
n[a] = c ? "true" : "";
|
|
1736
|
-
break;
|
|
1737
|
-
case "radio":
|
|
1738
|
-
case "dropdown":
|
|
1739
|
-
const g = ((l = s.state.selection) == null ? void 0 : l.length) === 1 && ((u = D.first(s.state.selection)) == null ? void 0 : u.default);
|
|
1740
|
-
n[a] = s.state.selection.length && !g ? D.first(s.state.selection).id : "";
|
|
1741
|
-
break;
|
|
1742
|
-
case "nested-checkbox":
|
|
1743
|
-
n[a] = c ? r.map((v) => v.id) : null;
|
|
1744
|
-
const { secondaryId: m } = s.filter;
|
|
1745
|
-
m && (n[m] = [].concat(...r.map((v) => v.secondLayerSelection.map((A) => A.id))));
|
|
1746
|
-
break;
|
|
1747
|
-
case "checkbox":
|
|
1748
|
-
case "grouped-checkbox":
|
|
1749
|
-
if (!c) {
|
|
1750
|
-
n[a] = null;
|
|
1751
|
-
break;
|
|
1752
|
-
}
|
|
1753
|
-
const h = [];
|
|
1754
|
-
for (const v of r) {
|
|
1755
|
-
const A = v.id.toString().split(":");
|
|
1756
|
-
if (A.length > 1)
|
|
1757
|
-
for (const T of A)
|
|
1758
|
-
h.push(T);
|
|
1759
|
-
else
|
|
1760
|
-
h.push(v.id);
|
|
1761
|
-
}
|
|
1762
|
-
n[a] = h;
|
|
1763
|
-
break;
|
|
1764
|
-
case "tag":
|
|
1765
|
-
n[a] = c ? r.map((v) => v.id) : null;
|
|
1766
|
-
break;
|
|
1767
|
-
case "rating":
|
|
1768
|
-
n[a] = c ? _e.getFrontendParamValue(r) : null;
|
|
1769
|
-
break;
|
|
1770
|
-
case "button":
|
|
1771
|
-
n[a] = c ? "true" : "";
|
|
1772
|
-
break;
|
|
1773
|
-
}
|
|
1774
|
-
n[a] || delete n[a];
|
|
1775
|
-
}), le.omit(n, ["cursor"]);
|
|
1776
|
-
},
|
|
1777
|
-
buildBackendFilterParams(e, t = [], n, s, a) {
|
|
1778
|
-
const o = s ? {
|
|
1779
|
-
"filters.presentation": n,
|
|
1780
|
-
isLearner: s
|
|
1781
|
-
} : {};
|
|
1782
|
-
return Object.keys(e).reduce((c, r) => {
|
|
1783
|
-
const l = e[r];
|
|
1784
|
-
return Array.isArray(l) && !l.length || !l || !Yt[r] ? c : r === "rating" ? (c[`${ne.FILTER_PARAM_PREFIX}${r}`] = _e.getBackendParamValue(l, t), c) : r === "productionYear" ? (c[`${ne.FILTER_PARAM_PREFIX}${r}`] = ht.getBackendParamValue(l), c) : r === "duration" ? (c[`${ne.FILTER_PARAM_PREFIX}${r}`] = gt.getBackendParamValue(l), c) : r === "moviesAndTv" ? (c[`${ne.FILTER_PARAM_PREFIX}curationTag`] = Ht.MOVIES_AND_TV, c) : r === "source" ? {
|
|
1785
|
-
...c,
|
|
1786
|
-
...yn.getBackendParamValue(l, a)
|
|
1787
|
-
} : (c[`${ne.FILTER_PARAM_PREFIX}${r}`] = l, c);
|
|
1788
|
-
}, o);
|
|
1789
|
-
},
|
|
1790
|
-
getAppliedIndices(e = {}, t = !1) {
|
|
1791
|
-
const { type: n } = e, s = ["category"];
|
|
1792
|
-
function a(c) {
|
|
1793
|
-
return (t || !s.includes(c)) && it[c];
|
|
1794
|
-
}
|
|
1795
|
-
if (n) {
|
|
1796
|
-
if (!Array.isArray(n))
|
|
1797
|
-
return [n].filter(a);
|
|
1798
|
-
if (n.length)
|
|
1799
|
-
return n.filter(a);
|
|
1800
|
-
}
|
|
1801
|
-
const o = [];
|
|
1802
|
-
return t && o.push(...s), e.source ? ["video", "clip", "interactive", ...o] : ["series", "video", "playlist", "classification", "clip", "interactive", "company", ...o];
|
|
1803
|
-
},
|
|
1804
|
-
applyFilter(e, t, n, s) {
|
|
1805
|
-
if (le.isEqual(t, n))
|
|
1806
|
-
return;
|
|
1807
|
-
const o = Object.keys(n).map((r) => {
|
|
1808
|
-
var m, h;
|
|
1809
|
-
const l = e.find((v) => v.id === r), u = n[r], g = ((m = u.selection) == null ? void 0 : m.length) === 1 && ((h = D.first(u.selection)) == null ? void 0 : h.default);
|
|
1810
|
-
return {
|
|
1811
|
-
filter: l,
|
|
1812
|
-
state: {
|
|
1813
|
-
active: u.active && !g,
|
|
1814
|
-
selection: u.selection
|
|
1815
|
-
}
|
|
1816
|
-
};
|
|
1817
|
-
}), c = Rt.GetQuery();
|
|
1818
|
-
dt.trigger({
|
|
1819
|
-
...s,
|
|
1820
|
-
params: j.buildFrontendFilterParams(c, o)
|
|
1821
|
-
}, { replace: !0 });
|
|
1822
|
-
},
|
|
1823
|
-
mixinDisabledFields(e, t, n, s) {
|
|
1824
|
-
let a = [...n, ...(s == null ? void 0 : s.filters) ?? []];
|
|
1825
|
-
a = hi(e, a, t), a = vi(e, a);
|
|
1826
|
-
const o = {
|
|
1827
|
-
mainFilters: a.filter((c) => n.find((r) => r.id === c.id))
|
|
1828
|
-
};
|
|
1829
|
-
return s != null && s.filters && (o.moreFilters = {
|
|
1830
|
-
...s,
|
|
1831
|
-
filters: a.filter((c) => s.filters.find((r) => r.id === c.id))
|
|
1832
|
-
}), o;
|
|
1833
|
-
},
|
|
1834
|
-
logFilterEvent(e, t, n, s, a) {
|
|
1835
|
-
var c;
|
|
1836
|
-
const o = [];
|
|
1837
|
-
e == null || e.forEach((r) => {
|
|
1838
|
-
const l = n[r.id];
|
|
1839
|
-
l.active && o.push({
|
|
1840
|
-
type: r.id,
|
|
1841
|
-
selection: l.selection
|
|
1842
|
-
});
|
|
1843
|
-
}), (c = t == null ? void 0 : t.filters) == null || c.forEach((r) => {
|
|
1844
|
-
const l = n.moreFilters[r.id];
|
|
1845
|
-
l.active && o.push({
|
|
1846
|
-
type: r.id,
|
|
1847
|
-
selection: l.selection
|
|
1848
|
-
});
|
|
1849
|
-
}), o.length || (a.descriptor = Ft.Reset), Ce.logUserAction({
|
|
1850
|
-
query: s ?? "",
|
|
1851
|
-
filters: o
|
|
1852
|
-
}, Ce.mergeOptions(a, {
|
|
1853
|
-
workflowPhase: Ot.Complete,
|
|
1854
|
-
actionType: _t.Filter
|
|
1855
|
-
}));
|
|
1856
|
-
},
|
|
1857
|
-
/**
|
|
1858
|
-
* Helpers below this comment return hard coded filter options for a particular filter.
|
|
1859
|
-
* If you are adding a new filter with hard coded options, add a new function here.
|
|
1860
|
-
*/
|
|
1861
|
-
getObjectTypeOptions(e = [], t) {
|
|
1862
|
-
return t ? [
|
|
1863
|
-
{
|
|
1864
|
-
id: "video",
|
|
1865
|
-
name: d("videos"),
|
|
1866
|
-
group: d("videoTypes")
|
|
1867
|
-
},
|
|
1868
|
-
{
|
|
1869
|
-
id: "interactive",
|
|
1870
|
-
name: d("interactives"),
|
|
1871
|
-
group: d("videoTypes")
|
|
1872
|
-
},
|
|
1873
|
-
{
|
|
1874
|
-
id: "clip",
|
|
1875
|
-
name: d("clips"),
|
|
1876
|
-
group: d("videoTypes")
|
|
1877
|
-
},
|
|
1878
|
-
{
|
|
1879
|
-
id: "classification",
|
|
1880
|
-
name: d("topics"),
|
|
1881
|
-
group: d("collections")
|
|
1882
|
-
},
|
|
1883
|
-
{
|
|
1884
|
-
id: "series",
|
|
1885
|
-
name: d("series"),
|
|
1886
|
-
group: d("collections")
|
|
1887
|
-
},
|
|
1888
|
-
{
|
|
1889
|
-
id: "playlist",
|
|
1890
|
-
name: d("playlists"),
|
|
1891
|
-
group: d("collections")
|
|
1892
|
-
},
|
|
1893
|
-
{
|
|
1894
|
-
id: "category",
|
|
1895
|
-
name: d("category"),
|
|
1896
|
-
group: d("collections")
|
|
1897
|
-
}
|
|
1898
|
-
].filter((n) => !e.find((s) => s === n.id)) : [
|
|
1899
|
-
{
|
|
1900
|
-
id: "classification",
|
|
1901
|
-
name: d("topics")
|
|
1902
|
-
},
|
|
1903
|
-
{
|
|
1904
|
-
id: "playlist",
|
|
1905
|
-
name: d("playlists")
|
|
1906
|
-
},
|
|
1907
|
-
{
|
|
1908
|
-
id: "series",
|
|
1909
|
-
name: d("series")
|
|
1910
|
-
},
|
|
1911
|
-
{
|
|
1912
|
-
id: "video",
|
|
1913
|
-
name: d("videos")
|
|
1914
|
-
},
|
|
1915
|
-
{
|
|
1916
|
-
id: "clip",
|
|
1917
|
-
name: d("clips")
|
|
1918
|
-
},
|
|
1919
|
-
{
|
|
1920
|
-
id: "interactive",
|
|
1921
|
-
name: d("interactives")
|
|
1922
|
-
}
|
|
1923
|
-
].filter((n) => !e.find((s) => s === n.id));
|
|
1924
|
-
},
|
|
1925
|
-
/**
|
|
1926
|
-
* Loops through each option on the "object type" filter, and determines whether
|
|
1927
|
-
* they should be disabled based on the currently active filters
|
|
1928
|
-
*/
|
|
1929
|
-
getIsObjectTypeOptionDisabled(e, t, n) {
|
|
1930
|
-
return e.map((s) => {
|
|
1931
|
-
let a = !1;
|
|
1932
|
-
return t.forEach((o) => {
|
|
1933
|
-
var r;
|
|
1934
|
-
if (a)
|
|
1935
|
-
return;
|
|
1936
|
-
const c = n[o.id] || n.moreFilters[o.id];
|
|
1937
|
-
!(c != null && c.active) || !((r = o.compatibleIndices) != null && r.length) || o.compatibleIndices.find((l) => s.id === l) || (a = !0);
|
|
1938
|
-
}), {
|
|
1939
|
-
...s,
|
|
1940
|
-
disabled: a
|
|
1941
|
-
};
|
|
1942
|
-
});
|
|
1943
|
-
},
|
|
1944
|
-
getNameSortOptions() {
|
|
1945
|
-
return [
|
|
1946
|
-
{
|
|
1947
|
-
id: "newest",
|
|
1948
|
-
name: d("newest")
|
|
1949
|
-
},
|
|
1950
|
-
{
|
|
1951
|
-
id: "oldest",
|
|
1952
|
-
name: d("oldest")
|
|
1953
|
-
},
|
|
1954
|
-
{
|
|
1955
|
-
id: "first-name-atoz",
|
|
1956
|
-
name: d("firstNameAToZ")
|
|
1957
|
-
},
|
|
1958
|
-
{
|
|
1959
|
-
id: "first-name-ztoa",
|
|
1960
|
-
name: d("firstNameZToA")
|
|
1961
|
-
},
|
|
1962
|
-
{
|
|
1963
|
-
id: "surname-atoz",
|
|
1964
|
-
name: d("surnameAToZ")
|
|
1965
|
-
},
|
|
1966
|
-
{
|
|
1967
|
-
id: "surname-ztoa",
|
|
1968
|
-
name: d("surnameZToA")
|
|
1969
|
-
}
|
|
1970
|
-
];
|
|
1971
|
-
},
|
|
1972
|
-
getYearGroupOptions(e) {
|
|
1973
|
-
return e != null && e.length ? e.map((t) => ({
|
|
1974
|
-
id: t.value.toString(),
|
|
1975
|
-
name: t.name
|
|
1976
|
-
})) : [];
|
|
1977
|
-
},
|
|
1978
|
-
getStatusOptions() {
|
|
1979
|
-
return [
|
|
1980
|
-
{
|
|
1981
|
-
id: "active",
|
|
1982
|
-
name: d("active")
|
|
1983
|
-
},
|
|
1984
|
-
{
|
|
1985
|
-
id: "deactivated",
|
|
1986
|
-
name: d("deactivated")
|
|
1987
|
-
},
|
|
1988
|
-
{
|
|
1989
|
-
id: "pending",
|
|
1990
|
-
name: d("pending")
|
|
1991
|
-
}
|
|
1992
|
-
];
|
|
1993
|
-
},
|
|
1994
|
-
getJobStatusOptions() {
|
|
1995
|
-
return [
|
|
1996
|
-
{
|
|
1997
|
-
id: "completed",
|
|
1998
|
-
name: d("completed")
|
|
1999
|
-
},
|
|
2000
|
-
{
|
|
2001
|
-
id: "failed",
|
|
2002
|
-
name: d("errored")
|
|
2003
|
-
},
|
|
2004
|
-
{
|
|
2005
|
-
id: "inProgress",
|
|
2006
|
-
name: d("inProgress")
|
|
2007
|
-
}
|
|
2008
|
-
];
|
|
2009
|
-
},
|
|
2010
|
-
getTvFieldsOptions() {
|
|
2011
|
-
return [
|
|
2012
|
-
{
|
|
2013
|
-
id: "0",
|
|
2014
|
-
name: d("allFields"),
|
|
2015
|
-
default: !0
|
|
2016
|
-
},
|
|
2017
|
-
{
|
|
2018
|
-
id: "1",
|
|
2019
|
-
name: d("titleDescriptionField")
|
|
2020
|
-
},
|
|
2021
|
-
{
|
|
2022
|
-
id: "2",
|
|
2023
|
-
name: d("captionsField")
|
|
2024
|
-
}
|
|
2025
|
-
];
|
|
2026
|
-
},
|
|
2027
|
-
getTvChannelOptions(e) {
|
|
2028
|
-
return e != null && e.length ? e.map((t) => ({
|
|
2029
|
-
id: t.name,
|
|
2030
|
-
name: t.name
|
|
2031
|
-
})) : [];
|
|
2032
|
-
},
|
|
2033
|
-
getTvDateBroadcastOptions() {
|
|
2034
|
-
return [
|
|
2035
|
-
{
|
|
2036
|
-
id: "any-time",
|
|
2037
|
-
name: d("anyTime"),
|
|
2038
|
-
default: !0
|
|
2039
|
-
},
|
|
2040
|
-
{
|
|
2041
|
-
id: "yesterday",
|
|
2042
|
-
name: d("yesterday")
|
|
2043
|
-
},
|
|
2044
|
-
{
|
|
2045
|
-
id: "last-week",
|
|
2046
|
-
name: d("lastWeek")
|
|
2047
|
-
},
|
|
2048
|
-
{
|
|
2049
|
-
id: "last-2-weeks",
|
|
2050
|
-
name: d("last2Weeks")
|
|
2051
|
-
}
|
|
2052
|
-
];
|
|
2053
|
-
},
|
|
2054
|
-
getCustomerStatusOptions() {
|
|
2055
|
-
return [
|
|
2056
|
-
{
|
|
2057
|
-
id: ie.Unclassified.toString(),
|
|
2058
|
-
name: se.Unclassified
|
|
2059
|
-
},
|
|
2060
|
-
{
|
|
2061
|
-
id: ie.Active.toString(),
|
|
2062
|
-
name: se.Active
|
|
2063
|
-
},
|
|
2064
|
-
{
|
|
2065
|
-
id: ie.Prospect.toString(),
|
|
2066
|
-
name: se.Prospect
|
|
2067
|
-
},
|
|
2068
|
-
{
|
|
2069
|
-
id: ie.LostCustomer.toString(),
|
|
2070
|
-
name: se.LostCustomer
|
|
2071
|
-
},
|
|
2072
|
-
{
|
|
2073
|
-
id: ie.Disabled.toString(),
|
|
2074
|
-
name: se.Disabled
|
|
2075
|
-
},
|
|
2076
|
-
{
|
|
2077
|
-
id: ie.Other.toString(),
|
|
2078
|
-
name: se.Other
|
|
2079
|
-
}
|
|
2080
|
-
];
|
|
2081
|
-
},
|
|
2082
|
-
getCustomerTypeOptions() {
|
|
2083
|
-
return [
|
|
2084
|
-
{
|
|
2085
|
-
id: U.Unclassified.toString(),
|
|
2086
|
-
name: P.Unclassified
|
|
2087
|
-
},
|
|
2088
|
-
{
|
|
2089
|
-
id: U.Primary.toString(),
|
|
2090
|
-
name: P.Primary
|
|
2091
|
-
},
|
|
2092
|
-
{
|
|
2093
|
-
id: U.Secondary.toString(),
|
|
2094
|
-
name: P.Secondary
|
|
2095
|
-
},
|
|
2096
|
-
{
|
|
2097
|
-
id: U.K12.toString(),
|
|
2098
|
-
name: P.K12
|
|
2099
|
-
},
|
|
2100
|
-
{
|
|
2101
|
-
id: U.Tertiary.toString(),
|
|
2102
|
-
name: P.Tertiary
|
|
2103
|
-
},
|
|
2104
|
-
{
|
|
2105
|
-
id: U.NonEducational.toString(),
|
|
2106
|
-
name: P.NonEducational
|
|
2107
|
-
},
|
|
2108
|
-
{
|
|
2109
|
-
id: U.Partners.toString(),
|
|
2110
|
-
name: P.Partners
|
|
2111
|
-
},
|
|
2112
|
-
{
|
|
2113
|
-
id: U.Internal.toString(),
|
|
2114
|
-
name: P.Internal
|
|
2115
|
-
},
|
|
2116
|
-
{
|
|
2117
|
-
id: U.Other.toString(),
|
|
2118
|
-
name: P.Other
|
|
2119
|
-
},
|
|
2120
|
-
{
|
|
2121
|
-
id: U.ClickView.toString(),
|
|
2122
|
-
name: P.ClickView
|
|
2123
|
-
},
|
|
2124
|
-
{
|
|
2125
|
-
id: U.System.toString(),
|
|
2126
|
-
name: P.System
|
|
2127
|
-
}
|
|
2128
|
-
];
|
|
2129
|
-
},
|
|
2130
|
-
getCategoriesOptions(e) {
|
|
2131
|
-
return e != null && e.length ? e.map((t) => ({
|
|
2132
|
-
id: t.data.id,
|
|
2133
|
-
name: t.data.name
|
|
2134
|
-
// secondLayerOptions: category.children.map(
|
|
2135
|
-
// nestedCategory => ({ id: nestedCategory.data.id, name: nestedCategory.data.name })
|
|
2136
|
-
// )
|
|
2137
|
-
})) : [];
|
|
2138
|
-
},
|
|
2139
|
-
getSpecialEventTypeOptions() {
|
|
2140
|
-
return [
|
|
2141
|
-
{
|
|
2142
|
-
id: S.BreakingNews,
|
|
2143
|
-
name: Q[S.BreakingNews]
|
|
2144
|
-
},
|
|
2145
|
-
{
|
|
2146
|
-
id: S.SportingEvent,
|
|
2147
|
-
name: Q[S.SportingEvent]
|
|
2148
|
-
},
|
|
2149
|
-
{
|
|
2150
|
-
id: S.Observance,
|
|
2151
|
-
name: Q[S.Observance]
|
|
2152
|
-
},
|
|
2153
|
-
{
|
|
2154
|
-
id: S.NaturalDisaster,
|
|
2155
|
-
name: Q[S.NaturalDisaster]
|
|
2156
|
-
},
|
|
2157
|
-
{
|
|
2158
|
-
id: S.HistoricalEvent,
|
|
2159
|
-
name: Q[S.HistoricalEvent]
|
|
2160
|
-
},
|
|
2161
|
-
{
|
|
2162
|
-
id: S.Holiday,
|
|
2163
|
-
name: Q[S.Holiday]
|
|
2164
|
-
},
|
|
2165
|
-
{
|
|
2166
|
-
id: S.Informal,
|
|
2167
|
-
name: Q[S.Informal]
|
|
2168
|
-
},
|
|
2169
|
-
{
|
|
2170
|
-
id: S.ReligiousEvent,
|
|
2171
|
-
name: Q[S.ReligiousEvent]
|
|
2172
|
-
},
|
|
2173
|
-
{
|
|
2174
|
-
id: S.Other,
|
|
2175
|
-
name: Q[S.Other]
|
|
2176
|
-
}
|
|
2177
|
-
];
|
|
2178
|
-
}
|
|
2179
|
-
};
|
|
2180
|
-
function I(e, t = [], n) {
|
|
2181
|
-
var o;
|
|
2182
|
-
const s = t.find((c) => c.id === n);
|
|
2183
|
-
if (!s)
|
|
2184
|
-
return [];
|
|
2185
|
-
if (!e[n])
|
|
2186
|
-
return ((o = s.options) == null ? void 0 : o.filter((c) => c.default)) ?? [];
|
|
2187
|
-
if (n === "rating")
|
|
2188
|
-
return _e.deriveInitialRatingFilterStateFromQueryParams(e[n], s);
|
|
2189
|
-
let a = e[n];
|
|
2190
|
-
return Array.isArray(a) || (a = [a]), n === "classification" ? li.deriveInitialClassificationFilterStateFromQueryParams(s, a) : n === "presentation" ? ui.deriveInitialPresentationFilterStateFromQueryParams(s.options, a, e) : Oe(s.options, a);
|
|
2191
|
-
}
|
|
2192
|
-
function Oe(e, t) {
|
|
2193
|
-
return Array.isArray(t) || (t = [t]), (e == null ? void 0 : e.filter((n) => t.find((s) => s.toString() === n.id.toString()))) ?? [];
|
|
2194
|
-
}
|
|
2195
|
-
function hi(e, t, n) {
|
|
2196
|
-
const s = n.reduce((a, o) => (a[o] = !0, a), {});
|
|
2197
|
-
return t.map((a) => {
|
|
2198
|
-
var r;
|
|
2199
|
-
if (!((r = a.compatibleIndices) != null && r.length))
|
|
2200
|
-
return a;
|
|
2201
|
-
if (!a.compatibleIndices.find((l) => s[l]))
|
|
2202
|
-
return {
|
|
2203
|
-
...a,
|
|
2204
|
-
disabled: !0
|
|
2205
|
-
};
|
|
2206
|
-
const o = Object.keys(e).filter((l) => {
|
|
2207
|
-
const u = e[l];
|
|
2208
|
-
return "active" in u ? u.active : !1;
|
|
2209
|
-
});
|
|
2210
|
-
let c = !1;
|
|
2211
|
-
return o.forEach((l) => {
|
|
2212
|
-
var m;
|
|
2213
|
-
if (c)
|
|
2214
|
-
return;
|
|
2215
|
-
const u = t.find((h) => h.id === l);
|
|
2216
|
-
if (!((m = u.compatibleIndices) != null && m.length))
|
|
2217
|
-
return;
|
|
2218
|
-
const g = u.compatibleIndices.reduce((h, v) => (h[v] = !0, h), {});
|
|
2219
|
-
a.compatibleIndices.find((h) => g[h]) || (c = !0);
|
|
2220
|
-
}), {
|
|
2221
|
-
...a,
|
|
2222
|
-
disabled: c
|
|
2223
|
-
};
|
|
2224
|
-
});
|
|
2225
|
-
}
|
|
2226
|
-
function vi(e, t) {
|
|
2227
|
-
return t.map((n) => {
|
|
2228
|
-
if (!ve.isFunction(n.disableOptions))
|
|
2229
|
-
return n;
|
|
2230
|
-
const s = n.disableOptions(n.options, t, e);
|
|
2231
|
-
return {
|
|
2232
|
-
...n,
|
|
2233
|
-
options: s
|
|
2234
|
-
};
|
|
2235
|
-
});
|
|
2236
|
-
}
|
|
2237
|
-
const xi = "_hideCaret_zki3y_1", pi = "_filterMenu_zki3y_4", yi = "_twoColumnsWidth_zki3y_8", bi = "_nestedCheckboxesWidth_zki3y_16", Ai = "_switchWidth_zki3y_19", Si = "_moreFiltersWidth_zki3y_22", ji = "_svgContainer_zki3y_26", K = {
|
|
2238
|
-
hideCaret: xi,
|
|
2239
|
-
filterMenu: pi,
|
|
2240
|
-
twoColumnsWidth: yi,
|
|
2241
|
-
nestedCheckboxesWidth: bi,
|
|
2242
|
-
switchWidth: Ai,
|
|
2243
|
-
moreFiltersWidth: Si,
|
|
2244
|
-
svgContainer: ji
|
|
2245
|
-
};
|
|
2246
|
-
function Ci(e) {
|
|
2247
|
-
return j.displayTwoColumns(e) ? K.twoColumnsWidth : e.id === "classification" ? K.classificationWidth : j.displayTwoLayers(e) ? K.nestedCheckboxesWidth : e.type === "switch" ? K.switchWidth : "";
|
|
2248
|
-
}
|
|
2249
|
-
vt.defaultProps = {
|
|
2250
|
-
hideCaret: !0
|
|
2251
|
-
};
|
|
2252
|
-
function vt(e) {
|
|
2253
|
-
const { state: t } = C.useContext(de), n = t[e.filter.id], s = e.filter.type === "dropdown", [a, o] = C.useState(e.filter.name), [c, r] = C.useState(!1), [l, u] = C.useState(n);
|
|
2254
|
-
C.useEffect(() => {
|
|
2255
|
-
o(j.getLabel(e.filter, n)), u(n);
|
|
2256
|
-
}, [e.filter, n == null ? void 0 : n.selection]);
|
|
2257
|
-
function g(k) {
|
|
2258
|
-
u(k), s && v(k);
|
|
2259
|
-
}
|
|
2260
|
-
function m() {
|
|
2261
|
-
var Y;
|
|
2262
|
-
const k = (Y = e.filter.options) == null ? void 0 : Y.find((H) => H.default);
|
|
2263
|
-
u({
|
|
2264
|
-
active: !1,
|
|
2265
|
-
selection: k ? [k] : []
|
|
2266
|
-
});
|
|
2267
|
-
}
|
|
2268
|
-
function h() {
|
|
2269
|
-
v(), r(!1);
|
|
2270
|
-
}
|
|
2271
|
-
function v(k = l) {
|
|
2272
|
-
j.applyFilter(
|
|
2273
|
-
[e.filter],
|
|
2274
|
-
n,
|
|
2275
|
-
{ [e.filter.id]: k },
|
|
2276
|
-
t.appLink
|
|
2277
|
-
);
|
|
2278
|
-
}
|
|
2279
|
-
function A(k) {
|
|
2280
|
-
r(k), !(k || s) && v();
|
|
2281
|
-
}
|
|
2282
|
-
const T = C.useMemo(() => e.filter.customComponent ? e.filter.customComponent : j.mapTypeToComponent(e.filter.type), [e.filter.type]), $ = "fw-semibold mx-1 btn d-flex align-items-center", p = e.hideCaret && !s ? K.hideCaret : "", y = Ci(e.filter);
|
|
2283
|
-
return e.filter.type === "button" ? /* @__PURE__ */ i.jsx(
|
|
2284
|
-
T,
|
|
2285
|
-
{
|
|
2286
|
-
filter: e.filter,
|
|
2287
|
-
draftState: l,
|
|
2288
|
-
setDraftState: g
|
|
2289
|
-
}
|
|
2290
|
-
) : /* @__PURE__ */ i.jsxs(ae, { onToggle: A, show: c, children: [
|
|
2291
|
-
/* @__PURE__ */ i.jsxs(
|
|
2292
|
-
ae.Toggle,
|
|
2293
|
-
{
|
|
2294
|
-
id: `filterButton-${e.filter.id}`,
|
|
2295
|
-
className: `${$} ${p}`,
|
|
2296
|
-
variant: n.active && !s ? "dark" : "outline-dark",
|
|
2297
|
-
disabled: e.filter.disabled,
|
|
2298
|
-
children: [
|
|
2299
|
-
!!e.filter.icon && /* @__PURE__ */ i.jsx("div", { className: K.svgContainer, children: /* @__PURE__ */ i.jsx(Ee, { svg: e.filter.icon }) }),
|
|
2300
|
-
e.filter.labelPrefix,
|
|
2301
|
-
" ",
|
|
2302
|
-
a
|
|
2303
|
-
]
|
|
2304
|
-
}
|
|
2305
|
-
),
|
|
2306
|
-
/* @__PURE__ */ i.jsx(ae.Menu, { children: /* @__PURE__ */ i.jsxs("div", { className: `mx-1 ${K.filterMenu} ${y} ${s ? "" : "px-2 py-1"}`, children: [
|
|
2307
|
-
/* @__PURE__ */ i.jsx(
|
|
2308
|
-
T,
|
|
2309
|
-
{
|
|
2310
|
-
filter: e.filter,
|
|
2311
|
-
draftState: l,
|
|
2312
|
-
setDraftState: g
|
|
2313
|
-
}
|
|
2314
|
-
),
|
|
2315
|
-
!s && !e.filter.disabled && /* @__PURE__ */ i.jsx(
|
|
2316
|
-
Pe,
|
|
2317
|
-
{
|
|
2318
|
-
active: l.active,
|
|
2319
|
-
onClickReset: m,
|
|
2320
|
-
onClickApply: h
|
|
2321
|
-
}
|
|
2322
|
-
)
|
|
2323
|
-
] }) })
|
|
2324
|
-
] });
|
|
2325
|
-
}
|
|
2326
|
-
const ki = {
|
|
2327
|
-
/**
|
|
2328
|
-
* Helper function to get the setState function for an individual key in a state object.
|
|
2329
|
-
*
|
|
2330
|
-
* @param setState React setState action
|
|
2331
|
-
* @param key Property within the state object we're updating
|
|
2332
|
-
* @param callback Optional callback to modify data before setting state. Uses identity fn by default.
|
|
2333
|
-
*
|
|
2334
|
-
* @returns Newly updated state object
|
|
2335
|
-
*/
|
|
2336
|
-
getSetStateByKey(e, t, n) {
|
|
2337
|
-
return (s) => e((a) => {
|
|
2338
|
-
const o = ve.isFunction(n) ? n : ve.useIdentity();
|
|
2339
|
-
return { ...a, [t]: o(s, a) };
|
|
2340
|
-
});
|
|
2341
|
-
}
|
|
2342
|
-
};
|
|
2343
|
-
function st(e) {
|
|
2344
|
-
return Object.keys(e).reduce((n, s) => e[s].active ? n + 1 : n, 0);
|
|
2345
|
-
}
|
|
2346
|
-
function Ii(e) {
|
|
2347
|
-
const { state: t } = C.useContext(de), n = t.moreFilters, [s, a] = C.useState(e.filter.name), [o, c] = C.useState(!1), [r, l] = C.useState(n), [u, g] = C.useState(st(n)), m = Object.keys(n).map((p) => `${p}:${n[p].active}`).join("-");
|
|
2348
|
-
C.useEffect(() => {
|
|
2349
|
-
l(n), g(st(n));
|
|
2350
|
-
}, [e.filter, m]), C.useEffect(() => {
|
|
2351
|
-
a(u ? `${e.filter.name} - ${u}` : e.filter.name);
|
|
2352
|
-
}, [u]);
|
|
2353
|
-
function h() {
|
|
2354
|
-
const y = Object.keys(n).reduce((k, Y) => {
|
|
2355
|
-
var O;
|
|
2356
|
-
const q = (O = e.filter.filters.find((W) => W.id === Y).options) == null ? void 0 : O.find((W) => W.default);
|
|
2357
|
-
return k[Y] = {
|
|
2358
|
-
active: !1,
|
|
2359
|
-
selection: q ? [q] : []
|
|
2360
|
-
}, k;
|
|
2361
|
-
}, {});
|
|
2362
|
-
l(y);
|
|
2363
|
-
}
|
|
2364
|
-
function v() {
|
|
2365
|
-
T(), c(!1);
|
|
2366
|
-
}
|
|
2367
|
-
function A(p) {
|
|
2368
|
-
c(p), !p && T();
|
|
2369
|
-
}
|
|
2370
|
-
function T() {
|
|
2371
|
-
j.applyFilter(
|
|
2372
|
-
e.filter.filters,
|
|
2373
|
-
n,
|
|
2374
|
-
r,
|
|
2375
|
-
t.appLink
|
|
2376
|
-
);
|
|
2377
|
-
}
|
|
2378
|
-
const $ = `fw-semibold ${K.hideCaret} mx-1 btn`;
|
|
2379
|
-
return /* @__PURE__ */ i.jsxs(ae, { onToggle: A, show: o, children: [
|
|
2380
|
-
/* @__PURE__ */ i.jsx(ae.Toggle, { id: e.filter.id, className: $, variant: u ? "dark" : "outline-dark", children: s }),
|
|
2381
|
-
/* @__PURE__ */ i.jsx(ae.Menu, { onClick: (p) => p.stopPropagation(), children: /* @__PURE__ */ i.jsxs("div", { className: `mx-1 ${K.moreFiltersWidth} ${e.filter.type !== "dropdown" ? "px-2 py-1" : ""}`, children: [
|
|
2382
|
-
e.filter.filters.map((p) => {
|
|
2383
|
-
const y = p.customComponent ? p.customComponent : j.mapTypeToComponent(p.type);
|
|
2384
|
-
return /* @__PURE__ */ i.jsx("fieldset", { children: /* @__PURE__ */ i.jsx(
|
|
2385
|
-
y,
|
|
2386
|
-
{
|
|
2387
|
-
filter: p,
|
|
2388
|
-
draftState: r[p.id],
|
|
2389
|
-
setDraftState: ki.getSetStateByKey(l, p.id),
|
|
2390
|
-
isOnMoreFilters: !0
|
|
2391
|
-
}
|
|
2392
|
-
) }, p.id);
|
|
2393
|
-
}),
|
|
2394
|
-
/* @__PURE__ */ i.jsx(
|
|
2395
|
-
Pe,
|
|
2396
|
-
{
|
|
2397
|
-
active: !!Object.keys(r).find((p) => r[p].active),
|
|
2398
|
-
onClickReset: h,
|
|
2399
|
-
onClickApply: v
|
|
2400
|
-
}
|
|
2401
|
-
)
|
|
2402
|
-
] }) })
|
|
2403
|
-
] });
|
|
2404
|
-
}
|
|
2405
|
-
const at = N.memo(function({ tagClass: e = "" }) {
|
|
2406
|
-
const t = `partial-loading-background d-inline-block rounded-pill py-1 px-2 mb-1 me-1 text-nowrap ${e} ${zt.partialTag}`;
|
|
2407
|
-
return /* @__PURE__ */ i.jsx("div", { className: "mt-1", children: /* @__PURE__ */ i.jsx("span", { className: t, children: " " }) });
|
|
2408
|
-
}), Te = 400;
|
|
2409
|
-
function Di(e) {
|
|
2410
|
-
const { state: t, containerRef: n, mediaQuery: s } = e, [a, o] = N.useState(!1), [c, r] = N.useState({}), [l, u] = N.useState(null), g = N.useMemo(() => $e.isTouchScreen(), []);
|
|
2411
|
-
N.useEffect(() => {
|
|
2412
|
-
!n.current || !t.containerLeftPosition || g || setTimeout(() => m(), Te + 50);
|
|
2413
|
-
}, [
|
|
2414
|
-
n.current,
|
|
2415
|
-
s,
|
|
2416
|
-
t.offset,
|
|
2417
|
-
t.containerLeftPosition
|
|
2418
|
-
]);
|
|
2419
|
-
function m() {
|
|
2420
|
-
var k;
|
|
2421
|
-
const p = t;
|
|
2422
|
-
if (!((k = n.current) != null && k.children))
|
|
2423
|
-
return;
|
|
2424
|
-
const y = Array.from(n.current.children).reduce((Y, H) => {
|
|
2425
|
-
const q = H == null ? void 0 : H.getBoundingClientRect(), O = q.left < p.containerRightPosition && q.right > p.containerLeftPosition;
|
|
2426
|
-
return {
|
|
2427
|
-
...Y,
|
|
2428
|
-
[H.id]: O ? {
|
|
2429
|
-
"aria-hidden": !1
|
|
2430
|
-
} : {
|
|
2431
|
-
"aria-hidden": !0,
|
|
2432
|
-
inert: "true"
|
|
2433
|
-
}
|
|
2434
|
-
};
|
|
2435
|
-
}, {});
|
|
2436
|
-
r(y);
|
|
2437
|
-
}
|
|
2438
|
-
function h(p) {
|
|
2439
|
-
const y = t;
|
|
2440
|
-
return g || p >= y.offset - y.viewableItems && p < y.offset ? {
|
|
2441
|
-
"aria-hidden": !1
|
|
2442
|
-
} : {
|
|
2443
|
-
inert: "true",
|
|
2444
|
-
"aria-hidden": !0
|
|
2445
|
-
};
|
|
2446
|
-
}
|
|
2447
|
-
function v() {
|
|
2448
|
-
setTimeout(() => {
|
|
2449
|
-
if (!n.current)
|
|
2450
|
-
return;
|
|
2451
|
-
const p = n.current.querySelectorAll("li[aria-hidden]");
|
|
2452
|
-
let y = null;
|
|
2453
|
-
for (let k = l + 1; k < p.length && !y; k++)
|
|
2454
|
-
y = p[k].querySelector('a[tabindex="0"]');
|
|
2455
|
-
y && y.focus();
|
|
2456
|
-
}, Te + 100);
|
|
2457
|
-
}
|
|
2458
|
-
function A() {
|
|
2459
|
-
setTimeout(() => {
|
|
2460
|
-
if (!n.current)
|
|
2461
|
-
return;
|
|
2462
|
-
const p = n.current.querySelectorAll("li[aria-hidden]");
|
|
2463
|
-
let y = null;
|
|
2464
|
-
for (let k = l - 1; k >= 0 && !y; k--)
|
|
2465
|
-
y = p[k].querySelector('a[tabindex="0"]');
|
|
2466
|
-
y && y.focus();
|
|
2467
|
-
}, Te + 100);
|
|
2468
|
-
}
|
|
2469
|
-
function T(p) {
|
|
2470
|
-
document.querySelector(".user-is-tabbing") && (o(!0), u(p));
|
|
2471
|
-
}
|
|
2472
|
-
function $() {
|
|
2473
|
-
document.querySelector(".user-is-tabbing") || (o(!1), u(null));
|
|
2474
|
-
}
|
|
2475
|
-
return {
|
|
2476
|
-
isTabbing: a,
|
|
2477
|
-
onFocusWidget: T,
|
|
2478
|
-
onBlurWidget: $,
|
|
2479
|
-
getFixedAttributes: h,
|
|
2480
|
-
dynamicAttributes: c,
|
|
2481
|
-
focusNext: v,
|
|
2482
|
-
focusPrev: A
|
|
2483
|
-
};
|
|
2484
|
-
}
|
|
2485
|
-
var Ue = /* @__PURE__ */ ((e) => (e.Percentage = "%", e.Pixels = "px", e))(Ue || {});
|
|
2486
|
-
const xt = new Image();
|
|
2487
|
-
xt.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=";
|
|
2488
|
-
const wi = {
|
|
2489
|
-
// This removes the image that appears when you drag a draggable HTML element
|
|
2490
|
-
hideDragImage(e) {
|
|
2491
|
-
!e.dataTransfer.setDragImage || !ve.isFunction(e.dataTransfer.setDragImage) || e.dataTransfer.setDragImage(xt, 0, 0);
|
|
2492
|
-
}
|
|
2493
|
-
}, Ti = $e.isTouchScreen(), Ni = (e, t, n) => (t === Ue.Percentage && n && (e = e - n), {
|
|
2494
|
-
transform: `translate3d(${e}${t}, 0px, 0px)`,
|
|
2495
|
-
// Sync with transition time in useWidgetKeyboard.ts
|
|
2496
|
-
transition: "transform .4s ease-in-out"
|
|
2497
|
-
}), Fi = C.forwardRef((e, t) => {
|
|
2498
|
-
const { children: n, positionType: s, onDrag: a, onDragEnd: o, onTouchMove: c, onTouchEnd: r, percentageDragged: l, position: u = 0 } = e;
|
|
2499
|
-
function g() {
|
|
2500
|
-
const m = {};
|
|
2501
|
-
return a && o && (m.draggable = !0, m.onDragEnd = o, m.onDragStart = wi.hideDragImage, m.onDragOver = a), c && r && Ti && (m.onTouchMoveCapture = c, m.onTouchEndCapture = r), m;
|
|
2502
|
-
}
|
|
2503
|
-
return /* @__PURE__ */ i.jsx(
|
|
2504
|
-
"ul",
|
|
2505
|
-
{
|
|
2506
|
-
className: "list-unstyled d-flex flex-nowrap position-relative w-100 mb-0",
|
|
2507
|
-
style: Ni(u, s, l),
|
|
2508
|
-
ref: t,
|
|
2509
|
-
...g(),
|
|
2510
|
-
children: n
|
|
2511
|
-
}
|
|
2512
|
-
);
|
|
2513
|
-
});
|
|
2514
|
-
function _i(e) {
|
|
2515
|
-
return /* @__PURE__ */ i.jsx("svg", { ...e, children: /* @__PURE__ */ i.jsx(
|
|
2516
|
-
"path",
|
|
2517
|
-
{
|
|
2518
|
-
d: "M15.695 11.267c.407.41.407 1.056 0 1.466L9.79 18.696a1.046 1.046 0 0 1-1.474 0l-.01-.01a1.034 1.034 0 0 1 0-1.467L13.474 12l-5.17-5.22a1.034 1.034 0 0 1 0-1.465l.012-.011a1.046 1.046 0 0 1 1.474 0z",
|
|
2519
|
-
fill: "currentColor"
|
|
2520
|
-
}
|
|
2521
|
-
) });
|
|
2522
|
-
}
|
|
2523
|
-
const Oi = "_buttonContainer_1pl2q_1", Ri = "_left_1pl2q_7", Li = "_right_1pl2q_13", Ei = "_button_1pl2q_1", $i = "_hoverText_1pl2q_35", Pi = "_chevron_1pl2q_42", Ui = "_extendedClickableArea_1pl2q_42", Mi = "_gradientRight_1pl2q_54", Gi = "_gradientLeft_1pl2q_54", Vi = "_topPos_1pl2q_81", L = {
|
|
2524
|
-
buttonContainer: Oi,
|
|
2525
|
-
left: Ri,
|
|
2526
|
-
right: Li,
|
|
2527
|
-
button: Ei,
|
|
2528
|
-
hoverText: $i,
|
|
2529
|
-
chevron: Pi,
|
|
2530
|
-
extendedClickableArea: Ui,
|
|
2531
|
-
gradientRight: Mi,
|
|
2532
|
-
gradientLeft: Gi,
|
|
2533
|
-
topPos: Vi
|
|
2534
|
-
}, Yi = "shared.widgetButton", rt = V.encloseNamespace(Yi);
|
|
2535
|
-
var Re = /* @__PURE__ */ ((e) => (e[e.Left = 0] = "Left", e[e.Right = 1] = "Right", e))(Re || {});
|
|
2536
|
-
const ot = C.memo(function(e) {
|
|
2537
|
-
const t = e.direction === 0, n = t ? qt : _i;
|
|
2538
|
-
function s() {
|
|
2539
|
-
let o = L.topPos;
|
|
2540
|
-
return t ? o += ` ${L.left} ${e.leftButtonClassName}` : o += ` ${L.right} ${e.rightButtonClassName}`, o;
|
|
2541
|
-
}
|
|
2542
|
-
function a() {
|
|
2543
|
-
var o, c;
|
|
2544
|
-
return ((o = e.state) == null ? void 0 : o.contents) === "videos" ? { paddingBottom: 56.25 / ((c = e.state) == null ? void 0 : c.viewableItems) + "%" } : { height: "100%" };
|
|
2545
|
-
}
|
|
2546
|
-
return e.hide ? /* @__PURE__ */ i.jsx(i.Fragment, {}) : /* @__PURE__ */ i.jsxs("div", { className: `${L.buttonContainer} ${e.containerClassName ? e.containerClassName : ""}`, style: a(), children: [
|
|
2547
|
-
e.useGradientBackdrop && /* @__PURE__ */ i.jsx("div", { className: t ? `${L.gradientLeft} ${e.leftGradientClassName}` : `${L.gradientRight} ${e.rightGradientClassName}` }),
|
|
2548
|
-
!e.hideExtendedClickableArea && /* @__PURE__ */ i.jsx(
|
|
2549
|
-
"button",
|
|
2550
|
-
{
|
|
2551
|
-
onClick: e.onClick,
|
|
2552
|
-
className: `${L.extendedClickableArea} ${t ? L.left : L.right}`,
|
|
2553
|
-
tabIndex: -1
|
|
2554
|
-
}
|
|
2555
|
-
),
|
|
2556
|
-
/* @__PURE__ */ i.jsxs(
|
|
2557
|
-
"button",
|
|
2558
|
-
{
|
|
2559
|
-
className: `${s()} ${L.button} ${e.className || ""}`,
|
|
2560
|
-
onClick: e.onClick,
|
|
2561
|
-
"aria-label": rt(t ? "previous" : "next"),
|
|
2562
|
-
children: [
|
|
2563
|
-
e.hoverText && /* @__PURE__ */ i.jsx("span", { className: `ps-3 pe-2 ${L.hoverText}`, children: e.hoverText }),
|
|
2564
|
-
/* @__PURE__ */ i.jsx(
|
|
2565
|
-
Ee,
|
|
2566
|
-
{
|
|
2567
|
-
svg: n,
|
|
2568
|
-
size: Lt.Medium,
|
|
2569
|
-
className: `svg-container d-inline-block ${L.chevron}`
|
|
2570
|
-
}
|
|
2571
|
-
)
|
|
2572
|
-
]
|
|
2573
|
-
}
|
|
2574
|
-
)
|
|
2575
|
-
] });
|
|
2576
|
-
});
|
|
2577
|
-
var _ = /* @__PURE__ */ ((e) => (e.Init = "init", e.Next = "next", e.Previous = "previous", e.Resize = "resize", e.Drag = "drag", e.Update = "update", e.JumpToIndex = "jump-to-index", e))(_ || {});
|
|
2578
|
-
function Hi(e, t, n = []) {
|
|
2579
|
-
let s;
|
|
2580
|
-
const a = () => {
|
|
2581
|
-
e(), window.clearTimeout(s), s = window.setTimeout(t, 100);
|
|
2582
|
-
};
|
|
2583
|
-
C.useEffect(() => (window.addEventListener("resize", t ? a : e), () => window.removeEventListener("resize", t ? a : e)), [...n]);
|
|
2584
|
-
}
|
|
2585
|
-
const Wi = (e, t, n) => () => {
|
|
2586
|
-
e.container.current && (e.container.current.style.transition = ""), t({
|
|
2587
|
-
type: _.Resize,
|
|
2588
|
-
payload: {
|
|
2589
|
-
elementRefs: e,
|
|
2590
|
-
mediaQuery: n
|
|
2591
|
-
}
|
|
2592
|
-
});
|
|
2593
|
-
}, zi = (e) => () => {
|
|
2594
|
-
e.current && (e.current.style.transition = "transform .4s ease-in-out");
|
|
2595
|
-
}, Qi = (e, t, n, s, a) => (o) => {
|
|
2596
|
-
const c = o.clientX;
|
|
2597
|
-
let r = s;
|
|
2598
|
-
r || (r = { ...t, initialMouseX: c }, a(r), e.current.style.transition = ""), n({
|
|
2599
|
-
type: _.Drag,
|
|
2600
|
-
payload: {
|
|
2601
|
-
widgetSnapshot: r,
|
|
2602
|
-
currentMouseX: c
|
|
2603
|
-
}
|
|
2604
|
-
});
|
|
2605
|
-
}, Xi = (e, t) => () => {
|
|
2606
|
-
e.current.style.transition = "transform .4s ease-in-out", t(null);
|
|
2607
|
-
};
|
|
2608
|
-
function pt(e) {
|
|
2609
|
-
return e === De.XS ? 200 : e === De.SM || e === De.MD ? 350 : 500;
|
|
2610
|
-
}
|
|
2611
|
-
const Le = {
|
|
2612
|
-
offset: 0,
|
|
2613
|
-
containerLeftPosition: null,
|
|
2614
|
-
containerRightPosition: null,
|
|
2615
|
-
firstElementPosition: null,
|
|
2616
|
-
lastElementPosition: null,
|
|
2617
|
-
hideLeftButton: !0,
|
|
2618
|
-
hideRightButton: !0,
|
|
2619
|
-
maxSlideDistance: 0,
|
|
2620
|
-
leftOffsetLimit: null
|
|
2621
|
-
}, yt = (e) => {
|
|
2622
|
-
const { container: t, lastElement: n } = e.elementRefs;
|
|
2623
|
-
if (!(t != null && t.current) || !(n != null && n.current))
|
|
2624
|
-
return Le;
|
|
2625
|
-
const s = t.current.getBoundingClientRect(), a = s.left, o = s.right, c = a, r = n.current.getBoundingClientRect().right, l = o - r;
|
|
2626
|
-
return {
|
|
2627
|
-
...Le,
|
|
2628
|
-
containerLeftPosition: a,
|
|
2629
|
-
containerRightPosition: o,
|
|
2630
|
-
firstElementPosition: c,
|
|
2631
|
-
lastElementPosition: r,
|
|
2632
|
-
hideRightButton: r < o,
|
|
2633
|
-
leftOffsetLimit: l,
|
|
2634
|
-
maxSlideDistance: pt(e.mediaQuery)
|
|
2635
|
-
};
|
|
2636
|
-
}, Bi = (e) => ({
|
|
2637
|
-
...yt({
|
|
2638
|
-
...e,
|
|
2639
|
-
...e.elementRefs
|
|
2640
|
-
}),
|
|
2641
|
-
maxSlideDistance: pt(e.mediaQuery)
|
|
2642
|
-
}), Ki = (e) => {
|
|
2643
|
-
const { firstElementPosition: t, lastElementPosition: n, maxSlideDistance: s, offset: a, containerRightPosition: o } = e, c = n - o >= s ? s : n - o;
|
|
2644
|
-
return {
|
|
2645
|
-
firstElementPosition: t - c,
|
|
2646
|
-
lastElementPosition: n - c,
|
|
2647
|
-
offset: a - c,
|
|
2648
|
-
hideRightButton: n - c === o,
|
|
2649
|
-
hideLeftButton: !1
|
|
2650
|
-
};
|
|
2651
|
-
}, Zi = (e) => {
|
|
2652
|
-
const { containerLeftPosition: t, firstElementPosition: n, lastElementPosition: s, maxSlideDistance: a, offset: o } = e, c = n + a <= t, r = c ? a : Math.abs(o);
|
|
2653
|
-
return {
|
|
2654
|
-
firstElementPosition: n + r,
|
|
2655
|
-
lastElementPosition: s + r,
|
|
2656
|
-
offset: o + r,
|
|
2657
|
-
hideLeftButton: !c || n + r === t,
|
|
2658
|
-
hideRightButton: !1
|
|
2659
|
-
};
|
|
2660
|
-
}, qi = (e, t) => {
|
|
2661
|
-
const { widgetSnapshot: n, currentMouseX: s } = t;
|
|
2662
|
-
if (n.hideLeftButton && n.hideRightButton)
|
|
2663
|
-
return {};
|
|
2664
|
-
const a = n.initialMouseX - s;
|
|
2665
|
-
let o = n.offset - a, c = n.firstElementPosition - a, r = n.lastElementPosition - a, l = !1, u = !1;
|
|
2666
|
-
return c > e.containerLeftPosition && (o = 0, c = e.containerLeftPosition, r = e.lastElementPosition, l = !0), r <= e.containerRightPosition && (o = e.leftOffsetLimit, c = e.containerLeftPosition - Math.abs(e.leftOffsetLimit), r = n.containerRightPosition, u = !0), {
|
|
2667
|
-
offset: o,
|
|
2668
|
-
firstElementPosition: c,
|
|
2669
|
-
lastElementPosition: r,
|
|
2670
|
-
hideLeftButton: l,
|
|
2671
|
-
hideRightButton: u
|
|
2672
|
-
};
|
|
2673
|
-
};
|
|
2674
|
-
function Ji(e, t) {
|
|
2675
|
-
switch (t.type) {
|
|
2676
|
-
case _.Init:
|
|
2677
|
-
return {
|
|
2678
|
-
...e,
|
|
2679
|
-
...yt(t.payload)
|
|
2680
|
-
};
|
|
2681
|
-
case _.Resize:
|
|
2682
|
-
return {
|
|
2683
|
-
...e,
|
|
2684
|
-
...Bi(t.payload)
|
|
2685
|
-
};
|
|
2686
|
-
case _.Next:
|
|
2687
|
-
return {
|
|
2688
|
-
...e,
|
|
2689
|
-
...Ki(e)
|
|
2690
|
-
};
|
|
2691
|
-
case _.Previous:
|
|
2692
|
-
return {
|
|
2693
|
-
...e,
|
|
2694
|
-
...Zi(e)
|
|
2695
|
-
};
|
|
2696
|
-
case _.Drag:
|
|
2697
|
-
return {
|
|
2698
|
-
...e,
|
|
2699
|
-
...qi(e, t.payload)
|
|
2700
|
-
};
|
|
2701
|
-
default:
|
|
2702
|
-
return e;
|
|
2703
|
-
}
|
|
2704
|
-
}
|
|
2705
|
-
const es = "_itemSpacing_1j5ri_1", ts = "_header_1j5ri_4", ns = "_mobileScroll_1j5ri_8", is = "_leftGradient_1j5ri_16", ss = "_leftGradientNoPadding_1j5ri_19", as = "_leftButton_1j5ri_22", rs = "_leftButtonNoPadding_1j5ri_25", os = "_rightGradient_1j5ri_28", cs = "_rightGradientNoPadding_1j5ri_31", ls = "_rightButton_1j5ri_34", ds = "_rightButtonNoPadding_1j5ri_37", R = {
|
|
2706
|
-
itemSpacing: es,
|
|
2707
|
-
header: ts,
|
|
2708
|
-
mobileScroll: ns,
|
|
2709
|
-
leftGradient: is,
|
|
2710
|
-
leftGradientNoPadding: ss,
|
|
2711
|
-
leftButton: as,
|
|
2712
|
-
leftButtonNoPadding: rs,
|
|
2713
|
-
rightGradient: os,
|
|
2714
|
-
rightGradientNoPadding: cs,
|
|
2715
|
-
rightButton: ls,
|
|
2716
|
-
rightButtonNoPadding: ds
|
|
2717
|
-
};
|
|
2718
|
-
bt.defaultProps = {
|
|
2719
|
-
heading: "",
|
|
2720
|
-
description: "",
|
|
2721
|
-
childComponentProps: {}
|
|
2722
|
-
};
|
|
2723
|
-
function bt(e) {
|
|
2724
|
-
const { childComponent: t, staticChildren: n, getWidgetItemAnalyticsData: s = () => {
|
|
2725
|
-
} } = e, [a, o] = C.useReducer(Ji, Le), [c, r] = C.useState(null), l = {
|
|
2726
|
-
container: C.useRef(null),
|
|
2727
|
-
firstElement: C.useRef(null),
|
|
2728
|
-
lastElement: C.useRef(null)
|
|
2729
|
-
}, u = Mt(), g = $e.isTabletOrMobile(), { dynamicAttributes: m, focusNext: h, focusPrev: v, onFocusWidget: A, onBlurWidget: T } = Di({ state: a, containerRef: l.container, mediaQuery: u });
|
|
2730
|
-
Hi(
|
|
2731
|
-
Wi(l, o, u),
|
|
2732
|
-
zi(l.container),
|
|
2733
|
-
[u]
|
|
2734
|
-
);
|
|
2735
|
-
const { ref: $, inView: p } = en({ prevent: !e.lazyLoad });
|
|
2736
|
-
let y = e.collection;
|
|
2737
|
-
!e.collection && ve.isFunction(e.fetch) && (y = e.fetch(p).data), C.useEffect(() => {
|
|
2738
|
-
!y || le.isEmpty(y) || o({
|
|
2739
|
-
type: _.Init,
|
|
2740
|
-
payload: {
|
|
2741
|
-
elementRefs: l,
|
|
2742
|
-
mediaQuery: u
|
|
2743
|
-
}
|
|
2744
|
-
});
|
|
2745
|
-
}, [y]);
|
|
2746
|
-
function k() {
|
|
2747
|
-
if (!y)
|
|
2748
|
-
return;
|
|
2749
|
-
const O = (n == null ? void 0 : n.filter((F) => F.position === "start")) ?? [], W = (n == null ? void 0 : n.filter((F) => F.position === "end")) ?? [];
|
|
2750
|
-
let ue = y.map((F, z) => {
|
|
2751
|
-
let te;
|
|
2752
|
-
F === D.first(y) && (O != null && O.length) && (te = l.firstElement), F === D.last(y) && !(W != null && W.length) && (te = l.lastElement);
|
|
2753
|
-
const At = z + 1 === y.length;
|
|
2754
|
-
return /* @__PURE__ */ i.jsx(
|
|
2755
|
-
"li",
|
|
2756
|
-
{
|
|
2757
|
-
id: F.id,
|
|
2758
|
-
ref: te,
|
|
2759
|
-
onFocus: () => A(z),
|
|
2760
|
-
onBlur: () => T(),
|
|
2761
|
-
className: `${R.itemSpacing} ${e.childClassName || ""} ${At && g ? "pe-4" : ""}`,
|
|
2762
|
-
...m[F.id],
|
|
2763
|
-
children: /* @__PURE__ */ i.jsx(
|
|
2764
|
-
t,
|
|
2765
|
-
{
|
|
2766
|
-
getChildAppLink: e.getChildAppLink,
|
|
2767
|
-
data: F,
|
|
2768
|
-
getSubtitle: e.getSubtitle,
|
|
2769
|
-
analyticsData: {
|
|
2770
|
-
itemIndex: z,
|
|
2771
|
-
...e.analyticsData,
|
|
2772
|
-
...s(F)
|
|
2773
|
-
},
|
|
2774
|
-
analyticsOptions: { ...e == null ? void 0 : e.analyticsOptions, ...Ie.getSliderItemAnalyticsOptions() },
|
|
2775
|
-
...e.childComponentProps
|
|
2776
|
-
}
|
|
2777
|
-
)
|
|
2778
|
-
},
|
|
2779
|
-
F.id
|
|
2780
|
-
);
|
|
2781
|
-
});
|
|
2782
|
-
return O.length && (ue = [
|
|
2783
|
-
...O.map((F, z) => {
|
|
2784
|
-
const te = F.component;
|
|
2785
|
-
return /* @__PURE__ */ i.jsx(
|
|
2786
|
-
"li",
|
|
2787
|
-
{
|
|
2788
|
-
ref: z === 0 ? l.firstElement : null,
|
|
2789
|
-
className: `${R.itemSpacing} ${e.childClassName || ""}`,
|
|
2790
|
-
children: /* @__PURE__ */ i.jsx(te, {})
|
|
2791
|
-
},
|
|
2792
|
-
`first-widget-component:${z}`
|
|
2793
|
-
);
|
|
2794
|
-
}),
|
|
2795
|
-
...ue
|
|
2796
|
-
]), W.length && (ue = [
|
|
2797
|
-
...ue,
|
|
2798
|
-
...W.map((F, z) => {
|
|
2799
|
-
const te = F.component;
|
|
2800
|
-
return /* @__PURE__ */ i.jsx(
|
|
2801
|
-
"li",
|
|
2802
|
-
{
|
|
2803
|
-
ref: z === W.length - 1 ? l.lastElement : null,
|
|
2804
|
-
className: `${R.itemSpacing} ${e.childClassName || ""}`,
|
|
2805
|
-
children: /* @__PURE__ */ i.jsx(te, {})
|
|
2806
|
-
},
|
|
2807
|
-
`end-widget-component:${z}`
|
|
2808
|
-
);
|
|
2809
|
-
})
|
|
2810
|
-
]), /* @__PURE__ */ i.jsx(i.Fragment, { children: ue });
|
|
2811
|
-
}
|
|
2812
|
-
const Y = C.useMemo(k, [
|
|
2813
|
-
y,
|
|
2814
|
-
m,
|
|
2815
|
-
a.offset,
|
|
2816
|
-
u,
|
|
2817
|
-
...e.widgetDataDeps || []
|
|
2818
|
-
]);
|
|
2819
|
-
if (y && !y.length && !(n != null && n.length))
|
|
2820
|
-
return /* @__PURE__ */ i.jsx(i.Fragment, {});
|
|
2821
|
-
if (!y || le.isEmpty(y))
|
|
2822
|
-
return /* @__PURE__ */ i.jsx("div", { ref: $, children: /* @__PURE__ */ i.jsx(
|
|
2823
|
-
us,
|
|
2824
|
-
{
|
|
2825
|
-
partialLoadingComponent: e.partialLoadingComponent,
|
|
2826
|
-
partialLoadingOptions: e.partialLoadingOptions
|
|
2827
|
-
}
|
|
2828
|
-
) });
|
|
2829
|
-
const H = (O) => ({
|
|
2830
|
-
...e.analyticsData,
|
|
2831
|
-
id: e.id,
|
|
2832
|
-
name: e.heading,
|
|
2833
|
-
direction: O === _.Next ? "right" : "left"
|
|
2834
|
-
}), q = g || e.hideButtons;
|
|
2835
|
-
return /* @__PURE__ */ i.jsxs("div", { className: `${e.noNegativePadding ? "" : "mx-n4"}`, children: [
|
|
2836
|
-
/* @__PURE__ */ i.jsx("div", { className: `px-4 ${R.header}`, children: /* @__PURE__ */ i.jsx(
|
|
2837
|
-
Qt,
|
|
2838
|
-
{
|
|
2839
|
-
name: e.heading,
|
|
2840
|
-
description: e.description,
|
|
2841
|
-
appLink: e.headingAppLink,
|
|
2842
|
-
showSeeMoreLink: !!e.headingAppLink
|
|
2843
|
-
}
|
|
2844
|
-
) }),
|
|
2845
|
-
/* @__PURE__ */ i.jsx("div", { className: "position-relative", children: /* @__PURE__ */ i.jsx("div", { className: `${e.noNegativePadding ? "" : "px-4"} py-3 my-n3 position-relative ${g ? R.mobileScroll : "overflow-hidden-x"}`, children: /* @__PURE__ */ i.jsxs("div", { className: `position-relative ${e.hideButtons ? "overflow-hidden-x" : ""}`, children: [
|
|
2846
|
-
!q && /* @__PURE__ */ i.jsx(
|
|
2847
|
-
ot,
|
|
2848
|
-
{
|
|
2849
|
-
direction: Re.Left,
|
|
2850
|
-
onClick: () => {
|
|
2851
|
-
v(), o({ type: _.Previous }), Ce.logUserAction(
|
|
2852
|
-
H(_.Previous),
|
|
2853
|
-
Ie.getSliderAnalyticsOptions()
|
|
2854
|
-
);
|
|
2855
|
-
},
|
|
2856
|
-
leftButtonClassName: `${R.leftButton} ${e.noNegativePadding ? R.leftButtonNoPadding : ""}`,
|
|
2857
|
-
leftGradientClassName: `${R.leftGradient} ${e.noNegativePadding ? R.leftGradientNoPadding : ""}`,
|
|
2858
|
-
hide: a.hideLeftButton,
|
|
2859
|
-
useGradientBackdrop: !0
|
|
2860
|
-
}
|
|
2861
|
-
),
|
|
2862
|
-
/* @__PURE__ */ i.jsx(
|
|
2863
|
-
Fi,
|
|
2864
|
-
{
|
|
2865
|
-
position: a.offset,
|
|
2866
|
-
positionType: Ue.Pixels,
|
|
2867
|
-
onDrag: Qi(l.container, a, o, c, r),
|
|
2868
|
-
onDragEnd: Xi(l.container, r),
|
|
2869
|
-
ref: l.container,
|
|
2870
|
-
children: Y
|
|
2871
|
-
}
|
|
2872
|
-
),
|
|
2873
|
-
!q && /* @__PURE__ */ i.jsx(
|
|
2874
|
-
ot,
|
|
2875
|
-
{
|
|
2876
|
-
direction: Re.Right,
|
|
2877
|
-
onClick: () => {
|
|
2878
|
-
h(), o({ type: _.Next }), Ce.logUserAction(
|
|
2879
|
-
H(_.Next),
|
|
2880
|
-
Ie.getSliderAnalyticsOptions()
|
|
2881
|
-
);
|
|
2882
|
-
},
|
|
2883
|
-
hide: a.hideRightButton,
|
|
2884
|
-
rightButtonClassName: `${R.rightButton} ${e.noNegativePadding ? R.rightButtonNoPadding : ""}`,
|
|
2885
|
-
rightGradientClassName: `${R.rightGradient} ${e.noNegativePadding ? R.rightGradientNoPadding : ""}`,
|
|
2886
|
-
useGradientBackdrop: !0
|
|
2887
|
-
}
|
|
2888
|
-
)
|
|
2889
|
-
] }) }) })
|
|
2890
|
-
] });
|
|
2891
|
-
}
|
|
2892
|
-
const us = (e) => {
|
|
2893
|
-
const { partialLoadingComponent: t, partialLoadingOptions: n } = e;
|
|
2894
|
-
return /* @__PURE__ */ i.jsx("div", { className: "d-flex flex-nowrap overflow-hidden", children: Jt.getPartialLoadingItems(n).map((s, a) => /* @__PURE__ */ i.jsx(t, {}, a)) });
|
|
2895
|
-
};
|
|
2896
|
-
function ms(e) {
|
|
2897
|
-
const n = e.selectedItems.find((s) => s.id === e.data.id) ? "bg-gray-900 text-white" : "bg-light";
|
|
2898
|
-
return /* @__PURE__ */ i.jsx(
|
|
2899
|
-
Xt,
|
|
2900
|
-
{
|
|
2901
|
-
tag: e.data,
|
|
2902
|
-
appLink: e.appLink,
|
|
2903
|
-
tagClass: `no-decoration ${n} lh-1`,
|
|
2904
|
-
onClick: () => e.onClick(e.data)
|
|
2905
|
-
}
|
|
2906
|
-
);
|
|
2907
|
-
}
|
|
2908
|
-
const fs = "_tagItem_165ya_1", ct = {
|
|
2909
|
-
tagItem: fs
|
|
2910
|
-
};
|
|
2911
|
-
function gs(e) {
|
|
2912
|
-
var l, u, g;
|
|
2913
|
-
const { state: t } = N.useContext(de);
|
|
2914
|
-
if (!((l = e.filter) != null && l.id))
|
|
2915
|
-
return /* @__PURE__ */ i.jsx(i.Fragment, {});
|
|
2916
|
-
const n = t[e.filter.id], { selection: s } = n, a = ((g = (u = e.filter) == null ? void 0 : u.options) == null ? void 0 : g.filter((m) => !(s != null && s.find((h) => h.id === m.id)))) ?? [];
|
|
2917
|
-
function o(m) {
|
|
2918
|
-
let h = null, v = -1;
|
|
2919
|
-
if (s.find((A, T) => {
|
|
2920
|
-
v > -1 || A.id.toString() === m.id.toString() && (v = T);
|
|
2921
|
-
}), v >= 0) {
|
|
2922
|
-
const A = [...s.slice(0, v), ...s.slice(v + 1)];
|
|
2923
|
-
h = {
|
|
2924
|
-
active: !!A.length,
|
|
2925
|
-
selection: A
|
|
2926
|
-
};
|
|
2927
|
-
} else
|
|
2928
|
-
h = {
|
|
2929
|
-
active: !0,
|
|
2930
|
-
selection: s.concat(m)
|
|
2931
|
-
};
|
|
2932
|
-
j.applyFilter(
|
|
2933
|
-
[e.filter],
|
|
2934
|
-
n,
|
|
2935
|
-
{ [e.filter.id]: h },
|
|
2936
|
-
t.appLink
|
|
2937
|
-
);
|
|
2938
|
-
}
|
|
2939
|
-
function c() {
|
|
2940
|
-
let m = "mb-3";
|
|
2941
|
-
return r.length && e.isFetching ? m += " mt-n1" : !r.length && !e.isFetching && (m += " d-none"), m;
|
|
2942
|
-
}
|
|
2943
|
-
const r = [...s, ...e.isFetching ? [] : a];
|
|
2944
|
-
return /* @__PURE__ */ i.jsx("div", { className: e.isFetching || r.length ? "py-2" : "", children: /* @__PURE__ */ i.jsx("div", { className: c(), children: (!!r.length || e.isFetching) && /* @__PURE__ */ i.jsx(
|
|
2945
|
-
bt,
|
|
2946
|
-
{
|
|
2947
|
-
collection: r,
|
|
2948
|
-
childComponent: (m) => /* @__PURE__ */ i.jsx(
|
|
2949
|
-
ms,
|
|
2950
|
-
{
|
|
2951
|
-
...m,
|
|
2952
|
-
selectedItems: s,
|
|
2953
|
-
onClick: o
|
|
2954
|
-
}
|
|
2955
|
-
),
|
|
2956
|
-
staticChildren: e.isFetching ? new Array(3).fill({
|
|
2957
|
-
component: () => /* @__PURE__ */ i.jsx(at, { tagClass: ct.tagItem }),
|
|
2958
|
-
position: "end"
|
|
2959
|
-
}) : [],
|
|
2960
|
-
partialLoadingComponent: () => /* @__PURE__ */ i.jsx("div", { className: "me-2", children: /* @__PURE__ */ i.jsx(at, { tagClass: `${ct.tagItem}` }) })
|
|
2961
|
-
}
|
|
2962
|
-
) }) });
|
|
2963
|
-
}
|
|
2964
|
-
function hs(e) {
|
|
2965
|
-
const { state: t } = C.useContext(de), n = () => {
|
|
2966
|
-
var o;
|
|
2967
|
-
const s = ((o = Et.getCurrentRoute().appLink) == null ? void 0 : o.params) ?? {}, a = le.pick(s, ["query", ut]);
|
|
2968
|
-
dt.trigger({
|
|
2969
|
-
...t.appLink,
|
|
2970
|
-
params: a
|
|
2971
|
-
});
|
|
2972
|
-
};
|
|
2973
|
-
return /* @__PURE__ */ i.jsx(
|
|
2974
|
-
ge,
|
|
2975
|
-
{
|
|
2976
|
-
onClick: n,
|
|
2977
|
-
className: `${e.alignLeft ? "order-first" : ""} hover-text-underline cursor-pointer d-flex align-items-center mx-2`,
|
|
2978
|
-
children: /* @__PURE__ */ i.jsx(b, { namespace: "search.resetButton", phrase: "reset" })
|
|
2979
|
-
}
|
|
2980
|
-
);
|
|
2981
|
-
}
|
|
2982
|
-
const vs = "_filtersContainer_1pjxc_9", xs = {
|
|
2983
|
-
filtersContainer: vs
|
|
2984
|
-
};
|
|
2985
|
-
function _s(e) {
|
|
2986
|
-
const { queryParams: t, appLink: n, hideHeading: s, isFetchingOptions: a, constantIndices: o = [] } = e, c = C.useMemo(() => j.deriveInitialStateFromQuery(t, e.mainFilters, e.moreFilters, n), [t, a]), [r, l] = C.useReducer(tn, c);
|
|
2987
|
-
C.useEffect(() => {
|
|
2988
|
-
le.isEqual(c, r) || (l({
|
|
2989
|
-
type: "update",
|
|
2990
|
-
payload: c
|
|
2991
|
-
}), e.analyticsOptions && j.logFilterEvent(
|
|
2992
|
-
e.mainFilters,
|
|
2993
|
-
e.moreFilters,
|
|
2994
|
-
c,
|
|
2995
|
-
t.query,
|
|
2996
|
-
e.analyticsOptions
|
|
2997
|
-
));
|
|
2998
|
-
}, [c]);
|
|
2999
|
-
const u = D.uniq([
|
|
3000
|
-
...j.getAppliedIndices(t, e._hasNewSearch),
|
|
3001
|
-
...o
|
|
3002
|
-
]), { mainFilters: g, moreFilters: m } = j.mixinDisabledFields(
|
|
3003
|
-
r,
|
|
3004
|
-
u,
|
|
3005
|
-
e.mainFilters,
|
|
3006
|
-
e.moreFilters
|
|
3007
|
-
), h = g.filter((A) => A.type !== "tag"), v = g.find((A) => A.type === "tag");
|
|
3008
|
-
return /* @__PURE__ */ i.jsx(de.Provider, { value: { state: r, dispatch: l }, children: /* @__PURE__ */ i.jsx($t.Provider, { value: "search.searchFilters", children: /* @__PURE__ */ i.jsxs("section", { children: [
|
|
3009
|
-
/* @__PURE__ */ i.jsxs("div", { className: Ve(
|
|
3010
|
-
"d-flex",
|
|
3011
|
-
!e.hideDivider && "border-bottom pb-3 mb-3",
|
|
3012
|
-
e._hasNewSearch && e.hideDivider && "pb-3",
|
|
3013
|
-
e._hasNewSearch && !e.hideDivider && "border-gray-300"
|
|
3014
|
-
), children: [
|
|
3015
|
-
!s && /* @__PURE__ */ i.jsx("h2", { className: "h5 mb-0 d-inline-block pe-2 border-end d-flex align-items-center", children: /* @__PURE__ */ i.jsx(b, { phrase: "heading" }) }),
|
|
3016
|
-
/* @__PURE__ */ i.jsxs("div", { className: Ve(`d-flex flex-wrap ${xs.filtersContainer}`, !s && "ms-2"), children: [
|
|
3017
|
-
h.map((A) => /* @__PURE__ */ i.jsx(vt, { filter: A, hideCaret: e.hideCaret }, A.id)),
|
|
3018
|
-
m && /* @__PURE__ */ i.jsx(Ii, { filter: m }),
|
|
3019
|
-
j.hasActiveFilters(t) && !e.hideResetButton && /* @__PURE__ */ i.jsx(
|
|
3020
|
-
hs,
|
|
3021
|
-
{
|
|
3022
|
-
mainFilters: e.mainFilters,
|
|
3023
|
-
moreFilters: e.moreFilters,
|
|
3024
|
-
currentQueryParam: t.query,
|
|
3025
|
-
analyticsOptions: e.analyticsOptions,
|
|
3026
|
-
alignLeft: e.alignResetButtonLeft
|
|
3027
|
-
}
|
|
3028
|
-
)
|
|
3029
|
-
] })
|
|
3030
|
-
] }),
|
|
3031
|
-
/* @__PURE__ */ i.jsx(
|
|
3032
|
-
gs,
|
|
3033
|
-
{
|
|
3034
|
-
filter: v,
|
|
3035
|
-
queryParams: t,
|
|
3036
|
-
isFetching: e.isFetchingOptions
|
|
3037
|
-
}
|
|
3038
|
-
)
|
|
3039
|
-
] }) }) });
|
|
3040
|
-
}
|
|
3041
|
-
export {
|
|
3042
|
-
Fs as F,
|
|
3043
|
-
_s as S,
|
|
3044
|
-
j as a,
|
|
3045
|
-
ne as b
|
|
3046
|
-
};
|