@clickview/exchange 0.56.0-rc.1 → 0.56.0

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 (191) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/en.json +1 -1
  3. package/dist/scripts/{Cy191NLr.chunk.js → -hO5xjbU.chunk.js} +2 -2
  4. package/dist/scripts/{Cy191NLr.chunk.js.map → -hO5xjbU.chunk.js.map} +1 -1
  5. package/dist/scripts/0mGPhW9k.chunk.js +2 -0
  6. package/dist/scripts/{C6x-ZqLl.chunk.js.map → 0mGPhW9k.chunk.js.map} +1 -1
  7. package/dist/scripts/{wlWC_CCa.chunk.js → 4sHzAWaU.chunk.js} +2 -2
  8. package/dist/scripts/{wlWC_CCa.chunk.js.map → 4sHzAWaU.chunk.js.map} +1 -1
  9. package/dist/scripts/{J651bFfk.chunk.js → 9gPNCjBk.chunk.js} +2 -2
  10. package/dist/scripts/{J651bFfk.chunk.js.map → 9gPNCjBk.chunk.js.map} +1 -1
  11. package/dist/scripts/{CinRjwth.chunk.js → 9xHo2Cwe.chunk.js} +2 -2
  12. package/dist/scripts/{CinRjwth.chunk.js.map → 9xHo2Cwe.chunk.js.map} +1 -1
  13. package/dist/scripts/{CbOOCRVJ.chunk.js → B0OGvFw2.chunk.js} +2 -2
  14. package/dist/scripts/{CbOOCRVJ.chunk.js.map → B0OGvFw2.chunk.js.map} +1 -1
  15. package/dist/scripts/{ButpMiJ1.chunk.js → B1tVxL6y.chunk.js} +2 -2
  16. package/dist/scripts/{ButpMiJ1.chunk.js.map → B1tVxL6y.chunk.js.map} +1 -1
  17. package/dist/scripts/{DVisFoDC.chunk.js → B2pkApo6.chunk.js} +2 -2
  18. package/dist/scripts/{DVisFoDC.chunk.js.map → B2pkApo6.chunk.js.map} +1 -1
  19. package/dist/scripts/{Y5a0i_3c.chunk.js → B57_c_CS.chunk.js} +2 -2
  20. package/dist/scripts/{Y5a0i_3c.chunk.js.map → B57_c_CS.chunk.js.map} +1 -1
  21. package/dist/scripts/{DFNZXjHy.chunk.js → B67qUxbj.chunk.js} +2 -2
  22. package/dist/scripts/{DFNZXjHy.chunk.js.map → B67qUxbj.chunk.js.map} +1 -1
  23. package/dist/scripts/{CX1XQ05a.chunk.js → B86gu8do.chunk.js} +2 -2
  24. package/dist/scripts/{CX1XQ05a.chunk.js.map → B86gu8do.chunk.js.map} +1 -1
  25. package/dist/scripts/{DdJUaS75.chunk.js → B9Zy84TP.chunk.js} +2 -2
  26. package/dist/scripts/{DdJUaS75.chunk.js.map → B9Zy84TP.chunk.js.map} +1 -1
  27. package/dist/scripts/{BSIHfhEC.chunk.js → BDLmm9HB.chunk.js} +2 -2
  28. package/dist/scripts/{BSIHfhEC.chunk.js.map → BDLmm9HB.chunk.js.map} +1 -1
  29. package/dist/scripts/BDys2rrG.chunk.js +2 -0
  30. package/dist/scripts/{BlQxOSJi.chunk.js.map → BDys2rrG.chunk.js.map} +1 -1
  31. package/dist/scripts/{SI_6LGjL.chunk.js → BJG50MLZ.chunk.js} +2 -2
  32. package/dist/scripts/{SI_6LGjL.chunk.js.map → BJG50MLZ.chunk.js.map} +1 -1
  33. package/dist/scripts/{Duy0OOKL.chunk.js → BQEr0IGt.chunk.js} +2 -2
  34. package/dist/scripts/{Duy0OOKL.chunk.js.map → BQEr0IGt.chunk.js.map} +1 -1
  35. package/dist/scripts/{Co6EjRu3.chunk.js → BRCI_rEH.chunk.js} +2 -2
  36. package/dist/scripts/{Co6EjRu3.chunk.js.map → BRCI_rEH.chunk.js.map} +1 -1
  37. package/dist/scripts/{BpW5Hw5z.chunk.js → BUlwG-06.chunk.js} +2 -2
  38. package/dist/scripts/{BpW5Hw5z.chunk.js.map → BUlwG-06.chunk.js.map} +1 -1
  39. package/dist/scripts/{DCGOcoWo.chunk.js → BZnDGuzQ.chunk.js} +2 -2
  40. package/dist/scripts/{DCGOcoWo.chunk.js.map → BZnDGuzQ.chunk.js.map} +1 -1
  41. package/dist/scripts/{B-PNdHqp.chunk.js → Bf33xjOw.chunk.js} +2 -2
  42. package/dist/scripts/{B-PNdHqp.chunk.js.map → Bf33xjOw.chunk.js.map} +1 -1
  43. package/dist/scripts/{BtTTlrnZ.chunk.js → Bj3FQ5Ya.chunk.js} +2 -2
  44. package/dist/scripts/{BtTTlrnZ.chunk.js.map → Bj3FQ5Ya.chunk.js.map} +1 -1
  45. package/dist/scripts/{DUmKCSoR.chunk.js → Bn31qbi-.chunk.js} +2 -2
  46. package/dist/scripts/{DUmKCSoR.chunk.js.map → Bn31qbi-.chunk.js.map} +1 -1
  47. package/dist/scripts/{BDoSZnIa.chunk.js → BolzEYoc.chunk.js} +2 -2
  48. package/dist/scripts/{BDoSZnIa.chunk.js.map → BolzEYoc.chunk.js.map} +1 -1
  49. package/dist/scripts/{CYrSeREi.chunk.js → BoyiBqIK.chunk.js} +2 -2
  50. package/dist/scripts/{CYrSeREi.chunk.js.map → BoyiBqIK.chunk.js.map} +1 -1
  51. package/dist/scripts/{BC8oIL4t.chunk.js → BrWxbCy6.chunk.js} +2 -2
  52. package/dist/scripts/{BC8oIL4t.chunk.js.map → BrWxbCy6.chunk.js.map} +1 -1
  53. package/dist/scripts/{B2zOyhnx.chunk.js → BsN5hGdn.chunk.js} +2 -2
  54. package/dist/scripts/{B2zOyhnx.chunk.js.map → BsN5hGdn.chunk.js.map} +1 -1
  55. package/dist/scripts/{CzBvFLUu.chunk.js → BswE1yhG.chunk.js} +2 -2
  56. package/dist/scripts/{CzBvFLUu.chunk.js.map → BswE1yhG.chunk.js.map} +1 -1
  57. package/dist/scripts/{CFa8QduK.chunk.js → Bt6iO6Kj.chunk.js} +2 -2
  58. package/dist/scripts/{CFa8QduK.chunk.js.map → Bt6iO6Kj.chunk.js.map} +1 -1
  59. package/dist/scripts/{Y2CHWdPG.chunk.js → BvfTundg.chunk.js} +2 -2
  60. package/dist/scripts/{Y2CHWdPG.chunk.js.map → BvfTundg.chunk.js.map} +1 -1
  61. package/dist/scripts/{CmWKgt7c.chunk.js → BzaGFUjc.chunk.js} +2 -2
  62. package/dist/scripts/{CmWKgt7c.chunk.js.map → BzaGFUjc.chunk.js.map} +1 -1
  63. package/dist/scripts/{CsaYiq-6.chunk.js → C0CSgPvj.chunk.js} +2 -2
  64. package/dist/scripts/{CsaYiq-6.chunk.js.map → C0CSgPvj.chunk.js.map} +1 -1
  65. package/dist/scripts/{Dn7S7HZe.chunk.js → C37FAa5c.chunk.js} +2 -2
  66. package/dist/scripts/{Dn7S7HZe.chunk.js.map → C37FAa5c.chunk.js.map} +1 -1
  67. package/dist/scripts/{CG6eaNuu.chunk.js → C3oO96po.chunk.js} +2 -2
  68. package/dist/scripts/{CG6eaNuu.chunk.js.map → C3oO96po.chunk.js.map} +1 -1
  69. package/dist/scripts/{C6BGhDq3.chunk.js → C4F_pZyv.chunk.js} +2 -2
  70. package/dist/scripts/{C6BGhDq3.chunk.js.map → C4F_pZyv.chunk.js.map} +1 -1
  71. package/dist/scripts/{By50Y4fi.chunk.js → C4ROYls7.chunk.js} +2 -2
  72. package/dist/scripts/{By50Y4fi.chunk.js.map → C4ROYls7.chunk.js.map} +1 -1
  73. package/dist/scripts/{DjeFO5jj.chunk.js → C5UlFqqr.chunk.js} +2 -2
  74. package/dist/scripts/{DjeFO5jj.chunk.js.map → C5UlFqqr.chunk.js.map} +1 -1
  75. package/dist/scripts/{Dhpe3VD3.chunk.js → C6_0NPy2.chunk.js} +2 -2
  76. package/dist/scripts/{Dhpe3VD3.chunk.js.map → C6_0NPy2.chunk.js.map} +1 -1
  77. package/dist/scripts/{C3jPyokw.chunk.js → C7toqgJ9.chunk.js} +2 -2
  78. package/dist/scripts/{C3jPyokw.chunk.js.map → C7toqgJ9.chunk.js.map} +1 -1
  79. package/dist/scripts/{C_AYa87x.chunk.js → CA2wPtyp.chunk.js} +2 -2
  80. package/dist/scripts/{C_AYa87x.chunk.js.map → CA2wPtyp.chunk.js.map} +1 -1
  81. package/dist/scripts/{DZZlWrzc.chunk.js → CD7xQQSj.chunk.js} +2 -2
  82. package/dist/scripts/{DZZlWrzc.chunk.js.map → CD7xQQSj.chunk.js.map} +1 -1
  83. package/dist/scripts/{DXeWv8xM.chunk.js → CKJlxYxE.chunk.js} +2 -2
  84. package/dist/scripts/{DXeWv8xM.chunk.js.map → CKJlxYxE.chunk.js.map} +1 -1
  85. package/dist/scripts/{DSwVduDL.chunk.js → CMoQks36.chunk.js} +2 -2
  86. package/dist/scripts/{DSwVduDL.chunk.js.map → CMoQks36.chunk.js.map} +1 -1
  87. package/dist/scripts/{uyrSls2s.chunk.js → CNiWunhi.chunk.js} +2 -2
  88. package/dist/scripts/{uyrSls2s.chunk.js.map → CNiWunhi.chunk.js.map} +1 -1
  89. package/dist/scripts/{b-AUm3ni.chunk.js → CW89a4Mj.chunk.js} +2 -2
  90. package/dist/scripts/{b-AUm3ni.chunk.js.map → CW89a4Mj.chunk.js.map} +1 -1
  91. package/dist/scripts/{CHzv4hsQ.chunk.js → CWrjr29e.chunk.js} +2 -2
  92. package/dist/scripts/{CHzv4hsQ.chunk.js.map → CWrjr29e.chunk.js.map} +1 -1
  93. package/dist/scripts/{CkEsSdbO.chunk.js → C_hVa7Ra.chunk.js} +2 -2
  94. package/dist/scripts/{CkEsSdbO.chunk.js.map → C_hVa7Ra.chunk.js.map} +1 -1
  95. package/dist/scripts/Cfw5zASx.chunk.js +2 -0
  96. package/dist/scripts/{CWRjbtTx.chunk.js.map → Cfw5zASx.chunk.js.map} +1 -1
  97. package/dist/scripts/{Wfuxh2YT.chunk.js → CiXtVo-A.chunk.js} +2 -2
  98. package/dist/scripts/{Wfuxh2YT.chunk.js.map → CiXtVo-A.chunk.js.map} +1 -1
  99. package/dist/scripts/{DGDSZYW9.chunk.js → Cliq624L.chunk.js} +2 -2
  100. package/dist/scripts/{DGDSZYW9.chunk.js.map → Cliq624L.chunk.js.map} +1 -1
  101. package/dist/scripts/{CV6qoMzB.chunk.js → Cn9Jwmkc.chunk.js} +2 -2
  102. package/dist/scripts/{CV6qoMzB.chunk.js.map → Cn9Jwmkc.chunk.js.map} +1 -1
  103. package/dist/scripts/{6ucD94id.chunk.js → CoBxE0Ze.chunk.js} +2 -2
  104. package/dist/scripts/{6ucD94id.chunk.js.map → CoBxE0Ze.chunk.js.map} +1 -1
  105. package/dist/scripts/{B4mwlW3k.chunk.js → CucQidno.chunk.js} +2 -2
  106. package/dist/scripts/{B4mwlW3k.chunk.js.map → CucQidno.chunk.js.map} +1 -1
  107. package/dist/scripts/{BoCG3rE6.chunk.js → D1uhKPP8.chunk.js} +2 -2
  108. package/dist/scripts/{BoCG3rE6.chunk.js.map → D1uhKPP8.chunk.js.map} +1 -1
  109. package/dist/scripts/{Cqky1Knl.chunk.js → D2RVG0Pu.chunk.js} +2 -2
  110. package/dist/scripts/{Cqky1Knl.chunk.js.map → D2RVG0Pu.chunk.js.map} +1 -1
  111. package/dist/scripts/{B3cy6PVV.chunk.js → D36WobW6.chunk.js} +2 -2
  112. package/dist/scripts/{B3cy6PVV.chunk.js.map → D36WobW6.chunk.js.map} +1 -1
  113. package/dist/scripts/{tbYGeGLS.chunk.js → D9BoZZhI.chunk.js} +2 -2
  114. package/dist/scripts/{tbYGeGLS.chunk.js.map → D9BoZZhI.chunk.js.map} +1 -1
  115. package/dist/scripts/{HYIMjXwZ.chunk.js → D9ECiiu8.chunk.js} +2 -2
  116. package/dist/scripts/{HYIMjXwZ.chunk.js.map → D9ECiiu8.chunk.js.map} +1 -1
  117. package/dist/scripts/{DxLg_mEO.chunk.js → DEvwqrCo.chunk.js} +2 -2
  118. package/dist/scripts/{DxLg_mEO.chunk.js.map → DEvwqrCo.chunk.js.map} +1 -1
  119. package/dist/scripts/{DEfSuFug.chunk.js → DIFawdym.chunk.js} +2 -2
  120. package/dist/scripts/{DEfSuFug.chunk.js.map → DIFawdym.chunk.js.map} +1 -1
  121. package/dist/scripts/{oVMIGZTl.chunk.js → DLQTbn-d.chunk.js} +2 -2
  122. package/dist/scripts/{oVMIGZTl.chunk.js.map → DLQTbn-d.chunk.js.map} +1 -1
  123. package/dist/scripts/{BWnE7KAO.chunk.js → DSFKTxPl.chunk.js} +2 -2
  124. package/dist/scripts/{BWnE7KAO.chunk.js.map → DSFKTxPl.chunk.js.map} +1 -1
  125. package/dist/scripts/{fqbX9HRm.chunk.js → DToTQA1H.chunk.js} +2 -2
  126. package/dist/scripts/{fqbX9HRm.chunk.js.map → DToTQA1H.chunk.js.map} +1 -1
  127. package/dist/scripts/{DhNUjn7p.chunk.js → DVd5A_3v.chunk.js} +2 -2
  128. package/dist/scripts/{DhNUjn7p.chunk.js.map → DVd5A_3v.chunk.js.map} +1 -1
  129. package/dist/scripts/{vJWLdqFY.chunk.js → DXtSLojN.chunk.js} +2 -2
  130. package/dist/scripts/{vJWLdqFY.chunk.js.map → DXtSLojN.chunk.js.map} +1 -1
  131. package/dist/scripts/{B3e4NkXy.chunk.js → DaLZ0a8R.chunk.js} +2 -2
  132. package/dist/scripts/{B3e4NkXy.chunk.js.map → DaLZ0a8R.chunk.js.map} +1 -1
  133. package/dist/scripts/{Da9-cwkH.chunk.js → Dbdf7QGx.chunk.js} +2 -2
  134. package/dist/scripts/{Da9-cwkH.chunk.js.map → Dbdf7QGx.chunk.js.map} +1 -1
  135. package/dist/scripts/{C3YXHQU-.chunk.js → Ddk3CuwQ.chunk.js} +2 -2
  136. package/dist/scripts/{C3YXHQU-.chunk.js.map → Ddk3CuwQ.chunk.js.map} +1 -1
  137. package/dist/scripts/{Be3-ohNT.chunk.js → De7o0fUe.chunk.js} +3 -3
  138. package/dist/scripts/{Be3-ohNT.chunk.js.map → De7o0fUe.chunk.js.map} +1 -1
  139. package/dist/scripts/{DQ7Osv3q.chunk.js → DeC-NkSi.chunk.js} +2 -2
  140. package/dist/scripts/{DQ7Osv3q.chunk.js.map → DeC-NkSi.chunk.js.map} +1 -1
  141. package/dist/scripts/{BI6c50Jh.chunk.js → DiCC-7dB.chunk.js} +2 -2
  142. package/dist/scripts/{BI6c50Jh.chunk.js.map → DiCC-7dB.chunk.js.map} +1 -1
  143. package/dist/scripts/{Ct-hl94f.chunk.js → DqAsIeVB.chunk.js} +2 -2
  144. package/dist/scripts/{Ct-hl94f.chunk.js.map → DqAsIeVB.chunk.js.map} +1 -1
  145. package/dist/scripts/{CVca5RIC.chunk.js → EAS5-0G3.chunk.js} +2 -2
  146. package/dist/scripts/{CVca5RIC.chunk.js.map → EAS5-0G3.chunk.js.map} +1 -1
  147. package/dist/scripts/JVT9lUoz.chunk.js +2 -0
  148. package/dist/scripts/{wmclIpxx.chunk.js.map → JVT9lUoz.chunk.js.map} +1 -1
  149. package/dist/scripts/{044iq0d1.chunk.js → PswrCgft.chunk.js} +2 -2
  150. package/dist/scripts/{044iq0d1.chunk.js.map → PswrCgft.chunk.js.map} +1 -1
  151. package/dist/scripts/{C5DBZwej.chunk.js → UxXf3AJv.chunk.js} +2 -2
  152. package/dist/scripts/{C5DBZwej.chunk.js.map → UxXf3AJv.chunk.js.map} +1 -1
  153. package/dist/scripts/VBw4HYiM.chunk.js +2 -0
  154. package/dist/scripts/{DiJ1txP6.chunk.js.map → VBw4HYiM.chunk.js.map} +1 -1
  155. package/dist/scripts/{DLxCyfTf.chunk.js → W3L3GnYz.chunk.js} +2 -2
  156. package/dist/scripts/{DLxCyfTf.chunk.js.map → W3L3GnYz.chunk.js.map} +1 -1
  157. package/dist/scripts/{JZmjeIJo.chunk.js → Y40qqQUW.chunk.js} +2 -2
  158. package/dist/scripts/{JZmjeIJo.chunk.js.map → Y40qqQUW.chunk.js.map} +1 -1
  159. package/dist/scripts/{DWtr2GDr.chunk.js → aYbKmndA.chunk.js} +2 -2
  160. package/dist/scripts/{DWtr2GDr.chunk.js.map → aYbKmndA.chunk.js.map} +1 -1
  161. package/dist/scripts/{app-cabh1nNK.js → app-BwZTeN0O.js} +3 -3
  162. package/dist/scripts/{app-cabh1nNK.js.map → app-BwZTeN0O.js.map} +1 -1
  163. package/dist/scripts/{BGg12SDH.chunk.js → dZRQM-hv.chunk.js} +2 -2
  164. package/dist/scripts/{BGg12SDH.chunk.js.map → dZRQM-hv.chunk.js.map} +1 -1
  165. package/dist/scripts/{CHFINytM.chunk.js → h9ujBzqa.chunk.js} +2 -2
  166. package/dist/scripts/{CHFINytM.chunk.js.map → h9ujBzqa.chunk.js.map} +1 -1
  167. package/dist/scripts/{CwuTuPLO.chunk.js → kpU1ILSr.chunk.js} +2 -2
  168. package/dist/scripts/{CwuTuPLO.chunk.js.map → kpU1ILSr.chunk.js.map} +1 -1
  169. package/dist/scripts/{DRDYq9ZL.chunk.js → mj8E03dO.chunk.js} +2 -2
  170. package/dist/scripts/{DRDYq9ZL.chunk.js.map → mj8E03dO.chunk.js.map} +1 -1
  171. package/dist/scripts/nYKnuiKr.chunk.js +2 -0
  172. package/dist/scripts/{D_yZCyl0.chunk.js.map → nYKnuiKr.chunk.js.map} +1 -1
  173. package/dist/scripts/{zBOmHm2e.chunk.js → o-4-XLY2.chunk.js} +2 -2
  174. package/dist/scripts/{zBOmHm2e.chunk.js.map → o-4-XLY2.chunk.js.map} +1 -1
  175. package/dist/scripts/{DSQI-Jdp.chunk.js → oWzYOkEl.chunk.js} +2 -2
  176. package/dist/scripts/{DSQI-Jdp.chunk.js.map → oWzYOkEl.chunk.js.map} +1 -1
  177. package/dist/scripts/{CjXJ8oFf.chunk.js → oxlQycmi.chunk.js} +2 -2
  178. package/dist/scripts/{CjXJ8oFf.chunk.js.map → oxlQycmi.chunk.js.map} +1 -1
  179. package/dist/scripts/{uGV8Ulpl.chunk.js → xWtPEEJC.chunk.js} +2 -2
  180. package/dist/scripts/{uGV8Ulpl.chunk.js.map → xWtPEEJC.chunk.js.map} +1 -1
  181. package/dist/scripts/zNwtPBUz.chunk.js +2 -0
  182. package/dist/scripts/{BWIFX-Ik.chunk.js.map → zNwtPBUz.chunk.js.map} +1 -1
  183. package/package.json +1 -1
  184. package/vite.config.ts +6 -0
  185. package/dist/scripts/BWIFX-Ik.chunk.js +0 -2
  186. package/dist/scripts/BlQxOSJi.chunk.js +0 -2
  187. package/dist/scripts/C6x-ZqLl.chunk.js +0 -2
  188. package/dist/scripts/CWRjbtTx.chunk.js +0 -2
  189. package/dist/scripts/D_yZCyl0.chunk.js +0 -2
  190. package/dist/scripts/DiJ1txP6.chunk.js +0 -2
  191. package/dist/scripts/wmclIpxx.chunk.js +0 -2
@@ -1,8 +1,8 @@
1
- import{U as Q,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-cabh1nNK.js";import{u as Ii,a as _i}from"./DXeWv8xM.chunk.js";import{P as Kt}from"./pkzD5BEm.chunk.js";import{T as Ct,C as Ci,I as Lr}from"./DSQI-Jdp.chunk.js";import{u as Oi}from"./tbYGeGLS.chunk.js";import{u as qe,l as ye,F as oe,a as ji}from"./Da9-cwkH.chunk.js";import{D as Ei,E as Ri,C as In,G as Tt}from"./DUmKCSoR.chunk.js";import{F as An}from"./B4mwlW3k.chunk.js";import{C as Ut}from"./BDoSZnIa.chunk.js";import{F as Pi,a as Ti}from"./BtTTlrnZ.chunk.js";import{M as ht}from"./J651bFfk.chunk.js";import{S as ki}from"./SI_6LGjL.chunk.js";import{S as Ur}from"./Duy0OOKL.chunk.js";import{M as Di}from"./_sYSSSUN.chunk.js";import{T as Nr}from"./B668bf5B.chunk.js";import"./Co6EjRu3.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:Q.urlBuilder("{gateway}/v1/users/me/audiences",i),publicUrl:Q.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:Q.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:Q.urlBuilder("{gateway}/v1/search/filters",t),publicUrl:Q.urlBuilder("/api/search/filters",t),key:"classification:availableTopics",normalize:!1}},availablePresentations(e){const t={type:e==null?void 0:e.toLowerCase()};return{url:Q.urlBuilder("{gateway}/v1/users/me/presentations/available",t),publicUrl:Q.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:Q.urlBuilder(`{gateway}/v1/subjects/presentations/${e}/classifications`,t),publicUrl:Q.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:Q.urlBuilder(`/api/subjects/presentations/${e}`,i),publicUrl:Q.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:Q.urlBuilder("{gateway}/v1/users/me/presentations",n),publicUrl:Q.urlBuilder(`/api/subjects/presentations/${t}`,n),key:`current:presentation${e?`:${e.toLowerCase()}`:""}${t?`:${t}`:""}`,normalizeOptions:{namespace:"presentation"}}},classifications(){return{url:Q.urlBuilder("{gateway}/v1/users/me/classifications",{query:Ze.CLASSIFICATION_COLLECTION,type:Ie.Subject.toLowerCase()}),publicUrl:Q.urlBuilder("/api/subjects/classifications",{query:Ht.CLASSIFICATION_COLLECTION,type:Ie.Subject.toLowerCase()}),key:"classifications",formatData:Ct.applyThemeAssets}},classification(e,t,n){return{url:Q.urlBuilder(`{gateway}/v1/subjects/classifications/${e}`,{query:Ze.CLASSIFICATION(t)}),publicUrl:Q.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:Q.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:Q.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/children`,{query:Ze.CLASSIFICATION_COLLECTION}),publicUrl:Q.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:Q.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${je.PinnedVideos}`,o),publicUrl:Q.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:Q.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${je.Playlists}`,o),publicUrl:Q.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 f;return(f=x.cover)==null?void 0:f.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:Q.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${je.Series}`,o),publicUrl:Q.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 f;return(f=x.tallPoster)==null?void 0:f.url})}}}},curriculumLinks(e,t){return{url:Q.urlBuilder(`/api/subjects/presentations/${t}/objects/${e}/classifications/paths`,{type:Ie.Curriculum.toLowerCase()}),publicUrl:Q.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=Q.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:Q.urlBuilder(`{gateway}/v1/objects/${e}/presentations`,n),publicUrl:Q.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 H=(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))(H||{});const Bi="shared.feedbackFormTitles",Ve=ie.encloseNamespace(Bi),kt=e=>{switch(e){case H.SUGGEST_IMPROVEMENT:return Ve(e);case H.REPORT_BUG:return Ve(e);case H.REQUEST_VIDEO:return Ve(e);case H.REQUEST_LIVESTREAM:return Ve(e);case H.GIVE_PRAISE:return Ve(e);case H.RAISE_ISSUE:return Ve(e);case H.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",[H.REQUEST_VIDEO]:{default:"https://img.clickviewapp.com/v2/images/G1YGdn",hover:"https://img.clickviewapp.com/v2/images/K6yPxz"},[H.REQUEST_LIVESTREAM]:{default:"https://img.clickviewapp.com/v2/images/G1YGdn",hover:"https://img.clickviewapp.com/v2/images/K6yPxz"},[H.SUGGEST_IMPROVEMENT]:{default:"https://img.clickviewapp.com/v2/images/g7aR1l",hover:"https://img.clickviewapp.com/v2/images/zMR0Dk"},[H.RAISE_ISSUE]:{default:"https://img.clickviewapp.com/v2/images/5boW78",hover:"https://img.clickviewapp.com/v2/images/m6yRKr"},[H.GIVE_PRAISE]:{default:"https://img.clickviewapp.com/v2/images/nE1mdz",hover:"https://img.clickviewapp.com/v2/images/JjEnmR"},[H.REPORT_BUG]:{default:"https://img.clickviewapp.com/v2/images/AOdYpo",hover:"https://img.clickviewapp.com/v2/images/yro9NM"},[H.OTHER]:{default:"https://img.clickviewapp.com/v2/images/Eoaykj",hover:"https://img.clickviewapp.com/v2/images/wN59Zg"}},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(E){try{f(i.next(E))}catch(T){c(T)}}function x(E){try{f(i.throw(E))}catch(T){c(T)}}function f(E){E.done?o(E.value):s(E.value).then(p,x)}f((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(f){return function(E){return x([f,E])}}function x(f){if(i)throw new TypeError("Generator is already executing.");for(;c&&(c=0,f[0]&&(n=0)),n;)try{if(i=1,s&&(o=f[0]&2?s.return:f[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,f[1])).done)return o;switch(s=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,s=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){n.label=f[1];break}if(f[0]===6&&n.label<o[1]){n.label=o[1],o=f;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(f);break}o[2]&&n.ops.pop(),n.trys.pop();continue}f=t.call(e,n)}catch(E){f=[6,E],s=0}finally{i=o=0}if(f[0]&5)throw f[1];return{value:f[0]?f[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,f,E;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 f=T.sent(),i(f),[3,4];case 4:return[3,6];case 5:E=Promise.all(p.map(Eo)),s.push(E),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 Q,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-BwZTeN0O.js";import{u as Ii,a as _i}from"./CKJlxYxE.chunk.js";import{P as Kt}from"./pkzD5BEm.chunk.js";import{T as Ct,C as Ci,I as Lr}from"./oWzYOkEl.chunk.js";import{u as Oi}from"./D9BoZZhI.chunk.js";import{u as qe,l as ye,F as oe,a as ji}from"./Dbdf7QGx.chunk.js";import{D as Ei,E as Ri,C as In,G as Tt}from"./Bn31qbi-.chunk.js";import{F as An}from"./CucQidno.chunk.js";import{C as Ut}from"./BolzEYoc.chunk.js";import{F as Pi,a as Ti}from"./Bj3FQ5Ya.chunk.js";import{M as ht}from"./9gPNCjBk.chunk.js";import{S as ki}from"./BJG50MLZ.chunk.js";import{S as Ur}from"./BQEr0IGt.chunk.js";import{M as Di}from"./_sYSSSUN.chunk.js";import{T as Nr}from"./B668bf5B.chunk.js";import"./BRCI_rEH.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:Q.urlBuilder("{gateway}/v1/users/me/audiences",i),publicUrl:Q.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:Q.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:Q.urlBuilder("{gateway}/v1/search/filters",t),publicUrl:Q.urlBuilder("/api/search/filters",t),key:"classification:availableTopics",normalize:!1}},availablePresentations(e){const t={type:e==null?void 0:e.toLowerCase()};return{url:Q.urlBuilder("{gateway}/v1/users/me/presentations/available",t),publicUrl:Q.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:Q.urlBuilder(`{gateway}/v1/subjects/presentations/${e}/classifications`,t),publicUrl:Q.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:Q.urlBuilder(`/api/subjects/presentations/${e}`,i),publicUrl:Q.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:Q.urlBuilder("{gateway}/v1/users/me/presentations",n),publicUrl:Q.urlBuilder(`/api/subjects/presentations/${t}`,n),key:`current:presentation${e?`:${e.toLowerCase()}`:""}${t?`:${t}`:""}`,normalizeOptions:{namespace:"presentation"}}},classifications(){return{url:Q.urlBuilder("{gateway}/v1/users/me/classifications",{query:Ze.CLASSIFICATION_COLLECTION,type:Ie.Subject.toLowerCase()}),publicUrl:Q.urlBuilder("/api/subjects/classifications",{query:Ht.CLASSIFICATION_COLLECTION,type:Ie.Subject.toLowerCase()}),key:"classifications",formatData:Ct.applyThemeAssets}},classification(e,t,n){return{url:Q.urlBuilder(`{gateway}/v1/subjects/classifications/${e}`,{query:Ze.CLASSIFICATION(t)}),publicUrl:Q.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:Q.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:Q.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/children`,{query:Ze.CLASSIFICATION_COLLECTION}),publicUrl:Q.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:Q.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${je.PinnedVideos}`,o),publicUrl:Q.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:Q.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${je.Playlists}`,o),publicUrl:Q.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 f;return(f=x.cover)==null?void 0:f.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:Q.urlBuilder(`{gateway}/v1/subjects/classifications/${e}/${je.Series}`,o),publicUrl:Q.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 f;return(f=x.tallPoster)==null?void 0:f.url})}}}},curriculumLinks(e,t){return{url:Q.urlBuilder(`/api/subjects/presentations/${t}/objects/${e}/classifications/paths`,{type:Ie.Curriculum.toLowerCase()}),publicUrl:Q.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=Q.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:Q.urlBuilder(`{gateway}/v1/objects/${e}/presentations`,n),publicUrl:Q.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 H=(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))(H||{});const Bi="shared.feedbackFormTitles",Ve=ie.encloseNamespace(Bi),kt=e=>{switch(e){case H.SUGGEST_IMPROVEMENT:return Ve(e);case H.REPORT_BUG:return Ve(e);case H.REQUEST_VIDEO:return Ve(e);case H.REQUEST_LIVESTREAM:return Ve(e);case H.GIVE_PRAISE:return Ve(e);case H.RAISE_ISSUE:return Ve(e);case H.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",[H.REQUEST_VIDEO]:{default:"https://img.clickviewapp.com/v2/images/G1YGdn",hover:"https://img.clickviewapp.com/v2/images/K6yPxz"},[H.REQUEST_LIVESTREAM]:{default:"https://img.clickviewapp.com/v2/images/G1YGdn",hover:"https://img.clickviewapp.com/v2/images/K6yPxz"},[H.SUGGEST_IMPROVEMENT]:{default:"https://img.clickviewapp.com/v2/images/g7aR1l",hover:"https://img.clickviewapp.com/v2/images/zMR0Dk"},[H.RAISE_ISSUE]:{default:"https://img.clickviewapp.com/v2/images/5boW78",hover:"https://img.clickviewapp.com/v2/images/m6yRKr"},[H.GIVE_PRAISE]:{default:"https://img.clickviewapp.com/v2/images/nE1mdz",hover:"https://img.clickviewapp.com/v2/images/JjEnmR"},[H.REPORT_BUG]:{default:"https://img.clickviewapp.com/v2/images/AOdYpo",hover:"https://img.clickviewapp.com/v2/images/yro9NM"},[H.OTHER]:{default:"https://img.clickviewapp.com/v2/images/Eoaykj",hover:"https://img.clickviewapp.com/v2/images/wN59Zg"}},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(E){try{f(i.next(E))}catch(T){c(T)}}function x(E){try{f(i.throw(E))}catch(T){c(T)}}function f(E){E.done?o(E.value):s(E.value).then(p,x)}f((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(f){return function(E){return x([f,E])}}function x(f){if(i)throw new TypeError("Generator is already executing.");for(;c&&(c=0,f[0]&&(n=0)),n;)try{if(i=1,s&&(o=f[0]&2?s.return:f[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,f[1])).done)return o;switch(s=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,s=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]<o[3])){n.label=f[1];break}if(f[0]===6&&n.label<o[1]){n.label=o[1],o=f;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(f);break}o[2]&&n.ops.pop(),n.trys.pop();continue}f=t.call(e,n)}catch(E){f=[6,E],s=0}finally{i=o=0}if(f[0]&5)throw f[1];return{value:f[0]?f[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,f,E;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 f=T.sent(),i(f),[3,4];case 4:return[3,6];case 5:E=Promise.all(p.map(Eo)),s.push(E),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 f=zr(x,n),E=vt(f,1),T=E[0],D=Wr(x,i,s),B=vt(D,1),M=B[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,f=t.onDragEnter,E=t.onDragLeave,T=t.onDragOver,D=t.onDrop,B=t.onDropAccepted,M=t.onDropRejected,q=t.onFileDialogCancel,V=t.onFileDialogOpen,L=t.useFsAccessApi,K=t.autoFocus,Z=t.preventDropOnDocument,C=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 V=="function"?V:ur},[V]),O=$.useMemo(function(){return typeof q=="function"?q:ur},[q]),A=$.useRef(null),W=$.useRef(null),Y=$.useReducer(fa,En),_=en(Y,2),m=_[0],u=_[1],d=m.isFocused,h=m.isFileDialogActive,a=$.useRef(typeof window<"u"&&window.isSecureContext&&L&&Qo()),g=function(){!a.current&&h&&setTimeout(function(){if(W.current){var F=W.current.files;F.length||(u({type:"closeDialog"}),O())}},300)};$.useEffect(function(){return window.addEventListener("focus",g,!1),function(){window.removeEventListener("focus",g,!1)}},[W,h,O,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&&K&&A.current&&A.current.focus(),function(){}},[A,K,i]);var P=$.useCallback(function(j){S?S(j):console.error(j)},[S]),U=$.useCallback(function(j){j.preventDefault(),j.persist(),Me(j),v.current=[].concat(ia(v.current),[j.target]),jt(j)&&Promise.resolve(s(j)).then(function(F){if(!(At(j)&&!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"}),f&&f(j)}}).catch(function(F){return P(F)})},[s,f,P,N,y,c,o,p,x,l]),G=$.useCallback(function(j){j.preventDefault(),j.persist(),Me(j);var F=jt(j);if(F&&j.dataTransfer)try{j.dataTransfer.dropEffect="copy"}catch{}return F&&T&&T(j),!1},[T,N]),J=$.useCallback(function(j){j.preventDefault(),j.persist(),Me(j);var F=v.current.filter(function(ue){return A.current&&A.current.contains(ue)}),ne=F.indexOf(j.target);ne!==-1&&F.splice(ne,1),v.current=F,!(F.length>0)&&(u({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),jt(j)&&E&&E(j))},[A,E,N]),te=$.useCallback(function(j,F){var ne=[],ue=[];j.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&&B&&B(ne,F)},[u,p,y,c,o,x,D,B,M,l]),ae=$.useCallback(function(j){j.preventDefault(),j.persist(),Me(j),v.current=[],jt(j)&&Promise.resolve(s(j)).then(function(F){At(j)&&!N||te(F,j)}).catch(function(F){return P(F)}),u({type:"reset"})},[s,te,P,N]),ce=$.useCallback(function(){if(a.current){u({type:"openDialog"}),I();var j={multiple:p,types:b};window.showOpenFilePicker(j).then(function(F){return s(F)}).then(function(F){te(F,null),u({type:"closeDialog"})}).catch(function(F){Zo(F)?(O(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,O,L,te,P,b,p]),me=$.useCallback(function(j){!A.current||!A.current.isEqualNode(j.target)||(j.key===" "||j.key==="Enter"||j.keyCode===32||j.keyCode===13)&&(j.preventDefault(),ce())},[A,ce]),_e=$.useCallback(function(){u({type:"focus"})},[]),fe=$.useCallback(function(){u({type:"blur"})},[]),Re=$.useCallback(function(){C||(Ko()?setTimeout(ce,0):ce())},[C,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 j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=j.refKey,ne=F===void 0?"ref":F,ue=j.role,he=j.onKeyDown,Ce=j.onFocus,Ae=j.onBlur,lt=j.onClick,ct=j.onDragEnter,Be=j.onDragOver,ee=j.onDragLeave,xe=j.onDrop,Pe=$t(j,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,G)),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,G,J,ae,k,R,i]),It=$.useCallback(function(j){j.stopPropagation()},[]),Ye=$.useMemo(function(){return function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},F=j.refKey,ne=F===void 0?"ref":F,ue=j.onChange,he=j.onClick,Ce=$t(j,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:d&&!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,B;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=!!((B=(D=e.selection.users)==null?void 0:D.data)!=null&&B.length),[c,p]=se.useState(!1),[x,f]=se.useState(i&&s);se.useEffect(()=>{f(i&&s)},[i,s]);function E(){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(V=>r.jsx(Lt,{selection:V,colourVariant:q,hasStudentExperience:e.hasStudentExperience},`${V.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:E,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](),f;!(o=(f=x.next()).done)&&(s.push(f.value),!(i&&s.length===i));o=!0);}catch(E){c=!0,p=E}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(f){for(f===null?f=0:f++;f<n.length&&n[f]===0;)f++;return f===n.length?null:f}function o(f){for(f===null?f=n.length-1:f--;f>=0&&n[f]===0;)f--;return f===-1?null:f}function c(f){var E=e(f,2),T=E[0],D=E[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(f){var E=e(f,2),T=E[0],D=E[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(f){return c(f)[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 f=0;f<c.length;f++)p[c[f]]=o[c[f]]}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(f,E){var T=[],D=!0,B=!1,M=void 0;try{for(var q=f[Symbol.iterator](),V;!(D=(V=q.next()).done)&&(T.push(V.value),!(E&&T.length===E));D=!0);}catch(L){B=!0,M=L}finally{try{!D&&q.return&&q.return()}finally{if(B)throw M}}return T}return function(f,E){if(Array.isArray(f))return f;if(Symbol.iterator in Object(f))return x(f,E);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 f=0,E=Array(x.length);f<x.length;f++)E[f]=x[f];return E}else return Array.from(x)}var o=bs(),c=i(o),p=function(f){return f};t.default=function(x){var f=Array.isArray(x)&&x.length===2?x:[x,null],E=n(f,2),T=E[0],D=E[1];return function(B){for(var M=arguments.length,q=Array(M>1?M-1:0),V=1;V<M;V++)q[V-1]=arguments[V];var L=q.map(function(K){return T[K]}).filter(p);return typeof L[0]=="string"||typeof D=="function"?{key:B,className:D?D.apply(void 0,s(L)):L.join(" ")}:{key:B,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={},f,E;for(f=0,E=o.length;f<E;f++)x[o[f]]=!0;for(f=0,E=c.length;f<E;f++){var T=c[f],D=i[T],B=s[T];if(D!==B){if(!x[T]||D===null||B===null||t(D)!=="object"||t(B)!=="object")return!0;var M=Object.keys(D),q=Object.keys(B);if(M.length!==q.length)return!0;for(var V=0,L=M.length;V<L;V++){var K=M[V];if(D[K]!==B[K])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(C){return C&&C.__esModule?C:{default:C}}function o(){if(typeof WeakMap!="function")return null;var C=new WeakMap;return o=function(){return C},C}function c(C){if(C&&C.__esModule)return C;if(C===null||p(C)!=="object"&&typeof C!="function")return{default:C};var k=o();if(k&&k.has(C))return k.get(C);var R={},N=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in C)if(Object.prototype.hasOwnProperty.call(C,S)){var l=N?Object.getOwnPropertyDescriptor(C,S):null;l&&(l.get||l.set)?Object.defineProperty(R,S,l):R[S]=C[S]}return R.default=C,k&&k.set(C,R),R}function p(C){"@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(C)}function x(C,k){if(!(C instanceof k))throw new TypeError("Cannot call a class as a function")}function f(C,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(C,N.key,N)}}function E(C,k,R){return k&&f(C.prototype,k),C}function T(C){return function(){var k=q(C),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(C,k){return k&&(p(k)==="object"||typeof k=="function")?k:B(C)}function B(C){if(C===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C}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(C){return q=Object.setPrototypeOf?Object.getPrototypeOf:function(R){return R.__proto__||Object.getPrototypeOf(R)},q(C)}function V(C,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function");C.prototype=Object.create(k&&k.prototype,{constructor:{value:C,writable:!0,configurable:!0}}),k&&L(C,k)}function L(C,k){return L=Object.setPrototypeOf||function(N,S){return N.__proto__=S,N},L(C,k)}function K(C,k,R){return k in C?Object.defineProperty(C,k,{value:R,enumerable:!0,configurable:!0,writable:!0}):C[k]=R,C}var Z=(function(C){V(R,C);var k=T(R);function R(){return x(this,R),k.apply(this,arguments)}return E(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,O=y(l);return O?t.default.createElement("div",b("".concat(I,"title"),"sectionTitle"),O):null}}]),R})(t.Component);e.default=Z,K(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 O in l)if(Object.prototype.hasOwnProperty.call(l,O)){var A=I?Object.getOwnPropertyDescriptor(l,O):null;A&&(A.get||A.set)?Object.defineProperty(b,O,A):b[O]=l[O]}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 f(l,y){var b=Object.keys(l);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(l);y&&(I=I.filter(function(O){return Object.getOwnPropertyDescriptor(l,O).enumerable})),b.push.apply(b,I)}return b}function E(l){for(var y=1;y<arguments.length;y++){var b=arguments[y]!=null?arguments[y]:{};y%2?f(Object(b),!0).forEach(function(I){N(l,I,b[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(b)):f(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,O;if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(l);for(O=0;O<A.length;O++)I=A[O],!(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),O,A;for(A=0;A<I.length;A++)O=I[A],!(y.indexOf(O)>=0)&&(b[O]=l[O]);return b}function B(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 V(l){return function(){var y=C(l),b;if(Z()){var I=C(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:K(l)}function K(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 C(l){return C=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},C(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,O){return I.__proto__=O,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=V(b);function b(){var I;B(this,b);for(var O=arguments.length,A=new Array(O),W=0;W<O;W++)A[W]=arguments[W];return I=y.call.apply(y,[this].concat(A)),N(K(I),"storeItemReference",function(Y){Y!==null&&(I.item=Y)}),N(K(I),"onMouseEnter",function(Y){var _=I.props,m=_.sectionIndex,u=_.itemIndex;I.props.onMouseEnter(Y,{sectionIndex:m,itemIndex:u})}),N(K(I),"onMouseLeave",function(Y){var _=I.props,m=_.sectionIndex,u=_.itemIndex;I.props.onMouseLeave(Y,{sectionIndex:m,itemIndex:u})}),N(K(I),"onMouseDown",function(Y){var _=I.props,m=_.sectionIndex,u=_.itemIndex;I.props.onMouseDown(Y,{sectionIndex:m,itemIndex:u})}),N(K(I),"onClick",function(Y){var _=I.props,m=_.sectionIndex,u=_.itemIndex;I.props.onClick(Y,{sectionIndex:m,itemIndex:u})}),I}return q(b,[{key:"shouldComponentUpdate",value:function(O){return(0,i.default)(O,this.props,["renderItemData"])}},{key:"render",value:function(){var O=this.props,A=O.isHighlighted,W=O.item,Y=O.renderItem,_=O.renderItemData,m=T(O,["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}),Y(W,E({isHighlighted:A},_)))}}]),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 O=b?Object.getOwnPropertyDescriptor(S,I):null;O&&(O.get||O.set)?Object.defineProperty(y,I,O):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 f(){return f=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},f.apply(this,arguments)}function E(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?E(Object(y),!0).forEach(function(b){R(S,b,y[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(y)):E(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 B(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&&B(S.prototype,l),S}function q(S){return function(){var l=Z(S),y;if(K()){var b=Z(this).constructor;y=Reflect.construct(l,arguments,b)}else y=l.apply(this,arguments);return V(this,y)}}function V(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 K(){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 C(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){C(y,S);var l=q(y);function y(){var b;D(this,y);for(var I=arguments.length,O=new Array(I),A=0;A<I;A++)O[A]=arguments[A];return b=l.call.apply(l,[this].concat(O)),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,O=this.props,A=O.items,W=O.itemProps,Y=O.renderItem,_=O.renderItemData,m=O.sectionIndex,u=O.highlightedItemIndex,d=O.getItemId,h=O.theme,a=O.keyPrefix,g=m===null?a:"".concat(a,"section-").concat(m,"-"),v=typeof W=="function";return t.default.createElement("ul",f({role:"listbox"},h("".concat(g,"items-list"),"itemsList")),A.map(function(w,P){var U=P===0,G=P===u,J="".concat(g,"item-").concat(P),te=v?W({sectionIndex:m,itemIndex:P}):W,ae=T({id:d(m,P),"aria-selected":G},h(J,"item",U&&"itemFirst",G&&"itemHighlighted"),{},te);return G&&(ae.ref=I.storeHighlightedItemReference),t.default.createElement(i.default,f({},ae,{sectionIndex:m,isHighlighted:G,itemIndex:P,item:w,renderItem:Y,renderItemData:_}))}))}}]),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=f(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 f(u){if(u&&u.__esModule)return u;if(u===null||K(u)!=="object"&&typeof u!="function")return{default:u};var d=x();if(d&&d.has(u))return d.get(u);var h={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in u)if(Object.prototype.hasOwnProperty.call(u,g)){var v=a?Object.getOwnPropertyDescriptor(u,g):null;v&&(v.get||v.set)?Object.defineProperty(h,g,v):h[g]=u[g]}return h.default=u,d&&d.set(u,h),h}function E(u,d){var h=Object.keys(u);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(u);d&&(a=a.filter(function(g){return Object.getOwnPropertyDescriptor(u,g).enumerable})),h.push.apply(h,a)}return h}function T(u){for(var d=1;d<arguments.length;d++){var h=arguments[d]!=null?arguments[d]:{};d%2?E(Object(h),!0).forEach(function(a){O(u,a,h[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(h)):E(Object(h)).forEach(function(a){Object.defineProperty(u,a,Object.getOwnPropertyDescriptor(h,a))})}return u}function D(u,d){return L(u)||V(u,d)||M(u,d)||B()}function B(){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,d){if(u){if(typeof u=="string")return q(u,d);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,d)}}function q(u,d){(d==null||d>u.length)&&(d=u.length);for(var h=0,a=new Array(d);h<d;h++)a[h]=u[h];return a}function V(u,d){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(u)))){var h=[],a=!0,g=!1,v=void 0;try{for(var w=u[Symbol.iterator](),P;!(a=(P=w.next()).done)&&(h.push(P.value),!(d&&h.length===d));a=!0);}catch(U){g=!0,v=U}finally{try{!a&&w.return!=null&&w.return()}finally{if(g)throw v}}return h}}function L(u){if(Array.isArray(u))return u}function K(u){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?K=function(h){return typeof h}:K=function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},K(u)}function Z(u,d){if(!(u instanceof d))throw new TypeError("Cannot call a class as a function")}function C(u,d){for(var h=0;h<d.length;h++){var a=d[h];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(u,a.key,a)}}function k(u,d,h){return d&&C(u.prototype,d),u}function R(u){return function(){var d=y(u),h;if(l()){var a=y(this).constructor;h=Reflect.construct(d,arguments,a)}else h=d.apply(this,arguments);return N(this,h)}}function N(u,d){return d&&(K(d)==="object"||typeof d=="function")?d: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,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(d&&d.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),d&&I(u,d)}function I(u,d){return I=Object.setPrototypeOf||function(a,g){return a.__proto__=g,a},I(u,d)}function O(u,d,h){return d in u?Object.defineProperty(u,d,{value:h,enumerable:!0,configurable:!0,writable:!0}):u[d]=h,u}var A={},W=function(d){return t.default.createElement("input",d)},Y=function(d){var h=d.containerProps,a=d.children;return t.default.createElement("div",h,a)},_={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 d=R(h);function h(a){var g;return Z(this,h),g=d.call(this,a),O(S(g),"storeInputReference",function(v){v!==null&&(g.input=v);var w=g.props.inputProps.ref;w&&(typeof w=="function"?w(v):K(w)==="object"&&Object.prototype.hasOwnProperty.call(w,"current")&&(w.current=v))}),O(S(g),"storeItemsContainerReference",function(v){v!==null&&(g.itemsContainer=v)}),O(S(g),"onHighlightedItemChange",function(v){g.highlightedItem=v}),O(S(g),"getItemId",function(v,w){if(w===null)return null;var P=g.props.id,U=v===null?"":"section-".concat(v);return"react-autowhatever-".concat(P,"-").concat(U,"-item-").concat(w)}),O(S(g),"onFocus",function(v){var w=g.props.inputProps;g.setState({isInputFocused:!0}),w.onFocus&&w.onFocus(v)}),O(S(g),"onBlur",function(v){var w=g.props.inputProps;g.setState({isInputFocused:!1}),w.onBlur&&w.onBlur(v)}),O(S(g),"onKeyDown",function(v){var w=g.props,P=w.inputProps,U=w.highlightedSectionIndex,G=w.highlightedItemIndex,J=v.keyCode;switch(J){case 40:case 38:{var te=J===40?"next":"prev",ae=g.sectionIterator[te]([U,G]),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:G})}}),g.highlightedItem=null,g.state={isInputFocused:!1},g.setSectionsItems(a),g.setSectionIterator(a),g.setTheme(a),g}return k(h,[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(g){g.items!==this.props.items&&this.setSectionsItems(g),(g.items!==this.props.items||g.multiSection!==this.props.multiSection)&&this.setSectionIterator(g),g.theme!==this.props.theme&&this.setTheme(g)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(g){g.multiSection&&(this.sectionsItems=g.items.map(function(v){return g.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(g){this.sectionIterator=(0,i.default)({multiSection:g.multiSection,data:g.multiSection?this.sectionsLengths:g.items.length})}},{key:"setTheme",value:function(g){this.theme=(0,s.default)(g.theme)}},{key:"renderSections",value:function(){var g=this;if(this.allSectionsAreEmpty)return null;var v=this.theme,w=this.props,P=w.id,U=w.items,G=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:g.sectionsItems[fe],itemProps:me,renderItem:G,renderItemData:J,sectionIndex:fe,highlightedItemIndex:ae===fe?ce:null,onHighlightedItemChange:g.onHighlightedItemChange,getItemId:g.getItemId,theme:v,keyPrefix:Re,ref:g.storeItemsListReference}))})}},{key:"renderItems",value:function(){var g=this.props.items;if(g.length===0)return null;var v=this.theme,w=this.props,P=w.id,U=w.renderItem,G=w.renderItemData,J=w.highlightedSectionIndex,te=w.highlightedItemIndex,ae=w.itemProps;return t.default.createElement(c.default,{items:g,itemProps:ae,renderItem:U,renderItemData:G,highlightedItemIndex:J===null?te:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:v,keyPrefix:"react-autowhatever-".concat(P,"-")})}},{key:"ensureHighlightedItemIsVisible",value:function(){var g=this.highlightedItem;if(g){var v=this.itemsContainer,w=g.offsetParent===v?g.offsetTop:g.offsetTop-v.offsetTop,P=v.scrollTop;w<P?P=w:w+g.offsetHeight>P+v.offsetHeight&&(P=w+g.offsetHeight-v.offsetHeight),P!==v.scrollTop&&(v.scrollTop=P)}}},{key:"render",value:function(){var g=this.theme,v=this.props,w=v.id,P=v.multiSection,U=v.renderInputComponent,G=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},g("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},g("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=G({containerProps:T({id:fe,role:"listbox"},g("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,O(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])}),O(m,"defaultProps",{id:"1",multiSection:!1,renderInputComponent:W,renderItemsContainer:Y,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:_})})(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||f(m)!=="object"&&typeof m!="function")return{default:m};var u=p();if(u&&u.has(m))return u.get(m);var d={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in m)if(Object.prototype.hasOwnProperty.call(m,a)){var g=h?Object.getOwnPropertyDescriptor(m,a):null;g&&(g.get||g.set)?Object.defineProperty(d,a,g):d[a]=m[a]}return d.default=m,u&&u.set(m,d),d}function f(m){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?f=function(d){return typeof d}:f=function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},f(m)}function E(m,u){var d=Object.keys(m);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(m);u&&(h=h.filter(function(a){return Object.getOwnPropertyDescriptor(m,a).enumerable})),d.push.apply(d,h)}return d}function T(m){for(var u=1;u<arguments.length;u++){var d=arguments[u]!=null?arguments[u]:{};u%2?E(Object(d),!0).forEach(function(h){R(m,h,d[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(d)):E(Object(d)).forEach(function(h){Object.defineProperty(m,h,Object.getOwnPropertyDescriptor(d,h))})}return m}function D(m,u){if(!(m instanceof u))throw new TypeError("Cannot call a class as a function")}function B(m,u){for(var d=0;d<u.length;d++){var h=u[d];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(m,h.key,h)}}function M(m,u,d){return u&&B(m.prototype,u),m}function q(m){return function(){var u=Z(m),d;if(K()){var h=Z(this).constructor;d=Reflect.construct(u,arguments,h)}else d=u.apply(this,arguments);return V(this,d)}}function V(m,u){return u&&(f(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 K(){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(d){return d.__proto__||Object.getPrototypeOf(d)},Z(m)}function C(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,d){return u in m?Object.defineProperty(m,u,{value:d,enumerable:!0,configurable:!0,writable:!0}):m[u]=d,m}var N=function(){return!0},S=function(u){return u.trim().length>0},l=function(u){var d=u.containerProps,h=u.children;return t.default.createElement("div",d,h)},y="suggestions-revealed",b="suggestions-updated",I="suggestion-selected",O="input-focused",A="input-changed",W="input-blurred",Y="escape-pressed",_=(function(m){C(d,m);var u=q(d);function d(h){var a,g=h.alwaysRenderSuggestions;return D(this,d),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,G=P.onSuggestionSelected,J=P.onSuggestionsFetchRequested;G&&G(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,G=a.getSuggestionIndices(a.findSuggestionElement(v.target)),J=G.sectionIndex,te=G.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,G=w.onBlur,J=a.getHighlightedSuggestion(),te=P(U,W);a.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!te}),G&&G(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:!g,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},a.justPressedUpDown=!1,a.justMouseEntered=!1,a.pressedSuggestion=null,a}return M(d,[{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 g=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():g&&this.resetHighlightedSuggestion():this.willRenderSuggestions(a,b)?(this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions(),g&&this.resetHighlightedSuggestion()):this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(a,g){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 G=this.getHighlightedSuggestion(),J=g.highlightedSuggestion;G!=J&&P({suggestion:G})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(a,g,v){var w=this;this.setState(function(P){var U=P.valueBeforeUpDown;return g===null?U=null:U===null&&typeof v<"u"&&(U=v),{highlightedSectionIndex:a,highlightedSuggestionIndex:g,highlightedSuggestion:g===null?null:w.getSuggestion(a,g),valueBeforeUpDown:U}})}},{key:"resetHighlightedSuggestion",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.setState(function(g){var v=g.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,g){var v=this.props,w=v.suggestions,P=v.multiSection,U=v.getSectionSuggestions;return P?U(w[a])[g]:w[g]}},{key:"getHighlightedSuggestion",value:function(){var a=this.state,g=a.highlightedSectionIndex,v=a.highlightedSuggestionIndex;return v===null?null:this.getSuggestion(g,v)}},{key:"getSuggestionValueByIndex",value:function(a,g){var v=this.props.getSuggestionValue;return v(this.getSuggestion(a,g))}},{key:"getSuggestionIndices",value:function(a){var g=a.getAttribute("data-section-index"),v=a.getAttribute("data-suggestion-index");return{sectionIndex:typeof g=="string"?parseInt(g,10):null,suggestionIndex:parseInt(v,10)}}},{key:"findSuggestionElement",value:function(a){var g=a;do{if(g.getAttribute&&g.getAttribute("data-suggestion-index")!==null)return g;g=g.parentNode}while(g!==null);throw console.error("Clicked element:",a),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(a,g,v){var w=this.props.inputProps,P=w.value,U=w.onChange;g!==P&&U(a,{newValue:g,method:v})}},{key:"willRenderSuggestions",value:function(a,g){var v=a.suggestions,w=a.inputProps,P=a.shouldRenderSuggestions,U=w.value;return v.length>0&&P(U,g)}},{key:"getQuery",value:function(){var a=this.props.inputProps,g=a.value,v=this.state.valueBeforeUpDown;return(v===null?g:v).trim()}},{key:"render",value:function(){var a=this,g=this.props,v=g.suggestions,w=g.renderInputComponent,P=g.onSuggestionsFetchRequested,U=g.renderSuggestion,G=g.inputProps,J=g.multiSection,te=g.renderSectionTitle,ae=g.id,ce=g.getSectionSuggestions,me=g.theme,_e=g.getSuggestionValue,fe=g.alwaysRenderSuggestions,Re=g.highlightFirstSuggestion,Se=g.containerProps,be=this.state,Qe=be.isFocused,Me=be.isCollapsed,wt=be.highlightedSectionIndex,It=be.highlightedSuggestionIndex,Ye=be.valueBeforeUpDown,j=fe?N:this.props.shouldRenderSuggestions,F=G.value,ne=G.onFocus,ue=G.onKeyDown,he=this.willRenderSuggestions(this.props,"render"),Ce=fe||Qe&&!Me&&he,Ae=Ce?v:[],lt=T({},G,{onFocus:function(ee){if(!a.justSelectedSuggestion&&!a.justClickedOnSuggestionsContainer){var xe=j(F,O);a.setState({isFocused:!0,isCollapsed:!xe}),ne&&ne(ee),xe&&P({value:F,reason:O})}},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=j(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)j(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"),j(Bt,Y)?P({value:Bt,reason:Y}):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})}}]),d})(t.Component);e.default=_,R(_,"propTypes",{suggestions:n.default.array.isRequired,onSuggestionsFetchRequested:function(u,d){var h=u[d];if(typeof h!="function")throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(u,d){var h=u[d];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,d){var h=u[d];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,d){var h=u[d];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,d){var h=u[d];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(_,"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,f=()=>r.jsx("div",{className:"d-inline-block",children:r.jsx(de,{svg:Ur,size:pt.Standard,onClick:t,className:Cr(t)})}),E=()=>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(f,{})}),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(E,{}),n==="right"&&r.jsx(f,{})]})]})}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 B=e[D];return B?B.map(M=>({...M,suggestionType:D})):[]},p=c("recent"),x=c("local"),f=c("remote"),E=c("generic");if(E.length)return[{data:E,suggestionType:"generic"}];if(Fe.isFunction(i))return i([...x,...f,...p]);const T=[];return x!=null&&x.length&&T.push({title:t,data:Sn(x,yn("local",s)),suggestionType:"local"}),f!=null&&f.length&&T.push({title:t,data:Sn(f,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,o){$.useEffect(()=>{!e||e.current||(e.current={resetQuery:t,setQuery:n,focusInput:i,blurInput:s,setInputProperty:o})},[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[f,E]=$.useState(e.initialQuery||""),[T,D]=$.useState("none"),B=di(Di.XS);$.useEffect(()=>{!e.resetSuggestionsOnNoActivation||!n||n.length>=e.activationLength||M()},[n]),$.useEffect(()=>{if(n.length)return;const _=ot(e.initialLocalSuggestions,e.recentSearches);o(_)},[e.initialLocalSuggestions,e.recentSearches]),$.useEffect(()=>{const _=e.initialQuery||"";n!==_&&(i(_),E(_))},[e.initialQuery]),$.useEffect(()=>{!p.current||!e.autoFocusInput||p.current.focus()},[e.autoFocusInput]);const M=()=>{const _=ot(e.initialLocalSuggestions,e.recentSearches);o(_)},q=()=>{i(""),E("")},V=()=>{var _;(_=p.current)==null||_.focus()},L=()=>{var _;(_=p.current)==null||_.blur()},K=(_,m)=>{var u,d,h;p.current&&((h=(d=(u=p.current)==null?void 0:u.style)==null?void 0:d.setProperty)==null||h.call(d,_,m))};Zs(e.controlsRef,q,i,V,L,K);const Z=(_,{newValue:m,method:u})=>{u==="type"&&E(m),!(u==="escape"&&(D("none"),!(e!=null&&e.resetQueryOnEscape)))&&(["up","down"].includes(u)||(i(m),Te(e.onQueryChange)&&e.onQueryChange(m)))},C=()=>{D("none")},k=_=>{_.preventDefault(),Te(e.onSubmit)&&e.onSubmit(n,p.current),e.clearQueryOnSelect&&q()},R=_=>{if(_.key==="Backspace"&&e.onBackspace&&!n){e.onBackspace();return}if(_.key==="ArrowUp"||_.key==="ArrowDown"){x.current=!0;return}},N=()=>{q(),e.resetSuggestionsOnClear&&M(),Te(e.onClickClearInput)&&e.onClickClearInput()},S=({suggestion:_})=>{if(T==="none"&&!_)return;x.current&&e.onArrowKeyUpOrDown&&(x.current=!1,e.onArrowKeyUpOrDown()),D(_?"suggestion":"custom")};function l(_){return Te(e.shouldUpdateQueryOnSelection)?e.shouldUpdateQueryOnSelection(_):e.shouldUpdateQueryOnSelection}const y=$.useMemo(()=>e.debounceTime?Fe.debounce(vn(e,o,M),e.debounceTime):vn(e,o,M),[e.debounceTime,...e.onSuggestionDependencies]);function b(_){return Te(e.renderSectionTitle)?e.renderSectionTitle(_,e.sectionTitleClassName):Qs(_,e.sectionTitleClassName)}function I(){return Te(e.renderSuggestionsOnInputFocus)?e.renderSuggestionsOnInputFocus(n):e.renderSuggestionsOnInputFocus}function O(){e.onBlur&&e.onBlur(n)}function A(){e.onFocus&&e.onFocus(n)}function W(_){_!==null&&!p.current&&(p.current=_.input)}function Y(){return typeof e.alwaysRenderSuggestions=="boolean"?e.alwaysRenderSuggestions:e.alwaysRenderSuggestionsWhenFocused&&n.length>=e.activationLength?document.activeElement===p.current:!1}return r.jsx(eu,{onSubmit:k,renderAsForm:!!e.renderAsForm,children:r.jsx(Ps,{ref:W,suggestions:c,onSuggestionsFetchRequested:y,onSuggestionHighlighted:S,onSuggestionsClearRequested:()=>{Y()||M()},onSuggestionSelected:(_,{suggestion:m})=>{m.generic||(e.clearQueryOnSelect&&q(),e.onSuggestionSelected(m,p.current,_))},getSuggestionValue:_=>l(_)?zs(e.valueKey,_):n,renderSuggestion:(_,m)=>{if(_.generic){if(_.type==="empty")return n.length>=e.activationLength&&Te(e.getEmptyStateComponent)?e.getEmptyStateComponent(n):r.jsx(r.Fragment,{});if(_.type==="errored"&&Te(e.getErrorStateComponent)){const u=vn(e,o,M),d=()=>u({value:n,reason:"input-changed"});return e.getErrorStateComponent(d)}if(_.type==="loading")return Ws(e.loadingComponentClassName)}return Te(e.getSuggestionComponent)?e.getSuggestionComponent(_,m):qn(e.valueKey,_)},renderSuggestionsContainer:_=>{const{ref:m,...u}=_.containerProps;if(!e.customScrollbarProps){const d={suggestions:s,query:n,isDropdownOpen:!!_.children};return r.jsxs("div",{ref:m,...u,onMouseOut:C,children:[_.children,e.getCreateComponent&&e.getCreateComponent({userInput:f,isActive:T==="custom",resetQuery:q,resetSuggestions:M,...d}),e.getFooterComponent&&e.getFooterComponent(d)]})}return r.jsx(ki,{ref:m,...e.customScrollbarProps,...u,children:_.children})},alwaysRenderSuggestions:Y(),focusInputOnSuggestionClick:!B&&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:Z,onKeyDown:R,autoFocus:!!e.autoFocusInput,highlightOnFocus:e.highlightInputOnFocus,onClickSearchIcon:!!e.submitOnClickSearchIcon&&k,searchIconPlacement:e.searchIconPlacement,showClearInputIcon:typeof e.showClearInputIcon=="boolean"?e.showClearInputIcon:!!n.length,onClickClearInput:N,formSize:e.size,onBlur:O,onFocus:A,disabled:e.disabled},renderInputComponent:Hs,theme:Xs(e.theme,!!s.generic.length),multiSection:!0,renderSectionTitle:b,getSectionSuggestions:Ks,...e.renderSuggestionsOnInputFocus?{shouldRenderSuggestions:I}:{}})})}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(f=>f.name===o);return Nn(p?"":o,c,"name",0).filter(f=>!(n.find(E=>E.name===f.name)||f.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",z=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(z("videoRequestTypeRequiredError")),topic:pe().when("videoRequestType",{is:e=>e==="videosTopic",then:pe().required(z("topicRequiredError")),otherwise:pe().notRequired()}),studentLevel:ye.array(ye.string()),videoTitle:pe().when(["videoRequestType","seriesName"],{is:(e,t)=>e==="videoOrSeries"&&!t,then:pe().required(z("videoRequiredError")),otherwise:pe().notRequired()}),seriesName:pe(),producerCompany:pe(),websiteOrTrailer:pe(),additionalInfo:De(),youtubeChannelLink:pe().when("videoRequestType",{is:e=>e==="youtubeVideo",then:pe().required(z("youtubeChannelLinkRequiredError")).url(z("invalidUrlError")),otherwise:pe().notRequired()}),youtubeVideoLink:pe().when("videoRequestType",{is:e=>e==="youtubeVideo",then:pe().required(z("youtubeVideoLinkRequiredError")).url(z("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(f=>f.name===o);return Nn(p?"":o,c,"name",0).filter(f=>!(n.find(E=>E.name===f.name)||f.name===(p==null?void 0:p.name)))}return r.jsxs(r.Fragment,{children:[r.jsxs(oe,{as:"select",label:z("videoRequestTypeLabel"),name:"videoRequestType",value:t.values.videoRequestType,children:[r.jsx("option",{value:"",disabled:!0,hidden:!0,children:z("videoRequestTypePlaceholder")}),r.jsx("option",{value:"videosTopic",children:z("videosTopicType")}),r.jsx("option",{value:"videoOrSeries",children:z("videoOrSeriesType")}),r.jsx("option",{value:"youtubeVideo",children:z("youtubeVideoType")})]}),t.values.videoRequestType==="youtubeVideo"&&r.jsxs(r.Fragment,{children:[r.jsx(oe,{placeholder:z("youtubeChannelLinkPlaceholder"),label:z("youtubeChannelLinkLabel"),name:"youtubeChannelLink",value:t.values.youtubeChannelLink,showRequiredStar:!0}),r.jsx(oe,{placeholder:z("youtubeVideoLinkPlaceholder"),label:z("youtubeVideoLinkLabel"),name:"youtubeVideoLink",value:t.values.youtubeVideoLink,showRequiredStar:!0}),r.jsx(oe,{as:"textarea",placeholder:z("otherPlaceholder"),label:z("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})]}),t.values.videoRequestType==="videosTopic"&&r.jsxs(r.Fragment,{children:[r.jsx(oe,{placeholder:z("videoTopicPlaceholder"),label:z("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:z("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:z("otherPlaceholder"),label:z("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})]}),t.values.videoRequestType==="videoOrSeries"&&r.jsxs(r.Fragment,{children:[r.jsx(oe,{placeholder:z("videoTitlePlaceholder"),label:z("videoTitleLabel"),name:"videoTitle",value:t.values.videoTitle}),r.jsx(oe,{placeholder:z("seriesPlaceholder"),label:z("seriesLabel"),name:"seriesName",value:t.values.seriesName}),r.jsx(oe,{placeholder:z("companyPlaceholder"),label:z("companyLabel"),name:"producerCompany",value:t.values.producerCompany}),r.jsx(oe,{placeholder:z("videoTopicPlaceholder"),label:z("topicLabel"),name:"topic",value:t.values.topic}),r.jsx(oe,{placeholder:z("websiteOrTrailerPlaceholder"),label:z("websiteOrTrailerLabel"),name:"websiteOrTrailer",value:t.values.websiteOrTrailer}),r.jsx(oe,{as:"textarea",placeholder:z("otherPlaceholder"),label:z("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(H.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 H.SUGGEST_IMPROVEMENT:return r.jsx(Eu,{...t});case H.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 H.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 H.REQUEST_LIVESTREAM:return r.jsx(vu,{...t,audiences:e.audiences});case H.RAISE_ISSUE:return r.jsx(ho,{...t});case H.GIVE_PRAISE:return r.jsx(io,{...t});case H.OTHER:return r.jsx(lo,{...t})}}const ni="shared.giveFeedback",et=ie.encloseNamespace(ni),Pr=5,Tr=60,Pu=1e6;function Gu(e){var Y,_;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,f]=se.useState("form"),[E,T]=se.useState(null),D=_i(xi.MixedMediaUpload),B=Li(()=>D.getCollection()),M=se.useRef(null),q=se.useRef(0),V=se.useRef([]),[L,K]=se.useState([]),[Z,C]=se.useState(""),k=e.product===Vt.StreamableLearning?Ie.StreamableLearning:Ie.Subject,R=Je(Ai.presentation(k)),N=Je(Fi.presentationAudiences(null,k)),l=(Y=Je(Si.userProducts()).data)==null?void 0:Y.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(d=>d.size>Tr*Pu)){C(et("maxFileSizeUploadError",{limit:Tr}));return}if(m.length>Pr-B.length){C(et("maxFilesUploadError",{limit:Pr}));return}if(m.some(d=>!kr.isValidFile(d,kn.MIXED_MEDIA))){C(et("invalidTypeUploadError"));return}C(""),q.current+=m.length,u&&(M.current=u),D.addFiles(m)}function b(m){const u=m.toJSON();if(V.current.push(u),q.current--,q.current>0)return;let d=V.current.length;V.current.forEach(h=>{setTimeout(()=>{d--;const a=D.getCollection().filter(g=>{var v;return((v=g.get("fileInfo"))==null?void 0:v.id)===h.fileInfo.id});D.getCollection().remove(a),K(g=>[...g,...a]),!(d>0)&&(_t.logUserAction({fileInfo:h.fileInfo},{location:zt.GiveFeedbackPopup,actionType:Gt.Upload,entity:Wt.MixedMedia,descriptor:_t.mapInteractionType(M.current)}),t.success(et("mixedMediaUploadSuccess")))})}),V.current=[]}function I(m){K(u=>u.filter(d=>d.id!==m))}function O(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 H.SUGGEST_IMPROVEMENT:return $e.SuggestImprovement;case H.REPORT_BUG:return $e.ReportBug;case H.REQUEST_VIDEO:return $e.RequestVideo;case H.REQUEST_LIVESTREAM:return $e.RequestLivestream;case H.GIVE_PRAISE:return $e.GivePraise;case H.RAISE_ISSUE:return $e.RaiseIssue;case H.OTHER:return $e.Other}}async function W(m,u){var a,g,v,w,P,U;const d={type:A(c),user:Pt.getUserInfo(i.data,s.data),tags:Pt.getTags(i.data,e.product,!1,["give feedback",kt(c).toLowerCase(),(g=(a=R.data)==null?void 0:a.description)==null?void 0:g.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===H.REPORT_BUG&&L.length&&(h={...h,...Pt.categorizeFiles(L)});try{await n($i.submitFeedback(d,h)),_t.logUserAction({...d,...h},{actionType:Gt.Submit,entity:Wt.Feedback,location:zt.GiveFeedbackPopup,workflowPhase:Wn.Complete}),f("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:O,options:[H.SUGGEST_IMPROVEMENT,H.REPORT_BUG,e.product===Vt.StreamableLearning?H.REQUEST_LIVESTREAM:H.REQUEST_VIDEO,H.GIVE_PRAISE,H.RAISE_ISSUE,H.OTHER]}),c&&r.jsx(Ru,{selectedOption:c,formStage:x,onSubmit:W,setSelectedOption:O,closePopup:e.closePopup,onFilesAdded:y,uploadingFiles:B,uploadedFiles:L,deleteFile:I,cancelUpload:m=>D.cancelUpload(m),audiences:N.data,uploadError:Z,initialValues:E,setFormState:T,instanceRegion:(_=i.data)==null?void 0:_.instanceRegion,hasExchangeTvProduct:!!l,exchangeTvUrl:l==null?void 0:l.url,skipBeforeRequesting:!!e.skipBeforeRequestingVideoStep,hideCancelButton:!!e.selectedOption})]})}export{Gu as GiveFeedbackView};
8
- //# sourceMappingURL=Cy191NLr.chunk.js.map
8
+ //# sourceMappingURL=-hO5xjbU.chunk.js.map