@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.
Files changed (284) hide show
  1. package/dist/bundles.json +4 -0
  2. package/dist/css/137-exchange-8c1b8716b3.chunk.css +25 -0
  3. package/dist/css/212-exchange-d71527fc65.chunk.css +1 -0
  4. package/dist/css/226-exchange-9ab9f14b3c.chunk.css +57 -0
  5. package/dist/css/291-exchange-be9d9f0cdb.chunk.css +11 -0
  6. package/dist/css/298-exchange-78ece5c7c5.chunk.css +37 -0
  7. package/dist/css/332-exchange-e4754ae27a.chunk.css +1 -0
  8. package/dist/css/489-exchange-6ecb1e7adc.chunk.css +85 -0
  9. package/dist/css/494-exchange-02d7a0249c.chunk.css +2 -0
  10. package/dist/css/522-exchange-1387f35e92.chunk.css +14 -0
  11. package/dist/css/538-exchange-4cbfe56ba3.chunk.css +1 -0
  12. package/dist/css/589-exchange-fa098d9131.chunk.css +11 -0
  13. package/dist/css/611-exchange-cbf2bb5621.chunk.css +5 -0
  14. package/dist/css/669-exchange-e80e6c6649.chunk.css +10 -0
  15. package/dist/css/68-exchange-b5eaf8af44.chunk.css +35 -0
  16. package/dist/css/75-exchange-6d2304419c.chunk.css +5 -0
  17. package/dist/css/759-exchange-23bb5dd175.chunk.css +8 -0
  18. package/dist/css/858-exchange-06944bdfa4.chunk.css +1 -0
  19. package/dist/css/904-exchange-0eab318199.chunk.css +40 -0
  20. package/dist/css/95-exchange-4cbfe56ba3.chunk.css +1 -0
  21. package/dist/css/lite-exchange-ed6bd260c5.css +14 -0
  22. package/dist/languages/en.json +1 -0
  23. package/dist/scripts/117-259130ac0e-exchange.chunk.js +1 -0
  24. package/dist/scripts/127-4a3c8f9725-exchange.chunk.js +1 -0
  25. package/dist/scripts/136-fd99ef4c9d-exchange.chunk.js +2 -0
  26. package/dist/scripts/136-fd99ef4c9d-exchange.chunk.js.LICENSE.txt +1 -0
  27. package/dist/scripts/137-51b4dab452-exchange.chunk.js +1 -0
  28. package/dist/scripts/156-7e4d78c20a-exchange.chunk.js +1 -0
  29. package/dist/scripts/170-9db7c3b12e-exchange.chunk.js +1 -0
  30. package/dist/scripts/173-3668db114a-exchange.chunk.js +1 -0
  31. package/dist/scripts/212-6ed71b2797-exchange.chunk.js +1 -0
  32. package/dist/scripts/226-889bef8e6c-exchange.chunk.js +1 -0
  33. package/dist/scripts/267-7daf64f8a1-exchange.chunk.js +1 -0
  34. package/dist/scripts/291-7e85a6e844-exchange.chunk.js +1 -0
  35. package/dist/scripts/298-ed8e8b8328-exchange.chunk.js +1 -0
  36. package/dist/scripts/312-69afcbbc39-exchange.chunk.js +1 -0
  37. package/dist/scripts/325-76baea117f-exchange.chunk.js +1 -0
  38. package/dist/scripts/332-08d48debc2-exchange.chunk.js +1 -0
  39. package/dist/scripts/414-567e121c75-exchange.chunk.js +2 -0
  40. package/dist/scripts/414-567e121c75-exchange.chunk.js.LICENSE.txt +60 -0
  41. package/dist/scripts/442-fcba36183d-exchange.chunk.js +1 -0
  42. package/dist/scripts/455-ceeb969c54-exchange.chunk.js +1 -0
  43. package/dist/scripts/484-08c82c5a88-exchange.chunk.js +1 -0
  44. package/dist/scripts/489-8b40fa92cc-exchange.chunk.js +2 -0
  45. package/dist/scripts/489-8b40fa92cc-exchange.chunk.js.LICENSE.txt +1 -0
  46. package/dist/scripts/494-abba46b945-exchange.chunk.js +2 -0
  47. package/dist/scripts/494-abba46b945-exchange.chunk.js.LICENSE.txt +1 -0
  48. package/dist/scripts/507-b6e119c8e2-exchange.chunk.js +1 -0
  49. package/dist/scripts/522-cb18547130-exchange.chunk.js +2 -0
  50. package/dist/scripts/522-cb18547130-exchange.chunk.js.LICENSE.txt +1 -0
  51. package/dist/scripts/536-b915864d5f-exchange.chunk.js +1 -0
  52. package/dist/scripts/538-ccc01a623f-exchange.chunk.js +2 -0
  53. package/dist/scripts/538-ccc01a623f-exchange.chunk.js.LICENSE.txt +1 -0
  54. package/dist/scripts/558-1bdbbc1f64-exchange.chunk.js +1 -0
  55. package/dist/scripts/589-17d73ab116-exchange.chunk.js +1 -0
  56. package/dist/scripts/601-a3c22b0a9f-exchange.chunk.js +1 -0
  57. package/dist/scripts/611-d8bd3e98dc-exchange.chunk.js +1 -0
  58. package/dist/scripts/619-1abac6cb1d-exchange.chunk.js +1 -0
  59. package/dist/scripts/648-485af12c37-exchange.chunk.js +1 -0
  60. package/dist/scripts/659-d08f206e1d-exchange.chunk.js +1 -0
  61. package/dist/scripts/669-a49a0838ff-exchange.chunk.js +1 -0
  62. package/dist/scripts/68-d0da8f3bd8-exchange.chunk.js +1 -0
  63. package/dist/scripts/725-9ddf1084b6-exchange.chunk.js +1 -0
  64. package/dist/scripts/726-868a877381-exchange.chunk.js +1 -0
  65. package/dist/scripts/75-9780e4300e-exchange.chunk.js +1 -0
  66. package/dist/scripts/759-f1a9db4868-exchange.chunk.js +1 -0
  67. package/dist/scripts/782-2c340d8404-exchange.chunk.js +1 -0
  68. package/dist/scripts/831-8808647fc7-exchange.chunk.js +1 -0
  69. package/dist/scripts/851-61f77ce4aa-exchange.chunk.js +2 -0
  70. package/dist/scripts/851-61f77ce4aa-exchange.chunk.js.LICENSE.txt +1 -0
  71. package/dist/scripts/858-70085ed3b1-exchange.chunk.js +1 -0
  72. package/dist/scripts/866-14ce8a3a4d-exchange.chunk.js +1 -0
  73. package/dist/scripts/87-d569a1463e-exchange.chunk.js +1 -0
  74. package/dist/scripts/877-5b357aeb63-exchange.chunk.js +1 -0
  75. package/dist/scripts/904-bd1dfd39e0-exchange.chunk.js +1 -0
  76. package/dist/scripts/925-f70ee1c7f9-exchange.chunk.js +1 -0
  77. package/dist/scripts/937-2e1f1f330e-exchange.chunk.js +1 -0
  78. package/dist/scripts/95-841a847f54-exchange.chunk.js +2 -0
  79. package/dist/scripts/95-841a847f54-exchange.chunk.js.LICENSE.txt +1 -0
  80. package/dist/scripts/bundle-7065b184e2.min.js +2 -0
  81. package/dist/scripts/bundle-7065b184e2.min.js.LICENSE.txt +108 -0
  82. package/package.json +3 -12
  83. package/typings/utils/imports.d.ts +1 -1
  84. package/dist/Actions-BtMRNMuv.cjs +0 -1
  85. package/dist/Actions-DfeKDy3k.js +0 -178
  86. package/dist/AddToLibraryView-BoCLtcWV.js +0 -508
  87. package/dist/AddToLibraryView-MpkcVgoR.cjs +0 -1
  88. package/dist/Badge-3MW5GacP.cjs +0 -1
  89. package/dist/Badge-Ddz0Il5v.js +0 -326
  90. package/dist/BadgeListContainer-CqwUuWKL.js +0 -19
  91. package/dist/BadgeListContainer-DLrBuDpU.cjs +0 -1
  92. package/dist/ButtonGroup-C-z2yWvb.cjs +0 -1
  93. package/dist/ButtonGroup-zaxEq7ZK.js +0 -24
  94. package/dist/Caret-Cpx0uvJ0.js +0 -36
  95. package/dist/Caret-Dgjy7YHO.cjs +0 -1
  96. package/dist/ChevronDownSvg-BI6xUNrZ.cjs +0 -1
  97. package/dist/ChevronDownSvg-BfijmId7.js +0 -13
  98. package/dist/ClassNameHelper-aJ0BDnVo.js +0 -29
  99. package/dist/ClassNameHelper-n4BHW-GR.cjs +0 -1
  100. package/dist/CloseSvg-2PKjla1T.js +0 -13
  101. package/dist/CloseSvg-B7rizkGp.cjs +0 -1
  102. package/dist/CurationStatus-BGjsO3l8.cjs +0 -1
  103. package/dist/CurationStatus-DZn3C9Qe.js +0 -4
  104. package/dist/DevErrorView-Bg1Ufy6-.js +0 -79
  105. package/dist/DevErrorView-CpXfV0V4.cjs +0 -1
  106. package/dist/DialogView-B5FEh3e8.cjs +0 -1
  107. package/dist/DialogView-RcNOylD7.js +0 -22
  108. package/dist/DownloadHelper-ChKHN-Le.cjs +0 -1
  109. package/dist/DownloadHelper-dL46n0Kq.js +0 -32
  110. package/dist/DownloadVideoView-CvDFi8HI.cjs +0 -1
  111. package/dist/DownloadVideoView-HSnwAYLp.js +0 -32
  112. package/dist/DragDropMoveWrapper-B_dy7ady.cjs +0 -1
  113. package/dist/DragDropMoveWrapper-TdzJqiqv.js +0 -462
  114. package/dist/ExchangeAddView-BRLjRe3p.js +0 -63
  115. package/dist/ExchangeAddView-CWfp5W52.cjs +0 -1
  116. package/dist/ExchangeFolderView-4ArEcQvn.js +0 -159
  117. package/dist/ExchangeFolderView-_ldS0uwf.cjs +0 -1
  118. package/dist/ExchangeMostRecentView-BMAosIXz.js +0 -61
  119. package/dist/ExchangeMostRecentView-s1iLfclz.cjs +0 -1
  120. package/dist/ExchangeNotFoundView-C_dtuc6J.cjs +0 -1
  121. package/dist/ExchangeNotFoundView-Cb-rmQH1.js +0 -7
  122. package/dist/ExchangePreviewView-hztBChIE.js +0 -82
  123. package/dist/ExchangePreviewView-kjDv-uqf.cjs +0 -1
  124. package/dist/ExchangeRequests-B3wRfv5Y.cjs +0 -1
  125. package/dist/ExchangeRequests-DV7BD3HZ.js +0 -115
  126. package/dist/ExchangeSearchBar-CNtU_swT.js +0 -32
  127. package/dist/ExchangeSearchBar-Ci1_Sc2S.cjs +0 -1
  128. package/dist/ExchangeSearchResultsView-CEueb9Li.js +0 -1641
  129. package/dist/ExchangeSearchResultsView-CGSIyjiV.cjs +0 -2
  130. package/dist/ExchangeSeriesView-BGBgwgMW.cjs +0 -1
  131. package/dist/ExchangeSeriesView-DMr_mCAH.js +0 -143
  132. package/dist/ExchangeSuggestEditView-B3P-nGFE.js +0 -307
  133. package/dist/ExchangeSuggestEditView-D1m5Z20N.cjs +0 -1
  134. package/dist/ExchangeTabs-CrA22PjN.js +0 -46
  135. package/dist/ExchangeTabs-KgrROs1d.cjs +0 -1
  136. package/dist/ExchangeUtils-BRDE3b9w.cjs +0 -1
  137. package/dist/ExchangeUtils-CCCrn5oQ.js +0 -65
  138. package/dist/ExchangeView-Cui4zZ4D.js +0 -30
  139. package/dist/ExchangeView-Dql8pHzi.cjs +0 -1
  140. package/dist/FormButtons-CDOsf9A-.cjs +0 -1
  141. package/dist/FormButtons-fQkvwYsy.js +0 -20
  142. package/dist/FormFeedback-5Dd3bMCl.js +0 -7
  143. package/dist/FormFeedback-BU7vSBqB.cjs +0 -1
  144. package/dist/FormField-Cb2l2GMO.cjs +0 -5
  145. package/dist/FormField-DYeERWxm.js +0 -3353
  146. package/dist/GiveFeedbackView-0tH6h1s3.js +0 -5436
  147. package/dist/GiveFeedbackView-DirGDc2a.cjs +0 -7
  148. package/dist/GroupSvg-BmwXO6yT.js +0 -53
  149. package/dist/GroupSvg-DVAq4iNX.cjs +0 -1
  150. package/dist/HardCoded-25AFj2sZ.js +0 -51
  151. package/dist/HardCoded-BbbeCQNt.cjs +0 -1
  152. package/dist/HttpErrorHandlers-CBhvfsvb.cjs +0 -1
  153. package/dist/HttpErrorHandlers-DKqNIMOg.js +0 -76
  154. package/dist/IconCircle-BVHFUBGt.cjs +0 -1
  155. package/dist/IconCircle-CxFLsbLY.js +0 -26
  156. package/dist/InstanceRegion-C7aJEkFV.cjs +0 -1
  157. package/dist/InstanceRegion-DQlzs4EK.js +0 -4
  158. package/dist/LazyImage-DBQklqeJ.js +0 -163
  159. package/dist/LazyImage-lv36coda.cjs +0 -1
  160. package/dist/LibraryRequests-BHAZPSUw.js +0 -186
  161. package/dist/LibraryRequests-DKCsJHbr.cjs +0 -1
  162. package/dist/LinkifyHelper-DPHYATPc.js +0 -925
  163. package/dist/LinkifyHelper-EOfbsqdi.cjs +0 -4
  164. package/dist/MasterTypeHelper-Y_SDsEUF.cjs +0 -1
  165. package/dist/MasterTypeHelper-uSKy6GZd.js +0 -16
  166. package/dist/MediaQueries-9caJ2eG6.js +0 -4
  167. package/dist/MediaQueries-CE9Kbs0e.cjs +0 -1
  168. package/dist/PartialLoadingHelper-D42uOdDd.cjs +0 -1
  169. package/dist/PartialLoadingHelper-DIas6hnM.js +0 -29
  170. package/dist/PermissionFilterOption-B-QrMVdA.js +0 -4
  171. package/dist/PermissionFilterOption-BIA__Q_O.cjs +0 -1
  172. package/dist/PillTabSelector-B5V2rqf0.js +0 -64
  173. package/dist/PillTabSelector-yR52s5ix.cjs +0 -14
  174. package/dist/PreviewVideoDetails-BQ0lYYbK.cjs +0 -362
  175. package/dist/PreviewVideoDetails-DJXB4vV3.js +0 -68337
  176. package/dist/ProgramType-DHk-SlRZ.cjs +0 -1
  177. package/dist/ProgramType-FpE5cuZV.js +0 -60
  178. package/dist/RatingRequests-BNPZAxXm.cjs +0 -1
  179. package/dist/RatingRequests-Dr3w3-z8.js +0 -11
  180. package/dist/RedirectView-BK8yU-PU.js +0 -22
  181. package/dist/RedirectView-OEJhJrvf.cjs +0 -1
  182. package/dist/RestrictionHelper-BSceJYz-.js +0 -112
  183. package/dist/RestrictionHelper-C5u_CmoL.cjs +0 -1
  184. package/dist/ScrollHelper-Dg7bDIH7.js +0 -10
  185. package/dist/ScrollHelper-ESsjtyv8.cjs +0 -1
  186. package/dist/SearchFilters-C_yEnumc.js +0 -3046
  187. package/dist/SearchFilters-D3fLjseM.cjs +0 -1
  188. package/dist/SearchSvg-BB6oXs1v.js +0 -13
  189. package/dist/SearchSvg-BU6G1Fs0.cjs +0 -1
  190. package/dist/SharedSearchHelper-BuVD-GvT.js +0 -159
  191. package/dist/SharedSearchHelper-D5GJJwW7.cjs +0 -1
  192. package/dist/TagItem-BBc3HmnI.cjs +0 -1
  193. package/dist/TagItem-BFnSikAz.js +0 -1125
  194. package/dist/TvAdFreeBadge-BDFn2ujd.js +0 -11
  195. package/dist/TvAdFreeBadge-X2iSf6B3.cjs +0 -1
  196. package/dist/TvAdFreeRequestView-CEAvozfO.js +0 -46
  197. package/dist/TvAdFreeRequestView-DgnMCKX4.cjs +0 -1
  198. package/dist/TvAddView-Bv12wfX7.js +0 -276
  199. package/dist/TvAddView-CA7Yappn.cjs +0 -1
  200. package/dist/TvAlreadyAddedView-C240rLQ7.js +0 -56
  201. package/dist/TvAlreadyAddedView-X4KElzJA.cjs +0 -1
  202. package/dist/TvBroadcastContentView-DizJHvTQ.js +0 -52
  203. package/dist/TvBroadcastContentView-g8i0Cy-k.cjs +0 -1
  204. package/dist/TvChannelBadge-B4a1wkQI.cjs +0 -1
  205. package/dist/TvChannelBadge-Doqs12s9.js +0 -11
  206. package/dist/TvChannelView-CSn0VleL.js +0 -177
  207. package/dist/TvChannelView-Ds_F3Mmp.cjs +0 -1
  208. package/dist/TvChannelsView-CM_T5E3j.js +0 -171
  209. package/dist/TvChannelsView-r3NO_BRv.cjs +0 -1
  210. package/dist/TvGuideView-B8vS-8lS.cjs +0 -1
  211. package/dist/TvGuideView-BLlQJiZ3.js +0 -54
  212. package/dist/TvHomeView-C_h4DZw_.cjs +0 -1
  213. package/dist/TvHomeView-CbNg8AyI.js +0 -15
  214. package/dist/TvPreviewView-DhXD3H__.js +0 -114
  215. package/dist/TvPreviewView-hGq7_Bzs.cjs +0 -1
  216. package/dist/TvProgramTimeBadge-BtQKNLz2.js +0 -18
  217. package/dist/TvProgramTimeBadge-DPJu73xG.cjs +0 -1
  218. package/dist/TvProgramsView-Ba9VPnEh.cjs +0 -1
  219. package/dist/TvProgramsView-DO4WnPJx.js +0 -223
  220. package/dist/TvRadioDownloadView-ByABG_YW.js +0 -41
  221. package/dist/TvRadioDownloadView-CitV60kZ.cjs +0 -1
  222. package/dist/TvRequestProgramView-CYc5nAEt.cjs +0 -1
  223. package/dist/TvRequestProgramView-Dm5Bra4d.js +0 -267
  224. package/dist/TvRequests-Bcy68aT5.js +0 -227
  225. package/dist/TvRequests-l_Xv-rcr.cjs +0 -1
  226. package/dist/TvSearchBar-5J6420z2.cjs +0 -1
  227. package/dist/TvSearchBar-KZqcg7G0.js +0 -95
  228. package/dist/TvSearchResultsView-BTONTtMg.cjs +0 -1
  229. package/dist/TvSearchResultsView-CMsq8ehS.js +0 -212
  230. package/dist/TvTabs-CrQVKuod.js +0 -88
  231. package/dist/TvTabs-JuCI2Ea7.cjs +0 -1
  232. package/dist/TypeHelper-Dt2Y9Wc4.js +0 -14
  233. package/dist/TypeHelper-Z2rqPzup.cjs +0 -1
  234. package/dist/UseAlerts-B2BbQeN3.js +0 -39
  235. package/dist/UseAlerts-pIg83NsO.cjs +0 -1
  236. package/dist/UseFetchAll-BaDVJFdj.cjs +0 -1
  237. package/dist/UseFetchAll-DYGA8s5a.js +0 -147
  238. package/dist/UseGetMediaQueryString-BLeJTZt2.cjs +0 -1
  239. package/dist/UseGetMediaQueryString-Dc_jP0rr.js +0 -226
  240. package/dist/UseHandleDialogError-BJHsOnKn.js +0 -9
  241. package/dist/UseHandleDialogError-PbyWsVaT.cjs +0 -1
  242. package/dist/UseHandleObjectError-CBFN1Ill.cjs +0 -1
  243. package/dist/UseHandleObjectError-DAhDbPEo.js +0 -16
  244. package/dist/UseHover-CLOLtbUV.cjs +0 -1
  245. package/dist/UseHover-Cc_d5rRf.js +0 -85
  246. package/dist/UseSelectAllPages-04737Rdu.cjs +0 -1
  247. package/dist/UseSelectAllPages-Cnk3MEAt.js +0 -149
  248. package/dist/VideoHelper-3AKe5Jyy.js +0 -477
  249. package/dist/VideoHelper-BQ7rWUw0.cjs +0 -1
  250. package/dist/VideoList-SNG1hmoL.cjs +0 -49
  251. package/dist/VideoList-s7lvSqSs.js +0 -2622
  252. package/dist/VideoRequests-CpDXl7E_.cjs +0 -1
  253. package/dist/VideoRequests-DlUeYLjl.js +0 -225
  254. package/dist/VideoSortSelect-3JfrvPfj.cjs +0 -1
  255. package/dist/VideoSortSelect-DS9Uvc-S.js +0 -116
  256. package/dist/VisibleOnSvg-BisjF586.cjs +0 -1
  257. package/dist/VisibleOnSvg-WDCQPPvV.js +0 -33
  258. package/dist/app-2U039aX_.js +0 -67680
  259. package/dist/app-DcIbciDa.cjs +0 -454
  260. package/dist/app.js +0 -1
  261. package/dist/en.json +0 -1
  262. package/dist/exchange.css +0 -1
  263. package/dist/getRegionInfo-B_h_jjAy.js +0 -31
  264. package/dist/getRegionInfo-Bs5JKG7h.cjs +0 -1
  265. package/dist/index-CGkY5YVS.cjs +0 -1
  266. package/dist/index-DUgR-v-j.js +0 -885
  267. package/dist/toLocalTime-Bt8Uy4Kq.js +0 -15
  268. package/dist/toLocalTime-DF9SIfIt.cjs +0 -1
  269. package/dist/useBreakpoints-37V489ap.js +0 -66
  270. package/dist/useBreakpoints-B-bcgx-L.cjs +0 -1
  271. package/dist/useGetExchangeActions-BwXrBSH-.cjs +0 -1
  272. package/dist/useGetExchangeActions-C8Y1FNSl.js +0 -176
  273. package/dist/useGetTvActions-CmEBdHbw.cjs +0 -1
  274. package/dist/useGetTvActions-DENrO3wZ.js +0 -54
  275. package/dist/useHandleRegionError-BNRrs6y8.cjs +0 -1
  276. package/dist/useHandleRegionError-BNxhNPKP.js +0 -10
  277. package/dist/usePreviewContext--ihfEi4P.js +0 -14
  278. package/dist/usePreviewContext-DjpFhe3I.cjs +0 -1
  279. package/dist/useSelectedRegion-7_2s4QQF.js +0 -16
  280. package/dist/useSelectedRegion-D3Xsu2Ut.cjs +0 -1
  281. package/dist/useVerifiedEmailRequiredErrorHandler-CSkvs-EW.cjs +0 -1
  282. package/dist/useVerifiedEmailRequiredErrorHandler-DFLs3cQc.js +0 -57
  283. package/vite-i18n-plugin.ts +0 -113
  284. package/vite.config.ts +0 -59
@@ -1,508 +0,0 @@
1
- import { X as me, T as te, j as n, J as be, r as I, w as ge, A as ye, R as ue, B, $ as pe, L as v, x as G, aN as le, U as ve, a1 as N, a0 as xe, al as Te, P as Le, c as J, a3 as Ne, aO as de, M as z, aA as Ae } from "./app-2U039aX_.js";
2
- import { l as Ce } from "./index-DUgR-v-j.js";
3
- import { u as Se, F as X, l as M, a as _e } from "./FormField-DYeERWxm.js";
4
- import { A as je } from "./Actions-DfeKDy3k.js";
5
- import { C as Pe } from "./Caret-Cpx0uvJ0.js";
6
- import { H as ce } from "./HardCoded-25AFj2sZ.js";
7
- import { L as Y } from "./LibraryRequests-BHAZPSUw.js";
8
- import { V as ke } from "./VideoRequests-DlUeYLjl.js";
9
- import { u as Fe } from "./UseAlerts-B2BbQeN3.js";
10
- import { u as Ee } from "./useVerifiedEmailRequiredErrorHandler-DFLs3cQc.js";
11
- import { V as K } from "./VideoHelper-3AKe5Jyy.js";
12
- function ee(e, t, r) {
13
- if (te.isEqual(e.id, t))
14
- return [e, r];
15
- const i = e.children;
16
- if (!i || !i.length)
17
- return [null, null];
18
- for (let a = 0; a < i.length; a++) {
19
- const [o, c] = ee(i[a], t, [...r, e]);
20
- if (o)
21
- return [o, c];
22
- }
23
- return [null, null];
24
- }
25
- const qe = 7, m = {
26
- find(e, t) {
27
- if (!(!e || !e.children || !e.children.length))
28
- for (let r = 0; r < e.children.length; r++) {
29
- const [i] = ee(e.children[r], t, []);
30
- if (i)
31
- return i;
32
- }
33
- },
34
- getPath(e, t) {
35
- if (!(!e || !e.children || !e.children.length))
36
- for (let r = 0; r < e.children.length; r++) {
37
- const [, i] = ee(e.children[r], t, []);
38
- if (i != null && i.length)
39
- return i;
40
- }
41
- },
42
- getParent(e, t) {
43
- const r = m.getPath(e, t);
44
- return r != null && r.length ? r[r.length - 1] : null;
45
- },
46
- convertNestedObjectToTree(e) {
47
- var r;
48
- const t = {
49
- ...e.data,
50
- children: e.children
51
- };
52
- return (r = t.children) != null && r.length && (t.children = t.children.map(m.convertNestedObjectToTree)), t;
53
- },
54
- findDepth(e, t, r = 0) {
55
- var a, o;
56
- if (!e || e.length === 0)
57
- return 0;
58
- let i = 0;
59
- for (const c of e) {
60
- if (((o = (a = c.data) == null ? void 0 : a.id) == null ? void 0 : o.toString()) === t.toString())
61
- return r;
62
- const f = m.findDepth(c.children, t, r + 1);
63
- if (f > 0) {
64
- i = f;
65
- break;
66
- }
67
- }
68
- return i;
69
- },
70
- findMaxChildDepth(e, t = 0) {
71
- if (!e || e.length === 0)
72
- return t;
73
- let r = t;
74
- for (const i of e) {
75
- const a = m.findMaxChildDepth(i.children, t + 1);
76
- r = Math.max(r, a);
77
- }
78
- return r;
79
- },
80
- findTargetNode(e, t) {
81
- var r, i;
82
- if (!e || e.length === 0)
83
- return null;
84
- for (const a of e) {
85
- if (((i = (r = a.data) == null ? void 0 : r.id) == null ? void 0 : i.toString()) === t.toString())
86
- return a;
87
- const o = m.findTargetNode(a.children, t);
88
- if (o !== null)
89
- return o;
90
- }
91
- return null;
92
- },
93
- isMaxDepth(e, t, r, i = qe) {
94
- const a = m.findTargetNode(e, t), o = m.findMaxChildDepth(a.children), c = m.findDepth(e, r);
95
- return o + c >= i;
96
- },
97
- flatten(e) {
98
- if (!e)
99
- return [];
100
- const t = [];
101
- function r(i) {
102
- t.push(me.omit(i, ["children"])), i.children.forEach(r);
103
- }
104
- return e.children.forEach(r), t;
105
- }
106
- }, Ie = "_tree_u0qyb_1", Re = "_text_u0qyb_1", Oe = "_chevron_u0qyb_4", De = "_disabled_u0qyb_163", Me = "_root_u0qyb_166", $e = "_selected_u0qyb_172", Ue = "_actions_u0qyb_175", we = "_node_u0qyb_185", He = "_noActions_u0qyb_188", b = {
107
- tree: Ie,
108
- text: Re,
109
- chevron: Oe,
110
- disabled: De,
111
- root: Me,
112
- selected: $e,
113
- actions: Ue,
114
- node: we,
115
- noActions: He
116
- };
117
- function Ve(e) {
118
- var r;
119
- function t() {
120
- let i = `${b.text} clamp-4`;
121
- return e.className && (i += ` ${e.className}`), i;
122
- }
123
- if (e.isDisabled) {
124
- const i = typeof e.disabledTooltip == "string" ? e.disabledTooltip : (r = e.disabledTooltip) == null ? void 0 : r.call(e, e.tree);
125
- return /* @__PURE__ */ n.jsx(be, { title: i, spanHack: !0, spanHackClassName: "d-inline-block flex-grow-1", children: /* @__PURE__ */ n.jsx("span", { className: `${t()} text-secondary ${b.disabled}`, children: e.text }) });
126
- }
127
- return /* @__PURE__ */ n.jsx("div", { className: t(), children: e.text });
128
- }
129
- const We = "tree-actions";
130
- fe.defaultProps = {
131
- selectedLinkClassName: b.selected
132
- };
133
- function fe(e) {
134
- const { tree: t, selectedIds: r, getAppLink: i, onSelect: a, isDisabled: o, isClickDisabled: c, actions: f, isDropdown: d } = e, h = I.useRef(null), x = I.useMemo(() => r == null ? void 0 : r.some((l) => m.find(t, l)), [t, r]), R = e.openDepth && e.depth < e.openDepth, [g, C] = I.useState(x || R), S = r == null ? void 0 : r.some((l) => te.isEqual(t.id, l));
135
- let _ = !!t.children && !!t.children.length;
136
- e.maxDisplayDepth && _ && (_ = e.depth < e.maxDisplayDepth), I.useEffect(() => {
137
- if (!h.current || !d)
138
- return;
139
- const l = (O) => {
140
- O.stopPropagation(), j();
141
- };
142
- return h.current.addEventListener("click", l), () => {
143
- h.current && h.current.removeEventListener("click", l);
144
- };
145
- }, [h.current, a]), I.useEffect(() => {
146
- var l;
147
- e.multiSelect || g && (x || S || !((l = e.selectedIds) != null && l.length) && (o != null && o(e.tree)) || R || C(!1));
148
- }, [r]);
149
- function j() {
150
- if (!(c != null && c(t))) {
151
- if (e.multiSelect || C(!g), i) {
152
- ye.trigger(i(t));
153
- return;
154
- }
155
- if (o != null && o(t)) {
156
- a(null);
157
- return;
158
- }
159
- a == null || a(t);
160
- }
161
- }
162
- function w(l) {
163
- if (l.stopPropagation(), e.multiSelect) {
164
- C(!g);
165
- return;
166
- }
167
- j();
168
- }
169
- function H() {
170
- let l = `py-1 d-flex align-items-center w-100 position-relative ${b.node}`;
171
- return S && (l += " " + e.selectedLinkClassName), f != null && f.length || (l += " " + b.noActions), x && e.multiSelect && (l += " text-underline fst-italic"), l;
172
- }
173
- return e.maxDisplayDepth && e.depth > e.maxDisplayDepth ? /* @__PURE__ */ n.jsx(n.Fragment, {}) : /* @__PURE__ */ n.jsx("li", { className: `position-relative ${g ? "" : b.collapsed} ${e.isRoot ? b.root : ""}`, children: /* @__PURE__ */ n.jsxs("div", { className: "position-relative", children: [
174
- /* @__PURE__ */ n.jsxs(
175
- ge,
176
- {
177
- className: H(),
178
- onClick: d ? null : j,
179
- ref: h,
180
- children: [
181
- _ && /* @__PURE__ */ n.jsx("div", { className: b.chevron, onClick: w, children: /* @__PURE__ */ n.jsx(Pe, { direction: g ? "down" : "right" }) }),
182
- /* @__PURE__ */ n.jsx(
183
- Ve,
184
- {
185
- tree: t,
186
- text: t.name || t.description,
187
- isDisabled: (o == null ? void 0 : o(t)) || (c == null ? void 0 : c(t)),
188
- disabledTooltip: e.disabledTooltip
189
- }
190
- )
191
- ]
192
- }
193
- ),
194
- !!e.actions && /* @__PURE__ */ n.jsx(
195
- je,
196
- {
197
- className: b.actions,
198
- actions: f == null ? void 0 : f.map((l) => ({ ...l, appLink: l.getAppLink(t) })),
199
- actionsDropdownClassName: `btn btn-light ${We} py-0`
200
- }
201
- ),
202
- g && /* @__PURE__ */ n.jsx(he, { ...e, isChild: !0, depth: e.depth + 1 }, t.id)
203
- ] }) });
204
- }
205
- function he(e) {
206
- const { tree: t, ...r } = e;
207
- return !t || !t.children ? /* @__PURE__ */ n.jsx(n.Fragment, {}) : /* @__PURE__ */ n.jsx("ul", { className: `m-0 p-0 list-unstyled ${b.tree}`, children: t.children.map((i, a) => /* @__PURE__ */ n.jsx(fe, { tree: i, ...r, isRoot: !e.isChild, depth: e.depth || 0 }, a)) });
208
- }
209
- const T = "libraries.addToLibraryForm", Q = v.encloseNamespace(T);
210
- function Be(e) {
211
- var o, c, f;
212
- const t = Se(), r = !t.values.library.canAddContent, i = (o = e.videoLibraries) == null ? void 0 : o.find((d) => d.id === t.values.library.id), a = ue.useMemo(() => ({
213
- children: e.getCategoryTree(t.values.library.id).map(m.convertNestedObjectToTree)
214
- }), [t.values.library.id]);
215
- return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
216
- i && /* @__PURE__ */ n.jsx("div", { className: "alert alert-info", children: /* @__PURE__ */ n.jsx(B, { namespace: T, phrase: "alreadyInLibrary", options: { library: t.values.library.name } }) }),
217
- r && /* @__PURE__ */ n.jsx("p", { children: /* @__PURE__ */ n.jsx(B, { namespace: T, phrase: "sendLibraryRequest", options: { video: e.video.name } }) }),
218
- /* @__PURE__ */ n.jsxs(pe, { children: [
219
- e.libraries.length > 1 && /* @__PURE__ */ n.jsx(
220
- X,
221
- {
222
- as: "select",
223
- label: Q("selectLibrary"),
224
- name: "library",
225
- value: ((c = t.values.library) == null ? void 0 : c.id) ?? "",
226
- className: (f = t.values.library) != null && f.id ? "" : "text-secondary",
227
- showRequiredStar: !0,
228
- onChange: (d) => {
229
- t.setFieldValue("folder", null);
230
- const h = d.target.value;
231
- t.setFieldValue("library", e.libraries.find((x) => x.id.toString() === h.toString()));
232
- },
233
- children: e.libraries.map((d) => /* @__PURE__ */ n.jsx("option", { value: d.id, className: "text-dark", children: d.name }, d.id))
234
- }
235
- ),
236
- /* @__PURE__ */ n.jsx(
237
- X,
238
- {
239
- label: Q("selectFolder"),
240
- name: "folder",
241
- showRequiredStar: !0,
242
- disabled: !t.values.library,
243
- children: () => {
244
- var d;
245
- return /* @__PURE__ */ n.jsx(Ce.Scrollbars, { autoHeight: !0, autoHeightMax: 300, className: "border rounded-3", children: /* @__PURE__ */ n.jsx(
246
- he,
247
- {
248
- tree: a,
249
- onSelect: (h) => t.setFieldValue("folder", h),
250
- isDisabled: e.isFolderDisabled,
251
- disabledTooltip: v.getPhrase(T, "disabledFolder"),
252
- selectedIds: (d = t.values.folder) != null && d.id ? [t.values.folder.id] : void 0,
253
- selectedLinkClassName: "bg-light"
254
- }
255
- ) });
256
- }
257
- }
258
- ),
259
- !!t.values.folder && /* @__PURE__ */ n.jsx("p", { className: "mt-n2", children: /* @__PURE__ */ n.jsx(
260
- B,
261
- {
262
- namespace: T,
263
- phrase: r ? "requestTo" : "addTo",
264
- options: { folder: t.values.folder.name }
265
- }
266
- ) }),
267
- r && /* @__PURE__ */ n.jsx(
268
- X,
269
- {
270
- label: v.getPhrase(T, "comment"),
271
- as: "textarea",
272
- name: "comment",
273
- id: "comment",
274
- placeholder: v.getPhrase(T, "commentPlaceholder"),
275
- value: t.values.comment
276
- }
277
- ),
278
- /* @__PURE__ */ n.jsxs(G, { children: [
279
- /* @__PURE__ */ n.jsx(G.Cancel, { onClick: e.closePopup }),
280
- /* @__PURE__ */ n.jsx(G.Submit, { variant: "dark", text: Q("addToLibrary") })
281
- ] })
282
- ] })
283
- ] });
284
- }
285
- const Ge = {
286
- /**
287
- * Orders libraries by type (custom -> shared -> hosted).
288
- * Also orders libraries of same type alphabetically.
289
- */
290
- sort(e) {
291
- return e != null && e.length ? e.sort((t, r) => {
292
- const i = t.isSharedLibrary ? "shared_library" : t.type, a = r.isSharedLibrary ? "shared_library" : r.type;
293
- return i === a ? t.name.localeCompare(r.name) : i === "custom_library" || i === "shared_library" && a !== "custom_library" || i === "hosted_library" && a !== "custom_library" && a !== "shared_library" ? -1 : 1;
294
- }) : [];
295
- },
296
- hasTwigOrTigtag(e, t) {
297
- if (!t)
298
- return { hasTwig: !1, hasTigtag: !1 };
299
- if (!t.isAuthenticated) {
300
- const a = t.contentRegion === le.UK || t.contentRegion === le.SCOT;
301
- return {
302
- hasTwig: a,
303
- hasTigtag: a
304
- };
305
- }
306
- if (!e)
307
- return { hasTwig: !1, hasTigtag: !1 };
308
- let r = !1, i = !1;
309
- for (const a of e)
310
- if (a.id.toString() === ce.Libraries.TWIG ? r = !0 : a.id.toString() === ce.Libraries.TIGTAG && (i = !0), r && i)
311
- break;
312
- return { hasTwig: r, hasTigtag: i };
313
- }
314
- }, Z = "libraries.validation", Je = M.object().shape({
315
- comment: M.string().nullable().max(512, () => v.getPhrase(Z, "commentExceeds")),
316
- library: M.object().required(() => v.getPhrase(Z, "libraryRequired")).nullable(),
317
- folder: M.object().required(() => v.getPhrase(Z, "folderRequired")).nullable()
318
- });
319
- var U = /* @__PURE__ */ ((e) => (e[e.MasterVideo = 1] = "MasterVideo", e[e.MasterClip = 2] = "MasterClip", e[e.MasterInteractive = 3] = "MasterInteractive", e))(U || {});
320
- const $ = v.encloseNamespace("shared.errorMessageHelper"), ze = {
321
- "operation-not-allowed": "operationNotAllowed",
322
- "library-not-supported": "libraryNotSupported",
323
- "access-denied": "accessDenied",
324
- "library-access-denied": "libraryAccessDenied",
325
- "library-access-denied-create": "libraryAccessDeniedCreate",
326
- "library-access-denied-fulfil": "libraryAccessDeniedFulfill",
327
- "library-access-denied-not-authorized": "libraryAccessDeniedNotAuthorized",
328
- "library-request-access-denied": "accessDenied",
329
- "library-request-access-denied-create-request": "libraryRequestAccessDeniedCreateRequest",
330
- "library-request-access-denied-process-comment": "libraryRequestAccessDeniedProcessComment",
331
- "customer-not-found": "customerNotFound",
332
- "customer-not-found-current-user": "customerNotFound",
333
- "customer-not-found-library-owner": "customerNotFoundLibraryOwner",
334
- "customer-not-found-destination-library-owner": "customerNotFoundLibraryOwner",
335
- "user-not-found": "userNotFound",
336
- "library-not-found": "libraryNotFound",
337
- "video-not-found": "videoNotFound",
338
- "category-not-found": "categoryNotFound",
339
- "category-not-found-destination-not-provided": "categoryNotFoundDestinationNotProvided",
340
- "category-not-found-not-in-library": "categoryNotFoundInLibrary",
341
- "library-request-not-found": "libraryRequestNotFound",
342
- "invalid-category-path": "invalidCategoryPath",
343
- "library-api-error": "somethingWentWrong",
344
- "content-not-playable": "contentNotPlayable",
345
- "invalid-object": "invalidObject",
346
- "same-request-existed": "sameRequestExisted",
347
- "unknown-error": "somethingWentWrong",
348
- "no-email": "noEmailError"
349
- }, Xe = {
350
- "create-invitation-failed": "createInvitationFailed",
351
- "invitation-resend-failed": "invitationResendFailed",
352
- "failed-to-accept": "failedToAccept",
353
- "invitee-not-found": "inviteeNotFound",
354
- "invitation-not-found": "invitationNotFound",
355
- "invitation-deleted": "invitationDeleted",
356
- "too-many-emails": "tooManyEmails"
357
- }, Ye = {
358
- libraryApiError(e) {
359
- var r;
360
- const t = ze[(r = e == null ? void 0 : e.responseJSON) == null ? void 0 : r.type];
361
- return $(t || "somethingWentWrong");
362
- },
363
- inviteColleagueError(e) {
364
- var r;
365
- const t = Xe[(r = e == null ? void 0 : e.responseJSON) == null ? void 0 : r.type];
366
- return $(t || "somethingWentWrong");
367
- }
368
- }, p = {
369
- buildOpenAppLinkUrl(e, t, r) {
370
- return ve.urlBuilder(`${e}/open`, { appLink: t, product: r });
371
- },
372
- buildOpenVideoUrl(e, t, r) {
373
- return p.buildOpenAppLinkUrl(e, `video:${t}`, r);
374
- },
375
- buildOpenClipUrl(e, t, r) {
376
- return p.buildOpenAppLinkUrl(e, `clip:${t}`, r);
377
- },
378
- buildOpenInteractiveUrl(e, t, r) {
379
- return p.buildOpenAppLinkUrl(e, `interactive:${t}`, r);
380
- },
381
- buildOpenTopicUrl(e, t, r) {
382
- return p.buildOpenAppLinkUrl(e, `topic:${t}`, r);
383
- },
384
- buildOpenSeriesUrl(e, t, r) {
385
- return p.buildOpenAppLinkUrl(e, `series:${t}`, r);
386
- },
387
- buildOpenPlaylistUrl(e, t, r) {
388
- return p.buildOpenAppLinkUrl(e, `playlist:${t}`, r);
389
- },
390
- buildOpenCategoryUrl(e, t, r) {
391
- return p.buildOpenAppLinkUrl(e, `category:${t}`, r);
392
- },
393
- buildOpenLibraryFolderUrl(e, t, r) {
394
- const i = `library:${t.libraryId}:folder:${t.folderId}`;
395
- return p.buildOpenAppLinkUrl(e, i, r);
396
- }
397
- }, Ke = {
398
- [z.Video]: U.MasterVideo,
399
- [z.Clip]: U.MasterClip,
400
- [z.Interactive]: U.MasterInteractive
401
- }, Qe = "libraries.addToLibrary", A = v.encloseNamespace(Qe);
402
- function ct(e) {
403
- var re, ie, ne;
404
- const t = N(Ne.currentUser()), r = N(Y.librariesWithCategories()), i = N(Y.libraryRequestLibraries()), a = K.getVideoRequest(e.id, e.typeId), o = N(a), f = (K.isClip(o.data) || K.isInteractive(o.data)) && ((re = o.data) == null ? void 0 : re._parentVideo), d = N(
405
- f && ke.video(f.id)
406
- ), { loading: h, handleGenerateReportError: x } = Ee(), R = N(Ae.config()), g = ue.useMemo(() => Ge.sort(i.data), [i.data]), C = xe(), S = Fe(), _ = !!t.data && Te.getOrSetSortType(t.data.id);
407
- function j() {
408
- var y, L, D, P, k, ae, oe, se;
409
- let s = null, u = (D = J.first((L = (y = o.data) == null ? void 0 : y.libraries) == null ? void 0 : L.data)) == null ? void 0 : D.id;
410
- if (u && ((P = o.data.categories.data) != null && P.length)) {
411
- const F = o.data.categories.data.find((V) => {
412
- var E, q;
413
- return (q = (E = V.libraries) == null ? void 0 : E.data) == null ? void 0 : q.find((W) => W.id.toString() === u.toString());
414
- });
415
- F && (s = F.id);
416
- }
417
- if (!u && (u = (oe = J.first((ae = (k = d.data) == null ? void 0 : k.libraries) == null ? void 0 : ae.data)) == null ? void 0 : oe.id, u && ((se = d.data.categories.data) != null && se.length))) {
418
- const F = d.data.categories.data.find((V) => {
419
- var E, q;
420
- return (q = (E = V.libraries) == null ? void 0 : E.data) == null ? void 0 : q.find((W) => W.id.toString() === u.toString());
421
- });
422
- F && (s = F.id);
423
- }
424
- return {
425
- sourceLibraryId: u ? +u : null,
426
- sourceCategoryId: s ? +s : null
427
- };
428
- }
429
- function w(s, u) {
430
- const { sourceLibraryId: y, sourceCategoryId: L } = j(), D = {
431
- objectId: e.id.toString(),
432
- objectType: Ke[e.typeId],
433
- message: s.comment,
434
- sourceLibraryId: y,
435
- destinationLibraryId: +s.library.id,
436
- metadata: {
437
- destinationCategoryId: +s.folder.id,
438
- sourceCategoryId: L
439
- }
440
- };
441
- C(Y.addToLibrary(D, _)).then(() => {
442
- s.library.canAddContent ? S.success({
443
- type: de.Success,
444
- heading: "",
445
- message: A("addToLibrarySuccess", { folder: s.folder.name, video: o.data.name, escapeText: !0 }),
446
- ...e.folderAppLink ? {
447
- appLink: {
448
- ...e.folderAppLink,
449
- args: [s.library.id, s.folder.id, te.slugify(s.folder.name)]
450
- },
451
- appLinkText: A("goToFolder", { folder: s.folder.name }),
452
- appLinkClassName: "info-link"
453
- } : {
454
- extLink: p.buildOpenLibraryFolderUrl(R.data.launchUrl, {
455
- libraryId: s.library.id,
456
- folderId: s.folder.id
457
- }),
458
- extLinkText: A("goToFolder", { folder: s.folder.name }),
459
- extLinkClassName: "info-link"
460
- }
461
- }) : S.success({
462
- type: de.Pending,
463
- heading: A("pendingApproval"),
464
- message: A("libraryRequestSent", { library: s.library.name, escapeText: !0 })
465
- });
466
- }).catch((P) => {
467
- const k = Ye.libraryApiError(P);
468
- x(P, k, k), u();
469
- }).finally(() => {
470
- e.closePopup();
471
- });
472
- }
473
- function H(s) {
474
- var u;
475
- return (u = r.data.find((y) => y.data.id.toString() === s.toString())) == null ? void 0 : u.children;
476
- }
477
- function l(s) {
478
- var u, y;
479
- return !!((y = (u = o.data.categories) == null ? void 0 : u.data) != null && y.find((L) => L.id === s.id));
480
- }
481
- const O = i.data && o.data && r.data;
482
- return /* @__PURE__ */ n.jsx(Le, { title: A("addToLibrary"), closePopup: e.closePopup, showLoadingSpinner: !O || h, children: O && /* @__PURE__ */ n.jsx(
483
- _e,
484
- {
485
- initialValues: {
486
- library: J.first(g),
487
- folder: null,
488
- comment: ""
489
- },
490
- validationSchema: Je,
491
- onSubmit: w,
492
- children: /* @__PURE__ */ n.jsx(
493
- Be,
494
- {
495
- libraries: g,
496
- closePopup: e.closePopup,
497
- isFolderDisabled: l,
498
- video: o.data,
499
- videoLibraries: (ne = (ie = o.data) == null ? void 0 : ie.libraries) == null ? void 0 : ne.data,
500
- getCategoryTree: H
501
- }
502
- )
503
- }
504
- ) });
505
- }
506
- export {
507
- ct as AddToLibraryView
508
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./app-DcIbciDa.cjs"),re=require("./index-CGkY5YVS.cjs"),y=require("./FormField-Cb2l2GMO.cjs"),ie=require("./Actions-BtMRNMuv.cjs"),ne=require("./Caret-Dgjy7YHO.cjs"),Z=require("./HardCoded-BbbeCQNt.cjs"),$=require("./LibraryRequests-DKCsJHbr.cjs"),ae=require("./VideoRequests-CpDXl7E_.cjs"),oe=require("./UseAlerts-pIg83NsO.cjs"),se=require("./useVerifiedEmailRequiredErrorHandler-CSkvs-EW.cjs"),w=require("./VideoHelper-BQ7rWUw0.cjs");function G(e,t,i){if(r.TextHelper.isEqual(e.id,t))return[e,i];const n=e.children;if(!n||!n.length)return[null,null];for(let a=0;a<n.length;a++){const[o,c]=G(n[a],t,[...i,e]);if(o)return[o,c]}return[null,null]}const le=7,m={find(e,t){if(!(!e||!e.children||!e.children.length))for(let i=0;i<e.children.length;i++){const[n]=G(e.children[i],t,[]);if(n)return n}},getPath(e,t){if(!(!e||!e.children||!e.children.length))for(let i=0;i<e.children.length;i++){const[,n]=G(e.children[i],t,[]);if(n!=null&&n.length)return n}},getParent(e,t){const i=m.getPath(e,t);return i!=null&&i.length?i[i.length-1]:null},convertNestedObjectToTree(e){var i;const t={...e.data,children:e.children};return(i=t.children)!=null&&i.length&&(t.children=t.children.map(m.convertNestedObjectToTree)),t},findDepth(e,t,i=0){var a,o;if(!e||e.length===0)return 0;let n=0;for(const c of e){if(((o=(a=c.data)==null?void 0:a.id)==null?void 0:o.toString())===t.toString())return i;const p=m.findDepth(c.children,t,i+1);if(p>0){n=p;break}}return n},findMaxChildDepth(e,t=0){if(!e||e.length===0)return t;let i=t;for(const n of e){const a=m.findMaxChildDepth(n.children,t+1);i=Math.max(i,a)}return i},findTargetNode(e,t){var i,n;if(!e||e.length===0)return null;for(const a of e){if(((n=(i=a.data)==null?void 0:i.id)==null?void 0:n.toString())===t.toString())return a;const o=m.findTargetNode(a.children,t);if(o!==null)return o}return null},isMaxDepth(e,t,i,n=le){const a=m.findTargetNode(e,t),o=m.findMaxChildDepth(a.children),c=m.findDepth(e,i);return o+c>=n},flatten(e){if(!e)return[];const t=[];function i(n){t.push(r.ObjectHelper.omit(n,["children"])),n.children.forEach(i)}return e.children.forEach(i),t}},de="_tree_u0qyb_1",ce="_text_u0qyb_1",ue="_chevron_u0qyb_4",pe="_disabled_u0qyb_163",fe="_root_u0qyb_166",me="_selected_u0qyb_172",he="_actions_u0qyb_175",ge="_node_u0qyb_185",be="_noActions_u0qyb_188",h={tree:de,text:ce,chevron:ue,disabled:pe,root:fe,selected:me,actions:he,node:ge,noActions:be};function xe(e){var i;function t(){let n=`${h.text} clamp-4`;return e.className&&(n+=` ${e.className}`),n}if(e.isDisabled){const n=typeof e.disabledTooltip=="string"?e.disabledTooltip:(i=e.disabledTooltip)==null?void 0:i.call(e,e.tree);return r.jsxRuntimeExports.jsx(r.Tooltip,{title:n,spanHack:!0,spanHackClassName:"d-inline-block flex-grow-1",children:r.jsxRuntimeExports.jsx("span",{className:`${t()} text-secondary ${h.disabled}`,children:e.text})})}return r.jsxRuntimeExports.jsx("div",{className:t(),children:e.text})}const ye="tree-actions";ee.defaultProps={selectedLinkClassName:h.selected};function ee(e){const{tree:t,selectedIds:i,getAppLink:n,onSelect:a,isDisabled:o,isClickDisabled:c,actions:p,isDropdown:d}=e,f=r.reactExports.useRef(null),v=r.reactExports.useMemo(()=>i==null?void 0:i.some(l=>m.find(t,l)),[t,i]),P=e.openDepth&&e.depth<e.openDepth,[g,L]=r.reactExports.useState(v||P),R=i==null?void 0:i.some(l=>r.TextHelper.isEqual(t.id,l));let A=!!t.children&&!!t.children.length;e.maxDisplayDepth&&A&&(A=e.depth<e.maxDisplayDepth),r.reactExports.useEffect(()=>{if(!f.current||!d)return;const l=k=>{k.stopPropagation(),N()};return f.current.addEventListener("click",l),()=>{f.current&&f.current.removeEventListener("click",l)}},[f.current,a]),r.reactExports.useEffect(()=>{var l;e.multiSelect||g&&(v||R||!((l=e.selectedIds)!=null&&l.length)&&(o!=null&&o(e.tree))||P||L(!1))},[i]);function N(){if(!(c!=null&&c(t))){if(e.multiSelect||L(!g),n){r.AppLinkHelper.trigger(n(t));return}if(o!=null&&o(t)){a(null);return}a==null||a(t)}}function M(l){if(l.stopPropagation(),e.multiSelect){L(!g);return}N()}function D(){let l=`py-1 d-flex align-items-center w-100 position-relative ${h.node}`;return R&&(l+=" "+e.selectedLinkClassName),p!=null&&p.length||(l+=" "+h.noActions),v&&e.multiSelect&&(l+=" text-underline fst-italic"),l}return e.maxDisplayDepth&&e.depth>e.maxDisplayDepth?r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{}):r.jsxRuntimeExports.jsx("li",{className:`position-relative ${g?"":h.collapsed} ${e.isRoot?h.root:""}`,children:r.jsxRuntimeExports.jsxs("div",{className:"position-relative",children:[r.jsxRuntimeExports.jsxs(r.DivButton,{className:D(),onClick:d?null:N,ref:f,children:[A&&r.jsxRuntimeExports.jsx("div",{className:h.chevron,onClick:M,children:r.jsxRuntimeExports.jsx(ne.Caret,{direction:g?"down":"right"})}),r.jsxRuntimeExports.jsx(xe,{tree:t,text:t.name||t.description,isDisabled:(o==null?void 0:o(t))||(c==null?void 0:c(t)),disabledTooltip:e.disabledTooltip})]}),!!e.actions&&r.jsxRuntimeExports.jsx(ie.Actions,{className:h.actions,actions:p==null?void 0:p.map(l=>({...l,appLink:l.getAppLink(t)})),actionsDropdownClassName:`btn btn-light ${ye} py-0`}),g&&r.jsxRuntimeExports.jsx(te,{...e,isChild:!0,depth:e.depth+1},t.id)]})})}function te(e){const{tree:t,...i}=e;return!t||!t.children?r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{}):r.jsxRuntimeExports.jsx("ul",{className:`m-0 p-0 list-unstyled ${h.tree}`,children:t.children.map((n,a)=>r.jsxRuntimeExports.jsx(ee,{tree:n,...i,isRoot:!e.isChild,depth:e.depth||0},a))})}const E="libraries.addToLibraryForm",B=r.LanguageService.encloseNamespace(E);function ve(e){var o,c,p;const t=y.useFormikContextWrapper(),i=!t.values.library.canAddContent,n=(o=e.videoLibraries)==null?void 0:o.find(d=>d.id===t.values.library.id),a=r.React.useMemo(()=>({children:e.getCategoryTree(t.values.library.id).map(m.convertNestedObjectToTree)}),[t.values.library.id]);return r.jsxRuntimeExports.jsxs(r.jsxRuntimeExports.Fragment,{children:[n&&r.jsxRuntimeExports.jsx("div",{className:"alert alert-info",children:r.jsxRuntimeExports.jsx(r.Text,{namespace:E,phrase:"alreadyInLibrary",options:{library:t.values.library.name}})}),i&&r.jsxRuntimeExports.jsx("p",{children:r.jsxRuntimeExports.jsx(r.Text,{namespace:E,phrase:"sendLibraryRequest",options:{video:e.video.name}})}),r.jsxRuntimeExports.jsxs(r.Form,{children:[e.libraries.length>1&&r.jsxRuntimeExports.jsx(y.FormField,{as:"select",label:B("selectLibrary"),name:"library",value:((c=t.values.library)==null?void 0:c.id)??"",className:(p=t.values.library)!=null&&p.id?"":"text-secondary",showRequiredStar:!0,onChange:d=>{t.setFieldValue("folder",null);const f=d.target.value;t.setFieldValue("library",e.libraries.find(v=>v.id.toString()===f.toString()))},children:e.libraries.map(d=>r.jsxRuntimeExports.jsx("option",{value:d.id,className:"text-dark",children:d.name},d.id))}),r.jsxRuntimeExports.jsx(y.FormField,{label:B("selectFolder"),name:"folder",showRequiredStar:!0,disabled:!t.values.library,children:()=>{var d;return r.jsxRuntimeExports.jsx(re.libExports.Scrollbars,{autoHeight:!0,autoHeightMax:300,className:"border rounded-3",children:r.jsxRuntimeExports.jsx(te,{tree:a,onSelect:f=>t.setFieldValue("folder",f),isDisabled:e.isFolderDisabled,disabledTooltip:r.LanguageService.getPhrase(E,"disabledFolder"),selectedIds:(d=t.values.folder)!=null&&d.id?[t.values.folder.id]:void 0,selectedLinkClassName:"bg-light"})})}}),!!t.values.folder&&r.jsxRuntimeExports.jsx("p",{className:"mt-n2",children:r.jsxRuntimeExports.jsx(r.Text,{namespace:E,phrase:i?"requestTo":"addTo",options:{folder:t.values.folder.name}})}),i&&r.jsxRuntimeExports.jsx(y.FormField,{label:r.LanguageService.getPhrase(E,"comment"),as:"textarea",name:"comment",id:"comment",placeholder:r.LanguageService.getPhrase(E,"commentPlaceholder"),value:t.values.comment}),r.jsxRuntimeExports.jsxs(r.PopupButtons,{children:[r.jsxRuntimeExports.jsx(r.PopupButtons.Cancel,{onClick:e.closePopup}),r.jsxRuntimeExports.jsx(r.PopupButtons.Submit,{variant:"dark",text:B("addToLibrary")})]})]})]})}const Ee={sort(e){return e!=null&&e.length?e.sort((t,i)=>{const n=t.isSharedLibrary?"shared_library":t.type,a=i.isSharedLibrary?"shared_library":i.type;return n===a?t.name.localeCompare(i.name):n==="custom_library"||n==="shared_library"&&a!=="custom_library"||n==="hosted_library"&&a!=="custom_library"&&a!=="shared_library"?-1:1}):[]},hasTwigOrTigtag(e,t){if(!t)return{hasTwig:!1,hasTigtag:!1};if(!t.isAuthenticated){const a=t.contentRegion===r.ContentRegion.UK||t.contentRegion===r.ContentRegion.SCOT;return{hasTwig:a,hasTigtag:a}}if(!e)return{hasTwig:!1,hasTigtag:!1};let i=!1,n=!1;for(const a of e)if(a.id.toString()===Z.HardCoded.Libraries.TWIG?i=!0:a.id.toString()===Z.HardCoded.Libraries.TIGTAG&&(n=!0),i&&n)break;return{hasTwig:i,hasTigtag:n}}},W="libraries.validation",Te=y.libExports.object().shape({comment:y.libExports.string().nullable().max(512,()=>r.LanguageService.getPhrase(W,"commentExceeds")),library:y.libExports.object().required(()=>r.LanguageService.getPhrase(W,"libraryRequired")).nullable(),folder:y.libExports.object().required(()=>r.LanguageService.getPhrase(W,"folderRequired")).nullable()});var H=(e=>(e[e.MasterVideo=1]="MasterVideo",e[e.MasterClip=2]="MasterClip",e[e.MasterInteractive=3]="MasterInteractive",e))(H||{});const O=r.LanguageService.encloseNamespace("shared.errorMessageHelper"),je={"operation-not-allowed":"operationNotAllowed","library-not-supported":"libraryNotSupported","access-denied":"accessDenied","library-access-denied":"libraryAccessDenied","library-access-denied-create":"libraryAccessDeniedCreate","library-access-denied-fulfil":"libraryAccessDeniedFulfill","library-access-denied-not-authorized":"libraryAccessDeniedNotAuthorized","library-request-access-denied":"accessDenied","library-request-access-denied-create-request":"libraryRequestAccessDeniedCreateRequest","library-request-access-denied-process-comment":"libraryRequestAccessDeniedProcessComment","customer-not-found":"customerNotFound","customer-not-found-current-user":"customerNotFound","customer-not-found-library-owner":"customerNotFoundLibraryOwner","customer-not-found-destination-library-owner":"customerNotFoundLibraryOwner","user-not-found":"userNotFound","library-not-found":"libraryNotFound","video-not-found":"videoNotFound","category-not-found":"categoryNotFound","category-not-found-destination-not-provided":"categoryNotFoundDestinationNotProvided","category-not-found-not-in-library":"categoryNotFoundInLibrary","library-request-not-found":"libraryRequestNotFound","invalid-category-path":"invalidCategoryPath","library-api-error":"somethingWentWrong","content-not-playable":"contentNotPlayable","invalid-object":"invalidObject","same-request-existed":"sameRequestExisted","unknown-error":"somethingWentWrong","no-email":"noEmailError"},Le={"create-invitation-failed":"createInvitationFailed","invitation-resend-failed":"invitationResendFailed","failed-to-accept":"failedToAccept","invitee-not-found":"inviteeNotFound","invitation-not-found":"invitationNotFound","invitation-deleted":"invitationDeleted","too-many-emails":"tooManyEmails"},Re={libraryApiError(e){var i;const t=je[(i=e==null?void 0:e.responseJSON)==null?void 0:i.type];return O(t||"somethingWentWrong")},inviteColleagueError(e){var i;const t=Le[(i=e==null?void 0:e.responseJSON)==null?void 0:i.type];return O(t||"somethingWentWrong")}},x={buildOpenAppLinkUrl(e,t,i){return r.UrlHelper.urlBuilder(`${e}/open`,{appLink:t,product:i})},buildOpenVideoUrl(e,t,i){return x.buildOpenAppLinkUrl(e,`video:${t}`,i)},buildOpenClipUrl(e,t,i){return x.buildOpenAppLinkUrl(e,`clip:${t}`,i)},buildOpenInteractiveUrl(e,t,i){return x.buildOpenAppLinkUrl(e,`interactive:${t}`,i)},buildOpenTopicUrl(e,t,i){return x.buildOpenAppLinkUrl(e,`topic:${t}`,i)},buildOpenSeriesUrl(e,t,i){return x.buildOpenAppLinkUrl(e,`series:${t}`,i)},buildOpenPlaylistUrl(e,t,i){return x.buildOpenAppLinkUrl(e,`playlist:${t}`,i)},buildOpenCategoryUrl(e,t,i){return x.buildOpenAppLinkUrl(e,`category:${t}`,i)},buildOpenLibraryFolderUrl(e,t,i){const n=`library:${t.libraryId}:folder:${t.folderId}`;return x.buildOpenAppLinkUrl(e,n,i)}},Ae={[r.MasterType.Video]:H.MasterVideo,[r.MasterType.Clip]:H.MasterClip,[r.MasterType.Interactive]:H.MasterInteractive},Ne="libraries.addToLibrary",j=r.LanguageService.encloseNamespace(Ne);function Ce(e){var J,z,Y;const t=r.useBasicFetch(r.UserRequests.currentUser()),i=r.useBasicFetch($.LibraryRequests.librariesWithCategories()),n=r.useBasicFetch($.LibraryRequests.libraryRequestLibraries()),a=w.VideoHelper.getVideoRequest(e.id,e.typeId),o=r.useBasicFetch(a),p=(w.VideoHelper.isClip(o.data)||w.VideoHelper.isInteractive(o.data))&&((J=o.data)==null?void 0:J._parentVideo),d=r.useBasicFetch(p&&ae.VideoRequests.video(p.id)),{loading:f,handleGenerateReportError:v}=se.useVerifiedEmailRequiredErrorHandler(),P=r.useBasicFetch(r.ConfigRequests.config()),g=r.React.useMemo(()=>Ee.sort(n.data),[n.data]),L=r.useGetFetchAsync(),R=oe.useAlerts(),A=!!t.data&&r.VideoSortHelper.getOrSetSortType(t.data.id);function N(){var b,T,I,C,S,K,X,Q;let s=null,u=(I=r.ArrayHelper.first((T=(b=o.data)==null?void 0:b.libraries)==null?void 0:T.data))==null?void 0:I.id;if(u&&((C=o.data.categories.data)!=null&&C.length)){const q=o.data.categories.data.find(V=>{var F,_;return(_=(F=V.libraries)==null?void 0:F.data)==null?void 0:_.find(U=>U.id.toString()===u.toString())});q&&(s=q.id)}if(!u&&(u=(X=r.ArrayHelper.first((K=(S=d.data)==null?void 0:S.libraries)==null?void 0:K.data))==null?void 0:X.id,u&&((Q=d.data.categories.data)!=null&&Q.length))){const q=d.data.categories.data.find(V=>{var F,_;return(_=(F=V.libraries)==null?void 0:F.data)==null?void 0:_.find(U=>U.id.toString()===u.toString())});q&&(s=q.id)}return{sourceLibraryId:u?+u:null,sourceCategoryId:s?+s:null}}function M(s,u){const{sourceLibraryId:b,sourceCategoryId:T}=N(),I={objectId:e.id.toString(),objectType:Ae[e.typeId],message:s.comment,sourceLibraryId:b,destinationLibraryId:+s.library.id,metadata:{destinationCategoryId:+s.folder.id,sourceCategoryId:T}};L($.LibraryRequests.addToLibrary(I,A)).then(()=>{s.library.canAddContent?R.success({type:r.AlertType.Success,heading:"",message:j("addToLibrarySuccess",{folder:s.folder.name,video:o.data.name,escapeText:!0}),...e.folderAppLink?{appLink:{...e.folderAppLink,args:[s.library.id,s.folder.id,r.TextHelper.slugify(s.folder.name)]},appLinkText:j("goToFolder",{folder:s.folder.name}),appLinkClassName:"info-link"}:{extLink:x.buildOpenLibraryFolderUrl(P.data.launchUrl,{libraryId:s.library.id,folderId:s.folder.id}),extLinkText:j("goToFolder",{folder:s.folder.name}),extLinkClassName:"info-link"}}):R.success({type:r.AlertType.Pending,heading:j("pendingApproval"),message:j("libraryRequestSent",{library:s.library.name,escapeText:!0})})}).catch(C=>{const S=Re.libraryApiError(C);v(C,S,S),u()}).finally(()=>{e.closePopup()})}function D(s){var u;return(u=i.data.find(b=>b.data.id.toString()===s.toString()))==null?void 0:u.children}function l(s){var u,b;return!!((b=(u=o.data.categories)==null?void 0:u.data)!=null&&b.find(T=>T.id===s.id))}const k=n.data&&o.data&&i.data;return r.jsxRuntimeExports.jsx(r.Popup,{title:j("addToLibrary"),closePopup:e.closePopup,showLoadingSpinner:!k||f,children:k&&r.jsxRuntimeExports.jsx(y.FormWrapper,{initialValues:{library:r.ArrayHelper.first(g),folder:null,comment:""},validationSchema:Te,onSubmit:M,children:r.jsxRuntimeExports.jsx(ve,{libraries:g,closePopup:e.closePopup,isFolderDisabled:l,video:o.data,videoLibraries:(Y=(z=o.data)==null?void 0:z.libraries)==null?void 0:Y.data,getCategoryTree:D})})})}exports.AddToLibraryView=Ce;
@@ -1 +0,0 @@
1
- "use strict";const t=require("./app-DcIbciDa.cjs"),m=require("./ClassNameHelper-n4BHW-GR.cjs"),x=require("./CurationStatus-BGjsO3l8.cjs"),h=require("./RestrictionHelper-C5u_CmoL.cjs");var l=(e=>(e.Exchange="exchange",e.Streamable="streamable",e.MoviesAndTv="movies_and_tv",e.Twig="twig",e))(l||{});function S(e){return t.jsxRuntimeExports.jsx("svg",{...e,children:t.jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.333 7.333a.667.667 0 1 0 0 1.334h2.39L13 13.39l-2.862-2.862a.667.667 0 0 0-.943 0l-5 5a.667.667 0 1 0 .943.942l4.529-4.528 2.862 2.862c.26.26.682.26.942 0l5.196-5.196V12A.667.667 0 0 0 20 12V8a.667.667 0 0 0-.667-.666z",clipRule:"evenodd"})})}function d(e){return t.jsxRuntimeExports.jsx("svg",{...e,children:t.jsxRuntimeExports.jsx("path",{d:"M7.5 5A2.5 2.5 0 0 0 5 7.5v9A2.5 2.5 0 0 0 7.5 19h9a2.5 2.5 0 0 0 2.5-2.5v-9A2.5 2.5 0 0 0 16.5 5zm0-1h9A3.5 3.5 0 0 1 20 7.5v9a3.5 3.5 0 0 1-3.5 3.5h-9A3.5 3.5 0 0 1 4 16.5v-9A3.5 3.5 0 0 1 7.5 4M11 9a.5.5 0 1 1 0 1H9.5A1.5 1.5 0 0 0 8 11.5v1A1.5 1.5 0 0 0 9.5 14H11a.5.5 0 1 1 0 1H9.5A2.5 2.5 0 0 1 7 12.5v-1A2.5 2.5 0 0 1 9.5 9zm5 0a.5.5 0 1 1 0 1h-1.5a1.5 1.5 0 0 0-1.5 1.5v1a1.5 1.5 0 0 0 1.5 1.5H16a.5.5 0 1 1 0 1h-1.5a2.5 2.5 0 0 1-2.5-2.5v-1A2.5 2.5 0 0 1 14.5 9z",fill:"currentColor"})})}const f=(e,r,n)=>{e=e.toString();const i=r-e.length;return i<=0?e:new Array(i+1).join(n)+e},p={ToDisplayDuration(e,r){if(!t.isNumber(e))return"";const n=new Date(e),i=n.getUTCHours(),o=f(n.getUTCMinutes(),2,"0"),a=f(n.getUTCSeconds(),2,"0");return r||i>0?`${i}:${o}:${a}`:`${o}:${a}`},ToDisplayDurationNewStyle(e,r){if(!t.isNumber(e))return"";const n=new Date(e),i=n.getUTCHours();let o=n.getUTCMinutes();const a=n.getUTCSeconds();if((i>0||o>0)&&a>=30&&(o=o+1),i>0){const g=i>1?"hrs":"hr";return o>0?r&&a>0?`${i}${g} ${o}m ${a}s`:`${i}${g} ${o}m `:`${i} ${g}`}return o>0?r&&a>0?`${o}m ${a}s`:`${o}m`:`${a}s`}};var u=(e=>(e.Folder="category",e.CategoryTree="category_tree",e.CustomLibrary="custom_library",e.HostedLibrary="hosted_library",e.Exchange="exchange",e.Workspace="workspace",e.Video="video",e.Clip="clip",e.Interactive="interactive",e))(u||{}),s=(e=>(e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text",e))(s||{});function j(e){return t.jsxRuntimeExports.jsx("svg",{...e,children:t.jsxRuntimeExports.jsx("path",{d:"M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m0 1v14h12V5zm5.09 7-2.3-3.4h1.82l1.4 2.28 1.45-2.28h1.72l-2.29 3.41 2.49 3.73h-1.87l-1.56-2.47-1.59 2.47H8.6z",fill:"currentColor"})})}function b(e){return t.jsxRuntimeExports.jsx("svg",{...e,children:t.jsxRuntimeExports.jsx("path",{d:"M9.833 15.006c-.328.765-.657 1.316-.997 1.619-.35.312-.762.394-1.138.15a1.4 1.4 0 0 1-.358-.322c-.298-.402-.194-.843.165-1.2.228-.227.563-.433.983-.63.226-.106.466-.204.706-.292q.213-.539.43-1.205a42 42 0 0 0 .866-3.123c-.435-.563-.75-1.057-.924-1.473-.28-.67-.211-1.242.372-1.494.56-.24 1.047-.086 1.307.391.17.312.234.736.231 1.26a8 8 0 0 1-.086 1.088q.238.293.513.606a31 31 0 0 0 1.73 1.81 14 14 0 0 0 .863.761q.697-.106 1.213-.105c.947.002 1.554.319 1.415 1.079-.107.585-.514.888-1.06.834-.365-.036-.781-.224-1.259-.532a9 9 0 0 1-.538-.38 21 21 0 0 0-.944.191q-.586.131-1.22.3a45 45 0 0 0-2.27.667M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m0 1v14h12V5zm4.43 8.39q-.104.315-.207.606l.055-.016a46 46 0 0 1 1.608-.459 34 34 0 0 1 1.538-.37 16 16 0 0 1-.378-.35 32 32 0 0 1-1.882-1.98l-.083.32a39 39 0 0 1-.652 2.248zm-2.157 2.603q.18-.162.382-.51a2.4 2.4 0 0 0-.553.37c-.092.092-.09.086-.083.096a.5.5 0 0 0 .138.116c.017.01.025.01.116-.072m7.434-2.3q-.07 0-.146.002c.242.132.443.209.585.223.11.011.118.005.146-.145.005-.027-.095-.079-.585-.08m-5.36-5.49q.098.235.283.53v-.05c.003-.393-.044-.696-.128-.85-.046-.086-.063-.091-.23-.02-.04.018-.05.092.075.39",fill:"currentColor"})})}function E(e){return t.jsxRuntimeExports.jsx("svg",{...e,children:t.jsxRuntimeExports.jsx("path",{d:"M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m0 1v14h12V5zm5.07 6.96h1.22q.27 0 .52-.04a1.2 1.2 0 0 0 .44-.155.84.84 0 0 0 .305-.325q.115-.21.115-.55t-.115-.55a.84.84 0 0 0-.305-.325 1.2 1.2 0 0 0-.44-.155 3 3 0 0 0-.52-.04h-1.22zM9.5 8.6h3.22q.67 0 1.14.195t.765.515.43.73a2.7 2.7 0 0 1 0 1.695q-.135.415-.43.735a2.1 2.1 0 0 1-.765.515q-.47.195-1.14.195h-1.65v2.56H9.5z",fill:"currentColor"})})}function w(e){return t.jsxRuntimeExports.jsx("svg",{...e,children:t.jsxRuntimeExports.jsx("path",{d:"M6 4h7l6 5v10a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m6.586 1H6v14h12V9.414zM13 10h3.5a.5.5 0 1 1 0 1h-4a.5.5 0 0 1-.5-.5v-4a.5.5 0 1 1 1 0z",fill:"currentColor"})})}function z(e){return t.jsxRuntimeExports.jsx("svg",{...e,children:t.jsxRuntimeExports.jsx("path",{d:"M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m0 1v14h12V5zm8.77 10.74h-1.56L12 10.88h-.02l-1.19 4.86H9.2L7.31 8.6h1.57l1.13 4.86h.02l1.24-4.86h1.47l1.22 4.92h.02l1.17-4.92h1.54z",fill:"currentColor"})})}function R(e){return t.jsxRuntimeExports.jsx("svg",{...e,children:t.jsxRuntimeExports.jsx("path",{d:"M6 4h12a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1m0 1v14h12V5zm5 0h1v1h-1zm1 1h1v1h-1zm-1 1h1v1h-1zm1 1h1v1h-1zm-1 1h1v1h-1zm1 1h1v1h-1zm-1 1h1v1h-1zm1 1h1v1h-1zm-1 1h1v1h-1zm1 1h1v1h-1zm-1 1h1v1h-1zm1 1h1v1h-1zm-1 1h1v1h-1zm1 1h1v1h-1z",fill:"currentColor"})})}const c="shared.shared-utils",H={mapRatingToClass(e){return e?(n=>{switch(!0){case n<32:return"bg-purple";case n<48:return"bg-green";case n<80:return"bg-blue";case n<96:return"bg-red";case n<128:return"bg-pink";case n>=128:return"bg-yellow";default:return""}})(e):""},mapSourceToDisplayName(e,r){switch(e.type){case u.HostedLibrary:case u.CustomLibrary:return e.name;case u.Exchange:return t.LanguageService.getPhrase(c,"exchange");case u.Workspace:return t.LanguageService.getPhrase(c,r?"myVideos":"workspace");default:return""}},mapSourceToClass(e){switch(e){case u.HostedLibrary:case u.CustomLibrary:return"bg-blue";case u.Exchange:return"bg-green";case u.Workspace:default:return"bg-red"}},isInteractive(e){var r,n;return!!((n=(r=e==null?void 0:e.interactives)==null?void 0:r.data)!=null&&n.length)},mapTypeToSvg(e){let n={[s.Pdf]:b,[s.Image]:m.FileImgSvg,[s.PowerPoint]:E,[s.Document]:z,[s.Excel]:j,[s.Zip]:R,[s.File]:w}[e];return n||(n=m.FolderSvg),n},mapTypeToClass(e){switch(e){case s.Pdf:return"icon-red";case s.Image:return"icon-purple";case s.Document:return"icon-blue";case s.Excel:return"icon-green";case s.PowerPoint:return"icon-orange";case s.Zip:return"icon-teal";case s.File:return"icon-gray";default:return""}},mapTypeToExtension(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName(e){if(!e)return"";switch(e){case s.Pdf:return t.LanguageService.getPhrase(c,"pdf");case s.Image:return t.LanguageService.getPhrase(c,"image");case s.Document:return t.LanguageService.getPhrase(c,"document");case s.Excel:return t.LanguageService.getPhrase(c,"spreadsheet");case s.PowerPoint:return t.LanguageService.getPhrase(c,"presentation");case s.Zip:return t.LanguageService.getPhrase(c,"zipArchive");case s.File:return t.LanguageService.getPhrase(c,"file");default:return""}}},P="shared.badges",$=t.LanguageService.encloseNamespace(P);var v=(e=>(e.DurationExact="duration-exact",e.DurationApproximate="duration-approximate",e.Interactive="interactive",e.Rating="rating",e.ProductionYear="production-year",e.Captions="captions",e.Status="status",e.Trending="trending",e.Count="count",e.Restriction="restriction",e.Source="source",e))(v||{});const D={xs:t.SvgContainerSize.ExtraSmall,sm:t.SvgContainerSize.Small,std:t.SvgContainerSize.Standard,lg:t.SvgContainerSize.Large},L={xs:"badge-xs",sm:"badge-sm",std:"badge-std",lg:"badge-lg"};function N(e){switch(e){case x.CurationStatus.Published:return"bg-success";case x.CurationStatus.Archived:case x.CurationStatus.Rejected:return"bg-danger";case x.CurationStatus.Draft:return"draft-badge px-2 rounded-pill text-nowrap d-flex align-items-center";case x.CurationStatus.Pending:case x.CurationStatus.Processing:return"bg-warning"}}function A(e){return e.includes(l.Streamable)?`px-1 text-nowrap d-flex align-items-center ${h.styles.streamable}`:e.includes(l.MoviesAndTv)?"bg-indigo text-white px-1 text-nowrap d-flex align-items-center":e.includes(l.Exchange)?"bg-orange text-white px-1 text-nowrap d-flex align-items-center":e.includes(l.Twig)?"bg-pink text-white px-1 text-nowrap d-flex align-items-center":""}function q(e,r,n){const i="badge",o=L[n];let a="";if(e==="duration-approximate"&&(a="duration-badge-new px-2 rounded-pill text-nowrap d-flex align-items-center"),e==="duration-exact"&&(a="duration-badge"),e==="interactive"&&(a="interactive-badge"),e==="rating"&&(a=`rating-badge text-shadow ${H.mapRatingToClass(r.value)}`),e==="production-year"&&(a="production-year-badge text-shadow"),e==="captions")return"p-0";if(e==="status")return`badge ${N(r)}`;if(e==="trending")return`trending-badge px-1 d-flex align-items-center ${o}`;if(e==="count"&&(a="count-badge px-1 rounded"),e==="restriction"){const g=h.RestrictionHelper.mapRestrictionToClass(r.restrictions);return m.classNames("restriction-badge rounded-pill px-2 d-flex align-items-center",g)}return e==="source"&&(a=A(r)),m.classNames(i,a)}function T(e,r,n){if(e==="interactive")return $("interactive");if(e==="duration-approximate")return p.ToDisplayDurationNewStyle(r);if(e==="duration-exact")return p.ToDisplayDuration(r);if(e==="rating")return r.code;if(e==="production-year")return r;if(e==="captions")return t.jsxRuntimeExports.jsx(t.SvgContainer,{svg:d});if(e==="status")return x.CurationStatus[r];if(e==="trending")return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(t.SvgContainer,{svg:S,size:D[n]}),t.jsxRuntimeExports.jsx("span",{className:"ps-1",children:r})]});if(e==="count")return r;if(e==="restriction")return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(t.SvgContainer,{svg:h.RestrictionHelper.mapRestrictionToSvg(r.restrictions)}),t.jsxRuntimeExports.jsx("span",{children:h.RestrictionHelper.mapRestrictionToText(r.restrictions,r.yearGroups)})]});if(e==="source"){const i=r;return i.includes(l.Streamable)?"streamable":i.includes(l.MoviesAndTv)?"movies + tv":i.includes(l.Exchange)?"exchange":i.includes(l.Twig)?"twig":"-"}}function V(e,r){return e==="rating"?{title:r.name,placement:"top"}:null}function M(e,r){var n,i;return typeof r=="boolean"?!!r:e==="rating"?r&&!!r.value:e==="interactive"?!!(r!=null&&r.length)||!!((n=r==null?void 0:r.data)!=null&&n.length):e==="captions"?!!(r!=null&&r.length)||!!((i=r==null?void 0:r.data)!=null&&i.length):e==="status"?typeof r=="number":!!r}function k(e){const{type:r,data:n,size:i="std"}=e;if(!M(r,n))return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{});let o=q(r,n,i);o=`${o} ${e.inline?"d-inline-block":"d-flex justify-content-center"} ${e.className||""}`;const a=T(r,n,i),g=V(r,n),C=e.inline&&"d-inline-block";return g?t.jsxRuntimeExports.jsx("div",{className:"badge-wrapper d-inline",children:t.jsxRuntimeExports.jsx(t.Tooltip,{...g,spanHack:!0,spanHackClassName:C,children:t.jsxRuntimeExports.jsx("span",{className:o,children:a})})}):t.jsxRuntimeExports.jsx("span",{className:`${o} badge-wrapper`,children:a})}exports.Badge=k;exports.BadgeType=v;exports.CloseCaptionBadgeSvg=d;exports.DurationHelper=p;exports.MasterObjectTypes=u;exports.ResourceFileType=s;