@clickview/exchange 0.55.1-dev.0 → 0.55.1-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/en.json +1 -1
  3. package/dist/scripts/{DYiI4iFo.chunk.js → 6ugYgeSq.chunk.js} +2 -2
  4. package/dist/scripts/{DYiI4iFo.chunk.js.map → 6ugYgeSq.chunk.js.map} +1 -1
  5. package/dist/scripts/{DJxQd3OQ.chunk.js → B2k61FX9.chunk.js} +2 -2
  6. package/dist/scripts/{DJxQd3OQ.chunk.js.map → B2k61FX9.chunk.js.map} +1 -1
  7. package/dist/scripts/{DAq5gDjR.chunk.js → B3PoX1Ca.chunk.js} +2 -2
  8. package/dist/scripts/{DAq5gDjR.chunk.js.map → B3PoX1Ca.chunk.js.map} +1 -1
  9. package/dist/scripts/{CdoPQq72.chunk.js → B5Tnikwj.chunk.js} +2 -2
  10. package/dist/scripts/{CdoPQq72.chunk.js.map → B5Tnikwj.chunk.js.map} +1 -1
  11. package/dist/scripts/{NOEoySBM.chunk.js → B5f0Cn6K.chunk.js} +2 -2
  12. package/dist/scripts/{NOEoySBM.chunk.js.map → B5f0Cn6K.chunk.js.map} +1 -1
  13. package/dist/scripts/{wwrNvwhU.chunk.js → B695Io16.chunk.js} +2 -2
  14. package/dist/scripts/{wwrNvwhU.chunk.js.map → B695Io16.chunk.js.map} +1 -1
  15. package/dist/scripts/{89IgQU35.chunk.js → B6CHLwQE.chunk.js} +2 -2
  16. package/dist/scripts/{89IgQU35.chunk.js.map → B6CHLwQE.chunk.js.map} +1 -1
  17. package/dist/scripts/{Cn8IJFAD.chunk.js → B6gXaLCu.chunk.js} +2 -2
  18. package/dist/scripts/{Cn8IJFAD.chunk.js.map → B6gXaLCu.chunk.js.map} +1 -1
  19. package/dist/scripts/{DwL60tTx.chunk.js → B7b3dHqh.chunk.js} +2 -2
  20. package/dist/scripts/{DwL60tTx.chunk.js.map → B7b3dHqh.chunk.js.map} +1 -1
  21. package/dist/scripts/{D5cTJzMl.chunk.js → B8BWa8rG.chunk.js} +2 -2
  22. package/dist/scripts/{D5cTJzMl.chunk.js.map → B8BWa8rG.chunk.js.map} +1 -1
  23. package/dist/scripts/{DdVfOuan.chunk.js → BA6dAji1.chunk.js} +2 -2
  24. package/dist/scripts/{DdVfOuan.chunk.js.map → BA6dAji1.chunk.js.map} +1 -1
  25. package/dist/scripts/{BKYS86yt.chunk.js → BDJvxAZr.chunk.js} +2 -2
  26. package/dist/scripts/{BKYS86yt.chunk.js.map → BDJvxAZr.chunk.js.map} +1 -1
  27. package/dist/scripts/{L4Ub9t1Q.chunk.js → BDTrB61Q.chunk.js} +2 -2
  28. package/dist/scripts/{L4Ub9t1Q.chunk.js.map → BDTrB61Q.chunk.js.map} +1 -1
  29. package/dist/scripts/{D95N1pjr.chunk.js → BENCAb_Y.chunk.js} +2 -2
  30. package/dist/scripts/{D95N1pjr.chunk.js.map → BENCAb_Y.chunk.js.map} +1 -1
  31. package/dist/scripts/{rR9pgyKh.chunk.js → BGTivNih.chunk.js} +3 -3
  32. package/dist/scripts/{rR9pgyKh.chunk.js.map → BGTivNih.chunk.js.map} +1 -1
  33. package/dist/scripts/{CBhcpqvz.chunk.js → BHjOfQBL.chunk.js} +2 -2
  34. package/dist/scripts/{CBhcpqvz.chunk.js.map → BHjOfQBL.chunk.js.map} +1 -1
  35. package/dist/scripts/{v6fMGz1b.chunk.js → BIsRcDFM.chunk.js} +2 -2
  36. package/dist/scripts/{v6fMGz1b.chunk.js.map → BIsRcDFM.chunk.js.map} +1 -1
  37. package/dist/scripts/{DVZ1kgun.chunk.js → BKhpM0zm.chunk.js} +2 -2
  38. package/dist/scripts/{DVZ1kgun.chunk.js.map → BKhpM0zm.chunk.js.map} +1 -1
  39. package/dist/scripts/BNMMjoWK.chunk.js +2 -0
  40. package/dist/scripts/{C8et0pLb.chunk.js.map → BNMMjoWK.chunk.js.map} +1 -1
  41. package/dist/scripts/BSp3iUl8.chunk.js +2 -0
  42. package/dist/scripts/{DtyB02Sn.chunk.js.map → BSp3iUl8.chunk.js.map} +1 -1
  43. package/dist/scripts/{DKjn3duF.chunk.js → BcHrOYjt.chunk.js} +2 -2
  44. package/dist/scripts/{DKjn3duF.chunk.js.map → BcHrOYjt.chunk.js.map} +1 -1
  45. package/dist/scripts/{DbqmKtbC.chunk.js → BfCrcP0R.chunk.js} +2 -2
  46. package/dist/scripts/{DbqmKtbC.chunk.js.map → BfCrcP0R.chunk.js.map} +1 -1
  47. package/dist/scripts/{CHoqd22R.chunk.js → BgN7i6MB.chunk.js} +2 -2
  48. package/dist/scripts/{CHoqd22R.chunk.js.map → BgN7i6MB.chunk.js.map} +1 -1
  49. package/dist/scripts/{C-aLs4Ef.chunk.js → BkHLoZ-N.chunk.js} +2 -2
  50. package/dist/scripts/{C-aLs4Ef.chunk.js.map → BkHLoZ-N.chunk.js.map} +1 -1
  51. package/dist/scripts/{lrq4lIJa.chunk.js → BniF6LVx.chunk.js} +2 -2
  52. package/dist/scripts/{lrq4lIJa.chunk.js.map → BniF6LVx.chunk.js.map} +1 -1
  53. package/dist/scripts/{DZu6jtCJ.chunk.js → C-Mo_AjO.chunk.js} +2 -2
  54. package/dist/scripts/{DZu6jtCJ.chunk.js.map → C-Mo_AjO.chunk.js.map} +1 -1
  55. package/dist/scripts/{DG5bX1lj.chunk.js → C00nDP-p.chunk.js} +2 -2
  56. package/dist/scripts/{DG5bX1lj.chunk.js.map → C00nDP-p.chunk.js.map} +1 -1
  57. package/dist/scripts/C09X2KJd.chunk.js +2 -0
  58. package/dist/scripts/{C94eK3Q6.chunk.js.map → C09X2KJd.chunk.js.map} +1 -1
  59. package/dist/scripts/{j7vmscoo.chunk.js → C0AfgE1f.chunk.js} +2 -2
  60. package/dist/scripts/{j7vmscoo.chunk.js.map → C0AfgE1f.chunk.js.map} +1 -1
  61. package/dist/scripts/{Dv1cKAft.chunk.js → C68sCpX6.chunk.js} +2 -2
  62. package/dist/scripts/{Dv1cKAft.chunk.js.map → C68sCpX6.chunk.js.map} +1 -1
  63. package/dist/scripts/{BqdID4mk.chunk.js → CAeyI7a_.chunk.js} +2 -2
  64. package/dist/scripts/{BqdID4mk.chunk.js.map → CAeyI7a_.chunk.js.map} +1 -1
  65. package/dist/scripts/{BMTODxV2.chunk.js → CC8ClfIm.chunk.js} +2 -2
  66. package/dist/scripts/{BMTODxV2.chunk.js.map → CC8ClfIm.chunk.js.map} +1 -1
  67. package/dist/scripts/{CoyUpQya.chunk.js → CE9VNRtH.chunk.js} +2 -2
  68. package/dist/scripts/{CoyUpQya.chunk.js.map → CE9VNRtH.chunk.js.map} +1 -1
  69. package/dist/scripts/{DH5pFFkH.chunk.js → CEOJnCgX.chunk.js} +2 -2
  70. package/dist/scripts/{DH5pFFkH.chunk.js.map → CEOJnCgX.chunk.js.map} +1 -1
  71. package/dist/scripts/{CSW_ftvw.chunk.js → CF4l8gqP.chunk.js} +2 -2
  72. package/dist/scripts/{CSW_ftvw.chunk.js.map → CF4l8gqP.chunk.js.map} +1 -1
  73. package/dist/scripts/{DnoYIjnk.chunk.js → CGs_wDRQ.chunk.js} +2 -2
  74. package/dist/scripts/{DnoYIjnk.chunk.js.map → CGs_wDRQ.chunk.js.map} +1 -1
  75. package/dist/scripts/{CloBBmov.chunk.js → CILpxfVo.chunk.js} +2 -2
  76. package/dist/scripts/{CloBBmov.chunk.js.map → CILpxfVo.chunk.js.map} +1 -1
  77. package/dist/scripts/{DmpDv9Tr.chunk.js → CK70Pu2i.chunk.js} +2 -2
  78. package/dist/scripts/{DmpDv9Tr.chunk.js.map → CK70Pu2i.chunk.js.map} +1 -1
  79. package/dist/scripts/{CcLLbQj9.chunk.js → CPD8tGlR.chunk.js} +2 -2
  80. package/dist/scripts/{CcLLbQj9.chunk.js.map → CPD8tGlR.chunk.js.map} +1 -1
  81. package/dist/scripts/{B2pUpkzt.chunk.js → CVZpiAmE.chunk.js} +2 -2
  82. package/dist/scripts/{B2pUpkzt.chunk.js.map → CVZpiAmE.chunk.js.map} +1 -1
  83. package/dist/scripts/{DbeS50YB.chunk.js → CWP9OQsX.chunk.js} +2 -2
  84. package/dist/scripts/{DbeS50YB.chunk.js.map → CWP9OQsX.chunk.js.map} +1 -1
  85. package/dist/scripts/{VtD9jrXA.chunk.js → CYXKgmT6.chunk.js} +2 -2
  86. package/dist/scripts/{VtD9jrXA.chunk.js.map → CYXKgmT6.chunk.js.map} +1 -1
  87. package/dist/scripts/{BFTe3PCJ.chunk.js → CZLa2gZJ.chunk.js} +2 -2
  88. package/dist/scripts/{BFTe3PCJ.chunk.js.map → CZLa2gZJ.chunk.js.map} +1 -1
  89. package/dist/scripts/{-oGcs2o7.chunk.js → CaLLQoeO.chunk.js} +2 -2
  90. package/dist/scripts/{-oGcs2o7.chunk.js.map → CaLLQoeO.chunk.js.map} +1 -1
  91. package/dist/scripts/{DZQFyYKA.chunk.js → Cb27KTif.chunk.js} +2 -2
  92. package/dist/scripts/{DZQFyYKA.chunk.js.map → Cb27KTif.chunk.js.map} +1 -1
  93. package/dist/scripts/{BaSBcMD4.chunk.js → CbeiCIGS.chunk.js} +2 -2
  94. package/dist/scripts/{BaSBcMD4.chunk.js.map → CbeiCIGS.chunk.js.map} +1 -1
  95. package/dist/scripts/{CgPcAJSh.chunk.js → CdP3gnNV.chunk.js} +2 -2
  96. package/dist/scripts/{CgPcAJSh.chunk.js.map → CdP3gnNV.chunk.js.map} +1 -1
  97. package/dist/scripts/{CmfVxd9w.chunk.js → Cem_15ru.chunk.js} +2 -2
  98. package/dist/scripts/{CmfVxd9w.chunk.js.map → Cem_15ru.chunk.js.map} +1 -1
  99. package/dist/scripts/{OBuowdMc.chunk.js → CfS44DXK.chunk.js} +2 -2
  100. package/dist/scripts/{OBuowdMc.chunk.js.map → CfS44DXK.chunk.js.map} +1 -1
  101. package/dist/scripts/{gAox6n5o.chunk.js → Cih4Ddbu.chunk.js} +2 -2
  102. package/dist/scripts/{gAox6n5o.chunk.js.map → Cih4Ddbu.chunk.js.map} +1 -1
  103. package/dist/scripts/CkF0PdvD.chunk.js +2 -0
  104. package/dist/scripts/{rzKXH0iU.chunk.js.map → CkF0PdvD.chunk.js.map} +1 -1
  105. package/dist/scripts/{D6kC-dfM.chunk.js → ClAajgIC.chunk.js} +2 -2
  106. package/dist/scripts/{D6kC-dfM.chunk.js.map → ClAajgIC.chunk.js.map} +1 -1
  107. package/dist/scripts/CuaAi3hl.chunk.js +2 -0
  108. package/dist/scripts/{dncf4usG.chunk.js.map → CuaAi3hl.chunk.js.map} +1 -1
  109. package/dist/scripts/CxUHqnOh.chunk.js +2 -0
  110. package/dist/scripts/{D94dUObP.chunk.js.map → CxUHqnOh.chunk.js.map} +1 -1
  111. package/dist/scripts/{Ca5g2g0M.chunk.js → Cz-DEpIl.chunk.js} +2 -2
  112. package/dist/scripts/{Ca5g2g0M.chunk.js.map → Cz-DEpIl.chunk.js.map} +1 -1
  113. package/dist/scripts/{B7vV0_3l.chunk.js → D4xYDc88.chunk.js} +2 -2
  114. package/dist/scripts/{B7vV0_3l.chunk.js.map → D4xYDc88.chunk.js.map} +1 -1
  115. package/dist/scripts/{-eOR7hsb.chunk.js → DAbsA9MV.chunk.js} +2 -2
  116. package/dist/scripts/{-eOR7hsb.chunk.js.map → DAbsA9MV.chunk.js.map} +1 -1
  117. package/dist/scripts/{MkZBh98f.chunk.js → DBs7i4mg.chunk.js} +2 -2
  118. package/dist/scripts/{MkZBh98f.chunk.js.map → DBs7i4mg.chunk.js.map} +1 -1
  119. package/dist/scripts/{BrmJsOUO.chunk.js → DEhxVL2r.chunk.js} +2 -2
  120. package/dist/scripts/{BrmJsOUO.chunk.js.map → DEhxVL2r.chunk.js.map} +1 -1
  121. package/dist/scripts/{DtwLBBNK.chunk.js → DFPTM2m4.chunk.js} +2 -2
  122. package/dist/scripts/{DtwLBBNK.chunk.js.map → DFPTM2m4.chunk.js.map} +1 -1
  123. package/dist/scripts/{CgqpQ9AK.chunk.js → DG4Gno_E.chunk.js} +2 -2
  124. package/dist/scripts/{CgqpQ9AK.chunk.js.map → DG4Gno_E.chunk.js.map} +1 -1
  125. package/dist/scripts/{BH7pP4J6.chunk.js → DH3Nc9P7.chunk.js} +2 -2
  126. package/dist/scripts/{BH7pP4J6.chunk.js.map → DH3Nc9P7.chunk.js.map} +1 -1
  127. package/dist/scripts/{DyTWsrqD.chunk.js → DHXvkHsb.chunk.js} +2 -2
  128. package/dist/scripts/{DyTWsrqD.chunk.js.map → DHXvkHsb.chunk.js.map} +1 -1
  129. package/dist/scripts/{D41CRehW.chunk.js → DHxv0YeB.chunk.js} +2 -2
  130. package/dist/scripts/{D41CRehW.chunk.js.map → DHxv0YeB.chunk.js.map} +1 -1
  131. package/dist/scripts/{C1I_rTQ_.chunk.js → DIJ6qEMe.chunk.js} +2 -2
  132. package/dist/scripts/{C1I_rTQ_.chunk.js.map → DIJ6qEMe.chunk.js.map} +1 -1
  133. package/dist/scripts/{SSTeR1Y-.chunk.js → DLBDiFVq.chunk.js} +2 -2
  134. package/dist/scripts/{SSTeR1Y-.chunk.js.map → DLBDiFVq.chunk.js.map} +1 -1
  135. package/dist/scripts/{CpXzdHOO.chunk.js → DP3w7A4L.chunk.js} +2 -2
  136. package/dist/scripts/{CpXzdHOO.chunk.js.map → DP3w7A4L.chunk.js.map} +1 -1
  137. package/dist/scripts/{CbnRXlsc.chunk.js → DVxew3cs.chunk.js} +2 -2
  138. package/dist/scripts/{CbnRXlsc.chunk.js.map → DVxew3cs.chunk.js.map} +1 -1
  139. package/dist/scripts/{CcAH_1Du.chunk.js → DXNAdVdo.chunk.js} +2 -2
  140. package/dist/scripts/{CcAH_1Du.chunk.js.map → DXNAdVdo.chunk.js.map} +1 -1
  141. package/dist/scripts/DYFlAuiV.chunk.js +2 -0
  142. package/dist/scripts/{yJSiv4Zm.chunk.js.map → DYFlAuiV.chunk.js.map} +1 -1
  143. package/dist/scripts/{FXsyYEqA.chunk.js → Dam_cOwt.chunk.js} +2 -2
  144. package/dist/scripts/{FXsyYEqA.chunk.js.map → Dam_cOwt.chunk.js.map} +1 -1
  145. package/dist/scripts/{CRAfTPgM.chunk.js → Dgb7t1K4.chunk.js} +2 -2
  146. package/dist/scripts/{CRAfTPgM.chunk.js.map → Dgb7t1K4.chunk.js.map} +1 -1
  147. package/dist/scripts/{cdxXDelE.chunk.js → DogGBezf.chunk.js} +2 -2
  148. package/dist/scripts/{cdxXDelE.chunk.js.map → DogGBezf.chunk.js.map} +1 -1
  149. package/dist/scripts/{D_-_6kZe.chunk.js → Dpdkt0GP.chunk.js} +2 -2
  150. package/dist/scripts/{D_-_6kZe.chunk.js.map → Dpdkt0GP.chunk.js.map} +1 -1
  151. package/dist/scripts/{TsMmz5NE.chunk.js → DpvM518u.chunk.js} +2 -2
  152. package/dist/scripts/{TsMmz5NE.chunk.js.map → DpvM518u.chunk.js.map} +1 -1
  153. package/dist/scripts/{Co0LfXeU.chunk.js → DqYRVHOk.chunk.js} +2 -2
  154. package/dist/scripts/{Co0LfXeU.chunk.js.map → DqYRVHOk.chunk.js.map} +1 -1
  155. package/dist/scripts/{DfgmLyT1.chunk.js → DqwgSiMd.chunk.js} +2 -2
  156. package/dist/scripts/{DfgmLyT1.chunk.js.map → DqwgSiMd.chunk.js.map} +1 -1
  157. package/dist/scripts/{DobAMdqT.chunk.js → DtgCW8ME.chunk.js} +2 -2
  158. package/dist/scripts/{DobAMdqT.chunk.js.map → DtgCW8ME.chunk.js.map} +1 -1
  159. package/dist/scripts/{BHUcf1fG.chunk.js → DxbUcs7w.chunk.js} +2 -2
  160. package/dist/scripts/{BHUcf1fG.chunk.js.map → DxbUcs7w.chunk.js.map} +1 -1
  161. package/dist/scripts/{BRRmOX-N.chunk.js → RZpRRsx8.chunk.js} +2 -2
  162. package/dist/scripts/{BRRmOX-N.chunk.js.map → RZpRRsx8.chunk.js.map} +1 -1
  163. package/dist/scripts/{COx43m1X.chunk.js → TEzZMW_8.chunk.js} +2 -2
  164. package/dist/scripts/{COx43m1X.chunk.js.map → TEzZMW_8.chunk.js.map} +1 -1
  165. package/dist/scripts/{BAo0l-Cr.chunk.js → VYxhnntI.chunk.js} +2 -2
  166. package/dist/scripts/{BAo0l-Cr.chunk.js.map → VYxhnntI.chunk.js.map} +1 -1
  167. package/dist/scripts/{app-D1kg55lE.js → app-CWLlxhC4.js} +3 -3
  168. package/dist/scripts/{app-D1kg55lE.js.map → app-CWLlxhC4.js.map} +1 -1
  169. package/dist/scripts/{fVRbFunO.chunk.js → ivwPXIiD.chunk.js} +2 -2
  170. package/dist/scripts/{fVRbFunO.chunk.js.map → ivwPXIiD.chunk.js.map} +1 -1
  171. package/dist/scripts/{BTLyZrVH.chunk.js → k7QDC8lR.chunk.js} +2 -2
  172. package/dist/scripts/{BTLyZrVH.chunk.js.map → k7QDC8lR.chunk.js.map} +1 -1
  173. package/dist/scripts/{B_eCP--R.chunk.js → m3alwmxn.chunk.js} +2 -2
  174. package/dist/scripts/{B_eCP--R.chunk.js.map → m3alwmxn.chunk.js.map} +1 -1
  175. package/dist/scripts/{GYrPX6ng.chunk.js → rP9OQnNa.chunk.js} +2 -2
  176. package/dist/scripts/{GYrPX6ng.chunk.js.map → rP9OQnNa.chunk.js.map} +1 -1
  177. package/dist/scripts/{4mEjD_Wx.chunk.js → tueKkjSA.chunk.js} +2 -2
  178. package/dist/scripts/{4mEjD_Wx.chunk.js.map → tueKkjSA.chunk.js.map} +1 -1
  179. package/dist/scripts/{DQdCoXQk.chunk.js → u39PSbeM.chunk.js} +2 -2
  180. package/dist/scripts/{DQdCoXQk.chunk.js.map → u39PSbeM.chunk.js.map} +1 -1
  181. package/dist/scripts/{B0SivR80.chunk.js → v6KzbWE4.chunk.js} +2 -2
  182. package/dist/scripts/{B0SivR80.chunk.js.map → v6KzbWE4.chunk.js.map} +1 -1
  183. package/package.json +1 -1
  184. package/dist/scripts/C8et0pLb.chunk.js +0 -2
  185. package/dist/scripts/C94eK3Q6.chunk.js +0 -2
  186. package/dist/scripts/D94dUObP.chunk.js +0 -2
  187. package/dist/scripts/DtyB02Sn.chunk.js +0 -2
  188. package/dist/scripts/dncf4usG.chunk.js +0 -2
  189. package/dist/scripts/rzKXH0iU.chunk.js +0 -2
  190. package/dist/scripts/yJSiv4Zm.chunk.js +0 -2
@@ -1,8 +1,8 @@
1
- import{U as Y,S as Ze,m as Ht,H as xn,R as se,D as ri,L as ie,n as ii,o as oi,p as ai,q as si,s as kr,t as kn,v as wn,j as r,w as yt,x as Ne,I as ft,y as Dr,r as $,z as X,B as le,G as de,M as ge,J as Ee,K as Fr,N as Dn,F as Fe,O as Ar,Q as pt,V as ui,W as li,X as St,Y as bt,Z as $r,_ as ci,$ as Vn,a0 as di,c as Fn,a1 as fi,a2 as gi,a3 as Je,a4 as mi,a5 as zn,a6 as Vt,a7 as hi,a8 as pi,a9 as vi,P as yi,aa as Si,ab as _t,ac as Wn,ad as zt,ae as Wt,af as Gt,ag as bi,ah as xi,ai as wi}from"./app-D1kg55lE.js";import{u as Ii,a as _i}from"./BKYS86yt.chunk.js";import{P as Kt}from"./pkzD5BEm.chunk.js";import{T as Ct,C as Ci,I as Lr}from"./4mEjD_Wx.chunk.js";import{u as Oi}from"./B_eCP--R.chunk.js";import{u as qe,l as ye,F as oe,a as ji}from"./DG5bX1lj.chunk.js";import{D as Ei,E as Ri,C as In,G as Tt}from"./-eOR7hsb.chunk.js";import{F as An}from"./CBhcpqvz.chunk.js";import{C as Ut}from"./BFTe3PCJ.chunk.js";import{F as Pi,a as Ti}from"./DYiI4iFo.chunk.js";import{M as ht}from"./BrmJsOUO.chunk.js";import{S as ki}from"./DVZ1kgun.chunk.js";import{S as Ur}from"./CcAH_1Du.chunk.js";import{M as Di}from"./_sYSSSUN.chunk.js";import{T as Nr}from"./B668bf5B.chunk.js";import"./B2pUpkzt.chunk.js";var $e=(e=>(e[e.Other=0]="Other",e[e.SuggestImprovement=1]="SuggestImprovement",e[e.ReportBug=2]="ReportBug",e[e.RequestVideo=3]="RequestVideo",e[e.RaiseIssue=4]="RaiseIssue",e[e.GivePraise=5]="GivePraise",e[e.Footer=6]="Footer",e[e.RequestLivestream=7]="RequestLivestream",e))($e||{}),Ie=(e=>(e.Subject="Subject",e.Curriculum="Curriculum",e.StreamableLearning="StreamableLearning",e))(Ie||{});const Fi={presentationAudiences(e,t){const n=t||Ie.Subject.toLowerCase(),i={type:n,presentationId:e};return{bootstrapName:"presentationAudiences",url:Y.urlBuilder("{gateway}/v1/users/me/audiences",i),publicUrl:Y.urlBuilder(`/api/subjects/presentation/${e}/audiences`,i),key:`presentation:audiences:${e}:${n}`,normalize:!1}},audiencesByPresentationId(e){return{url:`{gateway}/v1/subjects/presentations/${e}/audiences`,publicUrl:Y.urlBuilder(`/api/subjects/presentation/${e}/audiences`,{type:Ie.Subject.toLowerCase(),presentationId:e}),key:`presentation:${e}:audiences`,normalize:!1}}};var je=(e=>(e.Playlists="playlists",e.Series="series",e.Videos="videos",e.PinnedVideos="pinnedVideos",e))(je||{});const Qt=e=>`subjectpresentationaudiences.id:[${e.join(",")}]`,Ai={topicsFromAllAvailablePresentations(e){const t={filterType:"topics",presentationId:e};return{url:Y.urlBuilder("{gateway}/v1/search/filters",t),publicUrl:Y.urlBuilder("/api/search/filters",t),key:"classification:availableTopics",normalize:!1}},availablePresentations(e){const t={type:e==null?void 0:e.toLowerCase()};return{url:Y.urlBuilder("{gateway}/v1/users/me/presentations/available",t),publicUrl:Y.urlBuilder("/api/subjects/presentations/available",t),key:`available:presentations:${e}`,normalizeOptions:{namespace:"presentation"}}},topLevelTopics(e){const t={query:Ze.CLASSIFICATION_COLLECTION,sort:"alphabetical"};return{url:Y.urlBuilder(`{gateway}/v1/subjects/presentations/${e}/classifications`,t),publicUrl:Y.urlBuilder(`/api/subjects/presentations/${e}/classifications`,t),key:`presentation:${e}:classifications`,formatData:Ct.applyThemeAssets}},presentationById(e){return{url:`{gateway}/v1/subjects/presentations/${e}`,publicUrl:`/api/subjects/presentations/${e}`,key:`presentation:${e}`}},presentationBySlug(e,t,n){const i={type:n.toLowerCase(),contentRegion:t};return{url:Y.urlBuilder(`/api/subjects/presentations/${e}`,i),publicUrl:Y.urlBuilder(`/api/subjects/presentations/${e}`,i),key:`current:presentation:${n.toLowerCase()}:${t}:${e??""}`,bootstrapName:"presentation",normalizeOptions:{namespace:"presentation"}}},presentation(e,t){const n={type:e==null?void 0:e.toLowerCase()};return{url:Y.urlBuilder("{gateway}/v1/users/me/presentations",n),publicUrl:Y.urlBuilder(`/api/subjects/presentations/${t}`,n),key:`current:presentation${e?`:${e.toLowerCase()}`:""}${t?`:${t}`:""}`,normalizeOptions:{namespace:"presentation"}}},classifications(){return{url:Y.urlBuilder("{gateway}/v1/users/me/classifications",{query:Ze.CLASSIFICATION_COLLECTION,type:Ie.Subject.toLowerCase()}),publicUrl:Y.urlBuilder("/api/subjects/classifications",{query:Ht.CLASSIFICATION_COLLECTION,type:Ie.Subject.toLowerCase()}),key:"classifications",formatData:Ct.applyThemeAssets}},classification(e,t,n){return{url:Y.urlBuilder(`{gateway}/v1/subjects/classifications/${e}`,{query:Ze.CLASSIFICATION(t)}),publicUrl:Y.urlBuilder(`/api/subjects/classifications/${e}`,{query:Ht.CLASSIFICATION}),key:`classification:${e}`,formatData:Ct.applyThemeAssets,error:n}},path(e,t){const n={type:t};return{url:Y.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/path`,n),publicUrl:`/api/subjects/classifications/${e}/path`,key:`classification:${e}:path`}},paths(e){return{url:`/api/subjects/classifications/${e}/paths`,key:`classification:${e}:paths`}},children(e){return{url:Y.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/children`,{query:Ze.CLASSIFICATION_COLLECTION}),publicUrl:Y.urlBuilder(`/api/subjects/classifications/${e}/children`,{query:Ht.CLASSIFICATION_COLLECTION}),key:`classification:${e}:children`,formatData:Ct.applyThemeAssets}},videos(e,t,n){if(!t)return;let i="limit:100,orderbydesc:timestamp";n.length&&(i+=`,${Qt(n)}`);const o={query:`{${i}}(videoCollection),subjectpresentationaudiences{presentationId:${t}}`,permissionFilterOption:Kt.StripMetadata};return{url:Y.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${je.PinnedVideos}`,o),publicUrl:Y.urlBuilder(`/api/subjects/classifications/${e}/${je.PinnedVideos}`,o),key:`classification:${e}:${je.PinnedVideos}:${n.join(":")}`}},playlists(e,t,n){if(!t)return;let i="limit:100,orderby:name";n.length&&(i+=`,${Qt(n)}`);const o={query:`{${i}}${Ze.PLAYLIST_COLLECTION},subjectpresentationaudiences{presentationId:${t}}`,permissionFilterOption:Kt.StripMetadata};return{url:Y.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${je.Playlists}`,o),publicUrl:Y.urlBuilder(`/api/subjects/classifications/${e}/${je.Playlists}`,o),key:`classification:${e}:${je.Playlists}:${n.join(":")}`,formatData:c=>{var p;if(c)return{...c,data:(p=c.data)==null?void 0:p.filter(x=>{var d;return(d=x.cover)==null?void 0:d.url})}}}},series(e,t,n){if(!t)return;let i="limit:100";n.length&&(i+=`,${Qt(n)}`);const o={query:`{${i}}${Ze.SERIES},subjectpresentationaudiences{presentationId:${t}}`,permissionFilterOption:Kt.StripMetadata};return{url:Y.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${je.Series}`,o),publicUrl:Y.urlBuilder(`/api/subjects/classifications/${e}/${je.Series}`,o),key:`classification:${e}:${je.Series}:${n.join(":")}`,formatData:c=>{var p;if(c)return{...c,data:(p=c.data)==null?void 0:p.filter(x=>{var d;return(d=x.tallPoster)==null?void 0:d.url})}}}},curriculumLinks(e,t){return{url:Y.urlBuilder(`/api/subjects/presentations/${t}/objects/${e}/classifications/paths`,{type:Ie.Curriculum.toLowerCase()}),publicUrl:Y.urlBuilder(`/api/subjects/presentations/${t}/objects/${e}/classifications/paths`,{type:Ie.Curriculum.toLowerCase()}),key:`curriculum:links:${e}:${t}`,normalize:!1}},subjectLinks(e,t){const n=Y.urlBuilder(`/api/subjects/presentations/${t}/objects/${e}/classifications/paths`,{type:Ie.Subject.toLowerCase()});return{url:n,publicUrl:n,key:`subject:links:${e}:${t}`,normalize:!1}},getMappedCurriculums(e,t){const n={type:Ie.Curriculum.toLowerCase()};return{url:Y.urlBuilder(`{gateway}/v1/objects/${e}/presentations`,n),publicUrl:Y.urlBuilder(`/api/subjects/${e}/presentations`,{...n,pid:t}),key:`mapped:curriculums:${e}:${t.join(",")}`,normalize:!1}},regionAlternatives(e,t,n,i){return{url:`/api/subjects/classifications/${e}/region-alternatives`,publicUrl:`/api/subjects/classifications/${e}/region-alternatives`,key:`classification:regionAlternatives:${e}`,normalize:!1,success:t,error:n,always:i}}},$i={submitFeedback(e,t){return{url:"{gateway}/v1/feedback",key:"submit:feedback",type:xn.POST,data:{...e,...t}}}};function Li(e,t,n=[]){var s;const[,i]=se.useState(!1);return se.useEffect(()=>{const o=e();if(o)return o.off("add remove change"),o.on("add remove change",()=>{i(c=>!c)}),()=>{o.off("add remove change")}},n),(s=e())==null?void 0:s.toJSON()}const Ui="shared.studentRestrictedDialogError",Yt=ie.encloseNamespace(Ui);class Ni extends ri{constructor(){super("Learner accessing feature that is for staff only")}get name(){return"StudentRestrictedDialogError"}get dialogOptions(){return{title:Yt("heading"),text:Yt("description"),buttons:[{text:Yt("close"),className:"btn btn-link",close:!0}]}}}function qi(){const{hasPermissions:e,isLoaded:t}=ii();se.useEffect(()=>{if(!t||!e(oi.StudentExperience))return;const n=new Ni;ai.logError(n),si.throw(n)},[t])}var tt=(e=>(e.AU="au",e.NZ="nz",e.UK="uk",e.US="us",e.CA="ca",e))(tt||{});const Mi={[tt.AU]:"au",[tt.NZ]:"nz",[tt.UK]:"uk",[tt.US]:"us",[tt.CA]:"ca"},Pt={getUserInfo:(e,t)=>({id:e.id,username:e.username,email:e.email,userType:e.role===wn.Admin?"Admin":"Staff",customerId:e.customerId,cvcId:t.crmId,customerName:t.name,instanceRegion:e.instanceRegion,contentRegion:e.contentRegion,firstName:e.givenName,lastName:e.familyName}),mapCountryCodeToTag:e=>Mi[e.toLowerCase()],getTags:(e,t,n,i)=>{const s=[t,...i];s.push(n?"student":"staff"),e.role===wn.Admin&&s.push("administrator");const o=Pt.mapCountryCodeToTag(e.countryCode);return o&&s.push(o),s},categorizeFiles(e){return e.reduce((t,n)=>{const i=n.get("fileInfo");return kr.isValidFile(n.get("file"),kn.VIDEO)?t.videoUrls.push(i==null?void 0:i.url):t.imageUrls.push(i==null?void 0:i.url),t},{imageUrls:[],videoUrls:[]})}};var V=(e=>(e.SUGGEST_IMPROVEMENT="suggestImprovement",e.REPORT_BUG="reportBug",e.REQUEST_VIDEO="requestVideo",e.REQUEST_LIVESTREAM="requestLivestream",e.GIVE_PRAISE="givePraise",e.RAISE_ISSUE="raiseIssue",e.OTHER="other",e))(V||{});const Bi="shared.feedbackFormTitles",Ve=ie.encloseNamespace(Bi),kt=e=>{switch(e){case V.SUGGEST_IMPROVEMENT:return Ve(e);case V.REPORT_BUG:return Ve(e);case V.REQUEST_VIDEO:return Ve(e);case V.REQUEST_LIVESTREAM:return Ve(e);case V.GIVE_PRAISE:return Ve(e);case V.RAISE_ISSUE:return Ve(e);case V.OTHER:return Ve(e)}},at={mailSent:"https://img.clickviewapp.com/v2/images/2mZ7L9",mediaPreview:"https://img.clickviewapp.com/v2/images/ageRM0",lightBulb:"https://img.clickviewapp.com/v2/images/Oqg3JN",heartHands:"https://img.clickviewapp.com/v2/images/1ML8Oj",videoAlert:"https://img.clickviewapp.com/v2/images/dq2oMq",[V.REQUEST_VIDEO]:{default:"https://img.clickviewapp.com/v2/images/G1YGdn",hover:"https://img.clickviewapp.com/v2/images/K6yPxz"},[V.REQUEST_LIVESTREAM]:{default:"https://img.clickviewapp.com/v2/images/G1YGdn",hover:"https://img.clickviewapp.com/v2/images/K6yPxz"},[V.SUGGEST_IMPROVEMENT]:{default:"https://img.clickviewapp.com/v2/images/g7aR1l",hover:"https://img.clickviewapp.com/v2/images/zMR0Dk"},[V.RAISE_ISSUE]:{default:"https://img.clickviewapp.com/v2/images/5boW78",hover:"https://img.clickviewapp.com/v2/images/m6yRKr"},[V.GIVE_PRAISE]:{default:"https://img.clickviewapp.com/v2/images/nE1mdz",hover:"https://img.clickviewapp.com/v2/images/JjEnmR"},[V.REPORT_BUG]:{default:"https://img.clickviewapp.com/v2/images/AOdYpo",hover:"https://img.clickviewapp.com/v2/images/yro9NM"},[V.OTHER]:{default:"https://img.clickviewapp.com/v2/images/Eoaykj",hover:"https://img.clickviewapp.com/v2/images/wN59Zg"}},Hi="_image_1gpfb_1",Vi={image:Hi};function zi(e){const[t,n]=Oi(),i=at[e.option];return r.jsx(yt,{ref:t,className:"col-lg-4 col-sm-6 col-12",onClick:()=>e.onSelectOption(e.option),children:r.jsxs("div",{className:"d-flex flex-column align-items-center h-100 rounded border py-3 gap-2",children:[r.jsx("img",{className:Vi.image,src:n?i.hover:i.default,alt:kt(e.option)}),r.jsx("p",{className:"fw-semibold text-center mb-0",children:kt(e.option)})]})})}function Wi(e){return r.jsx("div",{className:"row g-2",children:e.options.map(t=>r.jsx(zi,{option:t,onSelectOption:e.onSelectOption},t))})}const Gi="shared.feedbackButtons",Xt=ie.encloseNamespace(Gi);function Ki(e){const t=qe();return r.jsxs(Ne,{children:[e.formStage==="form"&&r.jsxs(r.Fragment,{children:[!e.hideCancelButton&&r.jsx(Ne.Cancel,{onClick:()=>e.setSelectedOption(null),text:Xt("cancel")}),r.jsx(Ne.Submit,{variant:"dark",text:e.submitText||Xt("submit"),disabled:!t.isValid})]}),e.formStage==="success"&&r.jsx(Ne.Cancel,{variant:"dark",text:Xt("close"),onClick:e.closePopup})]})}const Qi="_successImage_3sso6_1",Yi={successImage:Qi},Xi="shared.feedbackFormState",Gn=ie.encloseNamespace(Xi);function Zi(e){return e.formStage==="form"?r.jsx(r.Fragment,{}):e.formStage==="error"?r.jsx(r.Fragment,{}):r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"mb-3",children:r.jsx("img",{className:Yi.successImage,src:e.successImageUrl||at.mailSent})}),r.jsx("h4",{className:"mb-3",children:e.successHeading||Gn("successHeading")}),r.jsx("p",{className:"mb-3",children:e.successDescription||Gn("successDescription")})]})}const Ji="shared.feedbackForm",Zt=ie.encloseNamespace(Ji),qr=10,Nt=5e3,ke=e=>{switch(e){case"requiredError":return Zt(e);case"minCharactersError":return Zt(e,{limit:qr});case"maxCharactersError":return Zt("maxCharactersError",{limit:Nt})}},De=()=>ye.string().min(qr,ke("minCharactersError")).max(Nt,ke("maxCharactersError")),eo="shared.feedbackGivePraise",Dt=ie.encloseNamespace(eo),to={praise:""},no=ye.object().shape({praise:De().required(ke("requiredError"))}).noUnknown();function ro(){const e=qe();return r.jsx(r.Fragment,{children:r.jsx(oe,{as:"textarea",placeholder:Dt("givePraisePlaceholder"),label:Dt("givePraiseLabel"),name:"praise",rows:5,value:e.values.praise,showRequiredStar:!0})})}function io(e){return r.jsx(Ke,{...e,initialValues:{...to,...e.initialValues},validationSchema:no,successImageUrl:at.heartHands,successHeading:Dt("successHeading"),successDescription:Dt("successDescription"),children:r.jsx(ro,{})})}const oo="shared.feedbackOther",Kn=ie.encloseNamespace(oo),ao={feedback:""},so=ye.object().shape({feedback:De().required(ke("requiredError"))}).noUnknown();function uo(){const e=qe();return r.jsx(r.Fragment,{children:r.jsx(oe,{as:"textarea",placeholder:Kn("otherPlaceholder"),label:Kn("otherLabel"),name:"feedback",rows:5,value:e.values.feedback,showRequiredStar:!0})})}function lo(e){return r.jsx(Ke,{...e,initialValues:{...ao,...e.initialValues},validationSchema:so,children:r.jsx(uo,{})})}const co="shared.feedbackRaiseIssue",Qn=ie.encloseNamespace(co),fo={issue:""},go=ye.object().shape({issue:De().required(ke("requiredError"))}).noUnknown();function mo(){const e=qe();return r.jsx(r.Fragment,{children:r.jsx(oe,{as:"textarea",placeholder:Qn("raiseIssuePlaceholder"),label:Qn("raiseIssueLabel"),name:"issue",rows:5,value:e.values.issue,showRequiredStar:!0})})}function ho(e){return r.jsx(Ke,{...e,initialValues:{...fo,...e.initialValues},validationSchema:go,children:r.jsx(mo,{})})}const Jt={[ft.AU]:{phone:"02 9509 2600",email:"support@clickview.com.au",website:"https://www.clickviewsupport.com/hc"},[ft.UK]:{phone:"+44 (0)333 207 6595",email:"info@clickview.co.uk",website:"https://www.clickviewsupport.com/hc"},[ft.NZ]:{phone:"09 916 1156",email:"support@clickview.co.nz",website:"https://www.clickviewsupport.com/hc"},[ft.US]:{phone:"+1 312-292-9322",email:"info@clickvieweducation.com",website:"https://www.clickviewsupport.com/hc"}};function po(e){return r.jsx("svg",{...e,children:r.jsx("path",{fill:"currentColor",d:"M17.834 5.916a2.5 2.5 0 0 0-3.536 0L12.53 7.684a.5.5 0 0 1-.707-.707l1.768-1.768a3.5 3.5 0 1 1 4.95 4.95l-3.687 3.687a3.786 3.786 0 0 1-5.354 0l-.152-.152a.5.5 0 0 1 .707-.707l.152.152a2.786 2.786 0 0 0 3.94 0l3.687-3.687a2.5 2.5 0 0 0 0-3.536m-8.94 3.99a3.643 3.643 0 0 1 5.152 0l.606.607a.5.5 0 1 1-.707.707l-.607-.606a2.643 2.643 0 0 0-3.737 0l-3.435 3.434a2.5 2.5 0 1 0 3.536 3.536l1.414-1.415a.5.5 0 0 1 .707.707l-1.414 1.415a3.5 3.5 0 1 1-4.95-4.95z"})})}function vo(e){return r.jsx("svg",{...e,children:r.jsx("path",{fill:"currentColor",d:"M15.928 20c1.348 0 2.33-.38 3.185-1.297.051-.057.097-.114.139-.161.505-.547.742-1.102.742-1.62 0-.545-.3-1.057-.941-1.492l-2.444-1.687c-.695-.477-1.51-.553-2.247.163l-.61.605c-.189.189-.387.218-.615.09-.417-.249-1.35-1.014-2.067-1.727-.785-.78-1.34-1.42-1.678-2.01-.127-.23-.098-.427.09-.616l.612-.616c.716-.726.64-1.552.157-2.243L8.575 4.952c-.446-.646-.953-.94-1.503-.952-.512-.01-1.071.242-1.614.742-.057.052-.104.098-.157.145C4.39 5.727 4 6.714 4 8.047c0 2.358 1.53 5.21 4.143 7.815C10.736 18.45 13.569 20 15.928 20m.006-1.018c-2.146.023-4.837-1.6-7.046-3.81-2.226-2.214-3.9-4.976-3.87-7.127.013-.942.335-1.764 1.014-2.39l.13-.112c.306-.282.63-.432.897-.432.266 0 .495.124.674.394l1.635 2.44c.209.307.247.66-.107 1.002l-.693.689c-.5.5-.484 1.153-.135 1.66.403.593 1.182 1.497 1.95 2.262.765.775 1.733 1.605 2.321 2.009.512.348 1.16.364 1.659-.141l.684-.694c.348-.342.7-.309 1.014-.1l2.433 1.635c.276.18.389.402.389.668 0 .283-.14.597-.437.908a1 1 0 0 1-.102.12c-.63.689-1.462 1.006-2.41 1.018"})})}function st(e,t,n,i){function s(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function p(j){try{d(i.next(j))}catch(T){c(T)}}function x(j){try{d(i.throw(j))}catch(T){c(T)}}function d(j){j.done?o(j.value):s(j.value).then(p,x)}d((i=i.apply(e,t||[])).next())})}function ut(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,s,o,c=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return c.next=p(0),c.throw=p(1),c.return=p(2),typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function p(d){return function(j){return x([d,j])}}function x(d){if(i)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(n=0)),n;)try{if(i=1,s&&(o=d[0]&2?s.return:d[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,d[1])).done)return o;switch(s=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,s=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(j){d=[6,j],s=0}finally{i=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Yn(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var i=n.call(e),s,o=[],c;try{for(;(t===void 0||t-- >0)&&!(s=i.next()).done;)o.push(s.value)}catch(p){c={error:p}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(c)throw c.error}}return o}function Xn(e,t,n){if(n||arguments.length===2)for(var i=0,s=t.length,o;i<s;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}var yo=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function xt(e,t){var n=So(e);if(typeof n.path!="string"){var i=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof i=="string"&&i.length>0?i:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function So(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var i=t.split(".").pop().toLowerCase(),s=yo.get(i);s&&Object.defineProperty(e,"type",{value:s,writable:!1,configurable:!1,enumerable:!0})}return e}var bo=[".DS_Store","Thumbs.db"];function xo(e){return st(this,void 0,void 0,function(){return ut(this,function(t){return Ft(e)&&wo(e.dataTransfer)?[2,Oo(e.dataTransfer,e.type)]:Io(e)?[2,_o(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Co(e)]:[2,[]]})})}function wo(e){return Ft(e)}function Io(e){return Ft(e)&&Ft(e.target)}function Ft(e){return typeof e=="object"&&e!==null}function _o(e){return _n(e.target.files).map(function(t){return xt(t)})}function Co(e){return st(this,void 0,void 0,function(){var t;return ut(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(i){return i.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(i){return xt(i)})]}})})}function Oo(e,t){return st(this,void 0,void 0,function(){var n,i;return ut(this,function(s){switch(s.label){case 0:return e.items?(n=_n(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(jo))]):[3,2];case 1:return i=s.sent(),[2,Zn(Mr(i))];case 2:return[2,Zn(_n(e.files).map(function(o){return xt(o)}))]}})})}function Zn(e){return e.filter(function(t){return bo.indexOf(t.name)===-1})}function _n(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var i=e[n];t.push(i)}return t}function jo(e){if(typeof e.webkitGetAsEntry!="function")return Jn(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Br(t):Jn(e)}function Mr(e){return e.reduce(function(t,n){return Xn(Xn([],Yn(t),!1),Yn(Array.isArray(n)?Mr(n):[n]),!1)},[])}function Jn(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=xt(t);return Promise.resolve(n)}function Eo(e){return st(this,void 0,void 0,function(){return ut(this,function(t){return[2,e.isDirectory?Br(e):Ro(e)]})})}function Br(e){var t=e.createReader();return new Promise(function(n,i){var s=[];function o(){var c=this;t.readEntries(function(p){return st(c,void 0,void 0,function(){var x,d,j;return ut(this,function(T){switch(T.label){case 0:if(p.length)return[3,5];T.label=1;case 1:return T.trys.push([1,3,,4]),[4,Promise.all(s)];case 2:return x=T.sent(),n(x),[3,4];case 3:return d=T.sent(),i(d),[3,4];case 4:return[3,6];case 5:j=Promise.all(p.map(Eo)),s.push(j),o(),T.label=6;case 6:return[2]}})})},function(p){i(p)})}o()})}function Ro(e){return st(this,void 0,void 0,function(){return ut(this,function(t){return[2,new Promise(function(n,i){e.file(function(s){var o=xt(s,e.fullPath);n(o)},function(s){i(s)})})]})})}var Ot={},er;function Po(){return er||(er=1,Ot.__esModule=!0,Ot.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var i=e.name||"",s=(e.type||"").toLowerCase(),o=s.replace(/\/.*$/,"");return n.some(function(c){var p=c.trim().toLowerCase();return p.charAt(0)==="."?i.toLowerCase().endsWith(p):p.endsWith("/*")?o===p.replace(/\/.*$/,""):s===p})}return!0}),Ot}var To=Po();const ko=Dr(To);function tr(e){return Ao(e)||Fo(e)||Vr(e)||Do()}function Do(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1
+ import{U as Y,S as Ze,m as Ht,H as xn,R as se,D as ri,L as ie,n as ii,o as oi,p as ai,q as si,s as kr,t as kn,v as wn,j as r,w as yt,x as Ne,I as ft,y as Dr,r as $,z as X,B as le,G as de,M as ge,J as Ee,K as Fr,N as Dn,F as Fe,O as Ar,Q as pt,V as ui,W as li,X as St,Y as bt,Z as $r,_ as ci,$ as Vn,a0 as di,c as Fn,a1 as fi,a2 as gi,a3 as Je,a4 as mi,a5 as zn,a6 as Vt,a7 as hi,a8 as pi,a9 as vi,P as yi,aa as Si,ab as _t,ac as Wn,ad as zt,ae as Wt,af as Gt,ag as bi,ah as xi,ai as wi}from"./app-CWLlxhC4.js";import{u as Ii,a as _i}from"./BDJvxAZr.chunk.js";import{P as Kt}from"./pkzD5BEm.chunk.js";import{T as Ct,C as Ci,I as Lr}from"./tueKkjSA.chunk.js";import{u as Oi}from"./m3alwmxn.chunk.js";import{u as qe,l as ye,F as oe,a as ji}from"./C00nDP-p.chunk.js";import{D as Ei,E as Ri,C as In,G as Tt}from"./DAbsA9MV.chunk.js";import{F as An}from"./BHjOfQBL.chunk.js";import{C as Ut}from"./CZLa2gZJ.chunk.js";import{F as Pi,a as Ti}from"./6ugYgeSq.chunk.js";import{M as ht}from"./DEhxVL2r.chunk.js";import{S as ki}from"./BKhpM0zm.chunk.js";import{S as Ur}from"./DXNAdVdo.chunk.js";import{M as Di}from"./_sYSSSUN.chunk.js";import{T as Nr}from"./B668bf5B.chunk.js";import"./CVZpiAmE.chunk.js";var $e=(e=>(e[e.Other=0]="Other",e[e.SuggestImprovement=1]="SuggestImprovement",e[e.ReportBug=2]="ReportBug",e[e.RequestVideo=3]="RequestVideo",e[e.RaiseIssue=4]="RaiseIssue",e[e.GivePraise=5]="GivePraise",e[e.Footer=6]="Footer",e[e.RequestLivestream=7]="RequestLivestream",e))($e||{}),Ie=(e=>(e.Subject="Subject",e.Curriculum="Curriculum",e.StreamableLearning="StreamableLearning",e))(Ie||{});const Fi={presentationAudiences(e,t){const n=t||Ie.Subject.toLowerCase(),i={type:n,presentationId:e};return{bootstrapName:"presentationAudiences",url:Y.urlBuilder("{gateway}/v1/users/me/audiences",i),publicUrl:Y.urlBuilder(`/api/subjects/presentation/${e}/audiences`,i),key:`presentation:audiences:${e}:${n}`,normalize:!1}},audiencesByPresentationId(e){return{url:`{gateway}/v1/subjects/presentations/${e}/audiences`,publicUrl:Y.urlBuilder(`/api/subjects/presentation/${e}/audiences`,{type:Ie.Subject.toLowerCase(),presentationId:e}),key:`presentation:${e}:audiences`,normalize:!1}}};var je=(e=>(e.Playlists="playlists",e.Series="series",e.Videos="videos",e.PinnedVideos="pinnedVideos",e))(je||{});const Qt=e=>`subjectpresentationaudiences.id:[${e.join(",")}]`,Ai={topicsFromAllAvailablePresentations(e){const t={filterType:"topics",presentationId:e};return{url:Y.urlBuilder("{gateway}/v1/search/filters",t),publicUrl:Y.urlBuilder("/api/search/filters",t),key:"classification:availableTopics",normalize:!1}},availablePresentations(e){const t={type:e==null?void 0:e.toLowerCase()};return{url:Y.urlBuilder("{gateway}/v1/users/me/presentations/available",t),publicUrl:Y.urlBuilder("/api/subjects/presentations/available",t),key:`available:presentations:${e}`,normalizeOptions:{namespace:"presentation"}}},topLevelTopics(e){const t={query:Ze.CLASSIFICATION_COLLECTION,sort:"alphabetical"};return{url:Y.urlBuilder(`{gateway}/v1/subjects/presentations/${e}/classifications`,t),publicUrl:Y.urlBuilder(`/api/subjects/presentations/${e}/classifications`,t),key:`presentation:${e}:classifications`,formatData:Ct.applyThemeAssets}},presentationById(e){return{url:`{gateway}/v1/subjects/presentations/${e}`,publicUrl:`/api/subjects/presentations/${e}`,key:`presentation:${e}`}},presentationBySlug(e,t,n){const i={type:n.toLowerCase(),contentRegion:t};return{url:Y.urlBuilder(`/api/subjects/presentations/${e}`,i),publicUrl:Y.urlBuilder(`/api/subjects/presentations/${e}`,i),key:`current:presentation:${n.toLowerCase()}:${t}:${e??""}`,bootstrapName:"presentation",normalizeOptions:{namespace:"presentation"}}},presentation(e,t){const n={type:e==null?void 0:e.toLowerCase()};return{url:Y.urlBuilder("{gateway}/v1/users/me/presentations",n),publicUrl:Y.urlBuilder(`/api/subjects/presentations/${t}`,n),key:`current:presentation${e?`:${e.toLowerCase()}`:""}${t?`:${t}`:""}`,normalizeOptions:{namespace:"presentation"}}},classifications(){return{url:Y.urlBuilder("{gateway}/v1/users/me/classifications",{query:Ze.CLASSIFICATION_COLLECTION,type:Ie.Subject.toLowerCase()}),publicUrl:Y.urlBuilder("/api/subjects/classifications",{query:Ht.CLASSIFICATION_COLLECTION,type:Ie.Subject.toLowerCase()}),key:"classifications",formatData:Ct.applyThemeAssets}},classification(e,t,n){return{url:Y.urlBuilder(`{gateway}/v1/subjects/classifications/${e}`,{query:Ze.CLASSIFICATION(t)}),publicUrl:Y.urlBuilder(`/api/subjects/classifications/${e}`,{query:Ht.CLASSIFICATION}),key:`classification:${e}`,formatData:Ct.applyThemeAssets,error:n}},path(e,t){const n={type:t};return{url:Y.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/path`,n),publicUrl:`/api/subjects/classifications/${e}/path`,key:`classification:${e}:path`}},paths(e){return{url:`/api/subjects/classifications/${e}/paths`,key:`classification:${e}:paths`}},children(e){return{url:Y.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/children`,{query:Ze.CLASSIFICATION_COLLECTION}),publicUrl:Y.urlBuilder(`/api/subjects/classifications/${e}/children`,{query:Ht.CLASSIFICATION_COLLECTION}),key:`classification:${e}:children`,formatData:Ct.applyThemeAssets}},videos(e,t,n){if(!t)return;let i="limit:100,orderbydesc:timestamp";n.length&&(i+=`,${Qt(n)}`);const o={query:`{${i}}(videoCollection),subjectpresentationaudiences{presentationId:${t}}`,permissionFilterOption:Kt.StripMetadata};return{url:Y.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${je.PinnedVideos}`,o),publicUrl:Y.urlBuilder(`/api/subjects/classifications/${e}/${je.PinnedVideos}`,o),key:`classification:${e}:${je.PinnedVideos}:${n.join(":")}`}},playlists(e,t,n){if(!t)return;let i="limit:100,orderby:name";n.length&&(i+=`,${Qt(n)}`);const o={query:`{${i}}${Ze.PLAYLIST_COLLECTION},subjectpresentationaudiences{presentationId:${t}}`,permissionFilterOption:Kt.StripMetadata};return{url:Y.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${je.Playlists}`,o),publicUrl:Y.urlBuilder(`/api/subjects/classifications/${e}/${je.Playlists}`,o),key:`classification:${e}:${je.Playlists}:${n.join(":")}`,formatData:c=>{var p;if(c)return{...c,data:(p=c.data)==null?void 0:p.filter(x=>{var d;return(d=x.cover)==null?void 0:d.url})}}}},series(e,t,n){if(!t)return;let i="limit:100";n.length&&(i+=`,${Qt(n)}`);const o={query:`{${i}}${Ze.SERIES},subjectpresentationaudiences{presentationId:${t}}`,permissionFilterOption:Kt.StripMetadata};return{url:Y.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${je.Series}`,o),publicUrl:Y.urlBuilder(`/api/subjects/classifications/${e}/${je.Series}`,o),key:`classification:${e}:${je.Series}:${n.join(":")}`,formatData:c=>{var p;if(c)return{...c,data:(p=c.data)==null?void 0:p.filter(x=>{var d;return(d=x.tallPoster)==null?void 0:d.url})}}}},curriculumLinks(e,t){return{url:Y.urlBuilder(`/api/subjects/presentations/${t}/objects/${e}/classifications/paths`,{type:Ie.Curriculum.toLowerCase()}),publicUrl:Y.urlBuilder(`/api/subjects/presentations/${t}/objects/${e}/classifications/paths`,{type:Ie.Curriculum.toLowerCase()}),key:`curriculum:links:${e}:${t}`,normalize:!1}},subjectLinks(e,t){const n=Y.urlBuilder(`/api/subjects/presentations/${t}/objects/${e}/classifications/paths`,{type:Ie.Subject.toLowerCase()});return{url:n,publicUrl:n,key:`subject:links:${e}:${t}`,normalize:!1}},getMappedCurriculums(e,t){const n={type:Ie.Curriculum.toLowerCase()};return{url:Y.urlBuilder(`{gateway}/v1/objects/${e}/presentations`,n),publicUrl:Y.urlBuilder(`/api/subjects/${e}/presentations`,{...n,pid:t}),key:`mapped:curriculums:${e}:${t.join(",")}`,normalize:!1}},regionAlternatives(e,t,n,i){return{url:`/api/subjects/classifications/${e}/region-alternatives`,publicUrl:`/api/subjects/classifications/${e}/region-alternatives`,key:`classification:regionAlternatives:${e}`,normalize:!1,success:t,error:n,always:i}}},$i={submitFeedback(e,t){return{url:"{gateway}/v1/feedback",key:"submit:feedback",type:xn.POST,data:{...e,...t}}}};function Li(e,t,n=[]){var s;const[,i]=se.useState(!1);return se.useEffect(()=>{const o=e();if(o)return o.off("add remove change"),o.on("add remove change",()=>{i(c=>!c)}),()=>{o.off("add remove change")}},n),(s=e())==null?void 0:s.toJSON()}const Ui="shared.studentRestrictedDialogError",Yt=ie.encloseNamespace(Ui);class Ni extends ri{constructor(){super("Learner accessing feature that is for staff only")}get name(){return"StudentRestrictedDialogError"}get dialogOptions(){return{title:Yt("heading"),text:Yt("description"),buttons:[{text:Yt("close"),className:"btn btn-link",close:!0}]}}}function qi(){const{hasPermissions:e,isLoaded:t}=ii();se.useEffect(()=>{if(!t||!e(oi.StudentExperience))return;const n=new Ni;ai.logError(n),si.throw(n)},[t])}var tt=(e=>(e.AU="au",e.NZ="nz",e.UK="uk",e.US="us",e.CA="ca",e))(tt||{});const Mi={[tt.AU]:"au",[tt.NZ]:"nz",[tt.UK]:"uk",[tt.US]:"us",[tt.CA]:"ca"},Pt={getUserInfo:(e,t)=>({id:e.id,username:e.username,email:e.email,userType:e.role===wn.Admin?"Admin":"Staff",customerId:e.customerId,cvcId:t.crmId,customerName:t.name,instanceRegion:e.instanceRegion,contentRegion:e.contentRegion,firstName:e.givenName,lastName:e.familyName}),mapCountryCodeToTag:e=>Mi[e.toLowerCase()],getTags:(e,t,n,i)=>{const s=[t,...i];s.push(n?"student":"staff"),e.role===wn.Admin&&s.push("administrator");const o=Pt.mapCountryCodeToTag(e.countryCode);return o&&s.push(o),s},categorizeFiles(e){return e.reduce((t,n)=>{const i=n.get("fileInfo");return kr.isValidFile(n.get("file"),kn.VIDEO)?t.videoUrls.push(i==null?void 0:i.url):t.imageUrls.push(i==null?void 0:i.url),t},{imageUrls:[],videoUrls:[]})}};var V=(e=>(e.SUGGEST_IMPROVEMENT="suggestImprovement",e.REPORT_BUG="reportBug",e.REQUEST_VIDEO="requestVideo",e.REQUEST_LIVESTREAM="requestLivestream",e.GIVE_PRAISE="givePraise",e.RAISE_ISSUE="raiseIssue",e.OTHER="other",e))(V||{});const Bi="shared.feedbackFormTitles",Ve=ie.encloseNamespace(Bi),kt=e=>{switch(e){case V.SUGGEST_IMPROVEMENT:return Ve(e);case V.REPORT_BUG:return Ve(e);case V.REQUEST_VIDEO:return Ve(e);case V.REQUEST_LIVESTREAM:return Ve(e);case V.GIVE_PRAISE:return Ve(e);case V.RAISE_ISSUE:return Ve(e);case V.OTHER:return Ve(e)}},at={mailSent:"https://img.clickviewapp.com/v2/images/2mZ7L9",mediaPreview:"https://img.clickviewapp.com/v2/images/ageRM0",lightBulb:"https://img.clickviewapp.com/v2/images/Oqg3JN",heartHands:"https://img.clickviewapp.com/v2/images/1ML8Oj",videoAlert:"https://img.clickviewapp.com/v2/images/dq2oMq",[V.REQUEST_VIDEO]:{default:"https://img.clickviewapp.com/v2/images/G1YGdn",hover:"https://img.clickviewapp.com/v2/images/K6yPxz"},[V.REQUEST_LIVESTREAM]:{default:"https://img.clickviewapp.com/v2/images/G1YGdn",hover:"https://img.clickviewapp.com/v2/images/K6yPxz"},[V.SUGGEST_IMPROVEMENT]:{default:"https://img.clickviewapp.com/v2/images/g7aR1l",hover:"https://img.clickviewapp.com/v2/images/zMR0Dk"},[V.RAISE_ISSUE]:{default:"https://img.clickviewapp.com/v2/images/5boW78",hover:"https://img.clickviewapp.com/v2/images/m6yRKr"},[V.GIVE_PRAISE]:{default:"https://img.clickviewapp.com/v2/images/nE1mdz",hover:"https://img.clickviewapp.com/v2/images/JjEnmR"},[V.REPORT_BUG]:{default:"https://img.clickviewapp.com/v2/images/AOdYpo",hover:"https://img.clickviewapp.com/v2/images/yro9NM"},[V.OTHER]:{default:"https://img.clickviewapp.com/v2/images/Eoaykj",hover:"https://img.clickviewapp.com/v2/images/wN59Zg"}},Hi="_image_1gpfb_1",Vi={image:Hi};function zi(e){const[t,n]=Oi(),i=at[e.option];return r.jsx(yt,{ref:t,className:"col-lg-4 col-sm-6 col-12",onClick:()=>e.onSelectOption(e.option),children:r.jsxs("div",{className:"d-flex flex-column align-items-center h-100 rounded border py-3 gap-2",children:[r.jsx("img",{className:Vi.image,src:n?i.hover:i.default,alt:kt(e.option)}),r.jsx("p",{className:"fw-semibold text-center mb-0",children:kt(e.option)})]})})}function Wi(e){return r.jsx("div",{className:"row g-2",children:e.options.map(t=>r.jsx(zi,{option:t,onSelectOption:e.onSelectOption},t))})}const Gi="shared.feedbackButtons",Xt=ie.encloseNamespace(Gi);function Ki(e){const t=qe();return r.jsxs(Ne,{children:[e.formStage==="form"&&r.jsxs(r.Fragment,{children:[!e.hideCancelButton&&r.jsx(Ne.Cancel,{onClick:()=>e.setSelectedOption(null),text:Xt("cancel")}),r.jsx(Ne.Submit,{variant:"dark",text:e.submitText||Xt("submit"),disabled:!t.isValid})]}),e.formStage==="success"&&r.jsx(Ne.Cancel,{variant:"dark",text:Xt("close"),onClick:e.closePopup})]})}const Qi="_successImage_3sso6_1",Yi={successImage:Qi},Xi="shared.feedbackFormState",Gn=ie.encloseNamespace(Xi);function Zi(e){return e.formStage==="form"?r.jsx(r.Fragment,{}):e.formStage==="error"?r.jsx(r.Fragment,{}):r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"mb-3",children:r.jsx("img",{className:Yi.successImage,src:e.successImageUrl||at.mailSent})}),r.jsx("h4",{className:"mb-3",children:e.successHeading||Gn("successHeading")}),r.jsx("p",{className:"mb-3",children:e.successDescription||Gn("successDescription")})]})}const Ji="shared.feedbackForm",Zt=ie.encloseNamespace(Ji),qr=10,Nt=5e3,ke=e=>{switch(e){case"requiredError":return Zt(e);case"minCharactersError":return Zt(e,{limit:qr});case"maxCharactersError":return Zt("maxCharactersError",{limit:Nt})}},De=()=>ye.string().min(qr,ke("minCharactersError")).max(Nt,ke("maxCharactersError")),eo="shared.feedbackGivePraise",Dt=ie.encloseNamespace(eo),to={praise:""},no=ye.object().shape({praise:De().required(ke("requiredError"))}).noUnknown();function ro(){const e=qe();return r.jsx(r.Fragment,{children:r.jsx(oe,{as:"textarea",placeholder:Dt("givePraisePlaceholder"),label:Dt("givePraiseLabel"),name:"praise",rows:5,value:e.values.praise,showRequiredStar:!0})})}function io(e){return r.jsx(Ke,{...e,initialValues:{...to,...e.initialValues},validationSchema:no,successImageUrl:at.heartHands,successHeading:Dt("successHeading"),successDescription:Dt("successDescription"),children:r.jsx(ro,{})})}const oo="shared.feedbackOther",Kn=ie.encloseNamespace(oo),ao={feedback:""},so=ye.object().shape({feedback:De().required(ke("requiredError"))}).noUnknown();function uo(){const e=qe();return r.jsx(r.Fragment,{children:r.jsx(oe,{as:"textarea",placeholder:Kn("otherPlaceholder"),label:Kn("otherLabel"),name:"feedback",rows:5,value:e.values.feedback,showRequiredStar:!0})})}function lo(e){return r.jsx(Ke,{...e,initialValues:{...ao,...e.initialValues},validationSchema:so,children:r.jsx(uo,{})})}const co="shared.feedbackRaiseIssue",Qn=ie.encloseNamespace(co),fo={issue:""},go=ye.object().shape({issue:De().required(ke("requiredError"))}).noUnknown();function mo(){const e=qe();return r.jsx(r.Fragment,{children:r.jsx(oe,{as:"textarea",placeholder:Qn("raiseIssuePlaceholder"),label:Qn("raiseIssueLabel"),name:"issue",rows:5,value:e.values.issue,showRequiredStar:!0})})}function ho(e){return r.jsx(Ke,{...e,initialValues:{...fo,...e.initialValues},validationSchema:go,children:r.jsx(mo,{})})}const Jt={[ft.AU]:{phone:"02 9509 2600",email:"support@clickview.com.au",website:"https://www.clickviewsupport.com/hc"},[ft.UK]:{phone:"+44 (0)333 207 6595",email:"info@clickview.co.uk",website:"https://www.clickviewsupport.com/hc"},[ft.NZ]:{phone:"09 916 1156",email:"support@clickview.co.nz",website:"https://www.clickviewsupport.com/hc"},[ft.US]:{phone:"+1 312-292-9322",email:"info@clickvieweducation.com",website:"https://www.clickviewsupport.com/hc"}};function po(e){return r.jsx("svg",{...e,children:r.jsx("path",{fill:"currentColor",d:"M17.834 5.916a2.5 2.5 0 0 0-3.536 0L12.53 7.684a.5.5 0 0 1-.707-.707l1.768-1.768a3.5 3.5 0 1 1 4.95 4.95l-3.687 3.687a3.786 3.786 0 0 1-5.354 0l-.152-.152a.5.5 0 0 1 .707-.707l.152.152a2.786 2.786 0 0 0 3.94 0l3.687-3.687a2.5 2.5 0 0 0 0-3.536m-8.94 3.99a3.643 3.643 0 0 1 5.152 0l.606.607a.5.5 0 1 1-.707.707l-.607-.606a2.643 2.643 0 0 0-3.737 0l-3.435 3.434a2.5 2.5 0 1 0 3.536 3.536l1.414-1.415a.5.5 0 0 1 .707.707l-1.414 1.415a3.5 3.5 0 1 1-4.95-4.95z"})})}function vo(e){return r.jsx("svg",{...e,children:r.jsx("path",{fill:"currentColor",d:"M15.928 20c1.348 0 2.33-.38 3.185-1.297.051-.057.097-.114.139-.161.505-.547.742-1.102.742-1.62 0-.545-.3-1.057-.941-1.492l-2.444-1.687c-.695-.477-1.51-.553-2.247.163l-.61.605c-.189.189-.387.218-.615.09-.417-.249-1.35-1.014-2.067-1.727-.785-.78-1.34-1.42-1.678-2.01-.127-.23-.098-.427.09-.616l.612-.616c.716-.726.64-1.552.157-2.243L8.575 4.952c-.446-.646-.953-.94-1.503-.952-.512-.01-1.071.242-1.614.742-.057.052-.104.098-.157.145C4.39 5.727 4 6.714 4 8.047c0 2.358 1.53 5.21 4.143 7.815C10.736 18.45 13.569 20 15.928 20m.006-1.018c-2.146.023-4.837-1.6-7.046-3.81-2.226-2.214-3.9-4.976-3.87-7.127.013-.942.335-1.764 1.014-2.39l.13-.112c.306-.282.63-.432.897-.432.266 0 .495.124.674.394l1.635 2.44c.209.307.247.66-.107 1.002l-.693.689c-.5.5-.484 1.153-.135 1.66.403.593 1.182 1.497 1.95 2.262.765.775 1.733 1.605 2.321 2.009.512.348 1.16.364 1.659-.141l.684-.694c.348-.342.7-.309 1.014-.1l2.433 1.635c.276.18.389.402.389.668 0 .283-.14.597-.437.908a1 1 0 0 1-.102.12c-.63.689-1.462 1.006-2.41 1.018"})})}function st(e,t,n,i){function s(o){return o instanceof n?o:new n(function(c){c(o)})}return new(n||(n=Promise))(function(o,c){function p(j){try{d(i.next(j))}catch(T){c(T)}}function x(j){try{d(i.throw(j))}catch(T){c(T)}}function d(j){j.done?o(j.value):s(j.value).then(p,x)}d((i=i.apply(e,t||[])).next())})}function ut(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,s,o,c=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return c.next=p(0),c.throw=p(1),c.return=p(2),typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function p(d){return function(j){return x([d,j])}}function x(d){if(i)throw new TypeError("Generator is already executing.");for(;c&&(c=0,d[0]&&(n=0)),n;)try{if(i=1,s&&(o=d[0]&2?s.return:d[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,d[1])).done)return o;switch(s=0,o&&(d=[d[0]&2,o.value]),d[0]){case 0:case 1:o=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,s=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]<o[3])){n.label=d[1];break}if(d[0]===6&&n.label<o[1]){n.label=o[1],o=d;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(d);break}o[2]&&n.ops.pop(),n.trys.pop();continue}d=t.call(e,n)}catch(j){d=[6,j],s=0}finally{i=o=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Yn(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var i=n.call(e),s,o=[],c;try{for(;(t===void 0||t-- >0)&&!(s=i.next()).done;)o.push(s.value)}catch(p){c={error:p}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(c)throw c.error}}return o}function Xn(e,t,n){if(n||arguments.length===2)for(var i=0,s=t.length,o;i<s;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}var yo=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function xt(e,t){var n=So(e);if(typeof n.path!="string"){var i=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof i=="string"&&i.length>0?i:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function So(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var i=t.split(".").pop().toLowerCase(),s=yo.get(i);s&&Object.defineProperty(e,"type",{value:s,writable:!1,configurable:!1,enumerable:!0})}return e}var bo=[".DS_Store","Thumbs.db"];function xo(e){return st(this,void 0,void 0,function(){return ut(this,function(t){return Ft(e)&&wo(e.dataTransfer)?[2,Oo(e.dataTransfer,e.type)]:Io(e)?[2,_o(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,Co(e)]:[2,[]]})})}function wo(e){return Ft(e)}function Io(e){return Ft(e)&&Ft(e.target)}function Ft(e){return typeof e=="object"&&e!==null}function _o(e){return _n(e.target.files).map(function(t){return xt(t)})}function Co(e){return st(this,void 0,void 0,function(){var t;return ut(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(i){return i.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(i){return xt(i)})]}})})}function Oo(e,t){return st(this,void 0,void 0,function(){var n,i;return ut(this,function(s){switch(s.label){case 0:return e.items?(n=_n(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(jo))]):[3,2];case 1:return i=s.sent(),[2,Zn(Mr(i))];case 2:return[2,Zn(_n(e.files).map(function(o){return xt(o)}))]}})})}function Zn(e){return e.filter(function(t){return bo.indexOf(t.name)===-1})}function _n(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var i=e[n];t.push(i)}return t}function jo(e){if(typeof e.webkitGetAsEntry!="function")return Jn(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Br(t):Jn(e)}function Mr(e){return e.reduce(function(t,n){return Xn(Xn([],Yn(t),!1),Yn(Array.isArray(n)?Mr(n):[n]),!1)},[])}function Jn(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=xt(t);return Promise.resolve(n)}function Eo(e){return st(this,void 0,void 0,function(){return ut(this,function(t){return[2,e.isDirectory?Br(e):Ro(e)]})})}function Br(e){var t=e.createReader();return new Promise(function(n,i){var s=[];function o(){var c=this;t.readEntries(function(p){return st(c,void 0,void 0,function(){var x,d,j;return ut(this,function(T){switch(T.label){case 0:if(p.length)return[3,5];T.label=1;case 1:return T.trys.push([1,3,,4]),[4,Promise.all(s)];case 2:return x=T.sent(),n(x),[3,4];case 3:return d=T.sent(),i(d),[3,4];case 4:return[3,6];case 5:j=Promise.all(p.map(Eo)),s.push(j),o(),T.label=6;case 6:return[2]}})})},function(p){i(p)})}o()})}function Ro(e){return st(this,void 0,void 0,function(){return ut(this,function(t){return[2,new Promise(function(n,i){e.file(function(s){var o=xt(s,e.fullPath);n(o)},function(s){i(s)})})]})})}var Ot={},er;function Po(){return er||(er=1,Ot.__esModule=!0,Ot.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var i=e.name||"",s=(e.type||"").toLowerCase(),o=s.replace(/\/.*$/,"");return n.some(function(c){var p=c.trim().toLowerCase();return p.charAt(0)==="."?i.toLowerCase().endsWith(p):p.endsWith("/*")?o===p.replace(/\/.*$/,""):s===p})}return!0}),Ot}var To=Po();const ko=Dr(To);function tr(e){return Ao(e)||Fo(e)||Vr(e)||Do()}function Do(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fo(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ao(e){if(Array.isArray(e))return Cn(e)}function nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function rr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nr(Object(n),!0).forEach(function(i){Hr(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nr(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Hr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vt(e,t){return Uo(e)||Lo(e,t)||Vr(e,t)||$o()}function $o(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vr(e,t){if(e){if(typeof e=="string")return Cn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cn(e,t)}}function Cn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Lo(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i=[],s=!0,o=!1,c,p;try{for(n=n.call(e);!(s=(c=n.next()).done)&&(i.push(c.value),!(t&&i.length===t));s=!0);}catch(x){o=!0,p=x}finally{try{!s&&n.return!=null&&n.return()}finally{if(o)throw p}}return i}}function Uo(e){if(Array.isArray(e))return e}var No="file-invalid-type",qo="file-too-large",Mo="file-too-small",Bo="too-many-files",Ho=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:No,message:"File type must be ".concat(n)}},ir=function(t){return{code:qo,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},or=function(t){return{code:Mo,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},Vo={code:Bo,message:"Too many files"};function zr(e,t){var n=e.type==="application/x-moz-file"||ko(e,t);return[n,n?null:Ho(t)]}function Wr(e,t,n){if(Ge(e.size))if(Ge(t)&&Ge(n)){if(e.size>n)return[!1,ir(n)];if(e.size<t)return[!1,or(t)]}else{if(Ge(t)&&e.size<t)return[!1,or(t)];if(Ge(n)&&e.size>n)return[!1,ir(n)]}return[!0,null]}function Ge(e){return e!=null}function zo(e){var t=e.files,n=e.accept,i=e.minSize,s=e.maxSize,o=e.multiple,c=e.maxFiles,p=e.validator;return!o&&t.length>1||o&&c>=1&&t.length>c?!1:t.every(function(x){var d=zr(x,n),j=vt(d,1),T=j[0],D=Wr(x,i,s),H=vt(D,1),M=H[0],q=p?p(x):null;return T&&M&&!q})}function At(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function jt(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function ar(e){e.preventDefault()}function Wo(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Go(e){return e.indexOf("Edge/")!==-1}function Ko(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Wo(e)||Go(e)}function Oe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(i){for(var s=arguments.length,o=new Array(s>1?s-1:0),c=1;c<s;c++)o[c-1]=arguments[c];return t.some(function(p){return!At(i)&&p&&p.apply(void 0,[i].concat(o)),At(i)})}}function Qo(){return"showOpenFilePicker"in window}function Yo(e){if(Ge(e)){var t=Object.entries(e).filter(function(n){var i=vt(n,2),s=i[0],o=i[1],c=!0;return Gr(s)||(console.warn('Skipped "'.concat(s,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),c=!1),(!Array.isArray(o)||!o.every(Kr))&&(console.warn('Skipped "'.concat(s,'" because an invalid file extension was provided.')),c=!1),c}).reduce(function(n,i){var s=vt(i,2),o=s[0],c=s[1];return rr(rr({},n),{},Hr({},o,c))},{});return[{description:"Files",accept:t}]}return e}function Xo(e){if(Ge(e))return Object.entries(e).reduce(function(t,n){var i=vt(n,2),s=i[0],o=i[1];return[].concat(tr(t),[s],tr(o))},[]).filter(function(t){return Gr(t)||Kr(t)}).join(",")}function Zo(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Jo(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Gr(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Kr(e){return/^.*\.[\w]+$/.test(e)}var ea=["children"],ta=["open"],na=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],ra=["refKey","onChange","onClick"];function ia(e){return sa(e)||aa(e)||Qr(e)||oa()}function oa(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aa(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sa(e){if(Array.isArray(e))return On(e)}function en(e,t){return ca(e)||la(e,t)||Qr(e,t)||ua()}function ua(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
5
5
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qr(e,t){if(e){if(typeof e=="string")return On(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return On(e,t)}}function On(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function la(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i=[],s=!0,o=!1,c,p;try{for(n=n.call(e);!(s=(c=n.next()).done)&&(i.push(c.value),!(t&&i.length===t));s=!0);}catch(x){o=!0,p=x}finally{try{!s&&n.return!=null&&n.return()}finally{if(o)throw p}}return i}}function ca(e){if(Array.isArray(e))return e}function sr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sr(Object(n),!0).forEach(function(i){jn(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sr(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function jn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $t(e,t){if(e==null)return{};var n=da(e,t),i,s;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(s=0;s<o.length;s++)i=o[s],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function da(e,t){if(e==null)return{};var n={},i=Object.keys(e),s,o;for(o=0;o<i.length;o++)s=i[o],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}var $n=$.forwardRef(function(e,t){var n=e.children,i=$t(e,ea),s=Xr(i),o=s.open,c=$t(s,ta);return $.useImperativeHandle(t,function(){return{open:o}},[o]),se.createElement($.Fragment,null,n(re(re({},c),{},{open:o})))});$n.displayName="Dropzone";var Yr={disabled:!1,getFilesFromEvent:xo,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};$n.defaultProps=Yr;$n.propTypes={children:X.func,accept:X.objectOf(X.arrayOf(X.string)),multiple:X.bool,preventDropOnDocument:X.bool,noClick:X.bool,noKeyboard:X.bool,noDrag:X.bool,noDragEventsBubbling:X.bool,minSize:X.number,maxSize:X.number,maxFiles:X.number,disabled:X.bool,getFilesFromEvent:X.func,onFileDialogCancel:X.func,onFileDialogOpen:X.func,useFsAccessApi:X.bool,autoFocus:X.bool,onDragEnter:X.func,onDragLeave:X.func,onDragOver:X.func,onDrop:X.func,onDropAccepted:X.func,onDropRejected:X.func,onError:X.func,validator:X.func};var En={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Xr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=re(re({},Yr),e),n=t.accept,i=t.disabled,s=t.getFilesFromEvent,o=t.maxSize,c=t.minSize,p=t.multiple,x=t.maxFiles,d=t.onDragEnter,j=t.onDragLeave,T=t.onDragOver,D=t.onDrop,H=t.onDropAccepted,M=t.onDropRejected,q=t.onFileDialogCancel,z=t.onFileDialogOpen,L=t.useFsAccessApi,Q=t.autoFocus,Z=t.preventDropOnDocument,_=t.noClick,k=t.noKeyboard,R=t.noDrag,N=t.noDragEventsBubbling,S=t.onError,l=t.validator,y=$.useMemo(function(){return Xo(n)},[n]),b=$.useMemo(function(){return Yo(n)},[n]),I=$.useMemo(function(){return typeof z=="function"?z:ur},[z]),C=$.useMemo(function(){return typeof q=="function"?q:ur},[q]),A=$.useRef(null),W=$.useRef(null),E=$.useReducer(fa,En),B=en(E,2),m=B[0],u=B[1],g=m.isFocused,h=m.isFileDialogActive,a=$.useRef(typeof window<"u"&&window.isSecureContext&&L&&Qo()),f=function(){!a.current&&h&&setTimeout(function(){if(W.current){var F=W.current.files;F.length||(u({type:"closeDialog"}),C())}},300)};$.useEffect(function(){return window.addEventListener("focus",f,!1),function(){window.removeEventListener("focus",f,!1)}},[W,h,C,a]);var v=$.useRef([]),w=function(F){A.current&&A.current.contains(F.target)||(F.preventDefault(),v.current=[])};$.useEffect(function(){return Z&&(document.addEventListener("dragover",ar,!1),document.addEventListener("drop",w,!1)),function(){Z&&(document.removeEventListener("dragover",ar),document.removeEventListener("drop",w))}},[A,Z]),$.useEffect(function(){return!i&&Q&&A.current&&A.current.focus(),function(){}},[A,Q,i]);var P=$.useCallback(function(O){S?S(O):console.error(O)},[S]),U=$.useCallback(function(O){O.preventDefault(),O.persist(),Me(O),v.current=[].concat(ia(v.current),[O.target]),jt(O)&&Promise.resolve(s(O)).then(function(F){if(!(At(O)&&!N)){var ne=F.length,ue=ne>0&&zo({files:F,accept:y,minSize:c,maxSize:o,multiple:p,maxFiles:x,validator:l}),he=ne>0&&!ue;u({isDragAccept:ue,isDragReject:he,isDragActive:!0,type:"setDraggedFiles"}),d&&d(O)}}).catch(function(F){return P(F)})},[s,d,P,N,y,c,o,p,x,l]),K=$.useCallback(function(O){O.preventDefault(),O.persist(),Me(O);var F=jt(O);if(F&&O.dataTransfer)try{O.dataTransfer.dropEffect="copy"}catch{}return F&&T&&T(O),!1},[T,N]),J=$.useCallback(function(O){O.preventDefault(),O.persist(),Me(O);var F=v.current.filter(function(ue){return A.current&&A.current.contains(ue)}),ne=F.indexOf(O.target);ne!==-1&&F.splice(ne,1),v.current=F,!(F.length>0)&&(u({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),jt(O)&&j&&j(O))},[A,j,N]),te=$.useCallback(function(O,F){var ne=[],ue=[];O.forEach(function(he){var Ce=zr(he,y),Ae=en(Ce,2),lt=Ae[0],ct=Ae[1],Be=Wr(he,c,o),ee=en(Be,2),xe=ee[0],Pe=ee[1],Xe=l?l(he):null;if(lt&&xe&&!Xe)ne.push(he);else{var He=[ct,Pe];Xe&&(He=He.concat(Xe)),ue.push({file:he,errors:He.filter(function(dt){return dt})})}}),(!p&&ne.length>1||p&&x>=1&&ne.length>x)&&(ne.forEach(function(he){ue.push({file:he,errors:[Vo]})}),ne.splice(0)),u({acceptedFiles:ne,fileRejections:ue,type:"setFiles"}),D&&D(ne,ue,F),ue.length>0&&M&&M(ue,F),ne.length>0&&H&&H(ne,F)},[u,p,y,c,o,x,D,H,M,l]),ae=$.useCallback(function(O){O.preventDefault(),O.persist(),Me(O),v.current=[],jt(O)&&Promise.resolve(s(O)).then(function(F){At(O)&&!N||te(F,O)}).catch(function(F){return P(F)}),u({type:"reset"})},[s,te,P,N]),ce=$.useCallback(function(){if(a.current){u({type:"openDialog"}),I();var O={multiple:p,types:b};window.showOpenFilePicker(O).then(function(F){return s(F)}).then(function(F){te(F,null),u({type:"closeDialog"})}).catch(function(F){Zo(F)?(C(F),u({type:"closeDialog"})):Jo(F)?(a.current=!1,W.current?(W.current.value=null,W.current.click()):P(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):P(F)});return}W.current&&(u({type:"openDialog"}),I(),W.current.value=null,W.current.click())},[u,I,C,L,te,P,b,p]),me=$.useCallback(function(O){!A.current||!A.current.isEqualNode(O.target)||(O.key===" "||O.key==="Enter"||O.keyCode===32||O.keyCode===13)&&(O.preventDefault(),ce())},[A,ce]),_e=$.useCallback(function(){u({type:"focus"})},[]),fe=$.useCallback(function(){u({type:"blur"})},[]),Re=$.useCallback(function(){_||(Ko()?setTimeout(ce,0):ce())},[_,ce]),Se=function(F){return i?null:F},be=function(F){return k?null:Se(F)},Qe=function(F){return R?null:Se(F)},Me=function(F){N&&F.stopPropagation()},wt=$.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=O.refKey,ne=F===void 0?"ref":F,ue=O.role,he=O.onKeyDown,Ce=O.onFocus,Ae=O.onBlur,lt=O.onClick,ct=O.onDragEnter,Be=O.onDragOver,ee=O.onDragLeave,xe=O.onDrop,Pe=$t(O,na);return re(re(jn({onKeyDown:be(Oe(he,me)),onFocus:be(Oe(Ce,_e)),onBlur:be(Oe(Ae,fe)),onClick:Se(Oe(lt,Re)),onDragEnter:Qe(Oe(ct,U)),onDragOver:Qe(Oe(Be,K)),onDragLeave:Qe(Oe(ee,J)),onDrop:Qe(Oe(xe,ae)),role:typeof ue=="string"&&ue!==""?ue:"presentation"},ne,A),!i&&!k?{tabIndex:0}:{}),Pe)}},[A,me,_e,fe,Re,U,K,J,ae,k,R,i]),It=$.useCallback(function(O){O.stopPropagation()},[]),Ye=$.useMemo(function(){return function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=O.refKey,ne=F===void 0?"ref":F,ue=O.onChange,he=O.onClick,Ce=$t(O,ra),Ae=jn({accept:y,multiple:p,type:"file",style:{display:"none"},onChange:Se(Oe(ue,ae)),onClick:Se(Oe(he,It)),tabIndex:-1},ne,W);return re(re({},Ae),Ce)}},[W,n,p,ae,i]);return re(re({},m),{},{isFocused:g&&!i,getRootProps:wt,getInputProps:Ye,rootRef:A,inputRef:W,open:Se(ce)})}function fa(e,t){switch(t.type){case"focus":return re(re({},e),{},{isFocused:!0});case"blur":return re(re({},e),{},{isFocused:!1});case"openDialog":return re(re({},En),{},{isFileDialogActive:!0});case"closeDialog":return re(re({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return re(re({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return re(re({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return re({},En);default:return e}}function ur(){}var Rn=(e=>(e.FileSelect="file-select",e.DragDrop="drag-drop",e))(Rn||{});const ga="_fileDrop_dm34f_1",ma="_resourcePreview_dm34f_4",lr={fileDrop:ga,resourcePreview:ma},tn="shared.feedbackFileUpload";function ha(e){const{getRootProps:t,getInputProps:n,isDragActive:i}=Xr({onDrop:x=>e.onFilesAdded(x,Rn.DragDrop),noClick:!0,noKeyboard:!0,multiple:!!e.acceptMultiple,noDragEventsBubbling:!0}),s=$.useRef(null),o=$.useCallback(x=>{x&&(s.current=x)},[]),c=()=>{s.current.value=null,s.current.click()};let p=`${lr.fileDrop} text-center p-2 rounded-1`;return e.uploadError&&(p+=" border-red"),i&&(p+=" border-blue bg-light-blue"),r.jsxs(r.Fragment,{children:[r.jsxs("div",{...t({className:p}),children:[r.jsx("img",{className:lr.resourcePreview,src:e.imageUrl,draggable:!1}),r.jsxs("div",{className:"position-relative",children:[i&&r.jsx("p",{className:"position-absolute font-size-md translate-middle top-50 start-50 mb-0",children:r.jsx(le,{namespace:tn,phrase:"dropUpload"})}),r.jsxs("div",{className:i?"opacity-0":"",children:[r.jsx("p",{className:"mb-0",children:r.jsx(le,{namespace:tn,phrase:"dragDrop"})}),r.jsx("button",{type:"button",className:"btn btn-link text-underline p-0",onClick:c,children:r.jsx(le,{namespace:tn,phrase:"upload"})})]})]}),r.jsx("input",{type:"file",name:"fileUpload",className:"file-select d-none",multiple:!!e.acceptMultiple,accept:e.mimeType,ref:o,onChange:x=>e.onFilesAdded([...x.target.files],Rn.FileSelect),"aria-errormessage":"fileUploadError"}),r.jsx("input",{...n()})]}),e.uploadError&&r.jsx(An,{name:"fileUpload",children:e.uploadError})]})}const pa="_progress_w7ph2_1",va={progress:pa};function ya(e){const t=e.upload.progress===100;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{children:[r.jsx(de,{svg:Pi,className:"svg-container me-2"}),r.jsx("span",{className:"align-middle",children:e.upload.name}),t&&r.jsx(de,{svg:Ci,className:"svg-container float-end text-success"}),!t&&r.jsx("div",{role:"button","aria-label":"close",onClick:()=>e.cancelUpload(e.upload.id),className:"float-end description",children:r.jsx(de,{svg:Ut})})]}),r.jsx("div",{className:`${va.progress} progress my-2`,children:r.jsx("div",{className:"progress-bar bg-blue",role:"progressbar",style:{width:`${e.upload.progress}%`},"aria-valuenow":e.upload.progress,"aria-valuemin":0,"aria-valuemax":100})})]})}function Sa(e){var t;return(t=e.uploads)!=null&&t.length?r.jsx(r.Fragment,{children:e.uploads.map((n,i)=>r.jsx(ya,{upload:n,cancelUpload:e.cancelUpload},i))}):r.jsx(r.Fragment,{})}function ba(e){return r.jsxs("div",{className:"bg-gray-100 rounded p-2",children:[r.jsx(de,{className:"d-inline-block align-middle svg-container icon-purple me-2",svg:Ti}),r.jsx("span",{className:"align-middle",children:e.file.get("name")}),r.jsx("button",{className:"btn p-0 border-0 float-end",onClick:()=>e.deleteFile(e.file.get("id")),children:r.jsx(de,{svg:Ei})})]})}function xa(e){return r.jsx("div",{className:"d-flex flex-column gap-2",children:e.uploadedFiles.map(t=>r.jsx(ba,{file:t,deleteFile:e.deleteFile},t.id))})}const nt="shared.feedbackReportBug",gt=ie.encloseNamespace(nt),wa={issue:"",stepsToReproduce:""},Ia=ye.object().shape({issue:De().required(ke("requiredError")),stepsToReproduce:De()}).noUnknown();function _a(e){const t=qe();return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"form-group",children:[r.jsx("label",{className:"form-label mb-1",children:r.jsx(le,{namespace:nt,phrase:"mixedMediaLabel"})}),r.jsx("p",{className:"text-secondary font-size-sm",children:r.jsx(le,{namespace:nt,phrase:"mixedMediaDescription"})}),r.jsx("div",{className:"mb-3",children:r.jsx(ha,{mimeType:kn.MIXED_MEDIA,onFilesAdded:e.onFilesAdded,imageUrl:e.previewImageUrl,uploadError:e.uploadError,acceptMultiple:!0})}),r.jsx(Sa,{uploads:e.uploadingFiles,cancelUpload:e.cancelUpload}),r.jsx(xa,{uploadedFiles:e.uploadedFiles,deleteFile:e.deleteFile})]}),r.jsx(oe,{as:"textarea",placeholder:gt("issuePlaceholder"),label:gt("issueLabel"),name:"issue",value:t.values.issue,showRequiredStar:!0}),r.jsx(oe,{as:"textarea",placeholder:gt("stepsPlaceholder"),label:gt("stepsLabel"),name:"stepsToReproduce",value:t.values.stepsToReproduce}),r.jsxs("div",{className:"rounded bg-light-yellow p-2 mb-3",children:[r.jsx("p",{className:"fw-semibold mb-2",children:r.jsx(le,{namespace:nt,phrase:"help"})}),r.jsxs("div",{className:"d-flex gap-1 mb-2",children:[r.jsx(de,{svg:po}),r.jsx("a",{href:Jt[e.instanceRegion].website,target:"_blank",className:"text-underline",children:r.jsx(le,{namespace:nt,phrase:"visitHelpCentre"})})]}),r.jsx("p",{className:"mb-2",children:r.jsx(le,{namespace:nt,phrase:"supportTeam"})}),r.jsxs("div",{className:"d-flex gap-1 mb-2",children:[r.jsx(de,{svg:vo}),r.jsx("span",{children:Jt[e.instanceRegion].phone})]}),r.jsxs("div",{className:"d-flex gap-1 mb-2",children:[r.jsx(de,{svg:Ri}),r.jsx("span",{children:Jt[e.instanceRegion].email})]})]})]})}function Ca(e){const{onFilesAdded:t,cancelUpload:n,uploadingFiles:i,uploadedFiles:s,deleteFile:o,...c}=e;return r.jsx(Ke,{...c,initialValues:{...wa,...e.initialValues},validationSchema:Ia,submitText:gt("submit"),children:r.jsx(_a,{onFilesAdded:t,previewImageUrl:at.mediaPreview,cancelUpload:n,uploadingFiles:i,uploadedFiles:s,deleteFile:o,uploadError:e.uploadError,instanceRegion:e.instanceRegion})})}var We=(e=>(e.Pink="colour:0",e.Orange="colour:1",e.Green="colour:2",e.Blue="colour:3",e.Purple="colour:4",e.Indigo="colour:5",e))(We||{});function qt(e){switch(e){case We.Pink:return"pink";case We.Orange:return"orange";case We.Green:return"green";case We.Blue:return"blue";case We.Purple:return"purple";case We.Indigo:return"indigo";default:return"pink"}}const Oa="_avatar_rpeug_1",ja={avatar:Oa};function Ea(e){const{imageUrl:t,initials:n}=e,i={};return t&&(i.backgroundImage=`url('${t}')`),r.jsx("div",{className:ja.avatar,style:i,children:t?r.jsx(r.Fragment,{children:" "}):n})}function Ra(e){return r.jsx("svg",{...e,children:r.jsx("path",{d:"M11 11V7.002a.999.999 0 1 1 2 0V11h3.998a.999.999 0 1 1 0 2H13v3.998a.999.999 0 1 1-2 0V13H7.002a.999.999 0 1 1 0-2z",fill:"currentColor"})})}const Pa="_svgContainer_kq46n_1",Ta="_selection_kq46n_5",ka="_expander_kq46n_8",Da="_iconContainer_kq46n_14",Fa="_icon_kq46n_14",Aa="_bubble_kq46n_30",$a="_spinnerContainer_kq46n_46",La="_remove_kq46n_51",Ua="_removeBubble_kq46n_60",ve={svgContainer:Pa,selection:Ta,expander:ka,iconContainer:Da,icon:Fa,bubble:Aa,spinnerContainer:$a,remove:La,removeBubble:Ua},Na=ie.encloseNamespace("shared.inputSelection");function qa(e){var t;switch(e.typeId){case ge.Classroom:return"text-teal-hover";case ge.ClassroomGroup:return`text-${qt((t=e.metadata)==null?void 0:t.colour)}-hover`}}function cr(e){var n;let t=`${ve.svgContainer} ${ve.icon}`;return e.typeId===ge.Classroom?t+=" text-teal":t+=` text-${qt((n=e.metadata)==null?void 0:n.colour)}`,t}function Ma(e){var i;const t=qa(e.selection),n=e.selection.typeId===ge.Classroom;if(!e.canExpand){if(!e.selection.typeId||e.selection.typeId===ge.User){const s=e.selection;return r.jsx("div",{className:ve.svgContainer,children:r.jsx(Ea,{imageUrl:(i=s.avatar)==null?void 0:i.url,initials:Ee.getInitials(e.selection.name,e.selection.surname)})})}return r.jsx(Fr,{title:Na(n?"emptyClassroom":"emptyGroup"),children:r.jsx("div",{className:`align-items-center border border-white bg-white ${ve.iconContainer}`,children:r.jsx(de,{className:cr(e.selection),svg:n?In:Tt})})})}return e.hasExpanded?r.jsx("div",{className:`d-flex align-items-center text-white ${ve.spinnerContainer} ${ve.svgContainer}`,children:r.jsx(Dn,{as:"div",size:"sm",animation:"border",role:"status"})}):r.jsxs(r.Fragment,{children:[r.jsx(yt,{className:`align-items-center cursor-pointer text-white border border-white rounded-circle ${ve.expander} ${t}`,onClick:e.onClickExpand,children:r.jsx(de,{svg:Ra,className:`d-flex align-items-center ${ve.svgContainer}`})}),r.jsx("div",{className:`align-items-center border border-white bg-white ${ve.iconContainer}`,children:r.jsx(de,{className:cr(e.selection),svg:n?In:Tt})})]})}function Pn(e){var t;if(!e.typeId)return"ultramarine";switch(e.typeId){case ge.User:return typeof e.userType=="number"?e.userType===2?"ultramarine":"indigo":e.userType===Ar.Learner?"ultramarine":"indigo";case ge.Classroom:return"teal";case ge.ClassroomGroup:return qt((t=e.metadata)==null?void 0:t.colour)}}function Ba(e){var T,D,H;const t=ht.isType(e.selection,ge.Classroom),n=ht.isType(e.selection,ge.ClassroomGroup),i=e.onClickExpand&&(t||n),s=!!((T=e.selection.users||e.selection.enrolments)!=null&&T.count),o=!!((H=(D=e.selection.users)==null?void 0:D.data)!=null&&H.length),[c,p]=se.useState(!1),[x,d]=se.useState(i&&s);se.useEffect(()=>{d(i&&s)},[i,s]);function j(){p(!0),e.onClickExpand(e.selection.id)}if(o){const M=e.selection,q=Pn(e.selection);return r.jsxs("div",{className:`d-flex align-items-center flex-wrap me-1 mt-1 pb-1 ps-1 pe-4 position-relative border-${q} text-${q} ${ve.bubble}`,children:[M.users.data.map(z=>r.jsx(Lt,{selection:z,colourVariant:q,hasStudentExperience:e.hasStudentExperience},`${z.id}:${e.selection.id}`)),r.jsx(yt,{className:`cursor-pointer position-absolute text-${q} ${ve.removeBubble}`,onClick:()=>e.onClickRemove(e.selection),children:r.jsx(de,{svg:Ut,className:`d-flex align-items-center ${ve.svgContainer}`})})]})}return r.jsx(Lt,{selection:e.selection,canExpand:x,hasExpanded:c,onClickExpand:j,onClickRemove:e.onClickRemove,colourVariant:Pn(e.selection),hasStudentExperience:e.hasStudentExperience})}function Lt(e){const t=e.colourVariant||Pn(e.selection);let n=e.selection.name;return e.selection.typeId===ge.User&&(n=e.hasStudentExperience?Ee.getDisplayName(e.selection):Ee.getFullName(e.selection)),r.jsxs("div",{className:`${ve.selection} bg-${t} rounded-pill text-${t} d-flex align-items-center me-1 mt-1 overflow-hidden`,children:[!e.hideExpander&&r.jsx(Ma,{canExpand:e.canExpand,hasExpanded:e.hasExpanded,onClickExpand:e.onClickExpand,selection:e.selection}),r.jsx("span",{className:"mx-1 text-white text-truncate",children:n}),Fe.isFunction(e.onClickRemove)&&r.jsx(yt,{className:`d-flex align-items-center cursor-pointer align-self-stretch text-white ${ve.remove}`,onClick:()=>e.onClickRemove(e.selection),children:r.jsx(de,{svg:Ut,className:`d-flex align-items-center ${ve.svgContainer}`})})]})}const Ha="_removeRecipient_3yabf_1",Va="_recipientItem_3yabf_5",za="_showSpinner_3yabf_8",Wa="_avatarContainer_3yabf_11",Ga="_recipientDetails_3yabf_15",Ka="_recipientDetailsWithRemoveButton_3yabf_18",Ue={removeRecipient:Ha,recipientItem:Va,showSpinner:za,avatarContainer:Wa,recipientDetails:Ga,recipientDetailsWithRemoveButton:Ka},Qa="shared.classroomGroupRecipientItemMetadata";function Ya(e){var i,s;const t=((i=e.users)==null?void 0:i.count)??0,n=(s=e.classroom)==null?void 0:s.name;return n?ie.getPhrase(Qa,"subheading",{classroomName:n,smartCount:t}):""}function Xa(e){var t;return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`${Ue.avatarContainer} d-inline-block`,children:r.jsx(Lr,{svg:Tt,variant:qt((t=e.classroomGroup.metadata)==null?void 0:t.colour)})}),r.jsxs("div",{className:e.detailsClassName,children:[r.jsx("h4",{className:"font-size-normal fw-normal m-0",children:e.classroomGroup.name}),r.jsx("p",{className:"text-secondary m-0",children:Ya(e.classroomGroup)})]})]})}const Za="shared.classroomRecipientItemMetadata";function Ja(e){var n,i;const t=((n=e.users)==null?void 0:n.count)??((i=e.enrolments)==null?void 0:i.count);return Number.isInteger(t)?ie.getPhrase(Za,"subheading",{smartCount:t}):""}function es(e){return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`${Ue.avatarContainer} d-inline-block`,children:r.jsx(Lr,{svg:In,variant:"teal"})}),r.jsxs("div",{className:e.detailsClassName,children:[r.jsx("h4",{className:"font-size-normal fw-normal m-0",children:e.classroom.name}),r.jsx("p",{className:"text-secondary m-0",children:Ja(e.classroom)})]})]})}class ts{constructor(t){const{length:n,separator:i,dictionaries:s,style:o,seed:c}=t;this.dictionaries=s,this.separator=i,this.length=n,this.style=o,this.seed=c}generate(){if(!this.dictionaries)throw new Error('Cannot find any dictionary. Please provide at least one, or leave the "dictionary" field empty in the config object');if(this.length<=0)throw new Error("Invalid length provided");if(this.length>this.dictionaries.length)throw new Error(`The length cannot be bigger than the number of dictionaries.
6
6
  Length provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);return this.dictionaries.slice(0,this.length).reduce((t,n)=>{let i=n[Math.floor((this.seed?(s=this.seed,(o=>{o=1831565813+(o|=0)|0;let c=Math.imul(o^o>>>15,1|o);return c=c+Math.imul(c^c>>>7,61|c)^c,((c^c>>>14)>>>0)/4294967296})(s)):Math.random())*n.length)]||"";var s;if(this.style==="lowerCase")i=i.toLowerCase();else if(this.style==="capital"){const[o,...c]=i.split("");i=o.toUpperCase()+c.join("")}else this.style==="upperCase"&&(i=i.toUpperCase());return t?`${t}${this.separator}${i}`:`${i}`},"")}}const dr={separator:"_",dictionaries:[]},ns=e=>{const t=[...e&&e.dictionaries||dr.dictionaries],n={...dr,...e,length:e&&e.length||t.length,dictionaries:t};if(!e||!e.dictionaries||!e.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new ts(n).generate()};var rs=["aardvark","aardwolf","albatross","alligator","alpaca","amphibian","anaconda","angelfish","anglerfish","ant","anteater","antelope","antlion","ape","aphid","armadillo","asp","baboon","badger","bandicoot","barnacle","barracuda","basilisk","bass","bat","bear","beaver","bedbug","bee","beetle","bird","bison","blackbird","boa","boar","bobcat","bobolink","bonobo","booby","bovid","bug","butterfly","buzzard","camel","canid","canidae","capybara","cardinal","caribou","carp","cat","caterpillar","catfish","catshark","cattle","centipede","cephalopod","chameleon","cheetah","chickadee","chicken","chimpanzee","chinchilla","chipmunk","cicada","clam","clownfish","cobra","cockroach","cod","condor","constrictor","coral","cougar","cow","coyote","crab","crane","crawdad","crayfish","cricket","crocodile","crow","cuckoo","damselfly","deer","dingo","dinosaur","dog","dolphin","donkey","dormouse","dove","dragon","dragonfly","duck","eagle","earthworm","earwig","echidna","eel","egret","elephant","elk","emu","ermine","falcon","felidae","ferret","finch","firefly","fish","flamingo","flea","fly","flyingfish","fowl","fox","frog","galliform","gamefowl","gayal","gazelle","gecko","gerbil","gibbon","giraffe","goat","goldfish","goose","gopher","gorilla","grasshopper","grouse","guan","guanaco","guineafowl","gull","guppy","haddock","halibut","hamster","hare","harrier","hawk","hedgehog","heron","herring","hippopotamus","hookworm","hornet","horse","hoverfly","hummingbird","hyena","iguana","impala","jackal","jaguar","jay","jellyfish","junglefowl","kangaroo","kingfisher","kite","kiwi","koala","koi","krill","ladybug","lamprey","landfowl","lark","leech","lemming","lemur","leopard","leopon","limpet","lion","lizard","llama","lobster","locust","loon","louse","lungfish","lynx","macaw","mackerel","magpie","mammal","manatee","mandrill","marlin","marmoset","marmot","marsupial","marten","mastodon","meadowlark","meerkat","mink","minnow","mite","mockingbird","mole","mollusk","mongoose","monkey","moose","mosquito","moth","mouse","mule","muskox","narwhal","newt","nightingale","ocelot","octopus","opossum","orangutan","orca","ostrich","otter","owl","ox","panda","panther","parakeet","parrot","parrotfish","partridge","peacock","peafowl","pelican","penguin","perch","pheasant","pig","pigeon","pike","pinniped","piranha","planarian","platypus","pony","porcupine","porpoise","possum","prawn","primate","ptarmigan","puffin","puma","python","quail","quelea","quokka","rabbit","raccoon","rat","rattlesnake","raven","reindeer","reptile","rhinoceros","roadrunner","rodent","rook","rooster","roundworm","sailfish","salamander","salmon","sawfish","scallop","scorpion","seahorse","shark","sheep","shrew","shrimp","silkworm","silverfish","skink","skunk","sloth","slug","smelt","snail","snake","snipe","sole","sparrow","spider","spoonbill","squid","squirrel","starfish","stingray","stoat","stork","sturgeon","swallow","swan","swift","swordfish","swordtail","tahr","takin","tapir","tarantula","tarsier","termite","tern","thrush","tick","tiger","tiglon","toad","tortoise","toucan","trout","tuna","turkey","turtle","tyrannosaurus","unicorn","urial","vicuna","viper","vole","vulture","wallaby","walrus","warbler","wasp","weasel","whale","whippet","whitefish","wildcat","wildebeest","wildfowl","wolf","wolverine","wombat","woodpecker","worm","wren","xerinae","yak","zebra"],is=["amaranth","amber","amethyst","apricot","aqua","aquamarine","azure","beige","black","blue","blush","bronze","brown","chocolate","coffee","copper","coral","crimson","cyan","emerald","fuchsia","gold","gray","green","harlequin","indigo","ivory","jade","lavender","lime","magenta","maroon","moccasin","olive","orange","peach","pink","plum","purple","red","rose","salmon","sapphire","scarlet","silver","tan","teal","tomato","turquoise","violet","white","yellow"];const os="shared.analyticsUtils",nn=ie.encloseNamespace(os);function as(e){if(!e)return 0;let t=0;for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t=(t<<5)-t+i,t|=0}return Math.abs(t)}function ss(e,t){const n=+`${e||as(t)}${Math.floor(new Date().getMinutes()/5)}`;return{dictionaries:[is,rs],separator:" ",length:2,style:"capital",seed:n}}function fr(e,t){return e?t?ns(ss(e.id,e.sessionId)):e.deleted?nn("deleted"):Ee.getFullName(e)||nn("anonUser"):nn("anonUser")}function us(e){return r.jsx("svg",{...e,children:r.jsx("path",{d:"m16.837 9.842-1.138-3.678a1.65 1.65 0 0 0-.887-1.01 1.67 1.67 0 0 0-1.348-.02l-1.14.486a.8.8 0 0 1-.647 0l-1.14-.488a1.67 1.67 0 0 0-1.348.021 1.65 1.65 0 0 0-.887 1.01L7.164 9.842a7.17 7.17 0 0 0-3.062 1.85.41.41 0 0 0 .314.683h15.17c.162 0 .31-.094.376-.241a.41.41 0 0 0-.064-.44 7.17 7.17 0 0 0-3.061-1.852M9.094 6.404a.836.836 0 0 1 1.117-.516l1.135.484c.416.181.89.181 1.306 0l1.137-.485a.836.836 0 0 1 1.117.516l.976 3.153a16.17 16.17 0 0 0-7.764 0zm-3.59 5.148c1.455-1.019 3.866-1.645 6.497-1.645a14.5 14.5 0 0 1 4.41.651c.74.229 1.444.563 2.087.994zm9.807 1.645a2.9 2.9 0 0 0-2.508 1.447 1.61 1.61 0 0 0-1.604 0c-.763-1.323-2.425-1.835-3.807-1.173s-2.016 2.272-1.452 3.69a2.93 2.93 0 0 0 3.6 1.704 2.906 2.906 0 0 0 1.968-3.445.88.88 0 0 1 .986 0 2.87 2.87 0 0 0 1.269 3.088 2.91 2.91 0 0 0 3.351-.176c.966-.762 1.341-2.048.935-3.204s-1.505-1.932-2.738-1.93m-6.62 4.936c-1.143 0-2.07-.92-2.07-2.056s.927-2.057 2.07-2.057 2.069.92 2.069 2.057a2.065 2.065 0 0 1-2.07 2.056m6.62 0c-1.142 0-2.069-.92-2.069-2.056s.927-2.057 2.07-2.057 2.068.92 2.068 2.057a2.065 2.065 0 0 1-2.069 2.056",fill:"currentColor"})})}const ls="_iconCircle_186sk_1",cs="_dot_186sk_8",rn={iconCircle:ls,dot:cs};function ds(e){const t=e.type==="anon";return e.type==="student-reach"?r.jsx("div",{className:"position-relative h-100 w-100",children:r.jsx("div",{className:`${rn.iconCircle} bg-orange text-light ${e.extraClasses||""}`,children:r.jsx(de,{svg:Tt,size:e.anonymousSvgSize||pt.Large,className:"svg-container w-100 h-100"})})}):t?r.jsxs("div",{className:"position-relative h-100 w-100",children:[r.jsx("div",{className:`${rn.iconCircle} bg-gray-700 text-light ${e.extraClasses||""}`,children:r.jsx(de,{svg:us,size:e.anonymousSvgSize||pt.Large,className:"svg-container w-100 h-100"})}),e.showDot&&r.jsx("div",{className:`${rn.dot} rounded-circle bg-danger`})]}):r.jsx(ui,{imageCdnUrl:e.imageCdnUrl,initials:e.initials,imageUrl:e.imageUrl,extraClasses:e.extraClasses,showDot:e.showDot,anonymiseUsers:e.anonymiseUsers})}const fs="shared.userRecipientItemMetadata",on=ie.encloseNamespace(fs);function gs(e){const t=Ee.getUserType(e),n=Ee.getUserRole(e);if(t===Ar.Staff)return n===wn.Admin?on("admin"):on("staff");const i=Ee.getYearGroup(e);return i!=null&&i.name&&i.name!=="Learners"?i.name:on("student")}function ms({user:e,anonymiseUsers:t,showDisplayName:n}){var i;if(e.sessionId||e.deleted){const s=fr(e,t),o=s.split(" ").filter(c=>!!c);return{name:s,surname:o.slice(1).join(" "),avatarUrl:null}}return{name:t?fr(e,!0):n?Ee.getDisplayName(e):Ee.getFullName(e),surname:e.surname,avatarUrl:(i=e.avatar)==null?void 0:i.url}}Zr.defaults={showSubText:!0};function Zr(e){const{name:t,surname:n,avatarUrl:i}=ms(e);return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`${Ue.avatarContainer} ${e.avatarClassName} d-inline-block flex-shrink-0`,children:r.jsx(ds,{imageUrl:i,imageCdnUrl:e.imageCdnUrl,initials:Ee.getInitials(t,n),type:!e.anonymiseUsers&&(e.user.sessionId||e.user.deleted)?"anon":void 0,anonymiseUsers:e.anonymiseUsers,anonymousSvgSize:pt.Small})}),r.jsxs("div",{className:e.detailsClassName,children:[r.jsx("h4",{className:li("font-size-normal fw-normal m-0",e.nameClassName),children:t}),e.showSubText&&"id"in e.user&&r.jsx("p",{className:"text-secondary m-0",children:e.getSubText?e.getSubText(e.user):gs(e.user)})]})]})}const hs="share.recipientItem",an=ie.encloseNamespace(hs);function ps(e){switch(e){case ge.User:return an("removeUser");case ge.Classroom:return an("removeClassroom");case ge.ClassroomGroup:return an("removeGroup")}return null}function vs(e){const[t,n]=se.useState(!1);let i=`${Ue.recipientItem} d-flex`;t&&(i+=` ${Ue.showSpinner}`);const s=`${e.removeRecipient?Ue.recipientDetailsWithRemoveButton:Ue.recipientDetails} d-inline-block ms-2`;function o(){n(!0),e.removeRecipient(e.entity.id,()=>n(!1))}return r.jsxs("div",{className:i,children:[(()=>{if(ht.isType(e.entity,ge.User))return r.jsx(Zr,{user:e.entity,imageCdnUrl:e.imageCdnUrl,detailsClassName:s,showDisplayName:e.showDisplayName,getSubText:e.getSubText,showSubText:!0});if(ht.isType(e.entity,ge.Classroom))return r.jsx(es,{classroom:e.entity,detailsClassName:s});if(ht.isType(e.entity,ge.ClassroomGroup))return r.jsx(Xa,{classroomGroup:e.entity,detailsClassName:s})})(),Fe.isFunction(e.removeRecipient)&&r.jsx("div",{className:`${Ue.removeRecipient} d-inline-flex justify-content-center align-items-center`,children:t?r.jsx(Dn,{as:"div",size:"sm",animation:"border",role:"status"}):r.jsx(Fr,{title:ps(e.entity.typeId),spanHack:!0,children:r.jsx("div",{className:"btn-close cursor-pointer",role:"button","aria-label":"Close",onClick:o})})})]})}var sn={},un,gr;function ys(){if(gr)return un;gr=1;function e(t,n){if(t===n)return!0;if(!t||!n)return!1;var i=t.length;if(n.length!==i)return!1;for(var s=0;s<i;s++)if(t[s]!==n[s])return!1;return!0}return un=e,un}var ln={},cn,mr;function Ss(){if(mr)return cn;mr=1;var e=(function(){function t(n,i){var s=[],o=!0,c=!1,p=void 0;try{for(var x=n[Symbol.iterator](),d;!(o=(d=x.next()).done)&&(s.push(d.value),!(i&&s.length===i));o=!0);}catch(j){c=!0,p=j}finally{try{!o&&x.return&&x.return()}finally{if(c)throw p}}return s}return function(n,i){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return t(n,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})();return cn=function(t){var n=t.data,i=t.multiSection;function s(d){for(d===null?d=0:d++;d<n.length&&n[d]===0;)d++;return d===n.length?null:d}function o(d){for(d===null?d=n.length-1:d--;d>=0&&n[d]===0;)d--;return d===-1?null:d}function c(d){var j=e(d,2),T=j[0],D=j[1];return i?D===null||D===n[T]-1?(T=s(T),T===null?[null,null]:[T,0]):[T,D+1]:n===0||D===n-1?[null,null]:D===null?[null,0]:[null,D+1]}function p(d){var j=e(d,2),T=j[0],D=j[1];return i?D===null||D===0?(T=o(T),T===null?[null,null]:[T,n[T]-1]):[T,D-1]:n===0||D===0?[null,null]:D===null?[null,n-1]:[null,D-1]}function x(d){return c(d)[1]===null}return{next:c,prev:p,isLast:x}},cn}var Et={exports:{}},dn,hr;function bs(){if(hr)return dn;hr=1;var e=Object.prototype.propertyIsEnumerable;function t(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function n(i){var s=Object.getOwnPropertyNames(i);return Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(i))),s.filter(function(o){return e.call(i,o)})}return dn=Object.assign||function(i,s){for(var o,c,p=t(i),x=1;x<arguments.length;x++){o=arguments[x],c=n(Object(o));for(var d=0;d<c.length;d++)p[c[d]]=o[c[d]]}return p},dn}var pr;function xs(){return pr||(pr=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=(function(){function x(d,j){var T=[],D=!0,H=!1,M=void 0;try{for(var q=d[Symbol.iterator](),z;!(D=(z=q.next()).done)&&(T.push(z.value),!(j&&T.length===j));D=!0);}catch(L){H=!0,M=L}finally{try{!D&&q.return&&q.return()}finally{if(H)throw M}}return T}return function(d,j){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d))return x(d,j);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})();function i(x){return x&&x.__esModule?x:{default:x}}function s(x){if(Array.isArray(x)){for(var d=0,j=Array(x.length);d<x.length;d++)j[d]=x[d];return j}else return Array.from(x)}var o=bs(),c=i(o),p=function(d){return d};t.default=function(x){var d=Array.isArray(x)&&x.length===2?x:[x,null],j=n(d,2),T=j[0],D=j[1];return function(H){for(var M=arguments.length,q=Array(M>1?M-1:0),z=1;z<M;z++)q[z-1]=arguments[z];var L=q.map(function(Q){return T[Q]}).filter(p);return typeof L[0]=="string"||typeof D=="function"?{key:H,className:D?D.apply(void 0,s(L)):L.join(" ")}:{key:H,style:c.default.apply(void 0,[{}].concat(s(L)))}}},e.exports=t.default})(Et,Et.exports)),Et.exports}var fn={},gn={},vr;function Ln(){return vr||(vr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=n;function t(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?t=function(o){return typeof o}:t=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},t(i)}function n(i,s){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(i===s)return!1;var c=Object.keys(i),p=Object.keys(s);if(c.length!==p.length)return!0;var x={},d,j;for(d=0,j=o.length;d<j;d++)x[o[d]]=!0;for(d=0,j=c.length;d<j;d++){var T=c[d],D=i[T],H=s[T];if(D!==H){if(!x[T]||D===null||H===null||t(D)!=="object"||t(H)!=="object")return!0;var M=Object.keys(D),q=Object.keys(H);if(M.length!==q.length)return!0;for(var z=0,L=M.length;z<L;z++){var Q=M[z];if(D[Q]!==H[Q])return!0}}}return!1}})(gn)),gn}var yr;function ws(){return yr||(yr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=c(St()),n=s(bt()),i=s(Ln());function s(_){return _&&_.__esModule?_:{default:_}}function o(){if(typeof WeakMap!="function")return null;var _=new WeakMap;return o=function(){return _},_}function c(_){if(_&&_.__esModule)return _;if(_===null||p(_)!=="object"&&typeof _!="function")return{default:_};var k=o();if(k&&k.has(_))return k.get(_);var R={},N=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in _)if(Object.prototype.hasOwnProperty.call(_,S)){var l=N?Object.getOwnPropertyDescriptor(_,S):null;l&&(l.get||l.set)?Object.defineProperty(R,S,l):R[S]=_[S]}return R.default=_,k&&k.set(_,R),R}function p(_){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?p=function(R){return typeof R}:p=function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},p(_)}function x(_,k){if(!(_ instanceof k))throw new TypeError("Cannot call a class as a function")}function d(_,k){for(var R=0;R<k.length;R++){var N=k[R];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(_,N.key,N)}}function j(_,k,R){return k&&d(_.prototype,k),_}function T(_){return function(){var k=q(_),R;if(M()){var N=q(this).constructor;R=Reflect.construct(k,arguments,N)}else R=k.apply(this,arguments);return D(this,R)}}function D(_,k){return k&&(p(k)==="object"||typeof k=="function")?k:H(_)}function H(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function M(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function q(_){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)},q(_)}function z(_,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(k&&k.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),k&&L(_,k)}function L(_,k){return L=Object.setPrototypeOf||function(N,S){return N.__proto__=S,N},L(_,k)}function Q(_,k,R){return k in _?Object.defineProperty(_,k,{value:R,enumerable:!0,configurable:!0,writable:!0}):_[k]=R,_}var Z=(function(_){z(R,_);var k=T(R);function R(){return x(this,R),k.apply(this,arguments)}return j(R,[{key:"shouldComponentUpdate",value:function(S){return(0,i.default)(S,this.props)}},{key:"render",value:function(){var S=this.props,l=S.section,y=S.renderSectionTitle,b=S.theme,I=S.sectionKeyPrefix,C=y(l);return C?t.default.createElement("div",b("".concat(I,"title"),"sectionTitle"),C):null}}]),R})(t.Component);e.default=Z,Q(Z,"propTypes",{section:n.default.any.isRequired,renderSectionTitle:n.default.func.isRequired,theme:n.default.func.isRequired,sectionKeyPrefix:n.default.string.isRequired})})(fn)),fn}var mn={},hn={},Sr;function Is(){return Sr||(Sr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=c(St()),n=s(bt()),i=s(Ln());function s(l){return l&&l.__esModule?l:{default:l}}function o(){if(typeof WeakMap!="function")return null;var l=new WeakMap;return o=function(){return l},l}function c(l){if(l&&l.__esModule)return l;if(l===null||p(l)!=="object"&&typeof l!="function")return{default:l};var y=o();if(y&&y.has(l))return y.get(l);var b={},I=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var C in l)if(Object.prototype.hasOwnProperty.call(l,C)){var A=I?Object.getOwnPropertyDescriptor(l,C):null;A&&(A.get||A.set)?Object.defineProperty(b,C,A):b[C]=l[C]}return b.default=l,y&&y.set(l,b),b}function p(l){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?p=function(b){return typeof b}:p=function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},p(l)}function x(){return x=Object.assign||function(l){for(var y=1;y<arguments.length;y++){var b=arguments[y];for(var I in b)Object.prototype.hasOwnProperty.call(b,I)&&(l[I]=b[I])}return l},x.apply(this,arguments)}function d(l,y){var b=Object.keys(l);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(l);y&&(I=I.filter(function(C){return Object.getOwnPropertyDescriptor(l,C).enumerable})),b.push.apply(b,I)}return b}function j(l){for(var y=1;y<arguments.length;y++){var b=arguments[y]!=null?arguments[y]:{};y%2?d(Object(b),!0).forEach(function(I){N(l,I,b[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(b)):d(Object(b)).forEach(function(I){Object.defineProperty(l,I,Object.getOwnPropertyDescriptor(b,I))})}return l}function T(l,y){if(l==null)return{};var b=D(l,y),I,C;if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(l);for(C=0;C<A.length;C++)I=A[C],!(y.indexOf(I)>=0)&&Object.prototype.propertyIsEnumerable.call(l,I)&&(b[I]=l[I])}return b}function D(l,y){if(l==null)return{};var b={},I=Object.keys(l),C,A;for(A=0;A<I.length;A++)C=I[A],!(y.indexOf(C)>=0)&&(b[C]=l[C]);return b}function H(l,y){if(!(l instanceof y))throw new TypeError("Cannot call a class as a function")}function M(l,y){for(var b=0;b<y.length;b++){var I=y[b];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(l,I.key,I)}}function q(l,y,b){return y&&M(l.prototype,y),l}function z(l){return function(){var y=_(l),b;if(Z()){var I=_(this).constructor;b=Reflect.construct(y,arguments,I)}else b=y.apply(this,arguments);return L(this,b)}}function L(l,y){return y&&(p(y)==="object"||typeof y=="function")?y:Q(l)}function Q(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function Z(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function _(l){return _=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},_(l)}function k(l,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(y&&y.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),y&&R(l,y)}function R(l,y){return R=Object.setPrototypeOf||function(I,C){return I.__proto__=C,I},R(l,y)}function N(l,y,b){return y in l?Object.defineProperty(l,y,{value:b,enumerable:!0,configurable:!0,writable:!0}):l[y]=b,l}var S=(function(l){k(b,l);var y=z(b);function b(){var I;H(this,b);for(var C=arguments.length,A=new Array(C),W=0;W<C;W++)A[W]=arguments[W];return I=y.call.apply(y,[this].concat(A)),N(Q(I),"storeItemReference",function(E){E!==null&&(I.item=E)}),N(Q(I),"onMouseEnter",function(E){var B=I.props,m=B.sectionIndex,u=B.itemIndex;I.props.onMouseEnter(E,{sectionIndex:m,itemIndex:u})}),N(Q(I),"onMouseLeave",function(E){var B=I.props,m=B.sectionIndex,u=B.itemIndex;I.props.onMouseLeave(E,{sectionIndex:m,itemIndex:u})}),N(Q(I),"onMouseDown",function(E){var B=I.props,m=B.sectionIndex,u=B.itemIndex;I.props.onMouseDown(E,{sectionIndex:m,itemIndex:u})}),N(Q(I),"onClick",function(E){var B=I.props,m=B.sectionIndex,u=B.itemIndex;I.props.onClick(E,{sectionIndex:m,itemIndex:u})}),I}return q(b,[{key:"shouldComponentUpdate",value:function(C){return(0,i.default)(C,this.props,["renderItemData"])}},{key:"render",value:function(){var C=this.props,A=C.isHighlighted,W=C.item,E=C.renderItem,B=C.renderItemData,m=T(C,["isHighlighted","item","renderItem","renderItemData"]);return delete m.sectionIndex,delete m.itemIndex,typeof m.onMouseEnter=="function"&&(m.onMouseEnter=this.onMouseEnter),typeof m.onMouseLeave=="function"&&(m.onMouseLeave=this.onMouseLeave),typeof m.onMouseDown=="function"&&(m.onMouseDown=this.onMouseDown),typeof m.onClick=="function"&&(m.onClick=this.onClick),t.default.createElement("li",x({role:"option"},m,{ref:this.storeItemReference}),E(W,j({isHighlighted:A},B)))}}]),b})(t.Component);e.default=S,N(S,"propTypes",{sectionIndex:n.default.number,isHighlighted:n.default.bool.isRequired,itemIndex:n.default.number.isRequired,item:n.default.any.isRequired,renderItem:n.default.func.isRequired,renderItemData:n.default.object.isRequired,onMouseEnter:n.default.func,onMouseLeave:n.default.func,onMouseDown:n.default.func,onClick:n.default.func})})(hn)),hn}var br;function _s(){return br||(br=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=p(St()),n=o(bt()),i=o(Is()),s=o(Ln());function o(S){return S&&S.__esModule?S:{default:S}}function c(){if(typeof WeakMap!="function")return null;var S=new WeakMap;return c=function(){return S},S}function p(S){if(S&&S.__esModule)return S;if(S===null||x(S)!=="object"&&typeof S!="function")return{default:S};var l=c();if(l&&l.has(S))return l.get(S);var y={},b=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var I in S)if(Object.prototype.hasOwnProperty.call(S,I)){var C=b?Object.getOwnPropertyDescriptor(S,I):null;C&&(C.get||C.set)?Object.defineProperty(y,I,C):y[I]=S[I]}return y.default=S,l&&l.set(S,y),y}function x(S){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?x=function(y){return typeof y}:x=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},x(S)}function d(){return d=Object.assign||function(S){for(var l=1;l<arguments.length;l++){var y=arguments[l];for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(S[b]=y[b])}return S},d.apply(this,arguments)}function j(S,l){var y=Object.keys(S);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(S);l&&(b=b.filter(function(I){return Object.getOwnPropertyDescriptor(S,I).enumerable})),y.push.apply(y,b)}return y}function T(S){for(var l=1;l<arguments.length;l++){var y=arguments[l]!=null?arguments[l]:{};l%2?j(Object(y),!0).forEach(function(b){R(S,b,y[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(y)):j(Object(y)).forEach(function(b){Object.defineProperty(S,b,Object.getOwnPropertyDescriptor(y,b))})}return S}function D(S,l){if(!(S instanceof l))throw new TypeError("Cannot call a class as a function")}function H(S,l){for(var y=0;y<l.length;y++){var b=l[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(S,b.key,b)}}function M(S,l,y){return l&&H(S.prototype,l),S}function q(S){return function(){var l=Z(S),y;if(Q()){var b=Z(this).constructor;y=Reflect.construct(l,arguments,b)}else y=l.apply(this,arguments);return z(this,y)}}function z(S,l){return l&&(x(l)==="object"||typeof l=="function")?l:L(S)}function L(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}function Q(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Z(S){return Z=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},Z(S)}function _(S,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");S.prototype=Object.create(l&&l.prototype,{constructor:{value:S,writable:!0,configurable:!0}}),l&&k(S,l)}function k(S,l){return k=Object.setPrototypeOf||function(b,I){return b.__proto__=I,b},k(S,l)}function R(S,l,y){return l in S?Object.defineProperty(S,l,{value:y,enumerable:!0,configurable:!0,writable:!0}):S[l]=y,S}var N=(function(S){_(y,S);var l=q(y);function y(){var b;D(this,y);for(var I=arguments.length,C=new Array(I),A=0;A<I;A++)C[A]=arguments[A];return b=l.call.apply(l,[this].concat(C)),R(L(b),"storeHighlightedItemReference",function(W){b.props.onHighlightedItemChange(W===null?null:W.item)}),b}return M(y,[{key:"shouldComponentUpdate",value:function(I){return(0,s.default)(I,this.props,["itemProps"])}},{key:"render",value:function(){var I=this,C=this.props,A=C.items,W=C.itemProps,E=C.renderItem,B=C.renderItemData,m=C.sectionIndex,u=C.highlightedItemIndex,g=C.getItemId,h=C.theme,a=C.keyPrefix,f=m===null?a:"".concat(a,"section-").concat(m,"-"),v=typeof W=="function";return t.default.createElement("ul",d({role:"listbox"},h("".concat(f,"items-list"),"itemsList")),A.map(function(w,P){var U=P===0,K=P===u,J="".concat(f,"item-").concat(P),te=v?W({sectionIndex:m,itemIndex:P}):W,ae=T({id:g(m,P),"aria-selected":K},h(J,"item",U&&"itemFirst",K&&"itemHighlighted"),{},te);return K&&(ae.ref=I.storeHighlightedItemReference),t.default.createElement(i.default,d({},ae,{sectionIndex:m,isHighlighted:K,itemIndex:P,item:w,renderItem:E,renderItemData:B}))}))}}]),y})(t.Component);e.default=N,R(N,"propTypes",{items:n.default.array.isRequired,itemProps:n.default.oneOfType([n.default.object,n.default.func]),renderItem:n.default.func.isRequired,renderItemData:n.default.object.isRequired,sectionIndex:n.default.number,highlightedItemIndex:n.default.number,onHighlightedItemChange:n.default.func.isRequired,getItemId:n.default.func.isRequired,theme:n.default.func.isRequired,keyPrefix:n.default.string.isRequired}),R(N,"defaultProps",{sectionIndex:null})})(mn)),mn}var xr;function Cs(){return xr||(xr=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=d(St()),n=p(bt()),i=p(Ss()),s=p(xs()),o=p(ws()),c=p(_s());function p(u){return u&&u.__esModule?u:{default:u}}function x(){if(typeof WeakMap!="function")return null;var u=new WeakMap;return x=function(){return u},u}function d(u){if(u&&u.__esModule)return u;if(u===null||Q(u)!=="object"&&typeof u!="function")return{default:u};var g=x();if(g&&g.has(u))return g.get(u);var h={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in u)if(Object.prototype.hasOwnProperty.call(u,f)){var v=a?Object.getOwnPropertyDescriptor(u,f):null;v&&(v.get||v.set)?Object.defineProperty(h,f,v):h[f]=u[f]}return h.default=u,g&&g.set(u,h),h}function j(u,g){var h=Object.keys(u);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(u);g&&(a=a.filter(function(f){return Object.getOwnPropertyDescriptor(u,f).enumerable})),h.push.apply(h,a)}return h}function T(u){for(var g=1;g<arguments.length;g++){var h=arguments[g]!=null?arguments[g]:{};g%2?j(Object(h),!0).forEach(function(a){C(u,a,h[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(h)):j(Object(h)).forEach(function(a){Object.defineProperty(u,a,Object.getOwnPropertyDescriptor(h,a))})}return u}function D(u,g){return L(u)||z(u,g)||M(u,g)||H()}function H(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
7
7
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M(u,g){if(u){if(typeof u=="string")return q(u,g);var h=Object.prototype.toString.call(u).slice(8,-1);if(h==="Object"&&u.constructor&&(h=u.constructor.name),h==="Map"||h==="Set")return Array.from(h);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return q(u,g)}}function q(u,g){(g==null||g>u.length)&&(g=u.length);for(var h=0,a=new Array(g);h<g;h++)a[h]=u[h];return a}function z(u,g){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(u)))){var h=[],a=!0,f=!1,v=void 0;try{for(var w=u[Symbol.iterator](),P;!(a=(P=w.next()).done)&&(h.push(P.value),!(g&&h.length===g));a=!0);}catch(U){f=!0,v=U}finally{try{!a&&w.return!=null&&w.return()}finally{if(f)throw v}}return h}}function L(u){if(Array.isArray(u))return u}function Q(u){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Q=function(h){return typeof h}:Q=function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},Q(u)}function Z(u,g){if(!(u instanceof g))throw new TypeError("Cannot call a class as a function")}function _(u,g){for(var h=0;h<g.length;h++){var a=g[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(u,a.key,a)}}function k(u,g,h){return g&&_(u.prototype,g),u}function R(u){return function(){var g=y(u),h;if(l()){var a=y(this).constructor;h=Reflect.construct(g,arguments,a)}else h=g.apply(this,arguments);return N(this,h)}}function N(u,g){return g&&(Q(g)==="object"||typeof g=="function")?g:S(u)}function S(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function l(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function y(u){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(h){return h.__proto__||Object.getPrototypeOf(h)},y(u)}function b(u,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(g&&g.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),g&&I(u,g)}function I(u,g){return I=Object.setPrototypeOf||function(a,f){return a.__proto__=f,a},I(u,g)}function C(u,g,h){return g in u?Object.defineProperty(u,g,{value:h,enumerable:!0,configurable:!0,writable:!0}):u[g]=h,u}var A={},W=function(g){return t.default.createElement("input",g)},E=function(g){var h=g.containerProps,a=g.children;return t.default.createElement("div",h,a)},B={container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"},m=(function(u){b(h,u);var g=R(h);function h(a){var f;return Z(this,h),f=g.call(this,a),C(S(f),"storeInputReference",function(v){v!==null&&(f.input=v);var w=f.props.inputProps.ref;w&&(typeof w=="function"?w(v):Q(w)==="object"&&Object.prototype.hasOwnProperty.call(w,"current")&&(w.current=v))}),C(S(f),"storeItemsContainerReference",function(v){v!==null&&(f.itemsContainer=v)}),C(S(f),"onHighlightedItemChange",function(v){f.highlightedItem=v}),C(S(f),"getItemId",function(v,w){if(w===null)return null;var P=f.props.id,U=v===null?"":"section-".concat(v);return"react-autowhatever-".concat(P,"-").concat(U,"-item-").concat(w)}),C(S(f),"onFocus",function(v){var w=f.props.inputProps;f.setState({isInputFocused:!0}),w.onFocus&&w.onFocus(v)}),C(S(f),"onBlur",function(v){var w=f.props.inputProps;f.setState({isInputFocused:!1}),w.onBlur&&w.onBlur(v)}),C(S(f),"onKeyDown",function(v){var w=f.props,P=w.inputProps,U=w.highlightedSectionIndex,K=w.highlightedItemIndex,J=v.keyCode;switch(J){case 40:case 38:{var te=J===40?"next":"prev",ae=f.sectionIterator[te]([U,K]),ce=D(ae,2),me=ce[0],_e=ce[1];P.onKeyDown(v,{newHighlightedSectionIndex:me,newHighlightedItemIndex:_e});break}default:P.onKeyDown(v,{highlightedSectionIndex:U,highlightedItemIndex:K})}}),f.highlightedItem=null,f.state={isInputFocused:!1},f.setSectionsItems(a),f.setSectionIterator(a),f.setTheme(a),f}return k(h,[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(f){f.items!==this.props.items&&this.setSectionsItems(f),(f.items!==this.props.items||f.multiSection!==this.props.multiSection)&&this.setSectionIterator(f),f.theme!==this.props.theme&&this.setTheme(f)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(f){f.multiSection&&(this.sectionsItems=f.items.map(function(v){return f.getSectionItems(v)}),this.sectionsLengths=this.sectionsItems.map(function(v){return v.length}),this.allSectionsAreEmpty=this.sectionsLengths.every(function(v){return v===0}))}},{key:"setSectionIterator",value:function(f){this.sectionIterator=(0,i.default)({multiSection:f.multiSection,data:f.multiSection?this.sectionsLengths:f.items.length})}},{key:"setTheme",value:function(f){this.theme=(0,s.default)(f.theme)}},{key:"renderSections",value:function(){var f=this;if(this.allSectionsAreEmpty)return null;var v=this.theme,w=this.props,P=w.id,U=w.items,K=w.renderItem,J=w.renderItemData,te=w.renderSectionTitle,ae=w.highlightedSectionIndex,ce=w.highlightedItemIndex,me=w.itemProps;return U.map(function(_e,fe){var Re="react-autowhatever-".concat(P,"-"),Se="".concat(Re,"section-").concat(fe,"-"),be=fe===0;return t.default.createElement("div",v("".concat(Se,"container"),"sectionContainer",be&&"sectionContainerFirst"),t.default.createElement(o.default,{section:_e,renderSectionTitle:te,theme:v,sectionKeyPrefix:Se}),t.default.createElement(c.default,{items:f.sectionsItems[fe],itemProps:me,renderItem:K,renderItemData:J,sectionIndex:fe,highlightedItemIndex:ae===fe?ce:null,onHighlightedItemChange:f.onHighlightedItemChange,getItemId:f.getItemId,theme:v,keyPrefix:Re,ref:f.storeItemsListReference}))})}},{key:"renderItems",value:function(){var f=this.props.items;if(f.length===0)return null;var v=this.theme,w=this.props,P=w.id,U=w.renderItem,K=w.renderItemData,J=w.highlightedSectionIndex,te=w.highlightedItemIndex,ae=w.itemProps;return t.default.createElement(c.default,{items:f,itemProps:ae,renderItem:U,renderItemData:K,highlightedItemIndex:J===null?te:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:v,keyPrefix:"react-autowhatever-".concat(P,"-")})}},{key:"ensureHighlightedItemIsVisible",value:function(){var f=this.highlightedItem;if(f){var v=this.itemsContainer,w=f.offsetParent===v?f.offsetTop:f.offsetTop-v.offsetTop,P=v.scrollTop;w<P?P=w:w+f.offsetHeight>P+v.offsetHeight&&(P=w+f.offsetHeight-v.offsetHeight),P!==v.scrollTop&&(v.scrollTop=P)}}},{key:"render",value:function(){var f=this.theme,v=this.props,w=v.id,P=v.multiSection,U=v.renderInputComponent,K=v.renderItemsContainer,J=v.highlightedSectionIndex,te=v.highlightedItemIndex,ae=this.state.isInputFocused,ce=P?this.renderSections():this.renderItems(),me=ce!==null,_e=this.getItemId(J,te),fe="react-autowhatever-".concat(w),Re=T({role:"combobox","aria-haspopup":"listbox","aria-owns":fe,"aria-expanded":me},f("react-autowhatever-".concat(w,"-container"),"container",me&&"containerOpen"),{},this.props.containerProps),Se=U(T({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":fe,"aria-activedescendant":_e},f("react-autowhatever-".concat(w,"-input"),"input",me&&"inputOpen",ae&&"inputFocused"),{},this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),be=K({containerProps:T({id:fe,role:"listbox"},f("react-autowhatever-".concat(w,"-items-container"),"itemsContainer",me&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:ce});return t.default.createElement("div",Re,Se,be)}}]),h})(t.Component);e.default=m,C(m,"propTypes",{id:n.default.string,multiSection:n.default.bool,renderInputComponent:n.default.func,renderItemsContainer:n.default.func,items:n.default.array.isRequired,renderItem:n.default.func,renderItemData:n.default.object,renderSectionTitle:n.default.func,getSectionItems:n.default.func,containerProps:n.default.object,inputProps:n.default.object,itemProps:n.default.oneOfType([n.default.object,n.default.func]),highlightedSectionIndex:n.default.number,highlightedItemIndex:n.default.number,theme:n.default.oneOfType([n.default.object,n.default.array])}),C(m,"defaultProps",{id:"1",multiSection:!1,renderInputComponent:W,renderItemsContainer:E,renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:A,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:A,inputProps:A,itemProps:A,highlightedSectionIndex:null,highlightedItemIndex:null,theme:B})})(ln)),ln}var ze={},wr;function Os(){if(wr)return ze;wr=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.mapToAutowhateverTheme=ze.defaultTheme=void 0;var e={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"};ze.defaultTheme=e;var t=function(i){var s={};for(var o in i)switch(o){case"suggestionsContainer":s.itemsContainer=i[o];break;case"suggestionsContainerOpen":s.itemsContainerOpen=i[o];break;case"suggestion":s.item=i[o];break;case"suggestionFirst":s.itemFirst=i[o];break;case"suggestionHighlighted":s.itemHighlighted=i[o];break;case"suggestionsList":s.itemsList=i[o];break;default:s[o]=i[o]}return s};return ze.mapToAutowhateverTheme=t,ze}var Ir;function js(){return Ir||(Ir=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=x(St()),n=c(bt()),i=c(ys()),s=c(Cs()),o=Os();function c(m){return m&&m.__esModule?m:{default:m}}function p(){if(typeof WeakMap!="function")return null;var m=new WeakMap;return p=function(){return m},m}function x(m){if(m&&m.__esModule)return m;if(m===null||d(m)!=="object"&&typeof m!="function")return{default:m};var u=p();if(u&&u.has(m))return u.get(m);var g={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in m)if(Object.prototype.hasOwnProperty.call(m,a)){var f=h?Object.getOwnPropertyDescriptor(m,a):null;f&&(f.get||f.set)?Object.defineProperty(g,a,f):g[a]=m[a]}return g.default=m,u&&u.set(m,g),g}function d(m){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?d=function(g){return typeof g}:d=function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},d(m)}function j(m,u){var g=Object.keys(m);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(m);u&&(h=h.filter(function(a){return Object.getOwnPropertyDescriptor(m,a).enumerable})),g.push.apply(g,h)}return g}function T(m){for(var u=1;u<arguments.length;u++){var g=arguments[u]!=null?arguments[u]:{};u%2?j(Object(g),!0).forEach(function(h){R(m,h,g[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(g)):j(Object(g)).forEach(function(h){Object.defineProperty(m,h,Object.getOwnPropertyDescriptor(g,h))})}return m}function D(m,u){if(!(m instanceof u))throw new TypeError("Cannot call a class as a function")}function H(m,u){for(var g=0;g<u.length;g++){var h=u[g];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(m,h.key,h)}}function M(m,u,g){return u&&H(m.prototype,u),m}function q(m){return function(){var u=Z(m),g;if(Q()){var h=Z(this).constructor;g=Reflect.construct(u,arguments,h)}else g=u.apply(this,arguments);return z(this,g)}}function z(m,u){return u&&(d(u)==="object"||typeof u=="function")?u:L(m)}function L(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m}function Q(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Z(m){return Z=Object.setPrototypeOf?Object.getPrototypeOf:function(g){return g.__proto__||Object.getPrototypeOf(g)},Z(m)}function _(m,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(u&&u.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),u&&k(m,u)}function k(m,u){return k=Object.setPrototypeOf||function(h,a){return h.__proto__=a,h},k(m,u)}function R(m,u,g){return u in m?Object.defineProperty(m,u,{value:g,enumerable:!0,configurable:!0,writable:!0}):m[u]=g,m}var N=function(){return!0},S=function(u){return u.trim().length>0},l=function(u){var g=u.containerProps,h=u.children;return t.default.createElement("div",g,h)},y="suggestions-revealed",b="suggestions-updated",I="suggestion-selected",C="input-focused",A="input-changed",W="input-blurred",E="escape-pressed",B=(function(m){_(g,m);var u=q(g);function g(h){var a,f=h.alwaysRenderSuggestions;return D(this,g),a=u.call(this),R(L(a),"onDocumentMouseDown",function(v){a.justClickedOnSuggestionsContainer=!1;for(var w=v.detail&&v.detail.target||v.target;w!==null&&w!==document;){if(w.getAttribute&&w.getAttribute("data-suggestion-index")!==null)return;if(w===a.suggestionsContainer){a.justClickedOnSuggestionsContainer=!0;return}w=w.parentNode}}),R(L(a),"storeAutowhateverRef",function(v){v!==null&&(a.autowhatever=v)}),R(L(a),"onSuggestionMouseEnter",function(v,w){var P=w.sectionIndex,U=w.itemIndex;a.updateHighlightedSuggestion(P,U),v.target===a.pressedSuggestion&&(a.justSelectedSuggestion=!0),a.justMouseEntered=!0,setTimeout(function(){a.justMouseEntered=!1})}),R(L(a),"highlightFirstSuggestion",function(){a.updateHighlightedSuggestion(a.props.multiSection?0:null,0)}),R(L(a),"onDocumentMouseUp",function(){a.pressedSuggestion&&!a.justSelectedSuggestion&&a.input.focus(),a.pressedSuggestion=null}),R(L(a),"onSuggestionMouseDown",function(v){a.justSelectedSuggestion||(a.justSelectedSuggestion=!0,a.pressedSuggestion=v.target)}),R(L(a),"onSuggestionsClearRequested",function(){var v=a.props.onSuggestionsClearRequested;v&&v()}),R(L(a),"onSuggestionSelected",function(v,w){var P=a.props,U=P.alwaysRenderSuggestions,K=P.onSuggestionSelected,J=P.onSuggestionsFetchRequested;K&&K(v,w);var te=a.props.shouldKeepSuggestionsOnSelect(w.suggestion);U||te?J({value:w.suggestionValue,reason:I}):a.onSuggestionsClearRequested(),a.resetHighlightedSuggestion()}),R(L(a),"onSuggestionClick",function(v){var w=a.props,P=w.alwaysRenderSuggestions,U=w.focusInputOnSuggestionClick,K=a.getSuggestionIndices(a.findSuggestionElement(v.target)),J=K.sectionIndex,te=K.suggestionIndex,ae=a.getSuggestion(J,te),ce=a.props.getSuggestionValue(ae);a.maybeCallOnChange(v,ce,"click"),a.onSuggestionSelected(v,{suggestion:ae,suggestionValue:ce,suggestionIndex:te,sectionIndex:J,method:"click"});var me=a.props.shouldKeepSuggestionsOnSelect(ae);P||me||a.closeSuggestions(),U===!0?a.input.focus():a.onBlur(),setTimeout(function(){a.justSelectedSuggestion=!1})}),R(L(a),"onBlur",function(){var v=a.props,w=v.inputProps,P=v.shouldRenderSuggestions,U=w.value,K=w.onBlur,J=a.getHighlightedSuggestion(),te=P(U,W);a.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!te}),K&&K(a.blurEvent,{highlightedSuggestion:J})}),R(L(a),"onSuggestionMouseLeave",function(v){a.resetHighlightedSuggestion(!1),a.justSelectedSuggestion&&v.target===a.pressedSuggestion&&(a.justSelectedSuggestion=!1)}),R(L(a),"onSuggestionTouchStart",function(){a.justSelectedSuggestion=!0}),R(L(a),"onSuggestionTouchMove",function(){a.justSelectedSuggestion=!1,a.pressedSuggestion=null,a.input.focus()}),R(L(a),"itemProps",function(v){var w=v.sectionIndex,P=v.itemIndex;return{"data-section-index":w,"data-suggestion-index":P,onMouseEnter:a.onSuggestionMouseEnter,onMouseLeave:a.onSuggestionMouseLeave,onMouseDown:a.onSuggestionMouseDown,onTouchStart:a.onSuggestionTouchStart,onTouchMove:a.onSuggestionTouchMove,onClick:a.onSuggestionClick}}),R(L(a),"renderSuggestionsContainer",function(v){var w=v.containerProps,P=v.children,U=a.props.renderSuggestionsContainer;return U({containerProps:w,children:P,query:a.getQuery()})}),a.state={isFocused:!1,isCollapsed:!f,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},a.justPressedUpDown=!1,a.justMouseEntered=!1,a.pressedSuggestion=null,a}return M(g,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"UNSAFE_componentWillReceiveProps",value:function(a){var f=this.state.highlightedSuggestionIndex===0&&this.props.highlightFirstSuggestion&&!a.highlightFirstSuggestion;(0,i.default)(a.suggestions,this.props.suggestions)?a.highlightFirstSuggestion&&a.suggestions.length>0&&this.justPressedUpDown===!1&&this.justMouseEntered===!1?this.highlightFirstSuggestion():f&&this.resetHighlightedSuggestion():this.willRenderSuggestions(a,b)?(this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions(),f&&this.resetHighlightedSuggestion()):this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(a,f){var v=this.props,w=v.suggestions,P=v.onSuggestionHighlighted,U=v.highlightFirstSuggestion;if(!(0,i.default)(w,a.suggestions)&&w.length>0&&U){this.highlightFirstSuggestion();return}if(P){var K=this.getHighlightedSuggestion(),J=f.highlightedSuggestion;K!=J&&P({suggestion:K})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(a,f,v){var w=this;this.setState(function(P){var U=P.valueBeforeUpDown;return f===null?U=null:U===null&&typeof v<"u"&&(U=v),{highlightedSectionIndex:a,highlightedSuggestionIndex:f,highlightedSuggestion:f===null?null:w.getSuggestion(a,f),valueBeforeUpDown:U}})}},{key:"resetHighlightedSuggestion",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.setState(function(f){var v=f.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:a?null:v}})}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(a,f){var v=this.props,w=v.suggestions,P=v.multiSection,U=v.getSectionSuggestions;return P?U(w[a])[f]:w[f]}},{key:"getHighlightedSuggestion",value:function(){var a=this.state,f=a.highlightedSectionIndex,v=a.highlightedSuggestionIndex;return v===null?null:this.getSuggestion(f,v)}},{key:"getSuggestionValueByIndex",value:function(a,f){var v=this.props.getSuggestionValue;return v(this.getSuggestion(a,f))}},{key:"getSuggestionIndices",value:function(a){var f=a.getAttribute("data-section-index"),v=a.getAttribute("data-suggestion-index");return{sectionIndex:typeof f=="string"?parseInt(f,10):null,suggestionIndex:parseInt(v,10)}}},{key:"findSuggestionElement",value:function(a){var f=a;do{if(f.getAttribute&&f.getAttribute("data-suggestion-index")!==null)return f;f=f.parentNode}while(f!==null);throw console.error("Clicked element:",a),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(a,f,v){var w=this.props.inputProps,P=w.value,U=w.onChange;f!==P&&U(a,{newValue:f,method:v})}},{key:"willRenderSuggestions",value:function(a,f){var v=a.suggestions,w=a.inputProps,P=a.shouldRenderSuggestions,U=w.value;return v.length>0&&P(U,f)}},{key:"getQuery",value:function(){var a=this.props.inputProps,f=a.value,v=this.state.valueBeforeUpDown;return(v===null?f:v).trim()}},{key:"render",value:function(){var a=this,f=this.props,v=f.suggestions,w=f.renderInputComponent,P=f.onSuggestionsFetchRequested,U=f.renderSuggestion,K=f.inputProps,J=f.multiSection,te=f.renderSectionTitle,ae=f.id,ce=f.getSectionSuggestions,me=f.theme,_e=f.getSuggestionValue,fe=f.alwaysRenderSuggestions,Re=f.highlightFirstSuggestion,Se=f.containerProps,be=this.state,Qe=be.isFocused,Me=be.isCollapsed,wt=be.highlightedSectionIndex,It=be.highlightedSuggestionIndex,Ye=be.valueBeforeUpDown,O=fe?N:this.props.shouldRenderSuggestions,F=K.value,ne=K.onFocus,ue=K.onKeyDown,he=this.willRenderSuggestions(this.props,"render"),Ce=fe||Qe&&!Me&&he,Ae=Ce?v:[],lt=T({},K,{onFocus:function(ee){if(!a.justSelectedSuggestion&&!a.justClickedOnSuggestionsContainer){var xe=O(F,C);a.setState({isFocused:!0,isCollapsed:!xe}),ne&&ne(ee),xe&&P({value:F,reason:C})}},onBlur:function(ee){if(a.justClickedOnSuggestionsContainer){a.input.focus();return}a.blurEvent=ee,a.justSelectedSuggestion||(a.onBlur(),a.onSuggestionsClearRequested())},onChange:function(ee){var xe=ee.target.value,Pe=O(xe,A);a.maybeCallOnChange(ee,xe,"type"),a.suggestionsContainer&&(a.suggestionsContainer.scrollTop=0),a.setState(T({},Re?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!Pe})),Pe?P({value:xe,reason:A}):a.onSuggestionsClearRequested()},onKeyDown:function(ee,xe){var Pe=ee.keyCode;switch(Pe){case 40:case 38:if(Me)O(F,y)&&(P({value:F,reason:y}),a.revealSuggestions(),ee.preventDefault());else if(v.length>0){var Xe=xe.newHighlightedSectionIndex,He=xe.newHighlightedItemIndex,dt;He===null?dt=Ye===null?F:Ye:dt=a.getSuggestionValueByIndex(Xe,He),a.updateHighlightedSuggestion(Xe,He,F),a.maybeCallOnChange(ee,dt,Pe===40?"down":"up"),ee.preventDefault()}a.justPressedUpDown=!0,setTimeout(function(){a.justPressedUpDown=!1});break;case 13:{if(ee.keyCode===229)break;var Mt=a.getHighlightedSuggestion();if(Ce&&!fe&&a.closeSuggestions(),Mt!=null){ee.preventDefault();var Bn=_e(Mt);a.maybeCallOnChange(ee,Bn,"enter"),a.onSuggestionSelected(ee,{suggestion:Mt,suggestionValue:Bn,suggestionIndex:It,sectionIndex:wt,method:"enter"}),a.justSelectedSuggestion=!0,setTimeout(function(){a.justSelectedSuggestion=!1})}break}case 27:{Ce&&ee.preventDefault();var Hn=Ce&&!fe;if(Ye===null){if(!Hn){var Bt="";a.maybeCallOnChange(ee,Bt,"escape"),O(Bt,E)?P({value:Bt,reason:E}):a.onSuggestionsClearRequested()}}else a.maybeCallOnChange(ee,Ye,"escape");Hn?(a.onSuggestionsClearRequested(),a.closeSuggestions()):a.resetHighlightedSuggestion();break}}ue&&ue(ee)}}),ct={query:this.getQuery()};return t.default.createElement(s.default,{multiSection:J,items:Ae,renderInputComponent:w,renderItemsContainer:this.renderSuggestionsContainer,renderItem:U,renderItemData:ct,renderSectionTitle:te,getSectionItems:ce,highlightedSectionIndex:wt,highlightedItemIndex:It,containerProps:Se,inputProps:lt,itemProps:this.itemProps,theme:(0,o.mapToAutowhateverTheme)(me),id:ae,ref:this.storeAutowhateverRef})}}]),g})(t.Component);e.default=B,R(B,"propTypes",{suggestions:n.default.array.isRequired,onSuggestionsFetchRequested:function(u,g){var h=u[g];if(typeof h!="function")throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(u,g){var h=u[g];if(u.alwaysRenderSuggestions===!1&&typeof h!="function")throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},shouldKeepSuggestionsOnSelect:n.default.func,onSuggestionSelected:n.default.func,onSuggestionHighlighted:n.default.func,renderInputComponent:n.default.func,renderSuggestionsContainer:n.default.func,getSuggestionValue:n.default.func.isRequired,renderSuggestion:n.default.func.isRequired,inputProps:function(u,g){var h=u[g];if(!h)throw new Error("'inputProps' must be passed.");if(!Object.prototype.hasOwnProperty.call(h,"value"))throw new Error("'inputProps' must have 'value'.");if(!Object.prototype.hasOwnProperty.call(h,"onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:n.default.func,alwaysRenderSuggestions:n.default.bool,multiSection:n.default.bool,renderSectionTitle:function(u,g){var h=u[g];if(u.multiSection===!0&&typeof h!="function")throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(u,g){var h=u[g];if(u.multiSection===!0&&typeof h!="function")throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:n.default.bool,highlightFirstSuggestion:n.default.bool,theme:n.default.object,id:n.default.string,containerProps:n.default.object}),R(B,"defaultProps",{renderSuggestionsContainer:l,shouldRenderSuggestions:S,alwaysRenderSuggestions:!1,multiSection:!1,shouldKeepSuggestionsOnSelect:function(){return!1},focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:o.defaultTheme,id:"1",containerProps:{}})})(sn)),sn}var pn,_r;function Es(){return _r||(_r=1,pn=js().default),pn}var Rs=Es();const Ps=Dr(Rs),Ts="_inputWithoutHighlight_1gh2d_1",ks="_suggestionsContainerOpen_1gh2d_5",Ds="_sectionContainer_1gh2d_12",Fs="_suggestionHighlighted_1gh2d_15",As="_clearButton_1gh2d_18",$s="_inputWithLeftIcon_1gh2d_21",Ls="_inputWithRightIcon_1gh2d_24",Us="_inputWithTwoRightIcons_1gh2d_27",Ns="_iconContainer_1gh2d_30",qs="_leftIconContainer_1gh2d_35",Ms="_rightIconContainer_1gh2d_38",we={inputWithoutHighlight:Ts,suggestionsContainerOpen:ks,sectionContainer:Ds,suggestionHighlighted:Fs,clearButton:As,inputWithLeftIcon:$s,inputWithRightIcon:Ls,inputWithTwoRightIcons:Us,iconContainer:Ns,leftIconContainer:qs,rightIconContainer:Ms};function Bs(e,t,n,i,s){let o="form-control text-truncate";return n||(o+=` ${we.inputWithoutHighlight}`),e==="left"&&(o+=` ${we.inputWithLeftIcon}`),(e==="right"&&!t||e==="left"&&t||t)&&(o+=` ${we.inputWithRightIcon}`),e==="right"&&t&&(o+=` ${we.inputWithTwoRightIcons}`),s==="lg"&&(o+=" form-control-lg"),s==="sm"&&(o+=" form-control-sm"),i&&(o+=` ${i}`),o}function Cr(e){const t="d-inline-block svg-container";return Fe.isFunction(e)?t+" cursor-pointer":t}function Hs(e){const{onClickSearchIcon:t,searchIconPlacement:n,showClearInputIcon:i,onClickClearInput:s,highlightOnFocus:o,className:c,formSize:p,...x}=e,d=()=>r.jsx("div",{className:"d-inline-block",children:r.jsx(de,{svg:Ur,size:pt.Standard,onClick:t,className:Cr(t)})}),j=()=>r.jsx("button",{className:`d-inline-block text-secondary ${we.clearButton}`,onMouseUp:s,children:r.jsx(de,{svg:Ut,size:pt.Standard,className:Cr(s)})});return r.jsxs("div",{className:`position-relative ${we.inputContainer}`,children:[n==="left"&&r.jsx("div",{className:`${we.iconContainer} ${we.leftIconContainer}`,children:r.jsx(d,{})}),r.jsx("input",{className:Bs(n,i,o,c,p),...x}),(n==="right"||!!i)&&r.jsxs("div",{className:`${we.iconContainer} ${we.rightIconContainer}`,children:[!!i&&r.jsx(j,{}),n==="right"&&r.jsx(d,{})]})]})}function ot(e,t){return{recent:t,local:e,remote:[],generic:[]}}function Un(e,t){return $r.isObject(e)&&e.hasOwnProperty(t)&&Nr.isString(e[t])}function Nn(e,t,n,i){const s=e.trim().toLowerCase();return s.length<i?[]:t.filter(o=>!Un(o,n)||!Nr.isString(o[n])?!1:o[n].trim().toLowerCase().includes(s))}function Vs(e,t,n,i,s,o){const c=Fe.isFunction(e)&&e(t);if(c){if(o){Vn({resource:c,type:xn.POST,success:n,error:i,headers:s,data:o(t)});return}Vn({resource:c,type:xn.GET,success:n,error:i,headers:s})}}function rt(e,t){e({...ot([],[]),generic:[{type:t,generic:!0}]})}function Or(e,t,n){const i=Fe.isFunction(t.formatRemoteSuggestions)?t.formatRemoteSuggestions(e):e;if(!i.length&&t.getEmptyStateComponent){rt(n,"empty");return}n(s=>({...s,remote:i,generic:[]}))}function vn(e,t,n){return({value:i,reason:s})=>{var c;if((((c=e.allowableSuggestionFetchRequestedReasons)==null?void 0:c.includes(s))??!0)&&(i.length||n(),!(i.length<e.activationLength))){if(e.local){const p=Fe.isFunction(e.getLocalSuggestions)?e.getLocalSuggestions(i,e.local):Nn(i,e.local,e.valueKey,e.activationLength);if(!p.length&&e.getEmptyStateComponent){rt(t,"empty");return}t(x=>({...x,local:p,generic:[]}))}if(typeof e.handleFetchSuggestions=="function"){e.replacePreviousRemoteSuggestions?t(p=>({...ot([],[]),remote:p.remote})):rt(t,"loading"),e.handleFetchSuggestions(i,p=>Or(p,e,t),()=>rt(t,"errored"));return}e.getRemoteUrl&&(e.replacePreviousRemoteSuggestions?t(p=>({...ot([],[]),remote:p.remote})):rt(t,"loading"),Vs(e.getRemoteUrl,i,p=>Or(p,e,t),()=>{rt(t,"errored")},e.requestHeaders,e.getRemotePostBody))}}}function zs(e,t){return Un(t,e)?t[e]:""}function qn(e,t){return Un(t,e)?r.jsx(r.Fragment,{children:t[e]}):r.jsx(r.Fragment,{})}function Ws(e){function t(n){n.stopPropagation()}return r.jsx("div",{className:`d-flex justify-content-center cursor-default ${e??""}`,onClick:t,children:r.jsx(Dn,{as:"span",animation:"border",role:"status"})})}function Gs(e,t,n,i,s,o){const c=D=>{const H=e[D];return H?H.map(M=>({...M,suggestionType:D})):[]},p=c("recent"),x=c("local"),d=c("remote"),j=c("generic");if(j.length)return[{data:j,suggestionType:"generic"}];if(Fe.isFunction(i))return i([...x,...d,...p]);const T=[];return x!=null&&x.length&&T.push({title:t,data:Sn(x,yn("local",s)),suggestionType:"local"}),d!=null&&d.length&&T.push({title:t,data:Sn(d,yn("remote",s)),suggestionType:"remote"}),p!=null&&p.length&&T.push({title:n,data:Sn(p,yn("recent",s)),suggestionType:"recent"}),typeof o=="function"?o(T):T}function yn(e,t){return typeof t=="number"||typeof t=="boolean"?t:t[e]||!1}function Sn(e,t){return typeof t=="boolean"||e.length<=t?e:e.slice(0,t)}function Ks(e){return e.data}function Qs(e,t){if(e.title)return r.jsx("div",{className:`pb-1 ${t??""}`,children:r.jsx("strong",{children:e.title})})}function Ys(e){return{container:"position-relative",suggestionsContainerOpen:`bg-white py-1 border rounded ${we.suggestionsContainerOpen}`,suggestionsList:"list-unstyled m-0",suggestion:`${e?"":"cursor-pointer"} py-1 px-2`,suggestionHighlighted:e?"":we.suggestionHighlighted,sectionContainer:`border-bottom py-1 ${we.sectionContainer}`}}function Xs(e,t){const n=typeof e=="function"?e(t):e,i=Ys(t);return Object.assign(i,n)}function Zs(e,t,n,i,s){$.useEffect(()=>{!e||e.current||(e.current={resetQuery:t,setQuery:n,focusInput:i,blurInput:s})},[e==null?void 0:e.current])}function Js(e){const[t,n]=ci("lite:search:bar:focus",{focus:!1});return $.useEffect(()=>{!t.focus||!(e!=null&&e.current)||(e.current.focus(),n({focus:!1}))},[t.focus]),{focusSearchBar:()=>n({focus:!0}),shouldFocus:t.focus}}const jr="shared.searchBar",Te=Fe.isFunction;function eu(e){return e.renderAsForm?r.jsx("form",{onSubmit:e.onSubmit,children:e.children}):r.jsx("div",{className:"w-100",children:e.children})}Jr.defaultProps={valueKey:"name",activationLength:3,suggestionLimit:5,recentSearches:[],initialLocalSuggestions:[],searchIconPlacement:"right",renderAsForm:!0,onSuggestionDependencies:[],shouldUpdateQueryOnSelection:!0,focusInputOnSuggestionClick:!0,resetQueryOnEscape:!0};function Jr(e){const t=ot(e.initialLocalSuggestions,e.recentSearches),[n,i]=$.useState(e.initialQuery||""),[s,o]=$.useState(t),c=$.useMemo(()=>Gs(s,e.suggestionsHeading,e.recentSearchHeading||ie.getPhrase(jr,"recentSearchesHeading"),e.getSections,e.suggestionLimit,e.transformSections),[s]);$.useEffect(()=>{$r.isEqual(t,s)||n&&n.length>=(e==null?void 0:e.activationLength)||o(t)},[t]),$.useEffect(()=>{typeof e.onSuggestionUpdated=="function"&&e.onSuggestionUpdated(c)},[c]);const p=$.useRef(null),x=$.useRef(!1);Js(p);const[d,j]=$.useState(e.initialQuery||""),[T,D]=$.useState("none"),H=di(Di.XS);$.useEffect(()=>{!e.resetSuggestionsOnNoActivation||!n||n.length>=e.activationLength||M()},[n]),$.useEffect(()=>{if(n.length)return;const E=ot(e.initialLocalSuggestions,e.recentSearches);o(E)},[e.initialLocalSuggestions,e.recentSearches]),$.useEffect(()=>{const E=e.initialQuery||"";n!==E&&(i(E),j(E))},[e.initialQuery]),$.useEffect(()=>{!p.current||!e.autoFocusInput||p.current.focus()},[e.autoFocusInput]);const M=()=>{const E=ot(e.initialLocalSuggestions,e.recentSearches);o(E)},q=()=>{i(""),j("")},z=()=>{var E;(E=p.current)==null||E.focus()},L=()=>{var E;(E=p.current)==null||E.blur()};Zs(e.controlsRef,q,i,z,L);const Q=(E,{newValue:B,method:m})=>{m==="type"&&j(B),!(m==="escape"&&(D("none"),!(e!=null&&e.resetQueryOnEscape)))&&(["up","down"].includes(m)||(i(B),Te(e.onQueryChange)&&e.onQueryChange(B)))},Z=()=>{D("none")},_=E=>{E.preventDefault(),Te(e.onSubmit)&&e.onSubmit(n,p.current),e.clearQueryOnSelect&&q()},k=E=>{if(E.key==="Backspace"&&e.onBackspace&&!n){e.onBackspace();return}if(E.key==="ArrowUp"||E.key==="ArrowDown"){x.current=!0;return}},R=()=>{q(),e.resetSuggestionsOnClear&&M(),Te(e.onClickClearInput)&&e.onClickClearInput()},N=({suggestion:E})=>{if(T==="none"&&!E)return;x.current&&e.onArrowKeyUpOrDown&&(x.current=!1,e.onArrowKeyUpOrDown()),D(E?"suggestion":"custom")};function S(E){return Te(e.shouldUpdateQueryOnSelection)?e.shouldUpdateQueryOnSelection(E):e.shouldUpdateQueryOnSelection}const l=$.useMemo(()=>e.debounceTime?Fe.debounce(vn(e,o,M),e.debounceTime):vn(e,o,M),[e.debounceTime,...e.onSuggestionDependencies]);function y(E){return Te(e.renderSectionTitle)?e.renderSectionTitle(E,e.sectionTitleClassName):Qs(E,e.sectionTitleClassName)}function b(){return Te(e.renderSuggestionsOnInputFocus)?e.renderSuggestionsOnInputFocus(n):e.renderSuggestionsOnInputFocus}function I(){e.onBlur&&e.onBlur(n)}function C(){e.onFocus&&e.onFocus(n)}function A(E){E!==null&&!p.current&&(p.current=E.input)}function W(){return typeof e.alwaysRenderSuggestions=="boolean"?e.alwaysRenderSuggestions:e.alwaysRenderSuggestionsWhenFocused&&n.length>=e.activationLength?document.activeElement===p.current:!1}return r.jsx(eu,{onSubmit:_,renderAsForm:!!e.renderAsForm,children:r.jsx(Ps,{ref:A,suggestions:c,onSuggestionsFetchRequested:l,onSuggestionHighlighted:N,onSuggestionsClearRequested:()=>{W()||M()},onSuggestionSelected:(E,{suggestion:B})=>{B.generic||(e.clearQueryOnSelect&&q(),e.onSuggestionSelected(B,p.current,E))},getSuggestionValue:E=>S(E)?zs(e.valueKey,E):n,renderSuggestion:(E,B)=>{if(E.generic){if(E.type==="empty")return n.length>=e.activationLength&&Te(e.getEmptyStateComponent)?e.getEmptyStateComponent(n):r.jsx(r.Fragment,{});if(E.type==="errored"&&Te(e.getErrorStateComponent)){const m=vn(e,o,M),u=()=>m({value:n,reason:"input-changed"});return e.getErrorStateComponent(u)}if(E.type==="loading")return Ws(e.loadingComponentClassName)}return Te(e.getSuggestionComponent)?e.getSuggestionComponent(E,B):qn(e.valueKey,E)},renderSuggestionsContainer:E=>{const{ref:B,...m}=E.containerProps;if(!e.customScrollbarProps){const u={suggestions:s,query:n,isDropdownOpen:!!E.children};return r.jsxs("div",{ref:B,...m,onMouseOut:Z,children:[E.children,e.getCreateComponent&&e.getCreateComponent({userInput:d,isActive:T==="custom",resetQuery:q,resetSuggestions:M,...u}),e.getFooterComponent&&e.getFooterComponent(u)]})}return r.jsx(ki,{ref:B,...e.customScrollbarProps,...m,children:E.children})},alwaysRenderSuggestions:W(),focusInputOnSuggestionClick:!H&&e.focusInputOnSuggestionClick,inputProps:{id:e.id,name:e.id,"aria-errormessage":`${e.id}Error`,"aria-label":e.label,placeholder:e.placeholder||ie.getPhrase(jr,"placeholder"),value:n,onChange:Q,onKeyDown:k,autoFocus:!!e.autoFocusInput,highlightOnFocus:e.highlightInputOnFocus,onClickSearchIcon:!!e.submitOnClickSearchIcon&&_,searchIconPlacement:e.searchIconPlacement,showClearInputIcon:!!e.showClearInputIcon&&!!n.length,onClickClearInput:R,formSize:e.size,onBlur:I,onFocus:C,disabled:e.disabled},renderInputComponent:Hs,theme:Xs(e.theme,!!s.generic.length),multiSection:!0,renderSectionTitle:y,getSectionSuggestions:Ks,...e.renderSuggestionsOnInputFocus?{shouldRenderSuggestions:b}:{}})})}const tu=(e,t)=>{const[n,i]=se.useState(e);return se.useEffect(()=>{const s=setTimeout(()=>i(e),t);return()=>clearTimeout(s)},[e,t]),n},nu="_emptyState_1lwjl_1",ru={emptyState:nu},iu="shared.typeaheadEmptyState";function ou({query:e="",imageUrl:t}){function n(s){s.stopPropagation()}const i=tu(e,300);return r.jsxs("div",{className:"d-flex flex-column align-items-center text-center",onClick:n,children:[r.jsx("img",{alt:"",role:"presentation",src:t,className:`pb-2 ${ru.emptyState}`}),r.jsx("h2",{role:"status",className:"h6",children:r.jsx(le,{namespace:iu,phrase:"noResults",options:{query:i,smartCount:i.length}})})]})}const au="_emptyState_1lwjl_1",su={emptyState:au},Er="shared.typeaheadErrorState";function uu(e){function t(i){i.stopPropagation()}function n(i){i.stopPropagation(),e.onClickTryAgain()}return r.jsxs("div",{className:"d-flex flex-column align-items-center text-center",onClick:t,children:[r.jsx("img",{alt:"",role:"presentation",src:e.imageUrl,className:`pb-2 ${su.emptyState}`}),r.jsx("h2",{className:"h6",role:"alert",children:r.jsx(le,{namespace:Er,phrase:"error"})}),r.jsx(yt,{onClick:n,className:"btn btn-link info-link p-0",children:r.jsx(le,{namespace:Er,phrase:"tryAgain"})})]})}const lu="_container_sxosy_1",cu="_suggestionsContainerOpen_sxosy_11",du="_selectionContainer_sxosy_18",fu="_sectionContainer_sxosy_28",Rt={container:lu,suggestionsContainerOpen:cu,selectionContainer:du,sectionContainer:fu},gu="shared.tokenizedTypeahead";Mn.defaultProps={renderSuggestionsOnInputFocus:!0};function Mn(e){var t;return r.jsxs("div",{className:`form-control h-auto d-flex align-items-top position-relative ${e.hideIcon?"":"py-1 px-0"} ${e.className}`,children:[!e.hideIcon&&r.jsx(de,{className:"svg-container m-1",svg:Ur}),r.jsxs("div",{className:`${Rt.selectionContainer} d-flex flex-wrap align-items-center mt-n1`,children:[e.selections.map(n=>e.getInputTokenComponent?e.getInputTokenComponent(n):r.jsx(Ba,{selection:n,onClickRemove:e.removeSelection,onClickExpand:e.fetchSelectionMembers,hasStudentExperience:e.hasStudentExperience},n.id)),r.jsx(Jr,{...e,onBackspace:()=>{e.selections.length&&e.removeSelection(Fn.last(e.selections))},recentSearchHeading:e.recentSearchHeading||ie.getPhrase(gu,"recentSearchHeading"),placeholder:(t=e.selections)!=null&&t.length?" ":e.placeholder,searchIconPlacement:!1,clearQueryOnSelect:!0,getSuggestionComponent:n=>e.getSuggestionComponent?e.getSuggestionComponent(n):r.jsx(vs,{entity:n,imageCdnUrl:e.imageCdnUrl,showDisplayName:e.hasStudentExperience}),getEmptyStateComponent:n=>{if(e.getEmptyStateComponent)return e.getEmptyStateComponent(n);e.emptyStateImageUrl&&e.emptyStateImageUrl},getErrorStateComponent:n=>r.jsx(uu,{imageUrl:e.errorStateImageUrl,onClickTryAgain:n}),theme:{container:Rt.container,suggestionsContainerOpen:`bg-white py-1 rounded border mt-1 ${Rt.suggestionsContainerOpen}`,sectionContainer:`border-bottom py-1 ${Rt.sectionContainer}`},sectionTitleClassName:"ps-2",renderSuggestionsOnInputFocus:e.renderSuggestionsOnInputFocus,onSuggestionDependencies:[e.selections]})]}),!!e.sharePermissionsDescription&&r.jsx("span",{className:"px-2 text-secondary text-nowrap",children:e.sharePermissionsDescription})]})}const ei="shared.feedbackRequestLivestream",Le=ie.encloseNamespace(ei),mu={topic:"",studentLevel:[],producerCompany:"",additionalInfo:""},Rr=ye.string().max(Nt,ke("maxCharactersError")),hu=ye.object().shape({producerCompany:Rr.required(()=>Le("companyError")),topic:Rr,studentLevel:ye.array(ye.string()),additionalInfo:De()}).noUnknown();function pu(e){const t=qe(),n=t.values.studentLevel.map(o=>e.audiences.find(c=>c.name===o))||[];function i(o){t.setFieldValue("studentLevel",Fn.addOrRemoveImmutable(t.values.studentLevel,o.name)),requestAnimationFrame(()=>t.setFieldTouched("studentLevel"))}function s(o,c){const p=c.find(d=>d.name===o);return Nn(p?"":o,c,"name",0).filter(d=>!(n.find(j=>j.name===d.name)||d.name===(p==null?void 0:p.name)))}return r.jsxs(r.Fragment,{children:[r.jsx(oe,{placeholder:Le("companyPlaceholder"),label:Le("companyLabel"),name:"producerCompany",value:t.values.producerCompany,showRequiredStar:!0}),r.jsx(oe,{placeholder:Le("topicPlaceholder"),label:Le("topicLabel"),name:"topic",value:t.values.topic}),r.jsxs("div",{className:"form-group",children:[r.jsx("label",{className:"form-label",children:r.jsx(le,{namespace:ei,phrase:"audiencesLabel"})}),r.jsx(Mn,{id:"audiences",placeholder:Le("audiencesPlaceholder"),local:e.audiences,valueKey:"name",selections:n,onSuggestionSelected:i,removeSelection:o=>i(o),errorStateImageUrl:null,emptyStateImageUrl:null,activationLength:0,suggestionLimit:!1,getInputTokenComponent:o=>r.jsx(Lt,{selection:{name:o.name,masterId:o.masterId},colourVariant:"teal",onClickRemove:c=>i(c),hideExpander:!0},o.name),getSuggestionComponent:o=>qn("name",o),onSuggestionDependencies:[e.audiences,t.values.studentLevel,n],getLocalSuggestions:s,focusInputOnSuggestionClick:!1,renderAsForm:!1,hideIcon:!0,onBlur:()=>t.setFieldTouched("studentLevel"),className:`p-2 ${t.touched.studentLevel&&t.errors.studentLevel?"is-invalid":""}`}),t.touched.studentLevel&&t.errors.studentLevel&&r.jsx(An,{name:"audiences",children:t.errors.studentLevel})]}),r.jsx(oe,{as:"textarea",placeholder:Le("otherPlaceholder"),label:Le("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})]})}function vu(e){return r.jsx(Ke,{...e,initialValues:{...mu,...e.initialValues},validationSchema:hu,children:r.jsx(pu,{audiences:e.audiences})})}const yu="_image_1d4la_1",Su={image:yu},mt="shared.feedbackBeforeRequesting",bn=ie.encloseNamespace(mt);function bu(e){const[t,n]=se.useState(!1);return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"d-flex flex-column align-items-center my-4",children:[r.jsx("img",{className:`${Su.image} mb-3`,src:at.videoAlert}),r.jsx("h4",{className:"mb-3",children:r.jsx(le,{namespace:mt,phrase:"beforeRequesting"})}),r.jsx("p",{children:r.jsx(le,{namespace:mt,phrase:"haveYouSearched",options:{exchangeUrl:`${e.exchangeTvUrl}/exchange`}})}),e.instanceRegion===ft.UK?r.jsx("p",{children:r.jsx(le,{namespace:mt,phrase:"bbcArchiveRequestsNote",options:{exchangeTvUrl:`${e.exchangeTvUrl}/tv?requestVideo=true`}})}):r.jsx("p",{children:r.jsx(le,{namespace:mt,phrase:"foxtelRequestsNote",options:{exchangeTvUrl:`${e.exchangeTvUrl}/tv?requestVideo=true`}})})]}),r.jsxs(Ne,{children:[r.jsx(Ne.Checkbox,{id:"confirmExchange",checked:t,onToggle:()=>n(!t),label:bn("exchangeCheck")}),r.jsx(Ne.Cancel,{onClick:()=>e.setSelectedOption(null),text:bn("back")}),r.jsx(Ne.Submit,{variant:"dark",text:bn("continue"),disabled:!t,onClick:()=>e.setConfirmed(!0)})]})]})}const ti="shared.feedbackRequestVideo",G=ie.encloseNamespace(ti),xu={videoRequestType:"",topic:"",studentLevel:[],videoTitle:"",seriesName:"",producerCompany:"",websiteOrTrailer:"",additionalInfo:"",youtubeChannelLink:"",youtubeVideoLink:""},pe=()=>ye.string().max(Nt,ke("maxCharactersError")),wu=ye.object().shape({videoRequestType:ye.string().required(G("videoRequestTypeRequiredError")),topic:pe().when("videoRequestType",{is:e=>e==="videosTopic",then:pe().required(G("topicRequiredError")),otherwise:pe().notRequired()}),studentLevel:ye.array(ye.string()),videoTitle:pe().when(["videoRequestType","seriesName"],{is:(e,t)=>e==="videoOrSeries"&&!t,then:pe().required(G("videoRequiredError")),otherwise:pe().notRequired()}),seriesName:pe(),producerCompany:pe(),websiteOrTrailer:pe(),additionalInfo:De(),youtubeChannelLink:pe().when("videoRequestType",{is:e=>e==="youtubeVideo",then:pe().required(G("youtubeChannelLinkRequiredError")).url(G("invalidUrlError")),otherwise:pe().notRequired()}),youtubeVideoLink:pe().when("videoRequestType",{is:e=>e==="youtubeVideo",then:pe().required(G("youtubeVideoLinkRequiredError")).url(G("invalidUrlError")),otherwise:pe().notRequired()})}).noUnknown();function Iu(e){const t=qe(),n=t.values.studentLevel.map(o=>{var c;return(c=e.audiences)==null?void 0:c.find(p=>p.name===o)})||[];function i(o){t.setFieldValue("studentLevel",Fn.addOrRemoveImmutable(t.values.studentLevel,o.name)),requestAnimationFrame(()=>t.setFieldTouched("studentLevel"))}function s(o,c){const p=c.find(d=>d.name===o);return Nn(p?"":o,c,"name",0).filter(d=>!(n.find(j=>j.name===d.name)||d.name===(p==null?void 0:p.name)))}return r.jsxs(r.Fragment,{children:[r.jsxs(oe,{as:"select",label:G("videoRequestTypeLabel"),name:"videoRequestType",value:t.values.videoRequestType,children:[r.jsx("option",{value:"",disabled:!0,hidden:!0,children:G("videoRequestTypePlaceholder")}),r.jsx("option",{value:"videosTopic",children:G("videosTopicType")}),r.jsx("option",{value:"videoOrSeries",children:G("videoOrSeriesType")}),r.jsx("option",{value:"youtubeVideo",children:G("youtubeVideoType")})]}),t.values.videoRequestType==="youtubeVideo"&&r.jsxs(r.Fragment,{children:[r.jsx(oe,{placeholder:G("youtubeChannelLinkPlaceholder"),label:G("youtubeChannelLinkLabel"),name:"youtubeChannelLink",value:t.values.youtubeChannelLink,showRequiredStar:!0}),r.jsx(oe,{placeholder:G("youtubeVideoLinkPlaceholder"),label:G("youtubeVideoLinkLabel"),name:"youtubeVideoLink",value:t.values.youtubeVideoLink,showRequiredStar:!0}),r.jsx(oe,{as:"textarea",placeholder:G("otherPlaceholder"),label:G("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})]}),t.values.videoRequestType==="videosTopic"&&r.jsxs(r.Fragment,{children:[r.jsx(oe,{placeholder:G("videoTopicPlaceholder"),label:G("videoTopicLabel"),name:"topic",value:t.values.topic,showRequiredStar:!0}),r.jsxs("div",{className:"form-group",children:[r.jsx("label",{className:"form-label",children:r.jsx(le,{namespace:ti,phrase:"audiencesLabel"})}),r.jsx(Mn,{id:"audiences",placeholder:G("audiencesPlaceholder"),local:e.audiences,valueKey:"name",selections:n,onSuggestionSelected:i,removeSelection:o=>i(o),errorStateImageUrl:null,emptyStateImageUrl:null,activationLength:0,suggestionLimit:!1,getInputTokenComponent:o=>r.jsx(Lt,{selection:{name:o.name,masterId:o.masterId},colourVariant:"teal",onClickRemove:c=>i(c),hideExpander:!0},o.name),getSuggestionComponent:o=>qn("name",o),onSuggestionDependencies:[e.audiences,t.values.studentLevel,n],getLocalSuggestions:s,focusInputOnSuggestionClick:!1,renderAsForm:!1,hideIcon:!0,onBlur:()=>t.setFieldTouched("studentLevel"),className:`p-2 ${t.touched.studentLevel&&t.errors.studentLevel?"is-invalid":""}`}),t.touched.studentLevel&&t.errors.studentLevel&&r.jsx(An,{name:"audiences",children:t.errors.studentLevel})]}),r.jsx(oe,{as:"textarea",placeholder:G("otherPlaceholder"),label:G("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})]}),t.values.videoRequestType==="videoOrSeries"&&r.jsxs(r.Fragment,{children:[r.jsx(oe,{placeholder:G("videoTitlePlaceholder"),label:G("videoTitleLabel"),name:"videoTitle",value:t.values.videoTitle}),r.jsx(oe,{placeholder:G("seriesPlaceholder"),label:G("seriesLabel"),name:"seriesName",value:t.values.seriesName}),r.jsx(oe,{placeholder:G("companyPlaceholder"),label:G("companyLabel"),name:"producerCompany",value:t.values.producerCompany}),r.jsx(oe,{placeholder:G("videoTopicPlaceholder"),label:G("topicLabel"),name:"topic",value:t.values.topic}),r.jsx(oe,{placeholder:G("websiteOrTrailerPlaceholder"),label:G("websiteOrTrailerLabel"),name:"websiteOrTrailer",value:t.values.websiteOrTrailer}),r.jsx(oe,{as:"textarea",placeholder:G("otherPlaceholder"),label:G("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})]})]})}function _u(e){const[t,n]=se.useState(!!e.skipBeforeRequesting),i=e.hasExchangeTvProduct&&!t;return r.jsxs(Ke,{...e,initialValues:{...xu,...e.initialValues},validationSchema:wu,hideButtons:e.hasExchangeTvProduct&&!t,hideCancelButton:e.skipBeforeRequesting,children:[i&&r.jsx(bu,{setConfirmed:n,setSelectedOption:e.setSelectedOption,exchangeTvUrl:e.exchangeTvUrl,instanceRegion:e.instanceRegion}),!i&&r.jsx(Iu,{audiences:e.audiences})]})}const Tn="shared.feedbackSuggestImprovement",it=ie.encloseNamespace(Tn),Cu={suggestion:"",importance:""},Ou=ye.object().shape({suggestion:De().required(ke("requiredError")),importance:De()}).noUnknown();function ju(e){const t=qe();return r.jsxs(r.Fragment,{children:[r.jsx(oe,{as:"textarea",placeholder:it("suggestionPlaceholder"),label:it("suggestionLabel"),name:"suggestion",value:t.values.suggestion,showRequiredStar:!0}),r.jsx(oe,{as:"textarea",placeholder:it("whySuggestionPlaceholder"),label:it("whySuggestionLabel"),name:"importance",rows:5,value:t.values.importance}),r.jsxs("p",{children:[r.jsx(le,{namespace:Tn,phrase:"contactSupport"})," ",r.jsx("button",{className:"btn btn-link text-underline p-0",onClick:()=>e.setSelectedOption(V.RAISE_ISSUE),children:r.jsx(le,{namespace:Tn,phrase:"raiseIssue"})})]})]})}function Eu(e){return r.jsx(Ke,{...e,initialValues:{...Cu,...e.initialValues},validationSchema:Ou,successImageUrl:at.lightBulb,successHeading:it("successHeading"),successDescription:it("successDescription"),children:r.jsx(ju,{setSelectedOption:e.setSelectedOption})})}function Ke(e){const t=se.useRef(null);function n(i){e.setFormState(s=>{var o;return{...s,...(o=t.current)==null?void 0:o.values}}),e.setSelectedOption(i)}return r.jsx(ji,{onSubmit:e.onSubmit,initialValues:e.initialValues,validationSchema:e.validationSchema,validateOnMount:!0,innerRef:t,children:r.jsxs(fi,{children:[e.formStage==="form"&&e.children,r.jsx(Zi,{formStage:e.formStage,successImageUrl:e.successImageUrl,successHeading:e.successHeading,successDescription:e.successDescription}),!e.hideButtons&&r.jsx(Ki,{setSelectedOption:n,submitText:e.submitText,formStage:e.formStage,closePopup:e.closePopup,hideCancelButton:e.hideCancelButton})]})})}function Ru(e){const t={formStage:e.formStage,initialValues:e.initialValues,setFormState:e.setFormState,onSubmit:e.onSubmit,setSelectedOption:e.setSelectedOption,closePopup:e.closePopup};switch(e.selectedOption){case V.SUGGEST_IMPROVEMENT:return r.jsx(Eu,{...t});case V.REPORT_BUG:return r.jsx(Ca,{...t,onFilesAdded:e.onFilesAdded,cancelUpload:e.cancelUpload,uploadingFiles:e.uploadingFiles,uploadedFiles:e.uploadedFiles,deleteFile:e.deleteFile,uploadError:e.uploadError,instanceRegion:e.instanceRegion});case V.REQUEST_VIDEO:return r.jsx(_u,{...t,audiences:e.audiences,hasExchangeTvProduct:e.hasExchangeTvProduct,exchangeTvUrl:e.exchangeTvUrl,instanceRegion:e.instanceRegion,skipBeforeRequesting:e.skipBeforeRequesting,hideCancelButton:e.hideCancelButton});case V.REQUEST_LIVESTREAM:return r.jsx(vu,{...t,audiences:e.audiences});case V.RAISE_ISSUE:return r.jsx(ho,{...t});case V.GIVE_PRAISE:return r.jsx(io,{...t});case V.OTHER:return r.jsx(lo,{...t})}}const ni="shared.giveFeedback",et=ie.encloseNamespace(ni),Pr=5,Tr=60,Pu=1e6;function Gu(e){var E,B;const t=Ii(),n=gi(),i=Je(zn.currentUser()),s=Je(i.data&&mi.customer(i.data.customerId)),o=Je(i.data&&zn.user(i.data.id)),[c,p]=se.useState(e.selectedOption),[x,d]=se.useState("form"),[j,T]=se.useState(null),D=_i(xi.MixedMediaUpload),H=Li(()=>D.getCollection()),M=se.useRef(null),q=se.useRef(0),z=se.useRef([]),[L,Q]=se.useState([]),[Z,_]=se.useState(""),k=e.product===Vt.StreamableLearning?Ie.StreamableLearning:Ie.Subject,R=Je(Ai.presentation(k)),N=Je(Fi.presentationAudiences(null,k)),l=(E=Je(Si.userProducts()).data)==null?void 0:E.find(m=>m.id===Vt.Exchange);hi(pi.Radio.channel(vi.MIXED_MEDIA_UPLOAD),wi.UPLOAD_COMPLETE,b),qi();function y(m,u){if(m.some(g=>g.size>Tr*Pu)){_(et("maxFileSizeUploadError",{limit:Tr}));return}if(m.length>Pr-H.length){_(et("maxFilesUploadError",{limit:Pr}));return}if(m.some(g=>!kr.isValidFile(g,kn.MIXED_MEDIA))){_(et("invalidTypeUploadError"));return}_(""),q.current+=m.length,u&&(M.current=u),D.addFiles(m)}function b(m){const u=m.toJSON();if(z.current.push(u),q.current--,q.current>0)return;let g=z.current.length;z.current.forEach(h=>{setTimeout(()=>{g--;const a=D.getCollection().filter(f=>{var v;return((v=f.get("fileInfo"))==null?void 0:v.id)===h.fileInfo.id});D.getCollection().remove(a),Q(f=>[...f,...a]),!(g>0)&&(_t.logUserAction({fileInfo:h.fileInfo},{location:zt.GiveFeedbackPopup,actionType:Gt.Upload,entity:Wt.MixedMedia,descriptor:_t.mapInteractionType(M.current)}),t.success(et("mixedMediaUploadSuccess")))})}),z.current=[]}function I(m){Q(u=>u.filter(g=>g.id!==m))}function C(m){p(m),m&&_t.logUserAction({type:m},{actionType:Gt.Click,entity:Wt.Feedback,location:zt.GiveFeedbackPopup,workflowPhase:Wn.Start})}function A(m){switch(m){case V.SUGGEST_IMPROVEMENT:return $e.SuggestImprovement;case V.REPORT_BUG:return $e.ReportBug;case V.REQUEST_VIDEO:return $e.RequestVideo;case V.REQUEST_LIVESTREAM:return $e.RequestLivestream;case V.GIVE_PRAISE:return $e.GivePraise;case V.RAISE_ISSUE:return $e.RaiseIssue;case V.OTHER:return $e.Other}}async function W(m,u){var a,f,v,w,P,U;const g={type:A(c),user:Pt.getUserInfo(i.data,s.data),tags:Pt.getTags(i.data,e.product,!1,["give feedback",kt(c).toLowerCase(),(f=(a=R.data)==null?void 0:a.description)==null?void 0:f.toLowerCase().trim(),(U=(P=(w=(v=o.data)==null?void 0:v.userProfile)==null?void 0:w.metadata)==null?void 0:P.jobTitle)==null?void 0:U.toLowerCase()].filter(Boolean))};let h={...m,currentPageUrl:bi.GetCurrentUrl()};c===V.REPORT_BUG&&L.length&&(h={...h,...Pt.categorizeFiles(L)});try{await n($i.submitFeedback(g,h)),_t.logUserAction({...g,...h},{actionType:Gt.Submit,entity:Wt.Feedback,location:zt.GiveFeedbackPopup,workflowPhase:Wn.Complete}),d("success")}catch{t.error(et("error"))}finally{u()}}return r.jsxs(yi,{size:"lg",title:c?kt(c):et("title"),closePopup:e.closePopup,backdrop:"static",children:[!c&&r.jsx("p",{children:r.jsx(le,{namespace:ni,phrase:"description"})}),!c&&r.jsx(Wi,{onSelectOption:C,options:[V.SUGGEST_IMPROVEMENT,V.REPORT_BUG,e.product===Vt.StreamableLearning?V.REQUEST_LIVESTREAM:V.REQUEST_VIDEO,V.GIVE_PRAISE,V.RAISE_ISSUE,V.OTHER]}),c&&r.jsx(Ru,{selectedOption:c,formStage:x,onSubmit:W,setSelectedOption:C,closePopup:e.closePopup,onFilesAdded:y,uploadingFiles:H,uploadedFiles:L,deleteFile:I,cancelUpload:m=>D.cancelUpload(m),audiences:N.data,uploadError:Z,initialValues:j,setFormState:T,instanceRegion:(B=i.data)==null?void 0:B.instanceRegion,hasExchangeTvProduct:!!l,exchangeTvUrl:l==null?void 0:l.url,skipBeforeRequesting:!!e.skipBeforeRequestingVideoStep,hideCancelButton:!!e.selectedOption})]})}export{Gu as GiveFeedbackView};
8
- //# sourceMappingURL=VtD9jrXA.chunk.js.map
8
+ //# sourceMappingURL=CYXKgmT6.chunk.js.map