@clickview/exchange 0.42.0-rc.0 → 0.43.0-rc.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 (117) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{651-exchange-ed359f3d88.chunk.css → 489-exchange-17da763e87.chunk.css} +2 -0
  3. package/dist/css/{lite-exchange-4ffe357348.css → lite-exchange-ed6bd260c5.css} +1 -1
  4. package/dist/languages/en.json +1 -1
  5. package/dist/scripts/117-e2b3dd7f3e-exchange.chunk.js +1 -0
  6. package/dist/scripts/127-4a3c8f9725-exchange.chunk.js +1 -0
  7. package/dist/scripts/136-fd99ef4c9d-exchange.chunk.js +2 -0
  8. package/dist/scripts/136-fd99ef4c9d-exchange.chunk.js.LICENSE.txt +1 -0
  9. package/dist/scripts/137-3469f0ae4f-exchange.chunk.js +1 -0
  10. package/dist/scripts/156-847dae6ace-exchange.chunk.js +1 -0
  11. package/dist/scripts/170-9db7c3b12e-exchange.chunk.js +1 -0
  12. package/dist/scripts/173-3668db114a-exchange.chunk.js +1 -0
  13. package/dist/scripts/212-6ed71b2797-exchange.chunk.js +1 -0
  14. package/dist/scripts/226-889bef8e6c-exchange.chunk.js +1 -0
  15. package/dist/scripts/267-7daf64f8a1-exchange.chunk.js +1 -0
  16. package/dist/scripts/291-7e85a6e844-exchange.chunk.js +1 -0
  17. package/dist/scripts/298-ed8e8b8328-exchange.chunk.js +1 -0
  18. package/dist/scripts/312-69afcbbc39-exchange.chunk.js +1 -0
  19. package/dist/scripts/{325-eafc6d2723-exchange.chunk.js → 325-76baea117f-exchange.chunk.js} +1 -1
  20. package/dist/scripts/332-08d48debc2-exchange.chunk.js +1 -0
  21. package/dist/scripts/414-567e121c75-exchange.chunk.js +2 -0
  22. package/dist/scripts/{414-6440ca2c7d-exchange.chunk.js.LICENSE.txt → 414-567e121c75-exchange.chunk.js.LICENSE.txt} +1 -1
  23. package/dist/scripts/442-fcba36183d-exchange.chunk.js +1 -0
  24. package/dist/scripts/455-ceeb969c54-exchange.chunk.js +1 -0
  25. package/dist/scripts/484-08c82c5a88-exchange.chunk.js +1 -0
  26. package/dist/scripts/489-af07bfe6b6-exchange.chunk.js +2 -0
  27. package/dist/scripts/489-af07bfe6b6-exchange.chunk.js.LICENSE.txt +1 -0
  28. package/dist/scripts/494-abba46b945-exchange.chunk.js +2 -0
  29. package/dist/scripts/494-abba46b945-exchange.chunk.js.LICENSE.txt +1 -0
  30. package/dist/scripts/507-b6e119c8e2-exchange.chunk.js +1 -0
  31. package/dist/scripts/522-bff5ec4360-exchange.chunk.js +2 -0
  32. package/dist/scripts/522-bff5ec4360-exchange.chunk.js.LICENSE.txt +1 -0
  33. package/dist/scripts/536-b915864d5f-exchange.chunk.js +1 -0
  34. package/dist/scripts/538-ccc01a623f-exchange.chunk.js +2 -0
  35. package/dist/scripts/538-ccc01a623f-exchange.chunk.js.LICENSE.txt +1 -0
  36. package/dist/scripts/558-c29164dfd9-exchange.chunk.js +1 -0
  37. package/dist/scripts/589-17d73ab116-exchange.chunk.js +1 -0
  38. package/dist/scripts/611-d8bd3e98dc-exchange.chunk.js +1 -0
  39. package/dist/scripts/619-1abac6cb1d-exchange.chunk.js +1 -0
  40. package/dist/scripts/648-485af12c37-exchange.chunk.js +1 -0
  41. package/dist/scripts/659-d7aefc839c-exchange.chunk.js +1 -0
  42. package/dist/scripts/669-ca4aa9bc7c-exchange.chunk.js +1 -0
  43. package/dist/scripts/68-34b81dae8c-exchange.chunk.js +1 -0
  44. package/dist/scripts/725-9ddf1084b6-exchange.chunk.js +1 -0
  45. package/dist/scripts/726-868a877381-exchange.chunk.js +1 -0
  46. package/dist/scripts/75-9780e4300e-exchange.chunk.js +1 -0
  47. package/dist/scripts/759-f1a9db4868-exchange.chunk.js +1 -0
  48. package/dist/scripts/782-2c340d8404-exchange.chunk.js +1 -0
  49. package/dist/scripts/831-8808647fc7-exchange.chunk.js +1 -0
  50. package/dist/scripts/851-61f77ce4aa-exchange.chunk.js +2 -0
  51. package/dist/scripts/851-61f77ce4aa-exchange.chunk.js.LICENSE.txt +1 -0
  52. package/dist/scripts/{866-187a4b057a-exchange.chunk.js → 866-14ce8a3a4d-exchange.chunk.js} +1 -1
  53. package/dist/scripts/87-d569a1463e-exchange.chunk.js +1 -0
  54. package/dist/scripts/904-bd1dfd39e0-exchange.chunk.js +1 -0
  55. package/dist/scripts/925-f70ee1c7f9-exchange.chunk.js +1 -0
  56. package/dist/scripts/937-2e1f1f330e-exchange.chunk.js +1 -0
  57. package/dist/scripts/95-bd8ed548fc-exchange.chunk.js +2 -0
  58. package/dist/scripts/95-bd8ed548fc-exchange.chunk.js.LICENSE.txt +1 -0
  59. package/dist/scripts/bundle-ad48936b47.min.js +2 -0
  60. package/dist/scripts/{bundle-8dc46ddfab.min.js.LICENSE.txt → bundle-ad48936b47.min.js.LICENSE.txt} +1 -1
  61. package/package.json +1 -1
  62. package/dist/scripts/117-a71c7703ad-exchange.chunk.js +0 -1
  63. package/dist/scripts/127-92dc016a93-exchange.chunk.js +0 -1
  64. package/dist/scripts/136-486d2ff09a-exchange.chunk.js +0 -2
  65. package/dist/scripts/136-486d2ff09a-exchange.chunk.js.LICENSE.txt +0 -1
  66. package/dist/scripts/137-6007937019-exchange.chunk.js +0 -1
  67. package/dist/scripts/156-14625c2bb0-exchange.chunk.js +0 -1
  68. package/dist/scripts/170-8a3dadfb8d-exchange.chunk.js +0 -1
  69. package/dist/scripts/173-43b652e061-exchange.chunk.js +0 -1
  70. package/dist/scripts/212-c3bd645e6c-exchange.chunk.js +0 -1
  71. package/dist/scripts/226-c5c63cc910-exchange.chunk.js +0 -1
  72. package/dist/scripts/267-ef0b473b5b-exchange.chunk.js +0 -1
  73. package/dist/scripts/291-b22851572f-exchange.chunk.js +0 -1
  74. package/dist/scripts/298-00c817b0a2-exchange.chunk.js +0 -1
  75. package/dist/scripts/312-3bce3bebb0-exchange.chunk.js +0 -1
  76. package/dist/scripts/332-7b0dc13857-exchange.chunk.js +0 -1
  77. package/dist/scripts/414-6440ca2c7d-exchange.chunk.js +0 -2
  78. package/dist/scripts/442-b81cdd41f1-exchange.chunk.js +0 -1
  79. package/dist/scripts/455-431dd8ae58-exchange.chunk.js +0 -1
  80. package/dist/scripts/484-5995380059-exchange.chunk.js +0 -1
  81. package/dist/scripts/494-bbdbf724ab-exchange.chunk.js +0 -2
  82. package/dist/scripts/494-bbdbf724ab-exchange.chunk.js.LICENSE.txt +0 -1
  83. package/dist/scripts/522-592d80f6b9-exchange.chunk.js +0 -2
  84. package/dist/scripts/522-592d80f6b9-exchange.chunk.js.LICENSE.txt +0 -1
  85. package/dist/scripts/536-60a0365c89-exchange.chunk.js +0 -1
  86. package/dist/scripts/538-eb82ec0f4f-exchange.chunk.js +0 -2
  87. package/dist/scripts/538-eb82ec0f4f-exchange.chunk.js.LICENSE.txt +0 -1
  88. package/dist/scripts/558-26876df8ca-exchange.chunk.js +0 -1
  89. package/dist/scripts/589-c46c85e1a5-exchange.chunk.js +0 -1
  90. package/dist/scripts/611-74c66fd12e-exchange.chunk.js +0 -1
  91. package/dist/scripts/619-eece92ee6d-exchange.chunk.js +0 -1
  92. package/dist/scripts/648-41dc8d0902-exchange.chunk.js +0 -1
  93. package/dist/scripts/651-7bb7c130ee-exchange.chunk.js +0 -2
  94. package/dist/scripts/651-7bb7c130ee-exchange.chunk.js.LICENSE.txt +0 -1
  95. package/dist/scripts/659-9c2e19d274-exchange.chunk.js +0 -1
  96. package/dist/scripts/669-3663718e51-exchange.chunk.js +0 -1
  97. package/dist/scripts/68-9bc7f5980b-exchange.chunk.js +0 -1
  98. package/dist/scripts/725-1643762091-exchange.chunk.js +0 -1
  99. package/dist/scripts/726-0326486cac-exchange.chunk.js +0 -1
  100. package/dist/scripts/75-7581313572-exchange.chunk.js +0 -1
  101. package/dist/scripts/759-4981c7b5f0-exchange.chunk.js +0 -1
  102. package/dist/scripts/782-c71c388c62-exchange.chunk.js +0 -1
  103. package/dist/scripts/831-92f23405d1-exchange.chunk.js +0 -1
  104. package/dist/scripts/851-f4c3f42dc0-exchange.chunk.js +0 -2
  105. package/dist/scripts/851-f4c3f42dc0-exchange.chunk.js.LICENSE.txt +0 -1
  106. package/dist/scripts/87-9fccd188ae-exchange.chunk.js +0 -1
  107. package/dist/scripts/881-dbfc2bb923-exchange.chunk.js +0 -1
  108. package/dist/scripts/904-360548d336-exchange.chunk.js +0 -1
  109. package/dist/scripts/925-e0f4aee722-exchange.chunk.js +0 -1
  110. package/dist/scripts/937-2b17465c28-exchange.chunk.js +0 -1
  111. package/dist/scripts/95-72209d9609-exchange.chunk.js +0 -2
  112. package/dist/scripts/95-72209d9609-exchange.chunk.js.LICENSE.txt +0 -1
  113. package/dist/scripts/bundle-8dc46ddfab.min.js +0 -2
  114. package/dist/css/{759-exchange-015d6143ca.chunk.css → 759-exchange-23bb5dd175.chunk.css} +1 -1
  115. /package/dist/scripts/{601-77fb6a087c-exchange.chunk.js → 601-a3c22b0a9f-exchange.chunk.js} +0 -0
  116. /package/dist/scripts/{858-51c9b42098-exchange.chunk.js → 858-70085ed3b1-exchange.chunk.js} +0 -0
  117. /package/dist/scripts/{877-e693257ae6-exchange.chunk.js → 877-5b357aeb63-exchange.chunk.js} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[442],{69834:(e,t,r)=>{r.d(t,{r:()=>T});var n=r(50242),o=r(81886),a=r(67058),i=r(23481),u=r(64364);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var y="shared.privateResourceError",v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=f(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,d()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}(this,t,[i.T.getPhrase(y,"title")])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return i.T.getPhrase(y,"heading")}},{key:"description",get:function(){return i.T.getPhrase(y,"description")}}])&&l(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.H);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function g(e){var t=function(e){if("object"!=m(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==m(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}var k="shared.regionLockedResourceError",j=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=w(t),function(e,t){if(t&&("object"==m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,r||[],w(e).constructor):t.apply(e,r))}(this,t,[i.T.getPhrase(k,"title")])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"RegionLockedResourceError"}},{key:"heading",get:function(){return i.T.getPhrase(k,"heading")}},{key:"description",get:function(){return i.T.getPhrase(k,"description")}}])&&b(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.H),P=r(49075),S={notFound:a.d,forbidden:{rating:v,yearLevel:v,region:j,privacy:v},badRequest:P._,internalServerError:P._};function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var a;a="number"==typeof e?e:e.status;var i=Object.assign(Object.assign({},S),t);a&&o.Q.Ry.isStatusCodeError(a)&&(a!==n.o.InternalServer?a!==n.o.NotFound?a!==n.o.Forbidden?r.badRequest||o.Q.Ry.throw(new i.badRequest):r.forbidden||o.Q.Ry.throw(new i.forbidden.privacy):r.notFound||o.Q.Ry.throw(new i.notFound):r.internalServerError||o.Q.Ry.throw(new P._))}}},5353:(e,t,r)=>{r.d(t,{i:()=>d});var n,o=r(99940),a=r(97395),i=r(14965);!function(e){e[e.AllResults=0]="AllResults",e[e.Subtitles=1]="Subtitles",e[e.TitleAndDescription=2]="TitleAndDescription"}(n||(n={}));var u=r(55812);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(e){return Object.entries(e).reduce((function(e,t){var r,n,o=(n=2,function(e){if(Array.isArray(e))return e}(r=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(r,n)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],i=o[1];return e[a.charAt(0).toLowerCase()+a.slice(1)]=i,e}),{})}function s(e){return e?Array.isArray(e)?function(e){return e.map(l)}(e):l(e):null}var d={regions:function(){return{url:"/api/tv/api/v2/regions",key:"tv:regions",normalize:!1,formatData:s}},region:function(e){return{url:"/api/tv/api/v2/regions/".concat(e),key:"tv:region:".concat(e),normalize:!1,formatData:s}},dateRange:function(e){return{url:"/api/tv/api/v2/regions/".concat(e,"/daterange"),key:"tv:region:".concat(e,":daterange"),normalize:!1,formatData:s}},channels:function(e){return{url:a._.urlBuilder("/api/tv/api/v2/channels",{region:e}),key:"tv:channels:".concat(e),normalize:!1,formatData:function(e){return s(e).sort((function(e,t){return e.sortOrder-t.sortOrder}))}}},payTvChannels:function(){return{url:"/api/tv/v1/pay-tv/channels/all",key:"pay:tv:channels",normalize:!1,formatData:s}},programsByChannel:function(e,t,r,n){return{url:a._.urlBuilder("/api/tv/api/v3/regions/".concat(e,"/channels/programs"),{channel:t,startDate:r,endDate:n}),key:["tv:programs:by:channel",e,t,r,n].join(":"),normalize:!1,formatData:s}},programsByLetter:function(e,t,r,n){return{url:a._.urlBuilder("/api/tv/api/v2/Programs",{regionCode:e,startsWith:t,startDate:r,endDate:n}),key:["tv:programs:by:letter",e,t,r,n].join(":"),normalize:!1,formatData:s}},program:function(e){return{url:"/api/tv/api/v3/programs/".concat(e),key:"tv:programs:".concat(e),normalize:!1,formatData:function(e){var t=s(e);return t.region=s(e.Region),t}}},search:function(e,t,r){var o=t.query,i=t.dateBroadcast,c=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["query","dateBroadcast"]),l=r||1,d=c.filter||n.AllResults;return{url:a._.urlBuilder("/api/tv/api/v4/search",Object.assign(Object.assign(Object.assign({region:e,query:o,filter:d},u.a.getDateBroadcastParams(i)),c),{page:l,size:25})),key:["tv:search",o,e,Object.values(Object.assign({filter:d,dateBroadcast:i},c)).join(":"),l].join(":"),normalize:!1,formatData:function(e){var t=s(e);return t.results=s(e.Results),t.page=l,t}}},addFullVideo:function(e,t){return{url:"/api/tv/api/v2/workspace/video",key:"tv:add:full:video",normalize:!1,type:o.k.POST,data:e,invalidationKeys:"tv:workspace:video:".concat(t)}},addAdFreeVideo:function(e,t){return{url:a._.urlBuilder("/api/tv/v4/programs/".concat(e.id,"/ad-free"),{customerId:e.customerId,userId:e.userId}),key:"tv:add:ad:free:video",normalize:!1,type:o.k.POST,invalidationKeys:"tv:workspace:video:".concat(t)}},adFreeCredits:function(e,t,r){var n=new Date;n.setHours(0,0,0,0),n.setMinutes(n.getMinutes()+n.getTimezoneOffset());var o=i.O.add(n,1,"day");return{url:a._.urlBuilder("/api/tv/v4/user-requests",{userId:e,customerId:t,regionCode:r,from:i.O.convertUTCToLocal(n).toISOString(),to:i.O.convertUTCToLocal(o).toISOString()}),key:"tv:add:free:credits",normalize:!1,formatData:s}},createAdFreeRequest:function(e){return{url:a._.urlBuilder("/api/tv/v4/user-requests/ad-free",{userId:e.userId,customerId:e.customerId}),key:"tv:create:add:free:request",normalize:!1,type:o.k.POST,data:{programId:e.programId,regionCode:e.regionCode},invalidationKeys:["tv:add:free:credits"]}},workspaceVideo:function(e,t,r){return{url:a._.urlBuilder("/api/tv/v4/workspace/programs/".concat(e),{userId:t,customerId:r}),key:"tv:workspace:video:".concat(e),formatData:s}},requestProgram:function(e){return{url:"/api/tv/v1/pay-tv/user-requests",key:"tv:request:program",type:o.k.POST,data:e}},requestProgramUk:function(e){return{url:"/api/tv/api/v1/user-requests/program",key:"tv:request:program:uk",type:o.k.POST,data:e}}}},85949:(e,t,r)=>{r.d(t,{Y:()=>y});var n=r(81886),o=r(23481),a=r(97395),i=r(20354),u=r(65858),c=r(12754),l=r(39151),s=r(35223),d=r(73818),f=r(82329),p=o.T.encloseNamespace("tv.addRequests");function y(e,t,r){var o=i.a.useBasicFetch(l.L.config());return function(i){var l;if(!t)return[];var y="preview"===e,v={id:i.id,name:i.title},m=y?u.LZ.VideoItemPreview:u.LZ.VideoListItem;return[{label:y?p("addVideo"):"",svgName:y?void 0:s.vn.AddVideo,tooltip:y?"":p("addVideo"),className:y?"btn btn-dark me-2 text-nowrap":"btn",button:!0,onClick:function(){n.Q.C$.trigger({application:f.O.TV,action:d.e.Tv.ADD,args:[t.code,i.id],params:{currentTime:Math.floor(+(null==r?void 0:r.currentTime()))||void 0}})},analyticsData:v,analyticsOptions:{actionType:u.Vw.Click,entity:u.py.Video,descriptor:u.XX.AddToWorkspace,location:m,workflowPhase:u.eu.Start}},{label:p("editVideo"),href:a._.urlBuilder("".concat(null===(l=o.data)||void 0===l?void 0:l.cloudEditorUrl,"/tv/").concat(i.globalId),{product:c.x.Exchange}),openInNewTab:!0,analyticsData:v,analyticsOptions:{actionType:u.Vw.Click,entity:u.py.Video,location:m,descriptor:u.XX.EditVideo}}]}}},8519:(e,t,r)=>{r.d(t,{e:()=>c});var n=r(32735),o=r(50242),a=r(81886),i=r(20470),u=r(69834);function c(e,t){n.useEffect((function(){e.hasCompleted&&(e.data||(e.hasError&&(0,u.r)(e.statusCode),t?a.Q.Ry.throw(new i.x):(0,u.r)(o.o.BadRequest)))}),[e.hasCompleted,e.data])}},55812:(e,t,r)=>{r.d(t,{a:()=>i});var n=r(67624),o=r(14965),a=r(1048),i={getFormattedDateRange:function(e,t){return"".concat(o.O.format(e,"Do MMMM YYYY")," - ").concat(o.O.format(t,"Do MMMM YYYY"))},getDateBroadcastParams:function(e){var t=function(e){return o.O.format(e,"YYYY-MM-DD")},r=t(new Date);switch(e){case"yesterday":return{from:t(o.O.subtract(r,1,"day")),to:r};case"last-week":return{from:t(o.O.subtract(r,7,"days")),to:r};case"last-2-weeks":return{from:t(o.O.subtract(r,14,"days")),to:r}}},isHolidayPeriod:function(){var e,t=(e=n.SG.get("cv:holiday:dates"),a.t.isObject(e)?e:{startMonth:12,startDay:15,endMonth:1,endDay:6}),r=t.startMonth,o=t.startDay,i=t.endMonth,u=t.endDay,c=new Date,l=c.getMonth()+1,s=c.getDate();return l===r&&s>=o||l===i&&s<=u}}},70442:(e,t,r)=>{r.r(t),r.d(t,{TvPreviewView:()=>b});var n=r(32735),o=r(20354),a=r(77696),i=r(39151),u=r(31949),c=r(23455),l=r(33928),s=r(1557),d=r(84034),f=r(5353),p=r(85949),y=r(8519),v=r(97395);function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function b(e){var t,r,b,g=o.a.useBasicFetch(f.i.region(e.region)),h=o.a.useBasicFetch(i.L.config()),w=o.a.useBasicFetch(f.i.program(e.id)),O=o.a.useBasicFetch(u.N.currentUser()),k=(r=n.useState(),b=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(r,b)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}(r,b)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),j=k[0],P=k[1],S=(0,p.Y)("preview",g.data,j);(0,y.e)(g,!0),(0,c.h)(w.statusCode);var T=g.hasCompleted&&w.hasCompleted&&h.hasCompleted&&O.hasCompleted,C=T&&function(e){var t=e.currentUser,r=e.region,n=e.config,o=e.program,a=n.tvPreviewUrls[r.code],i=o.globalId.replace(/-/g,""),u=v._.safeUrlConcat(a,"/thumbnail/".concat(i,".jpg")),c=v._.safeUrlConcat(a,"/144p/".concat(i.toUpperCase(),"_144p.mp4")),l=v._.safeUrlConcat(a,"/subtitle/".concat(i.toUpperCase(),".srt")),s=v._.urlBuilder(v._.safeUrlConcat(n.playerApiUrl,"/api/srt-to-vtt"),{url:l});return{videoId:null,episodeNumber:0,seriesName:null,mediaId:null,mediaType:null,ratingCode:null,region:t.instanceRegion,seasonNumber:null,viewerId:t.id,viewerCustomerId:t.customerId,files:{fileToken:"",progressive:[{mimeType:"video/mp4",profile:"144",url:c}]},chapters:{list:[]},instanceRegion:t.instanceRegion,localCacheAddresses:[],posterUrl:u,resources:{list:[]},settings:{showSubtitles:!1,playbackProfile:"144",playbackProfileLocalCache:"144",playbackSubtitleSizeDefault:"medium"},subtitles:{list:[{url:s,isDefault:!1,language:"en-AU",mimeType:"text/vtt",label:"English"}]},title:o.title}}({currentUser:O.data,region:g.data,config:h.data,program:w.data});return n.createElement(a.G,{title:null===(t=w.data)||void 0===t?void 0:t.title,closePopup:e.closePopup,showLoadingSpinner:!T,size:"lg",bodyClassName:"p-0 rounded-3 position-relative",hideTitle:!0},T&&n.createElement(n.Fragment,null,n.createElement("div",{className:"overflow-hidden rounded-top-lg"},n.createElement(l.L,{viewKey:null,offlinePlaybackObject:C,playerApi:new URL(h.data.playerApiUrl),autoplay:!0,hotkeyElQuerySelector:"body",onReady:function(t){P(t),e.currentTime&&t.currentTime(e.currentTime)},allowFullscreen:!1})),n.createElement(d.d,{program:w.data,title:w.data.title,description:w.data.description,videoActions:S(w.data)}),n.createElement(s.$,{closePopup:e.closePopup})))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[455],{20455:(e,t,n)=>{n.d(t,{LB:()=>He,y9:()=>ct,g4:()=>te,Lg:()=>ae,we:()=>de,pE:()=>R,ey:()=>S,VK:()=>I,_8:()=>E,hI:()=>B,Cj:()=>_e,O1:()=>Ge,Zj:()=>Ze,VT:()=>g,Dy:()=>p});var r=n(32735),o=n(12788),i=n(17592);const a={display:"none"};function l(e){let{id:t,value:n}=e;return r.createElement("div",{id:t,style:a},n)}function s(e){let{id:t,announcement:n,ariaLiveType:o="assertive"}=e;return r.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":o,"aria-atomic":!0},n)}const c=(0,r.createContext)(null),u={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},d={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function f(e){let{announcements:t=d,container:n,hiddenTextDescribedById:a,screenReaderInstructions:f=u}=e;const{announce:v,announcement:h}=function(){const[e,t]=(0,r.useState)("");return{announce:(0,r.useCallback)((e=>{null!=e&&t(e)}),[]),announcement:e}}(),g=(0,i.Ld)("DndLiveRegion"),[p,b]=(0,r.useState)(!1);if((0,r.useEffect)((()=>{b(!0)}),[]),function(e){const t=(0,r.useContext)(c);(0,r.useEffect)((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}((0,r.useMemo)((()=>({onDragStart(e){let{active:n}=e;v(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&v(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;v(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;v(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;v(t.onDragCancel({active:n,over:r}))}})),[v,t])),!p)return null;const m=r.createElement(r.Fragment,null,r.createElement(l,{id:a,value:f.draggable}),r.createElement(s,{id:g,announcement:h}));return n?(0,o.createPortal)(m,n):m}var v;function h(){}function g(e,t){return(0,r.useMemo)((()=>({sensor:e,options:null!=t?t:{}})),[e,t])}function p(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>[...t].filter((e=>null!=e))),[...t])}!function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"}(v||(v={}));const b=Object.freeze({x:0,y:0});function m(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function y(e,t){const n=(0,i.DC)(e);return n?(n.x-t.left)/t.width*100+"% "+(n.y-t.top)/t.height*100+"%":"0 0"}function w(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function x(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function C(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function E(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}function D(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const R=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=D(t,t.left,t.top),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=m(D(r),o);i.push({id:t,data:{droppableContainer:e,value:n}})}}return i.sort(w)},S=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=C(t),i=[];for(const e of r){const{id:t}=e,r=n.get(t);if(r){const n=C(r),a=o.reduce(((e,t,r)=>e+m(n[r],t)),0),l=Number((a/4).toFixed(4));i.push({id:t,data:{droppableContainer:e,value:l}})}}return i.sort(w)};function M(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,l=i-n;if(r<o&&n<i){const n=t.width*t.height,r=e.width*e.height,o=a*l;return Number((o/(n+r-o)).toFixed(4))}return 0}const N=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const e of r){const{id:r}=e,i=n.get(r);if(i){const n=M(i,t);n>0&&o.push({id:r,data:{droppableContainer:e,value:n}})}}return o.sort(x)};function k(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:b}function L(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const O=L(1);function T(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}const A={ignoreTransform:!1};function I(e,t){void 0===t&&(t=A);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:t}=(0,i.Jj)(e),{transform:r,transformOrigin:o}=t(e);r&&(n=function(e,t,n){const r=T(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:l}=r,s=e.left-a-(1-o)*parseFloat(n),c=e.top-l-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s}}(n,r,o))}const{top:r,left:o,width:a,height:l,bottom:s,right:c}=n;return{top:r,left:o,width:a,height:l,bottom:s,right:c}}function j(e){return I(e,{ignoreTransform:!0})}function B(e,t){const n=[];return e?function r(o){if(null!=t&&n.length>=t)return n;if(!o)return n;if((0,i.qk)(o)&&null!=o.scrollingElement&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!(0,i.Re)(o)||(0,i.vZ)(o))return n;if(n.includes(o))return n;const{getComputedStyle:a}=(0,i.Jj)(o),l=a(o);return o!==e&&function(e,t){void 0===t&&(t=(0,i.Jj)(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const r=t[e];return"string"==typeof r&&n.test(r)}))}(o,l)&&n.push(o),function(e,t){return void 0===t&&(t=(0,i.Jj)(e).getComputedStyle(e)),"fixed"===t.position}(o,l)?n:r(o.parentNode)}(e):n}function z(e){const[t]=B(e,1);return null!=t?t:null}function X(e){return i.Nq&&e?(0,i.FJ)(e)?e:(0,i.UG)(e)?(0,i.qk)(e)||e===(0,i.r3)(e).scrollingElement?window:(0,i.Re)(e)?e:null:null:null}function P(e){return(0,i.FJ)(e)?e.scrollX:e.scrollLeft}function F(e){return(0,i.FJ)(e)?e.scrollY:e.scrollTop}function J(e){return{x:P(e),y:F(e)}}var Y;function U(e){return!(!i.Nq||!e)&&e===document.scrollingElement}function H(e){const t={x:0,y:0},n=U(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(Y||(Y={}));const K={x:.2,y:.2};function q(e,t,n,r,o){let{top:i,left:a,right:l,bottom:s}=n;void 0===r&&(r=10),void 0===o&&(o=K);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=H(e),v={x:0,y:0},h={x:0,y:0},g=t.height*o.y,p=t.width*o.x;return!c&&i<=t.top+g?(v.y=Y.Backward,h.y=r*Math.abs((t.top+g-i)/g)):!u&&s>=t.bottom-g&&(v.y=Y.Forward,h.y=r*Math.abs((t.bottom-g-s)/g)),!f&&l>=t.right-p?(v.x=Y.Forward,h.x=r*Math.abs((t.right-p-l)/p)):!d&&a<=t.left+p&&(v.x=Y.Backward,h.x=r*Math.abs((t.left+p-a)/p)),{direction:v,speed:h}}function W(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function G(e){return e.reduce(((e,t)=>(0,i.IH)(e,J(t))),b)}function _(e,t){if(void 0===t&&(t=I),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);z(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const V=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+P(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+F(t)),0)}]];class ${constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=B(t),r=G(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,o]of V)for(const i of t)Object.defineProperty(this,i,{get:()=>{const t=o(n),a=r[e]-t;return this.rect[i]+a},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Z{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var r;null==(r=this.target)||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Q(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t&&r>t.y}var ee,te;function ne(e){e.preventDefault()}function re(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(ee||(ee={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}(te||(te={}));const oe={start:[te.Space,te.Enter],cancel:[te.Esc],end:[te.Space,te.Enter]},ie=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case te.Right:return{...n,x:n.x+25};case te.Left:return{...n,x:n.x-25};case te.Down:return{...n,y:n.y+25};case te.Up:return{...n,y:n.y-25}}};class ae{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Z((0,i.r3)(t)),this.windowListeners=new Z((0,i.Jj)(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ee.Resize,this.handleCancel),this.windowListeners.add(ee.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(ee.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&_(n),t(b)}handleKeyDown(e){if((0,i.vd)(e)){const{active:t,context:n,options:r}=this.props,{keyboardCodes:o=oe,coordinateGetter:a=ie,scrollBehavior:l="smooth"}=r,{code:s}=e;if(o.end.includes(s))return void this.handleEnd(e);if(o.cancel.includes(s))return void this.handleCancel(e);const{collisionRect:c}=n.current,u=c?{x:c.left,y:c.top}:b;this.referenceCoordinates||(this.referenceCoordinates=u);const d=a(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=(0,i.$X)(d,u),r={x:0,y:0},{scrollableAncestors:o}=n.current;for(const n of o){const o=e.code,{isTop:i,isRight:a,isLeft:s,isBottom:c,maxScroll:u,minScroll:f}=H(n),v=W(n),h={x:Math.min(o===te.Right?v.right-v.width/2:v.right,Math.max(o===te.Right?v.left:v.left+v.width/2,d.x)),y:Math.min(o===te.Down?v.bottom-v.height/2:v.bottom,Math.max(o===te.Down?v.top:v.top+v.height/2,d.y))},g=o===te.Right&&!a||o===te.Left&&!s,p=o===te.Down&&!c||o===te.Up&&!i;if(g&&h.x!==d.x){const e=n.scrollLeft+t.x,i=o===te.Right&&e<=u.x||o===te.Left&&e>=f.x;if(i&&!t.y)return void n.scrollTo({left:e,behavior:l});r.x=i?n.scrollLeft-e:o===te.Right?n.scrollLeft-u.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:l});break}if(p&&h.y!==d.y){const e=n.scrollTop+t.y,i=o===te.Down&&e<=u.y||o===te.Up&&e>=f.y;if(i&&!t.x)return void n.scrollTo({top:e,behavior:l});r.y=i?n.scrollTop-e:o===te.Down?n.scrollTop-u.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:l});break}}this.handleMove(e,(0,i.IH)((0,i.$X)(d,this.referenceCoordinates),r))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function le(e){return Boolean(e&&"distance"in e)}function se(e){return Boolean(e&&"delay"in e)}ae.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=oe,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const t=i.activatorNode.current;return!(t&&e.target!==t||(e.preventDefault(),null==o||o({event:e.nativeEvent}),0))}return!1}}];class ce{constructor(e,t,n){var r;void 0===n&&(n=function(e){const{EventTarget:t}=(0,i.Jj)(e);return e instanceof t?e:(0,i.r3)(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:o}=e,{target:a}=o;this.props=e,this.events=t,this.document=(0,i.r3)(a),this.documentListeners=new Z(this.document),this.listeners=new Z(n),this.windowListeners=new Z((0,i.Jj)(a)),this.initialCoordinates=null!=(r=(0,i.DC)(o))?r:b,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(ee.Resize,this.handleCancel),this.windowListeners.add(ee.DragStart,ne),this.windowListeners.add(ee.VisibilityChange,this.handleCancel),this.windowListeners.add(ee.ContextMenu,ne),this.documentListeners.add(ee.Keydown,this.handleKeydown),t){if(le(t))return;if(se(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay))}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ee.Click,re,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ee.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:r,props:o}=this,{onMove:a,options:{activationConstraint:l}}=o;if(!r)return;const s=null!=(t=(0,i.DC)(e))?t:b,c=(0,i.$X)(r,s);if(!n&&l){if(se(l))return Q(c,l.tolerance)?this.handleCancel():void 0;if(le(l))return null!=l.tolerance&&Q(c,l.tolerance)?this.handleCancel():Q(c,l.distance)?this.handleStart():void 0}e.cancelable&&e.preventDefault(),a(s)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===te.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const ue={move:{name:"pointermove"},end:{name:"pointerup"}};class de extends ce{constructor(e){const{event:t}=e,n=(0,i.r3)(t.target);super(e,ue,n)}}de.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!(!n.isPrimary||0!==n.button||(null==r||r({event:n}),0))}}];const fe={move:{name:"mousemove"},end:{name:"mouseup"}};var ve;!function(e){e[e.RightClick=2]="RightClick"}(ve||(ve={})),class extends ce{constructor(e){super(e,fe,(0,i.r3)(e.event.target))}}.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==ve.RightClick&&(null==r||r({event:n}),!0)}}];const he={move:{name:"touchmove"},end:{name:"touchend"}};var ge,pe;(class extends ce{constructor(e){super(e,he)}static setup(){return window.addEventListener(he.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(he.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return!(o.length>1||(null==r||r({event:n}),0))}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(ge||(ge={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(pe||(pe={}));const be={x:{[Y.Backward]:!1,[Y.Forward]:!1},y:{[Y.Backward]:!1,[Y.Forward]:!1}};var me,ye;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(me||(me={})),function(e){e.Optimized="optimized"}(ye||(ye={}));const we=new Map;function xe(e,t){return(0,i.Gj)((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function Ce(e){let{callback:t,disabled:n}=e;const o=(0,i.zX)(t),a=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.ResizeObserver)return;const{ResizeObserver:e}=window;return new e(o)}),[n]);return(0,r.useEffect)((()=>()=>null==a?void 0:a.disconnect()),[a]),a}function Ee(e){return new $(I(e),e)}function De(e,t,n){void 0===t&&(t=Ee);const[o,a]=(0,r.useReducer)((function(r){if(!e)return null;var o;if(!1===e.isConnected)return null!=(o=null!=r?r:n)?o:null;const i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i}),null),l=function(e){let{callback:t,disabled:n}=e;const o=(0,i.zX)(t),a=(0,r.useMemo)((()=>{if(n||"undefined"==typeof window||void 0===window.MutationObserver)return;const{MutationObserver:e}=window;return new e(o)}),[o,n]);return(0,r.useEffect)((()=>()=>null==a?void 0:a.disconnect()),[a]),a}({callback(t){if(e)for(const n of t){const{type:t,target:r}=n;if("childList"===t&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=Ce({callback:a});return(0,i.LI)((()=>{a(),e?(null==s||s.observe(e),null==l||l.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==l||l.disconnect())}),[e]),o}const Re=[];function Se(e,t){void 0===t&&(t=[]);const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{n.current=null}),t),(0,r.useEffect)((()=>{const t=e!==b;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?(0,i.$X)(e,n.current):b}function Me(e){return(0,r.useMemo)((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const Ne=[];function ke(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return(0,i.Re)(t)?t:e}const Le=[{sensor:de,options:{}},{sensor:ae,options:{}}],Oe={current:{}},Te={draggable:{measure:j},droppable:{measure:j,strategy:me.WhileDragging,frequency:ye.Optimized},dragOverlay:{measure:I}};class Ae extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const Ie={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Ae,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:h},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Te,measureDroppableContainers:h,windowRect:null,measuringScheduled:!1},je={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:h,draggableNodes:new Map,over:null,measureDroppableContainers:h},Be=(0,r.createContext)(je),ze=(0,r.createContext)(Ie);function Xe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Ae}}}function Pe(e,t){switch(t.type){case v.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case v.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case v.DragEnd:case v.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case v.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Ae(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case v.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new Ae(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case v.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new Ae(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Fe(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:a}=(0,r.useContext)(Be),l=(0,i.D9)(o),s=(0,i.D9)(null==n?void 0:n.id);return(0,r.useEffect)((()=>{if(!t&&!o&&l&&null!=s){if(!(0,i.vd)(l))return;if(document.activeElement===l.target)return;const e=a.get(s);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=(0,i.so)(e);if(t){t.focus();break}}}))}}),[o,t,a,s,l]),null}function Je(e,t){let{transform:n,...r}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...r})),n):n}const Ye=(0,r.createContext)({...b,scaleX:1,scaleY:1});var Ue;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(Ue||(Ue={}));const He=(0,r.memo)((function(e){var t,n,a,l;let{id:s,accessibility:u,autoScroll:d=!0,children:h,sensors:g=Le,collisionDetection:p=N,measuring:m,modifiers:y,...w}=e;const x=(0,r.useReducer)(Pe,void 0,Xe),[C,D]=x,[R,S]=function(){const[e]=(0,r.useState)((()=>new Set)),t=(0,r.useCallback)((t=>(e.add(t),()=>e.delete(t))),[e]);return[(0,r.useCallback)((t=>{let{type:n,event:r}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,r)}))}),[e]),t]}(),[M,L]=(0,r.useState)(Ue.Uninitialized),T=M===Ue.Initialized,{draggable:{active:A,nodes:j,translate:P},droppable:{containers:F}}=C,H=A?j.get(A):null,K=(0,r.useRef)({initial:null,translated:null}),W=(0,r.useMemo)((()=>{var e;return null!=A?{id:A,data:null!=(e=null==H?void 0:H.data)?e:Oe,rect:K}:null}),[A,H]),_=(0,r.useRef)(null),[V,Z]=(0,r.useState)(null),[Q,ee]=(0,r.useState)(null),te=(0,i.Ey)(w,Object.values(w)),ne=(0,i.Ld)("DndDescribedBy",s),re=(0,r.useMemo)((()=>F.getEnabled()),[F]),oe=(ie=m,(0,r.useMemo)((()=>({draggable:{...Te.draggable,...null==ie?void 0:ie.draggable},droppable:{...Te.droppable,...null==ie?void 0:ie.droppable},dragOverlay:{...Te.dragOverlay,...null==ie?void 0:ie.dragOverlay}})),[null==ie?void 0:ie.draggable,null==ie?void 0:ie.droppable,null==ie?void 0:ie.dragOverlay]));var ie;const{droppableRects:ae,measureDroppableContainers:le,measuringScheduled:se}=function(e,t){let{dragging:n,dependencies:o,config:a}=t;const[l,s]=(0,r.useState)(null),c=null!=l,{frequency:u,measure:d,strategy:f}=a,v=(0,r.useRef)(e),h=function(){switch(f){case me.Always:return!1;case me.BeforeDragging:return n;default:return!n}}(),g=(0,i.Ey)(h),p=(0,r.useCallback)((function(e){void 0===e&&(e=[]),g.current||s((t=>t?t.concat(e):e))}),[g]),b=(0,r.useRef)(null),m=(0,i.Gj)((t=>{if(h&&!n)return we;const r=l;if(!t||t===we||v.current!==e||null!=r){const t=new Map;for(let n of e){if(!n)continue;if(r&&r.length>0&&!r.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new $(d(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t}),[e,l,n,h,d]);return(0,r.useEffect)((()=>{v.current=e}),[e]),(0,r.useEffect)((()=>{h||requestAnimationFrame((()=>p()))}),[n,h]),(0,r.useEffect)((()=>{c&&s(null)}),[c]),(0,r.useEffect)((()=>{h||"number"!=typeof u||null!==b.current||(b.current=setTimeout((()=>{p(),b.current=null}),u))}),[u,h,p,...o]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:c}}(re,{dragging:T,dependencies:[P.x,P.y],config:oe.droppable}),ce=function(e,t){const n=null!==t?e.get(t):void 0,r=n?n.node.current:null;return(0,i.Gj)((e=>{var n;return null===t?null:null!=(n=null!=r?r:e)?n:null}),[r,t])}(j,A),ue=(0,r.useMemo)((()=>Q?(0,i.DC)(Q):null),[Q]),de=function(){const e=!1===(null==V?void 0:V.autoScrollEnabled),t="object"==typeof d?!1===d.enabled:!1===d,n=T&&!e&&!t;return"object"==typeof d?{...d,enabled:n}:{enabled:n}}(),fe=function(e,t){return xe(e,t)}(ce,oe.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:a=!0}=e;const l=(0,r.useRef)(!1),{x:s,y:c}="boolean"==typeof a?{x:a,y:a}:a;(0,i.LI)((()=>{if(!s&&!c||!t)return void(l.current=!1);if(l.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=k(n(e),o);if(s||(r.x=0),c||(r.y=0),l.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=z(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,s,c,o,n])}({activeNode:A?j.get(A):null,config:de.layoutShiftCompensation,initialRect:fe,measure:oe.draggable.measure});const ve=De(ce,oe.draggable.measure,fe),he=De(ce?ce.parentElement:null),ye=(0,r.useRef)({activatorEvent:null,active:null,activeNode:ce,collisionRect:null,collisions:null,droppableRects:ae,draggableNodes:j,draggingNode:null,draggingNodeRect:null,droppableContainers:F,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ee=F.getNodeFor(null==(t=ye.current.over)?void 0:t.id),Ae=function(e){let{measure:t}=e;const[n,o]=(0,r.useState)(null),a=Ce({callback:(0,r.useCallback)((e=>{for(const{target:n}of e)if((0,i.Re)(n)){o((e=>{const r=t(n);return e?{...e,width:r.width,height:r.height}:r}));break}}),[t])}),l=(0,r.useCallback)((e=>{const n=ke(e);null==a||a.disconnect(),n&&(null==a||a.observe(n)),o(n?t(n):null)}),[t,a]),[s,c]=(0,i.wm)(l);return(0,r.useMemo)((()=>({nodeRef:s,rect:n,setRef:c})),[n,s,c])}({measure:oe.dragOverlay.measure}),Ie=null!=(n=Ae.nodeRef.current)?n:ce,je=T?null!=(a=Ae.rect)?a:ve:null,He=Boolean(Ae.nodeRef.current&&Ae.rect),Ke=k(qe=He?null:ve,xe(qe));var qe;const We=Me(Ie?(0,i.Jj)(Ie):null),Ge=function(e){const t=(0,r.useRef)(e),n=(0,i.Gj)((n=>e?n&&n!==Re&&e&&t.current&&e.parentNode===t.current.parentNode?n:B(e):Re),[e]);return(0,r.useEffect)((()=>{t.current=e}),[e]),n}(T?null!=Ee?Ee:ce:null),_e=function(e,t){void 0===t&&(t=I);const[n]=e,o=Me(n?(0,i.Jj)(n):null),[a,l]=(0,r.useReducer)((function(){return e.length?e.map((e=>U(e)?o:new $(t(e),e))):Ne}),Ne),s=Ce({callback:l});return e.length>0&&a===Ne&&l(),(0,i.LI)((()=>{e.length?e.forEach((e=>null==s?void 0:s.observe(e))):(null==s||s.disconnect(),l())}),[e]),a}(Ge),Ve=Je(y,{transform:{x:P.x-Ke.x,y:P.y-Ke.y,scaleX:1,scaleY:1},activatorEvent:Q,active:W,activeNodeRect:ve,containerNodeRect:he,draggingNodeRect:je,over:ye.current.over,overlayNodeRect:Ae.rect,scrollableAncestors:Ge,scrollableAncestorRects:_e,windowRect:We}),$e=ue?(0,i.IH)(ue,P):null,Ze=function(e){const[t,n]=(0,r.useState)(null),o=(0,r.useRef)(e),a=(0,r.useCallback)((e=>{const t=X(e.target);t&&n((e=>e?(e.set(t,J(t)),new Map(e)):null))}),[]);return(0,r.useEffect)((()=>{const t=o.current;if(e!==t){r(t);const i=e.map((e=>{const t=X(e);return t?(t.addEventListener("scroll",a,{passive:!0}),[t,J(t)]):null})).filter((e=>null!=e));n(i.length?new Map(i):null),o.current=e}return()=>{r(e),r(t)};function r(e){e.forEach((e=>{const t=X(e);null==t||t.removeEventListener("scroll",a)}))}}),[a,e]),(0,r.useMemo)((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>(0,i.IH)(e,t)),b):G(e):b),[e,t])}(Ge),Qe=Se(Ze),et=Se(Ze,[ve]),tt=(0,i.IH)(Ve,Qe),nt=je?O(je,Ve):null,rt=W&&nt?p({active:W,collisionRect:nt,droppableRects:ae,droppableContainers:re,pointerCoordinates:$e}):null,ot=E(rt,"id"),[it,at]=(0,r.useState)(null),lt=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(He?Ve:(0,i.IH)(Ve,et),null!=(l=null==it?void 0:it.rect)?l:null,ve),st=(0,r.useCallback)(((e,t)=>{let{sensor:n,options:r}=t;if(null==_.current)return;const i=j.get(_.current);if(!i)return;const a=e.nativeEvent,l=new n({active:_.current,activeNode:i,event:a,options:r,context:ye,onStart(e){const t=_.current;if(null==t)return;const n=j.get(t);if(!n)return;const{onDragStart:r}=te.current,i={active:{id:t,data:n.data,rect:K}};(0,o.unstable_batchedUpdates)((()=>{null==r||r(i),L(Ue.Initializing),D({type:v.DragStart,initialCoordinates:e,active:t}),R({type:"onDragStart",event:i})}))},onMove(e){D({type:v.DragMove,coordinates:e})},onEnd:s(v.DragEnd),onCancel:s(v.DragCancel)});function s(e){return async function(){const{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=ye.current;let l=null;if(t&&i){const{cancelDrop:o}=te.current;l={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===v.DragEnd&&"function"==typeof o&&await Promise.resolve(o(l))&&(e=v.DragCancel)}_.current=null,(0,o.unstable_batchedUpdates)((()=>{D({type:e}),L(Ue.Uninitialized),at(null),Z(null),ee(null);const t=e===v.DragEnd?"onDragEnd":"onDragCancel";if(l){const e=te.current[t];null==e||e(l),R({type:t,event:l})}}))}}(0,o.unstable_batchedUpdates)((()=>{Z(l),ee(e.nativeEvent)}))}),[j]),ct=(0,r.useCallback)(((e,t)=>(n,r)=>{const o=n.nativeEvent,i=j.get(r);if(null!==_.current||!i||o.dndKit||o.defaultPrevented)return;const a={active:i};!0===e(n,t.options,a)&&(o.dndKit={capturedBy:t.sensor},_.current=r,st(n,t))}),[j,st]),ut=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{const{sensor:r}=n;return[...e,...r.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(g,ct);!function(e){(0,r.useEffect)((()=>{if(!i.Nq)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))}(g),(0,i.LI)((()=>{ve&&M===Ue.Initializing&&L(Ue.Initialized)}),[ve,M]),(0,r.useEffect)((()=>{const{onDragMove:e}=te.current,{active:t,activatorEvent:n,collisions:r,over:i}=ye.current;if(!t||!n)return;const a={active:t,activatorEvent:n,collisions:r,delta:{x:tt.x,y:tt.y},over:i};(0,o.unstable_batchedUpdates)((()=>{null==e||e(a),R({type:"onDragMove",event:a})}))}),[tt.x,tt.y]),(0,r.useEffect)((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=ye.current;if(!e||null==_.current||!t||!i)return;const{onDragOver:a}=te.current,l=r.get(ot),s=l&&l.rect.current?{id:l.id,rect:l.rect.current,data:l.data,disabled:l.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,o.unstable_batchedUpdates)((()=>{at(s),null==a||a(c),R({type:"onDragOver",event:c})}))}),[ot]),(0,i.LI)((()=>{ye.current={activatorEvent:Q,active:W,activeNode:ce,collisionRect:nt,collisions:rt,droppableRects:ae,draggableNodes:j,draggingNode:Ie,draggingNodeRect:je,droppableContainers:F,over:it,scrollableAncestors:Ge,scrollAdjustedTranslate:tt},K.current={initial:je,translated:nt}}),[W,ce,rt,nt,j,Ie,je,ae,F,it,Ge,tt]),function(e){let{acceleration:t,activator:n=ge.Pointer,canScroll:o,draggingRect:a,enabled:l,interval:s=5,order:c=pe.TreeOrder,pointerCoordinates:u,scrollableAncestors:d,scrollableAncestorRects:f,delta:v,threshold:h}=e;const g=function(e){let{delta:t,disabled:n}=e;const r=(0,i.D9)(t);return(0,i.Gj)((e=>{if(n||!r||!e)return be;const o=Math.sign(t.x-r.x),i=Math.sign(t.y-r.y);return{x:{[Y.Backward]:e.x[Y.Backward]||-1===o,[Y.Forward]:e.x[Y.Forward]||1===o},y:{[Y.Backward]:e.y[Y.Backward]||-1===i,[Y.Forward]:e.y[Y.Forward]||1===i}}}),[n,t,r])}({delta:v,disabled:!l}),[p,b]=(0,i.Yz)(),m=(0,r.useRef)({x:0,y:0}),y=(0,r.useRef)({x:0,y:0}),w=(0,r.useMemo)((()=>{switch(n){case ge.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case ge.DraggableRect:return a}}),[n,a,u]),x=(0,r.useRef)(null),C=(0,r.useCallback)((()=>{const e=x.current;if(!e)return;const t=m.current.x*y.current.x,n=m.current.y*y.current.y;e.scrollBy(t,n)}),[]),E=(0,r.useMemo)((()=>c===pe.TreeOrder?[...d].reverse():d),[c,d]);(0,r.useEffect)((()=>{if(l&&d.length&&w){for(const e of E){if(!1===(null==o?void 0:o(e)))continue;const n=d.indexOf(e),r=f[n];if(!r)continue;const{direction:i,speed:a}=q(e,r,w,t,h);for(const e of["x","y"])g[e][i[e]]||(a[e]=0,i[e]=0);if(a.x>0||a.y>0)return b(),x.current=e,p(C,s),m.current=a,void(y.current=i)}m.current={x:0,y:0},y.current={x:0,y:0},b()}else b()}),[t,C,o,b,l,s,JSON.stringify(w),JSON.stringify(g),p,d,E,f,JSON.stringify(h)])}({...de,delta:P,draggingRect:nt,pointerCoordinates:$e,scrollableAncestors:Ge,scrollableAncestorRects:_e});const dt=(0,r.useMemo)((()=>({active:W,activeNode:ce,activeNodeRect:ve,activatorEvent:Q,collisions:rt,containerNodeRect:he,dragOverlay:Ae,draggableNodes:j,droppableContainers:F,droppableRects:ae,over:it,measureDroppableContainers:le,scrollableAncestors:Ge,scrollableAncestorRects:_e,measuringConfiguration:oe,measuringScheduled:se,windowRect:We})),[W,ce,ve,Q,rt,he,Ae,j,F,ae,it,le,Ge,_e,oe,se,We]),ft=(0,r.useMemo)((()=>({activatorEvent:Q,activators:ut,active:W,activeNodeRect:ve,ariaDescribedById:{draggable:ne},dispatch:D,draggableNodes:j,over:it,measureDroppableContainers:le})),[Q,ut,W,ve,D,ne,j,it,le]);return r.createElement(c.Provider,{value:S},r.createElement(Be.Provider,{value:ft},r.createElement(ze.Provider,{value:dt},r.createElement(Ye.Provider,{value:lt},h)),r.createElement(Fe,{disabled:!1===(null==u?void 0:u.restoreFocus)})),r.createElement(f,{...u,hiddenTextDescribedById:ne}))})),Ke=(0,r.createContext)(null),qe="button",We="Droppable";function Ge(e){let{id:t,data:n,disabled:o=!1,attributes:a}=e;const l=(0,i.Ld)(We),{activators:s,activatorEvent:c,active:u,activeNodeRect:d,ariaDescribedById:f,draggableNodes:v,over:h}=(0,r.useContext)(Be),{role:g=qe,roleDescription:p="draggable",tabIndex:b=0}=null!=a?a:{},m=(null==u?void 0:u.id)===t,y=(0,r.useContext)(m?Ye:Ke),[w,x]=(0,i.wm)(),[C,E]=(0,i.wm)(),D=function(e,t){return(0,r.useMemo)((()=>e.reduce(((e,n)=>{let{eventName:r,handler:o}=n;return e[r]=e=>{o(e,t)},e}),{})),[e,t])}(s,t),R=(0,i.Ey)(n);return(0,i.LI)((()=>(v.set(t,{id:t,key:l,node:w,activatorNode:C,data:R}),()=>{const e=v.get(t);e&&e.key===l&&v.delete(t)})),[v,t]),{active:u,activatorEvent:c,activeNodeRect:d,attributes:(0,r.useMemo)((()=>({role:g,tabIndex:b,"aria-disabled":o,"aria-pressed":!(!m||g!==qe)||void 0,"aria-roledescription":p,"aria-describedby":f.draggable})),[o,g,b,m,p,f.draggable]),isDragging:m,listeners:o?void 0:D,node:w,over:h,setNodeRef:x,setActivatorNodeRef:E,transform:y}}function _e(){return(0,r.useContext)(ze)}const Ve="Droppable",$e={timeout:25};function Ze(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:a}=e;const l=(0,i.Ld)(Ve),{active:s,dispatch:c,over:u,measureDroppableContainers:d}=(0,r.useContext)(Be),f=(0,r.useRef)({disabled:n}),h=(0,r.useRef)(!1),g=(0,r.useRef)(null),p=(0,r.useRef)(null),{disabled:b,updateMeasurementsFor:m,timeout:y}={...$e,...a},w=(0,i.Ey)(null!=m?m:o),x=Ce({callback:(0,r.useCallback)((()=>{h.current?(null!=p.current&&clearTimeout(p.current),p.current=setTimeout((()=>{d(Array.isArray(w.current)?w.current:[w.current]),p.current=null}),y)):h.current=!0}),[y]),disabled:b||!s}),C=(0,r.useCallback)(((e,t)=>{x&&(t&&(x.unobserve(t),h.current=!1),e&&x.observe(e))}),[x]),[E,D]=(0,i.wm)(C),R=(0,i.Ey)(t);return(0,r.useEffect)((()=>{x&&E.current&&(x.disconnect(),h.current=!1,x.observe(E.current))}),[E,x]),(0,i.LI)((()=>(c({type:v.RegisterDroppable,element:{id:o,key:l,disabled:n,node:E,rect:g,data:R}}),()=>c({type:v.UnregisterDroppable,key:l,id:o}))),[o]),(0,r.useEffect)((()=>{n!==f.current.disabled&&(c({type:v.SetDroppableDisabled,id:o,key:l,disabled:n}),f.current.disabled=n)}),[o,l,n,c]),{active:s,rect:g,isOver:(null==u?void 0:u.id)===o,node:E,over:u,setNodeRef:D}}function Qe(e){let{animation:t,children:n}=e;const[o,a]=(0,r.useState)(null),[l,s]=(0,r.useState)(null),c=(0,i.D9)(n);return n||o||!c||a(c),(0,i.LI)((()=>{if(!l)return;const e=null==o?void 0:o.key,n=null==o?void 0:o.props.id;null!=e&&null!=n?Promise.resolve(t(n,l)).then((()=>{a(null)})):a(null)}),[t,o,l]),r.createElement(r.Fragment,null,n,o?(0,r.cloneElement)(o,{ref:s}):null)}const et={x:0,y:0,scaleX:1,scaleY:1};function tt(e){let{children:t}=e;return r.createElement(Be.Provider,{value:je},r.createElement(Ye.Provider,{value:et},t))}const nt={position:"fixed",touchAction:"none"},rt=e=>(0,i.vd)(e)?"transform 250ms ease":void 0,ot=(0,r.forwardRef)(((e,t)=>{let{as:n,activatorEvent:o,adjustScale:a,children:l,className:s,rect:c,style:u,transform:d,transition:f=rt}=e;if(!c)return null;const v=a?d:{...d,scaleX:1,scaleY:1},h={...nt,width:c.width,height:c.height,top:c.top,left:c.left,transform:i.ux.Transform.toString(v),transformOrigin:a&&o?y(o,c):void 0,transition:"function"==typeof f?f(o):f,...u};return r.createElement(n,{className:s,style:h,ref:t},l)})),it=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:a}=e;if(null!=i&&i.active)for(const[e,t]of Object.entries(i.active))void 0!==t&&(o[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(null!=i&&i.dragOverlay)for(const[e,t]of Object.entries(i.dragOverlay))void 0!==t&&r.node.style.setProperty(e,t);return null!=a&&a.active&&n.node.classList.add(a.active),null!=a&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[e,t]of Object.entries(o))n.node.style.setProperty(e,t);null!=a&&a.active&&n.node.classList.remove(a.active)}},at={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:i.ux.Transform.toString(t)},{transform:i.ux.Transform.toString(n)}]},sideEffects:it({styles:{active:{opacity:"0"}}})};let lt=0;function st(e){return(0,r.useMemo)((()=>{if(null!=e)return lt++,lt}),[e])}const ct=r.memo((e=>{let{adjustScale:t=!1,children:n,dropAnimation:o,style:a,transition:l,modifiers:s,wrapperElement:c="div",className:u,zIndex:d=999}=e;const{activatorEvent:f,active:v,activeNodeRect:h,containerNodeRect:g,draggableNodes:p,droppableContainers:b,dragOverlay:m,over:y,measuringConfiguration:w,scrollableAncestors:x,scrollableAncestorRects:C,windowRect:E}=_e(),D=(0,r.useContext)(Ye),R=st(null==v?void 0:v.id),S=Je(s,{activatorEvent:f,active:v,activeNodeRect:h,containerNodeRect:g,draggingNodeRect:m.rect,over:y,overlayNodeRect:m.rect,scrollableAncestors:x,scrollableAncestorRects:C,transform:D,windowRect:E}),M=xe(h),N=function(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return(0,i.zX)(((e,a)=>{if(null===t)return;const l=n.get(e);if(!l)return;const s=l.node.current;if(!s)return;const c=ke(a);if(!c)return;const{transform:u}=(0,i.Jj)(a).getComputedStyle(a),d=T(u);if(!d)return;const f="function"==typeof t?t:function(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...at,...e};return e=>{let{active:i,dragOverlay:a,transform:l,...s}=e;if(!t)return;const c=a.rect.left-i.rect.left,u=a.rect.top-i.rect.top,d={scaleX:1!==l.scaleX?i.rect.width*l.scaleX/a.rect.width:1,scaleY:1!==l.scaleY?i.rect.height*l.scaleY/a.rect.height:1},f={x:l.x-c,y:l.y-u,...d},v=o({...s,active:i,dragOverlay:a,transform:{initial:l,final:f}}),[h]=v,g=v[v.length-1];if(JSON.stringify(h)===JSON.stringify(g))return;const p=null==r?void 0:r({active:i,dragOverlay:a,...s}),b=a.node.animate(v,{duration:t,easing:n,fill:"forwards"});return new Promise((e=>{b.onfinish=()=>{null==p||p(),e()}}))}}(t);return _(s,o.draggable.measure),f({active:{id:e,data:l.data,node:s,rect:o.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:o.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:o,transform:d})}))}({config:o,draggableNodes:p,droppableContainers:b,measuringConfiguration:w}),k=M?m.setRef:void 0;return r.createElement(tt,null,r.createElement(Qe,{animation:N},v&&R?r.createElement(ot,{key:R,id:v.id,ref:k,as:c,activatorEvent:f,adjustScale:t,className:u,transition:l,rect:M,style:{zIndex:d,...a},transform:S},n):null))}))},17592:(e,t,n)=>{n.d(t,{$X:()=>D,D9:()=>y,DC:()=>S,Ey:()=>p,FJ:()=>a,Gj:()=>b,HB:()=>o,IH:()=>E,Jj:()=>s,LI:()=>v,Ld:()=>x,Nq:()=>i,Re:()=>u,UG:()=>l,Yz:()=>g,qk:()=>c,r3:()=>f,so:()=>k,ux:()=>M,vZ:()=>d,vd:()=>R,wm:()=>m,zX:()=>h});var r=n(32735);function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,r.useMemo)((()=>e=>{t.forEach((t=>t(e)))}),t)}const i="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function a(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function l(e){return"nodeType"in e}function s(e){var t,n;return e?a(e)?e:l(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function c(e){const{Document:t}=s(e);return e instanceof t}function u(e){return!a(e)&&e instanceof s(e).HTMLElement}function d(e){return e instanceof s(e).SVGElement}function f(e){return e?a(e)?e.document:l(e)?c(e)?e:u(e)||d(e)?e.ownerDocument:document:document:document}const v=i?r.useLayoutEffect:r.useEffect;function h(e){const t=(0,r.useRef)(e);return v((()=>{t.current=e})),(0,r.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function g(){const e=(0,r.useRef)(null);return[(0,r.useCallback)(((t,n)=>{e.current=setInterval(t,n)}),[]),(0,r.useCallback)((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}function p(e,t){void 0===t&&(t=[e]);const n=(0,r.useRef)(e);return v((()=>{n.current!==e&&(n.current=e)}),t),n}function b(e,t){const n=(0,r.useRef)();return(0,r.useMemo)((()=>{const t=e(n.current);return n.current=t,t}),[...t])}function m(e){const t=h(e),n=(0,r.useRef)(null),o=(0,r.useCallback)((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function y(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e}),[e]),t.current}let w={};function x(e,t){return(0,r.useMemo)((()=>{if(t)return t;const n=null==w[e]?0:w[e]+1;return w[e]=n,e+"-"+n}),[e,t])}function C(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce(((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t}),{...t})}}const E=C(1),D=C(-1);function R(e){if(!e)return!1;const{KeyboardEvent:t}=s(e.target);return t&&e instanceof t}function S(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=s(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const M=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[M.Translate.toString(e),M.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),N="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function k(e){return e.matches(N)?e:e.querySelector(N)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[484],{27898:(e,t,r)=>{r.d(t,{Q:()=>b,z:()=>m});var n=r(23481),o=r(75896),i=r(1048);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e){return function(e){if(Array.isArray(e))return u(e)}(e)||s(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}var f={"featured-result":1,"topic-list":8,company:8,"playlist-with-videos":1,"series-with-videos":1,"series-thumbnail":1,"playlist-thumbnail":1,"video-item":1,"companies-and-topics":16},m="curriculumCode",b={flattenResults:function(e){return e?e.results?Object.assign(Object.assign({},e),{results:o.m.flatten(e.results)}):Object.assign(Object.assign({},e),{results:[]}):null},getContextualSearchQueryParams:function(e){return e&&e.get("filterParam")?(t={},r=e.get("filterParam"),n=e.get("filterValue"),(r=function(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,t):{};var t,r,n},mapMaxScoreToSearchResults:function(e,t){return e.map((function(e){return t?Object.assign(Object.assign({},e),{_maxScore:t}):e}))},groupResults:function(e,t,r,o,a){var u,m;if(!(null==e?void 0:e.length)&&!(null===(u=null==t?void 0:t.results)||void 0===u?void 0:u.length)&&!(null===(m=null==r?void 0:r.results)||void 0===m?void 0:m.length))return[];var b,d,y,v,g=function(e){if(Array.isArray(e))return e}(v=e)||s(v)||c(v)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),h=g[0],S=g.slice(1),j=a.xs||a.sm,w=function(e,t,r,o,a){var c,u,s,m,b,d,y,v=a?"playlist-thumbnail":"playlist-with-videos",g=a?"series-thumbnail":"series-with-videos",h=[{type:"companies-and-topics",items:null!==(b=[].concat(l(null!==(u=null===(c=null==r?void 0:r.results)||void 0===c?void 0:c.slice(0,f.company))&&void 0!==u?u:[]),l(null!==(m=null===(s=null==t?void 0:t.results)||void 0===s?void 0:s.slice(0,f["topic-list"]))&&void 0!==m?m:[])))&&void 0!==b?b:[]},{type:"featured-result",items:i.t.isEmpty(o)?[]:[o]},{type:"video-item",items:[]},{type:"video-item",items:[]},{type:"video-item",items:[]},{type:v,items:[]},{type:g,items:[]},{heading:n.T.getPhrase("sharedSearch.utils","relatedTopics"),type:"topic-list",items:null!==(y=null===(d=null==t?void 0:t.results)||void 0===d?void 0:d.slice(f["topic-list"],2*f["topic-list"]))&&void 0!==y?y:[]}],S=!1;return null==e||e.forEach((function(e){var t=p(e,a);if(!e._featured||S||"video"!==e._index)if(h[2].items.length<f["video-item"]&&"video-item"===t)h[2].items.push(e);else if(h[3].items.length<f["video-item"]&&"video-item"===t)h[3].items.push(e);else if(h[4].items.length<f["video-item"]&&"video-item"===t)h[4].items.push(e);else if(h[5].items.length<f[v]&&t===v)h[5].items.push(e);else if(h[6].items.length<f[g]&&t===g)h[6].items.push(e);else{var r=h[h.length-1];if((null==r?void 0:r.type)===t){var n=f[t];r.items.length>=n?h.push({type:t,items:[e]}):r.items.push(e)}else h.push({type:t,items:[e]})}else S=!0})),h.filter((function(e){var t;return null===(t=e.items)||void 0===t?void 0:t.length}))}(h,t,r,o,j);return(null==S?void 0:S.length)?(d=w,y=j,(b=S)?(b.forEach((function(e){var t=d[d.length-1],r=!0;e.forEach((function(e){var n=p(e,y);if(r&&t.type===n)t.items.length>=f[n]?(r=!1,d.push({type:n,items:[e]})):t.items.push(e);else{var o=d[d.length-1];(null==o?void 0:o.type)===n?o.items.length>=f[n]?d.push({type:n,items:[e]}):o.items.push(e):d.push({type:n,items:[e]})}}))})),d):d):w}};function p(e,t){var r;return"video"===e._index||"interactive"===e._index||"clip"===e._index?"video-item":"series"===e._index?(null===(r=e.tallPoster)||void 0===r?void 0:r.id)&&!t?"series-with-videos":"series-thumbnail":"classification"===e._index?"topic-list":"playlist"===e._index?t?"playlist-thumbnail":"playlist-with-videos":void 0}},87611:(e,t,r)=>{r.d(t,{Z:()=>f});var n=r(32735),o=r(1048),i=r(28825),a=r(40320),l=r(54610),c=r(67453);const u={image:"vdd4V",thumbnail:"Ez0E7",tallPoster:"H9bQA",cover:"Nudts",banner:"IOvDH",poster:"iiY56",pdf:"aDJiJ",link:"wDpui"};function s(e){var t=u.image,r="";return e.imageType===l.__.Thumbnails&&(r="thumbnail ".concat(u.thumbnail)),e.imageType===l.__.TallPosters&&(r=u.tallPoster),e.imageType===l.__.Covers&&(r=u.cover),e.imageType===l.__.Banners&&(r=u.banner),e.imageType===l.__.Posters&&(r=u.poster),e.imageType===l.__.Pdf&&(r=u.pdf),e.imageType===l.__.Link&&(r=u.link),r&&(t+=" ".concat(r)),e.className&&(t+=" ".concat(e.className)),t}function f(e){var t=e.data,r=e.imageOptions,l=e.appLink,u=e.preload,f=e.preventLoad,m=e.analyticsOptions,b=e.analyticsData,p=e.imageClassName,d=e.alt,y="";"string"==typeof t?y=t:o.t.isObject(t)&&(y=t.url);var v=y&&r?c.j.createUrl(y,r):y;return n.createElement("div",{className:s(e),style:e.imageStyle},n.createElement(i.F,{appLink:l,analyticsData:b,analyticsOptions:m,onClick:e.onClick,preventFocus:e.preventFocus,className:e.appLinkClassName},e.children,v&&n.createElement(a.w,{src:v,alt:d,forceLoad:u,preventLoad:f,extraClasses:p,errorFallbackImageSrc:e.errorFallbackImageSrc,errorFallbackImageClassName:e.errorFallbackImageClassName,onLoad:e.onLoad})))}},26533:(e,t,r)=>{r.d(t,{oy:()=>m,mS:()=>u});var n=r(32735),o=r(83914),i=r(7733),a=r(9085),l=r(35223);const c={baseFallbackContainer:"ZvbeV",svgFallbackContainer:"atIHN",subjectFallbackContainer:"m20L7",subjectFallbackContainerSmall:"QIbxu",subjectFallbackContainerLarge:"z_sHT",seriesItemFallback:"epoLB",playlistItemFallback:"h1S5T",playlistFallback:"ZbKBN",posterFallback:"I1mTo",subjectFallback:"kNG8Z",fallbackThumbnailImage:"nKsWZ",videoFallback:"LolCW",folderFallback:"mdrT5"};var u,s,f;function m(e){var t,r=e.type,m=e.mediaType,b=e.extraClasses,p=e.containerClassSize;if(r===u.Video)return n.createElement("div",{className:"".concat(c.videoFallback," ").concat(e.extraClasses," bg-light-blue")});if(r===u.Folder)return n.createElement("div",{className:"".concat(c.folderFallback," ").concat(e.extraClasses," ").concat((0,a.x)(e.name,i.o))});var d=function(e){return e===u.SeriesThumbnail?c.seriesItemFallback:e===u.PlaylistThumbnail?c.playlistItemFallback:e===u.Playlist?c.playlistFallback:e===u.Series||e===u.TallSubject?c.posterFallback:e===u.Subject?"".concat(c.subjectFallback," svg-container d-inline-block"):""}(r),y=function(e){return e===u.SeriesThumbnail||e===u.PlaylistThumbnail?l.vn.Play:e===u.Playlist?l.vn.Image:e===u.Series?l.vn.Series:e===u.Subject||e===u.TallSubject?l.vn.FileImg:""}(r),v=function(e){return e===u.Subject?o.S.ExtraLarge:o.S.Standard}(r),g="".concat(function(e,t,r){if(t===u.Subject){var n=r===f.Large?c.subjectFallbackContainerLarge:c.subjectFallbackContainerSmall;return"".concat(c.subjectFallbackContainer," ").concat(n)}return e===s.Svg?t===u.SeriesThumbnail||t===u.PlaylistThumbnail?"".concat(c.svgFallbackContainer," rounded-3"):c.svgFallbackContainer:c.baseFallbackContainer}(m,r,p));return b&&(g+=" ".concat(e.extraClasses)),n.createElement("div",{className:g},m===s.Svg?n.createElement(o.x,{svgName:y,className:"".concat(d," ").concat(null!==(t=e.svgContainerClassName)&&void 0!==t?t:""),tagName:"div",size:v}):n.createElement("div",{className:c.fallbackThumbnailImage,style:{backgroundImage:"url('".concat(y,"')")}}))}!function(e){e[e.Playlist=0]="Playlist",e[e.PlaylistThumbnail=1]="PlaylistThumbnail",e[e.Series=2]="Series",e[e.SeriesThumbnail=3]="SeriesThumbnail",e[e.Subject=4]="Subject",e[e.TallSubject=5]="TallSubject",e[e.Video=6]="Video",e[e.Folder=7]="Folder"}(u||(u={})),function(e){e[e.Svg=0]="Svg",e[e.Image=1]="Image"}(s||(s={})),function(e){e[e.Large=0]="Large",e[e.Small=1]="Small"}(f||(f={})),m.defaultProps={mediaType:s.Svg,containerClassSize:f.Large}},40320:(e,t,r)=>{r.d(t,{w:()=>l});var n=r(32735),o=r(65294);const i="fVSzb";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var l=n.memo((function(e){var t,r,l=e.forceLoad,c=e.extraClasses,u=void 0===c?"":c,s=e.errorFallbackImageSrc,f=e.preventLoad,m=void 0!==f&&f,b=e.errorFallbackImageClassName,p=e.src,d=e.alt,y=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["forceLoad","extraClasses","errorFallbackImageSrc","preventLoad","errorFallbackImageClassName","src","alt"]),v=(0,o.Y)({rootMargin:"500px"}),g=v.ref,h=v.inView,S=(t=n.useState(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),j=S[0],w=S[1];function O(){return j&&s?s:e.src}if(n.useEffect((function(){if((l||h)&&!m){var e=new Image;return e.onerror=function(){w(!0),s&&(e.src=s)},e.src=p,function(){return e.onerror=null}}}),[h,m]),j&&!s)return n.createElement(n.Fragment,null);if(!g)return n.createElement("img",Object.assign({className:"".concat(i," ").concat(u," ").concat(j&&b||""),alt:d,src:O()},y));var k=Object.assign(Object.assign({alt:d},y),!h&&!l||m?{src:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}:{src:O()});return l||(k.ref=g),n.createElement("img",Object.assign({className:"".concat(i," ").concat(u," ").concat(j&&b||"")},k))}))},7733:(e,t,r)=>{r.d(t,{o:()=>n});var n=["bg-pink","bg-orange"].concat(["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"])},69834:(e,t,r)=>{r.d(t,{r:()=>P});var n=r(50242),o=r(81886),i=r(67058),a=r(23481),l=r(64364);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}var p="shared.privateResourceError",d=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=m(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,r||[],m(e).constructor):t.apply(e,r))}(this,t,[a.T.getPhrase(p,"title")])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"PrivateResourceError"}},{key:"heading",get:function(){return a.T.getPhrase(p,"heading")}},{key:"description",get:function(){return a.T.getPhrase(p,"description")}}])&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(l.H);function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,g(n.key),n)}}function g(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}var w="shared.regionLockedResourceError",O=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=S(t),function(e,t){if(t&&("object"==y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,r||[],S(e).constructor):t.apply(e,r))}(this,t,[a.T.getPhrase(w,"title")])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"RegionLockedResourceError"}},{key:"heading",get:function(){return a.T.getPhrase(w,"heading")}},{key:"description",get:function(){return a.T.getPhrase(w,"description")}}])&&v(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(l.H),k=r(49075),F={notFound:i.d,forbidden:{rating:d,yearLevel:d,region:O,privacy:d},badRequest:k._,internalServerError:k._};function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var i;i="number"==typeof e?e:e.status;var a=Object.assign(Object.assign({},F),t);i&&o.Q.Ry.isStatusCodeError(i)&&(i!==n.o.InternalServer?i!==n.o.NotFound?i!==n.o.Forbidden?r.badRequest||o.Q.Ry.throw(new a.badRequest):r.forbidden||o.Q.Ry.throw(new a.forbidden.privacy):r.notFound||o.Q.Ry.throw(new a.notFound):r.internalServerError||o.Q.Ry.throw(new k._))}}},65294:(e,t,r)=>{r.d(t,{Y:()=>i});var n=r(34152);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.prevent,a=r.rootMargin,l=r.triggerOnce,c=void 0===l||l,u=(e=(0,n.YD)({triggerOnce:c,rootMargin:a}),t=3,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=u[0],f=u[1],m=u[2];return!0!==i&&void 0!==window.IntersectionObserver||(f=!0,s=null),{ref:s,inView:f,initialized:!!m}}},45719:(e,t,r)=>{r.d(t,{P:()=>s});var n=r(32735),o=r(70680),i=r(50242),a=r(79014),l=r(20354);function c(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t,r){function i(e){if(e)return a.q.isFunction(t)?c(t(e)):c(e.data)}function u(e){var t,n;if(e)return r?r(e):null===(n=null===(t=e.pagination)||void 0===t?void 0:t.cursors)||void 0===n?void 0:n.next}return(0,o.v9)((0,n.useMemo)((function(){return function(t){if(a.q.isFunction(e)){for(var r=e,n=a.q.isFunction(e)&&r(),o=n&&l.a.getResponse(t,n),s=o&&o.isFetching,f=o&&o.statusCode,m=o&&o.hasCompleted,b=m,p=o&&o.shouldFetch,d=i(o&&o.data),y=u(o&&o.data),v=function(e){if(e)return null==e?void 0:e.count}(o&&o.data);y&&(o=l.a.getResponse(t,r(y)),s=s||o.isFetching,f=o.statusCode,m=o.hasCompleted,!o.shouldFetch);){var g=i(o.data);g&&d.push.apply(d,c(g));var h=u(o.data);y=h===y?null:h}var S={shouldInitialFetch:p,items:d,nextCursor:y,isFetching:s,statusCode:f,hasCompleted:m,hasFirstPageCompleted:b};return"number"==typeof v&&(S.totalItems=v),S}}}),[e]))}i.o.Ok},79967:(e,t,r)=>{r.d(t,{k:()=>i});var n=r(32735),o=r(49677);function i(){return n.useContext(o.X)}},9085:(e,t,r)=>{function n(e,t){return t[e.charCodeAt(0)%t.length]}r.d(t,{x:()=>n})}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 494-bbdbf724ab-exchange.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[494],{32119:(e,t,r)=>{r.d(t,{G:()=>o});var a=r(32735),n=r(71365);function o(e){var t,r;return t=e,r=n.u.getInstance(t),a.useEffect((function(){return function(){n.u.releaseInstance(t)}})),r}},69883:(e,t,r)=>{r.d(t,{Z:()=>i});var a=r(79976),n=r(60139),o=r(32119);function i(){var e=(0,o.G)(a.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:n.NK.Warning,heading:n.R6.Warning,message:t})},info:function(t,r){e.createAlert({heading:t,message:r,type:n.NK.Info})}}}},23455:(e,t,r)=>{r.d(t,{h:()=>i});var a=r(32735),n=r(81886),o=r(20470);function i(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];a.useEffect((function(){t.length&&t.some(n.Q.Ry.isStatusCodeError)&&n.Q.Ry.throw(new o.x)}),t)}},5353:(e,t,r)=>{r.d(t,{i:()=>d});var a,n=r(99940),o=r(97395),i=r(14965);!function(e){e[e.AllResults=0]="AllResults",e[e.Subtitles=1]="Subtitles",e[e.TitleAndDescription=2]="TitleAndDescription"}(a||(a={}));var c=r(55812);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}function u(e){return Object.entries(e).reduce((function(e,t){var r,a,n=(a=2,function(e){if(Array.isArray(e))return e}(r=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o,i,c=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(a=o.call(r)).done)&&(c.push(a.value),c.length!==t);s=!0);}catch(e){u=!0,n=e}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw n}}return c}}(r,a)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(r,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1];return e[o.charAt(0).toLowerCase()+o.slice(1)]=i,e}),{})}function l(e){return e?Array.isArray(e)?function(e){return e.map(u)}(e):u(e):null}var d={regions:function(){return{url:"/api/tv/api/v2/regions",key:"tv:regions",normalize:!1,formatData:l}},region:function(e){return{url:"/api/tv/api/v2/regions/".concat(e),key:"tv:region:".concat(e),normalize:!1,formatData:l}},dateRange:function(e){return{url:"/api/tv/api/v2/regions/".concat(e,"/daterange"),key:"tv:region:".concat(e,":daterange"),normalize:!1,formatData:l}},channels:function(e){return{url:o._.urlBuilder("/api/tv/api/v2/channels",{region:e}),key:"tv:channels:".concat(e),normalize:!1,formatData:function(e){return l(e).sort((function(e,t){return e.sortOrder-t.sortOrder}))}}},payTvChannels:function(){return{url:"/api/tv/v1/pay-tv/channels/all",key:"pay:tv:channels",normalize:!1,formatData:l}},programsByChannel:function(e,t,r,a){return{url:o._.urlBuilder("/api/tv/api/v3/regions/".concat(e,"/channels/programs"),{channel:t,startDate:r,endDate:a}),key:["tv:programs:by:channel",e,t,r,a].join(":"),normalize:!1,formatData:l}},programsByLetter:function(e,t,r,a){return{url:o._.urlBuilder("/api/tv/api/v2/Programs",{regionCode:e,startsWith:t,startDate:r,endDate:a}),key:["tv:programs:by:letter",e,t,r,a].join(":"),normalize:!1,formatData:l}},program:function(e){return{url:"/api/tv/api/v3/programs/".concat(e),key:"tv:programs:".concat(e),normalize:!1,formatData:function(e){var t=l(e);return t.region=l(e.Region),t}}},search:function(e,t,r){var n=t.query,i=t.dateBroadcast,s=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r}(t,["query","dateBroadcast"]),u=r||1,d=s.filter||a.AllResults;return{url:o._.urlBuilder("/api/tv/api/v4/search",Object.assign(Object.assign(Object.assign({region:e,query:n,filter:d},c.a.getDateBroadcastParams(i)),s),{page:u,size:25})),key:["tv:search",n,e,Object.values(Object.assign({filter:d,dateBroadcast:i},s)).join(":"),u].join(":"),normalize:!1,formatData:function(e){var t=l(e);return t.results=l(e.Results),t.page=u,t}}},addFullVideo:function(e,t){return{url:"/api/tv/api/v2/workspace/video",key:"tv:add:full:video",normalize:!1,type:n.k.POST,data:e,invalidationKeys:"tv:workspace:video:".concat(t)}},addAdFreeVideo:function(e,t){return{url:o._.urlBuilder("/api/tv/v4/programs/".concat(e.id,"/ad-free"),{customerId:e.customerId,userId:e.userId}),key:"tv:add:ad:free:video",normalize:!1,type:n.k.POST,invalidationKeys:"tv:workspace:video:".concat(t)}},adFreeCredits:function(e,t,r){var a=new Date;a.setHours(0,0,0,0),a.setMinutes(a.getMinutes()+a.getTimezoneOffset());var n=i.O.add(a,1,"day");return{url:o._.urlBuilder("/api/tv/v4/user-requests",{userId:e,customerId:t,regionCode:r,from:i.O.convertUTCToLocal(a).toISOString(),to:i.O.convertUTCToLocal(n).toISOString()}),key:"tv:add:free:credits",normalize:!1,formatData:l}},createAdFreeRequest:function(e){return{url:o._.urlBuilder("/api/tv/v4/user-requests/ad-free",{userId:e.userId,customerId:e.customerId}),key:"tv:create:add:free:request",normalize:!1,type:n.k.POST,data:{programId:e.programId,regionCode:e.regionCode},invalidationKeys:["tv:add:free:credits"]}},workspaceVideo:function(e,t,r){return{url:o._.urlBuilder("/api/tv/v4/workspace/programs/".concat(e),{userId:t,customerId:r}),key:"tv:workspace:video:".concat(e),formatData:l}},requestProgram:function(e){return{url:"/api/tv/v1/pay-tv/user-requests",key:"tv:request:program",type:n.k.POST,data:e}},requestProgramUk:function(e){return{url:"/api/tv/api/v1/user-requests/program",key:"tv:request:program:uk",type:n.k.POST,data:e}}}},55812:(e,t,r)=>{r.d(t,{a:()=>i});var a=r(67624),n=r(14965),o=r(1048),i={getFormattedDateRange:function(e,t){return"".concat(n.O.format(e,"Do MMMM YYYY")," - ").concat(n.O.format(t,"Do MMMM YYYY"))},getDateBroadcastParams:function(e){var t=function(e){return n.O.format(e,"YYYY-MM-DD")},r=t(new Date);switch(e){case"yesterday":return{from:t(n.O.subtract(r,1,"day")),to:r};case"last-week":return{from:t(n.O.subtract(r,7,"days")),to:r};case"last-2-weeks":return{from:t(n.O.subtract(r,14,"days")),to:r}}},isHolidayPeriod:function(){var e,t=(e=a.SG.get("cv:holiday:dates"),o.t.isObject(e)?e:{startMonth:12,startDay:15,endMonth:1,endDay:6}),r=t.startMonth,n=t.startDay,i=t.endMonth,c=t.endDay,s=new Date,u=s.getMonth()+1,l=s.getDate();return u===r&&l>=n||u===i&&l<=c}}},22494:(e,t,r)=>{r.r(t),r.d(t,{TvAddView:()=>P});var a=r(32735),n=r(23481),o=r(81886),i=r(20354),c=r(11607);const s={selected:"zWik0",disabled:"bMSMv"};function u(e){var t,r,n,o,i,u="text-center cursor-pointer p-3 border rounded-3 mx-2 user-select-none w-50";return e.selected&&(u+=" border-info ".concat(s.selected)),(null===(t=e.option)||void 0===t?void 0:t.disabled)&&(u+=" ".concat(s.disabled)),a.createElement(c.L,{onClick:function(){var t;(null===(t=e.option)||void 0===t?void 0:t.disabled)||e.onSelect(e.option)},className:u},(null===(r=e.option)||void 0===r?void 0:r.imageUrl)&&a.createElement("img",{src:e.option.imageUrl,className:"img-fluid my-3 ".concat(null!==(n=e.option.imageClassName)&&void 0!==n?n:""),draggable:!1}),(null===(o=e.option)||void 0===o?void 0:o.title)&&a.createElement("h2",{className:"h3"},e.option.title),(null===(i=e.option)||void 0===i?void 0:i.description)&&a.createElement("p",{className:"mb-0",dangerouslySetInnerHTML:{__html:e.option.description}}),e.children)}var l=r(77696),d=r(13876),f=r(83345),p=r(31949),m=r(23455),v=r(73818),h=r(82329),y=r(99742),g=r(5353),b=r(60139),w=r(49985),E=r(65858),A=r(69883),k=r(65185);function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function x(){x=function(){return t};var e,t={},r=Object.prototype,a=r.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function l(e,t,r,a){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),c=new L(a||[]);return n(i,"_invoke",{value:T(e,r,c)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var f="suspendedStart",p="suspendedYield",m="executing",v="completed",h={};function y(){}function g(){}function b(){}var w={};u(w,i,(function(){return this}));var E=Object.getPrototypeOf,A=E&&E(E(C([])));A&&A!==r&&a.call(A,i)&&(w=A);var k=b.prototype=y.prototype=Object.create(w);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function D(e,t){function r(n,o,i,c){var s=d(e[n],e,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==O(l)&&a.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(l).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,c)}))}c(s.arg)}var o;n(this,"_invoke",{value:function(e,a){function n(){return new t((function(t,n){r(e,a,t,n)}))}return o=o?o.then(n,n):n()}})}function T(t,r,a){var n=f;return function(o,i){if(n===m)throw Error("Generator is already running");if(n===v){if("throw"===o)throw i;return{value:e,done:!0}}for(a.method=o,a.arg=i;;){var c=a.delegate;if(c){var s=I(c,a);if(s){if(s===h)continue;return s}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(n===f)throw n=v,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);n=m;var u=d(t,r,a);if("normal"===u.type){if(n=a.done?v:p,u.arg===h)continue;return{value:u.arg,done:a.done}}"throw"===u.type&&(n=v,a.method="throw",a.arg=u.arg)}}}function I(t,r){var a=r.method,n=t.iterator[a];if(n===e)return r.delegate=null,"throw"===a&&t.iterator.return&&(r.method="return",r.arg=e,I(t,r),"throw"===r.method)||"return"!==a&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+a+"' method")),h;var o=d(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,h;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function C(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function r(){for(;++n<t.length;)if(a.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(O(t)+" is not iterable")}return g.prototype=b,n(k,"constructor",{value:b,configurable:!0}),n(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,s,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},S(D.prototype),u(D.prototype,c,(function(){return this})),t.AsyncIterator=D,t.async=function(e,r,a,n,o){void 0===o&&(o=Promise);var i=new D(l(e,r,a,n),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},S(k),u(k,s,"Generator"),u(k,i,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function e(){for(;r.length;){var a=r.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},t.values=C,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(F),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(a,n){return c.type="throw",c.arg=t,r.next=a,n&&(r.method="next",r.arg=e),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),F(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if("throw"===a.type){var n=a.arg;F(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,a){return this.delegate={iterator:C(t),resultName:r,nextLoc:a},"next"===this.method&&(this.arg=e),h}},t}var S=function(e,t,r,a){return new(r||(r=Promise))((function(n,o){function i(e){try{s(a.next(e))}catch(e){o(e)}}function c(e){try{s(a.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,c)}s((a=a.apply(e,t||[])).next())}))},D=n.T.encloseNamespace("tv.addRequests"),T=r(55812);const I={circle:"v0QaY"};function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=Array(t);r<t;r++)a[r]=e[r];return a}var F="tv.add",L=n.T.encloseNamespace(F),C={id:"ad-free",title:"adFreeTitle",description:"adFreeDescription",imageUrl:y.W.General.MOUNTAINS_FRAMED},_={id:"request-ad-free",title:"adFreeTitle",imageUrl:y.W.General.MOUNTAINS_FRAMED},j={id:"full-video",title:"fullVideoTitle",description:"fullVideoDescription",imageUrl:y.W.General.ANNOUNCEMENT_FRAMED};function P(e){var t=i.a.useBasicFetch(p.N.currentUser()),r=i.a.useBasicFetch(g.i.program(e.id)),n=i.a.useBasicFetch(t.data&&g.i.adFreeCredits(t.data.id,t.data.customerId,e.region)),c=function(e,t){var r=i.a.useGetFetchAsync(),a=(0,A.Z)(),n=i.a.useBasicFetch(p.N.currentUser()),c=i.a.useBasicFetch(p.N.workspace()),s=i.a.useBasicFetch(g.i.program(e)),u=i.a.useBasicFetch(g.i.region(t)),l=i.a.useBasicFetch(s.data&&n.data&&g.i.workspaceVideo(s.data.id,n.data.id,n.data.customerId));return{requestAdFreeVideo:function(){var e;return S(this,void 0,void 0,x().mark((function t(){var i,c;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r(g.i.createAdFreeRequest({programId:s.data.id,regionCode:u.data.code,userId:n.data.id,customerId:n.data.customerId}));case 3:a.success({heading:k.R.Success,message:D("requestAdFreeSuccess",{video:s.data.title}),type:b.NK.Success}),o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.AD_FREE_REQUEST,args:[u.data.code,s.data.id]}),w.k.logUserAction({id:s.data.id,name:s.data.title},{actionType:E.Vw.Submit,entity:E.py.Video,descriptor:E.MI.AdFreeRequest,location:E.LZ.Popup,workflowPhase:E.eu.Complete}),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(0),(i=null===(e=t.t0.responseJSON)||void 0===e?void 0:e.message)?(c=JSON.parse(i),a.error(D(c.Type,{video:s.data.title}))):a.error(D("error"));case 12:case"end":return t.stop()}}),t,null,[[0,8]])})))},addAdFreeVideo:function(){return S(this,void 0,void 0,x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l.data.exists||!l.data.hasAdFree){e.next=3;break}return o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,params:{alreadyAdded:!0}}),e.abrupt("return");case 3:return e.prev=3,t={id:s.data.id,userId:n.data.id,customerId:n.data.customerId},e.next=7,r(g.i.addAdFreeVideo(t,s.data.id));case 7:a.success({heading:k.R.Success,message:D("addAdFreeSuccess",{video:s.data.title}),type:b.NK.Success}),o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,args:[u.data.code,s.data.id]}),w.k.logUserAction({id:s.data.id,name:s.data.title},{actionType:E.Vw.Submit,entity:E.py.Video,descriptor:E.MI.AddAdFreeVideo,location:E.LZ.Popup,workflowPhase:E.eu.Complete}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),a.error(D("error"));case 15:case"end":return e.stop()}}),e,null,[[3,12]])})))},addFullVideo:function(){return S(this,void 0,void 0,x().mark((function e(){var t;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!l.data.exists){e.next=3;break}return o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,params:{alreadyAdded:!0}}),e.abrupt("return");case 3:return e.prev=3,t={userId:n.data.id,customerId:n.data.customerId,globalId:s.data.globalId,libraryId:c.data.id},e.next=7,r(g.i.addFullVideo(t,s.data.id));case 7:a.success({heading:k.R.Success,message:D("addFullSuccess",{video:s.data.title}),type:b.NK.Success}),o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.ALREADY_ADDED,args:[u.data.code,s.data.id]}),w.k.logUserAction({id:s.data.id,name:s.data.title},{actionType:E.Vw.Submit,entity:E.py.Video,descriptor:E.MI.AddFullVideo,location:E.LZ.Popup,workflowPhase:E.eu.Complete}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(3),a.error(D("error"));case 15:case"end":return e.stop()}}),e,null,[[3,12]])})))}}}(e.id,e.region),s=c.requestAdFreeVideo,y=c.addAdFreeVideo,O=c.addFullVideo;(0,m.h)(r.statusCode);var P,M,R=(P=a.useState(null),M=2,function(e){if(Array.isArray(e))return e}(P)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var a,n,o,i,c=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(a=o.call(r)).done)&&(c.push(a.value),c.length!==t);s=!0);}catch(e){u=!0,n=e}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw n}}return c}}(P,M)||function(e,t){if(e){if("string"==typeof e)return N(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?N(e,t):void 0}}(P,M)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),V=R[0],q=R[1],B=!Number.isNaN(e.currentTime),U=n.data&&n.data.userRequests<n.data.maxAvailableCredit,Y=n.data&&n.data.maxAvailableCredit-n.data.userRequests;a.useEffect((function(){n.hasCompleted&&(U||q(j))}),[n,U]);var z=t.hasCompleted&&r.hasCompleted&&n.hasCompleted,G=(null==V?void 0:V.id)===_.id&&T.a.isHolidayPeriod();return a.createElement(l.G,{size:"lg",title:L("title"),showLoadingSpinner:!z,closePopup:e.closePopup},z&&a.createElement(a.Fragment,null,a.createElement("div",{className:"d-flex mb-3 mx-n2"},r.data.hasAdsFree&&a.createElement(u,{option:{id:C.id},onSelect:q,selected:(null==V?void 0:V.id)===C.id},a.createElement("img",{src:C.imageUrl,className:"img-fluid",draggable:!1}),a.createElement("h2",{className:"h4 mb-1"},a.createElement(f.x,{namespace:F,phrase:C.title})),a.createElement("p",{className:"mb-2"},a.createElement(f.x,{namespace:F,phrase:C.description}))),!r.data.hasAdsFree&&a.createElement(u,{option:{id:_.id,disabled:!U},onSelect:q,selected:(null==V?void 0:V.id)===_.id},a.createElement("img",{src:_.imageUrl,className:"img-fluid",draggable:!1}),a.createElement("div",{className:"d-flex justify-content-center align-items-center mb-1"},a.createElement("h2",{className:"h4 mb-1"},a.createElement(f.x,{namespace:F,phrase:_.title})),a.createElement("span",{className:"badge bg-dark rounded-circle ms-2 ".concat(I.circle)},Y)),a.createElement("p",{className:"mb-2"},a.createElement(f.x,{namespace:F,phrase:U?"requestAdFreeDescription":"noRequestsDescription"}))),a.createElement(u,{option:{id:j.id},onSelect:q,selected:(null==V?void 0:V.id)===j.id},a.createElement("img",{src:j.imageUrl,className:"img-fluid",draggable:!1}),a.createElement("h2",{className:"h4 mb-1"},a.createElement(f.x,{namespace:F,phrase:j.title})),a.createElement("p",{className:"mb-2"},a.createElement(f.x,{namespace:F,phrase:j.description})))),G&&a.createElement("div",{className:"alert alert-warning",role:"alert"},a.createElement("h3",{className:"h5"},a.createElement(f.x,{namespace:F,phrase:"adFreeAlertHeading"})),a.createElement("p",{className:"m-0"},a.createElement(f.x,{namespace:F,phrase:"adFreeAlertBody"})))),a.createElement(d.u,null,a.createElement(d.u.Cancel,{text:L(B?"back":"close"),onClick:function(){B?o.Q.C$.trigger({application:h.O.TV,action:v.e.Tv.PREVIEW,args:[e.region,r.data.id],params:{currentTime:e.currentTime}}):e.closePopup()},variant:"link"}),a.createElement(d.u.Submit,{text:L("continue"),onClick:function(){V&&(V.id===j.id&&O(),V.id===C.id&&y(),V.id===_.id&&s())},variant:"dark",disabled:!V})))}}}]);
@@ -1 +0,0 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
@@ -1,2 +0,0 @@
1
- /*! For license information please see 522-592d80f6b9-exchange.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[522],{31453:(e,t,n)=>{function r(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return"";var r=t.filter((function(e){return!!e}));return r.length?r.join(" "):""}n.d(t,{A:()=>r})},66090:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{O:()=>a});var a={isNumber:function(e){return a.isType(e,"number")},isString:function(e){return a.isType(e,"string")},isType:function(e,t){return r(e)===t}}},66122:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(32735);function a(e){return r.createElement("span",{id:"".concat(e.name,"Error"),className:"".concat(e.className," invalid-feedback d-block"),role:"status"},e.children)}},11904:(e,t,n)=>{n.d(t,{n:()=>S,W:()=>w});var r=n(32735),a=n(80247),o=n(50132),i=n(92802),c=n(79014),l=n(1048),s=n(28825),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function m(e){var t=e.label,n=e.checkboxLabelClassName,a=e.checkboxLabelFontWeight,i=e.className,c=u(e,["label","checkboxLabelClassName","checkboxLabelFontWeight","className"]);return r.createElement(o.Z.Group,{className:"form-group"},r.createElement("div",{className:"form-check ".concat(i||"")},r.createElement(S,Object.assign({className:"form-check-input"},c)),r.createElement(o.Z.Label,{className:"form-check-label cursor-pointer ".concat("normal"===a?"fw-normal":""," \n ").concat(n),htmlFor:c.id},t),e.checkboxAppLink&&e.checkboxAppLinkText&&r.createElement(r.Fragment,null,r.createElement("span",null," "),r.createElement(s.F,{appLink:e.checkboxAppLink,className:"info-link"},e.checkboxAppLinkText))))}var d=n(83914),p=n(83345),f={getCustomFormControlClassName:function(e,t,n,r,a,o){var c="";return c=function(e,t){var n="";return n="select"===e?"form-select":"form-control","sm"===t&&(n+=" ".concat(n,"-sm")),"lg"===t&&(n+=" ".concat(n,"-lg")),n}(o,r),(0,i.u9)(t,n)&&(0,i.u9)(e,n)&&(c+=" is-invalid"),a&&(c+=" ".concat(a)),c}},v=n(35223);function g(e){var t=(0,i.u6)().values,n=l.t.get(t,e.fieldName);return"string"!=typeof n?r.createElement(r.Fragment,null):r.createElement("div",{className:"float-end text-secondary fw-normal"},n.length,"/",e.limit," characters")}const h={revealPassword:"jCfI0",passwordInput:"RBJnf",passwordContainer:"d78lK",passwordContainerDisabled:"asbVo",infoTooltip:"wzyOG",spinner:"CycFx"};function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},E="shared.formField";function S(e){var t,n,o=e.children,s=e.showLoadingSpinner,u=y(e,["children","showLoadingSpinner"]),m=(t=r.useState(e.type),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=m[0],f=m[1],g=c.q.isFunction(o)?function(e){return o(e)}:r.Children.count(o)?o:null;if("password"!==u.type)return s?r.createElement("div",{className:"position-relative"},r.createElement(i.gN,Object.assign({},l.t.omit(u,["formSize"])),g),r.createElement("div",{className:h.spinner},r.createElement(a.Z,{animation:"border",size:"sm"}))):r.createElement(i.gN,Object.assign({},l.t.omit(u,["formSize"])),g);var E="position-relative ".concat(h.passwordContainer);return u.className&&(E+=" ".concat(u.className)),u.disabled&&(E+=" ".concat(h.passwordContainerDisabled)),r.createElement("div",{className:E},r.createElement(i.gN,Object.assign({},l.t.omit(u,["formSize","type","className"]),{type:p,className:"".concat(h.passwordInput," border-0 w-100 h-100 outline-none rounded")}),g),"password"===u.type&&r.createElement(d.x,{svgName:"password"===p?v.vn.VisibleOn:v.vn.VisibleOff,className:"svg-container cursor-pointer ".concat(h.revealPassword),onClick:function(){f("password"===p?"text":"password")}}))}function w(e){var t=e.label,n=e.className,a=e.showCharacterCounter,c=e.showRequiredStar,s=e.infoTooltip,u=e.infoTooltipPlacement,b=e.infoText,w=e.formSize,O=e.showOptionalLabel,C=e.formGroupClassname,I=y(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoTooltipPlacement","infoText","formSize","showOptionalLabel","formGroupClassname"]),x=(0,i.u6)(),j=x.errors,N=x.touched,k=function(){};if("checkbox"===I.type){var T=l.t.omit(e,["formSize","infoTooltipPlacement"]);return e.disabled&&(T.onChange=k),r.createElement(m,Object.assign({},T))}var R=Object.assign(Object.assign({},I),{className:f.getCustomFormControlClassName(j,N,I.name,w,n,"string"==typeof e.as?e.as:null)});return e.disabled&&(R.onChange=k),r.createElement(o.Z.Group,{className:"form-group ".concat(C)},!!t&&r.createElement(o.Z.Label,{htmlFor:I.id,className:"d-flex align-items-center"},t,c&&r.createElement("span",{className:"text-danger"},"*"),s&&r.createElement(d.x,{className:"svg-container text-secondary ".concat(h.infoTooltip),svgName:v.vn.Info,title:s,tooltipPlacement:u,tooltipSpanHack:!0}),O&&r.createElement("span",{className:"text-secondary"}," ",r.createElement(p.x,{namespace:E,phrase:"optional"})),!!a&&!!I.maxLength&&r.createElement("div",{className:"ms-auto"},r.createElement(g,{fieldName:I.name,limit:I.maxLength}))),r.createElement(S,Object.assign({},R,{"aria-errormessage":"".concat(I.name,"Error")})),!!b&&r.createElement(o.Z.Text,{className:"text-secondary"},b),r.createElement(i.Bc,{name:I.name},(function(e){return r.createElement(o.Z.Control.Feedback,{id:"".concat(I.name,"Error"),type:"invalid",role:"status"},e)})))}S.defaultProps={autoComplete:"off"},w.defaultProps={autoComplete:"off",infoTooltipPlacement:"top"}},82644:(e,t,n)=>{n.d(t,{b:()=>u,n:()=>s});var r=n(32735),a=n(92802),o=n(79014),i=n(1048);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function s(e){var t=e.castInitialValues,n=e.castValuesOnSubmit,s=e.initialValues,u=e.onSubmit,m=l(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),d=t&&e.validationSchema?e.validationSchema.cast(function(e){if(!e)return{};var t=i.t.deepClone(e);return function e(n){Object.keys(t).forEach((function(r){t.hasOwnProperty(r)&&(i.t.isObject(n[r])?e(n[r]):null===t[r]&&delete t[r])}))}(t),t}(s)):s,p={allowInitialSubmit:e.allowInitialSubmit};return r.createElement(a.J9,Object.assign({enableReinitialize:!0},m,{initialValues:d,onSubmit:function(t,r){var a=r.setSubmitting,o=r.resetForm,i=r.setFieldError,l=n&&e.validationSchema?e.validationSchema.cast(t):t;u(l,(function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n.reset&&o(),n.errors)for(var r=0,l=Object.entries(n.errors);r<l.length;r++){var s=(e=l[r],t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],m=s[1];i(u,m)}a(!1)}))},initialStatus:p}),o.q.isFunction(e.children)?function(t){return e.children(t)}:r.Children.count(e.children)?e.children:null)}function u(){return(0,a.u6)()}s.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},75289:(e,t,n)=>{n.d(t,{f:()=>i});var r=n(32735),a=n(83914);const o={circle:"Uxnsl",img:"BQ87Y"};function i(e){var t;return e.imageUrl||e.svgName?e.imageUrl?r.createElement("div",{className:"".concat(o.img," rounded-circle h-100 w-100"),style:{backgroundImage:"url(".concat(e.imageUrl,")")}}," "):r.createElement("div",{className:"".concat(o.circle," ").concat(e.variant?"bg-".concat(e.variant):""," text-").concat(e.textVariant," rounded-circle h-100 w-100 ").concat(null!==(t=e.svgWrapperClassName)&&void 0!==t?t:"")},r.createElement(a.x,{svgName:e.svgName,size:e.svgSize})):r.createElement(r.Fragment,null)}i.defaultProps={textVariant:"white"}},19808:(e,t,n)=>{var r;n.d(t,{b:()=>r}),function(e){e.AU="cv-ap-southeast-1",e.NZ="cv-ap-southeast-2",e.UK="cv-eu-west-1",e.US="cv-na-west-1"}(r||(r={}))},86764:(e,t,n)=>{var r;n.d(t,{r:()=>r}),function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(r||(r={}))},78417:(e,t,n)=>{var r;n.d(t,{r:()=>r}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(r||(r={}))},45778:(e,t,n)=>{n.d(t,{G:()=>a});var r=n(4594),a={isType:function(e,t){var n;return(null==e?void 0:e.typeId)?e.typeId===t:(null===(n=null==e?void 0:e.type)||void 0===n?void 0:n.toLowerCase())===r.E[t].toLowerCase()},isResource:function(e){return a.isType(e,r.E.Resource)},isClassification:function(e){return"Subject"===e.type}}},81522:(e,t,n)=>{n.r(t),n.d(t,{GiveFeedbackView:()=>Rr});var r,a,o=n(32735),i=n(43823),c=n(53301),l=n.n(c),s=n(39202),u=n(23481),m=n(54150),d=n(32119),p=n(20354),f=n(49985),v=n(65858),g=n(29555),h=n(28046),b=n(77696),y=n(83345),E=n(52003),S=n(60735);!function(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"}(r||(r={})),function(e){e.Subject="Subject",e.Curriculum="Curriculum",e.StreamableLearning="StreamableLearning"}(a||(a={}));var w,O=n(12754),C=n(97395),I={presentationAudiences:function(e,t){var n=t||a.Subject.toLowerCase(),r={type:n,presentationId:e};return{bootstrapName:"presentationAudiences",url:C._.urlBuilder("/api/domain/v1/subjects/audiences",r),publicUrl:C._.urlBuilder("/api/subjects/presentation/".concat(e,"/audiences"),r),key:"presentation:audiences:".concat(e,":").concat(n),normalize:!1}},audiencesByPresentationId:function(e){return{url:"/api/domain/v1/subjects/presentations/".concat(e,"/audiences"),publicUrl:C._.urlBuilder("/api/subjects/presentation/".concat(e,"/audiences"),{type:a.Subject.toLowerCase(),presentationId:e}),key:"presentation:".concat(e,":audiences"),normalize:!1}}};!function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos",e.PinnedVideos="pinnedVideos"}(w||(w={}));var x=n(62803),j=n(78417),N=function(e){return"subjectpresentationaudiences.id:[".concat(e.join(","),"]")},k={topicsFromAllAvailablePresentations:function(e){var t={filterType:"topics",presentationId:e};return{url:C._.urlBuilder("{gateway}/v1/search/filters",t),publicUrl:C._.urlBuilder("/api/search/filters",t),key:"classification:availableTopics",normalize:!1}},availablePresentations:function(e){var t={type:null==e?void 0:e.toLowerCase()};return{url:C._.urlBuilder("/api/domain/v1/subjects/presentations/available",t),publicUrl:C._.urlBuilder("/api/subjects/presentations/available",t),key:"available:presentations:".concat(e),normalizeOptions:{namespace:"presentation"}}},topLevelTopics:function(e){var t={query:x.v.CLASSIFICATION_COLLECTION,sort:"alphabetical"};return{url:C._.urlBuilder("/api/domain/v1/subjects/presentations/".concat(e,"/classifications"),t),publicUrl:C._.urlBuilder("/api/subjects/presentations/".concat(e,"/classifications"),t),key:"presentation:".concat(e,":classifications")}},presentationById:function(e){return{url:"/api/domain/v1/subjects/presentations/".concat(e),publicUrl:"/api/subjects/presentations/".concat(e),key:"presentation:".concat(e)}},presentationBySlug:function(e,t,n){var r={type:n.toLowerCase(),contentRegion:t};return{url:C._.urlBuilder("/api/subjects/presentations/".concat(e),r),publicUrl:C._.urlBuilder("/api/subjects/presentations/".concat(e),r),key:"current:presentation:".concat(n.toLowerCase(),":").concat(t,":").concat(null!=e?e:""),bootstrapName:"presentation",normalizeOptions:{namespace:"presentation"}}},presentation:function(e,t){var n={type:null==e?void 0:e.toLowerCase()};return{url:C._.urlBuilder("/api/domain/v1/subjects/presentations",n),publicUrl:C._.urlBuilder("/api/subjects/presentations/".concat(t),n),key:"current:presentation".concat(e?":".concat(e.toLowerCase()):"").concat(t?":".concat(t):""),normalizeOptions:{namespace:"presentation"}}},classifications:function(){return{url:C._.urlBuilder("/api/domain/v1/subjects",{query:x.v.CLASSIFICATION_COLLECTION,type:a.Subject.toLowerCase()}),publicUrl:C._.urlBuilder("/api/subjects/classifications",{query:x.t.CLASSIFICATION_COLLECTION,type:a.Subject.toLowerCase()}),key:"classifications"}},classification:function(e,t,n){return{url:C._.urlBuilder("/api/domain/v1/subjects/".concat(e),{query:x.v.CLASSIFICATION(t)}),publicUrl:C._.urlBuilder("/api/subjects/classifications/".concat(e),{query:x.t.CLASSIFICATION}),key:"classification:".concat(e),error:n}},path:function(e,t){var n={type:t};return{url:C._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/path"),n),publicUrl:"/api/subjects/classifications/".concat(e,"/path"),key:"classification:".concat(e,":path")}},paths:function(e){return{url:"/api/subjects/classifications/".concat(e,"/paths"),key:"classification:".concat(e,":paths")}},children:function(e){return{url:C._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/children"),{query:x.v.CLASSIFICATION_COLLECTION}),publicUrl:C._.urlBuilder("/api/subjects/classifications/".concat(e,"/children"),{query:x.t.CLASSIFICATION_COLLECTION}),key:"classification:".concat(e,":children")}},videos:function(e,t,n){if(t){var r="limit:100,orderbydesc:timestamp";n.length&&(r+=",".concat(N(n)));var a={query:"{".concat(r,"}(videoCollection),subjectpresentationaudiences{presentationId:").concat(t,"}"),permissionFilterOption:j.r.StripMetadata};return{url:C._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/").concat(w.PinnedVideos),a),publicUrl:C._.urlBuilder("/api/subjects/classifications/".concat(e,"/").concat(w.PinnedVideos),a),key:"classification:".concat(e,":").concat(w.PinnedVideos,":").concat(n.join(":"))}}},playlists:function(e,t,n){if(t){var r="limit:100,orderby:name";n.length&&(r+=",".concat(N(n)));var a={query:"{".concat(r,"}").concat(x.v.PLAYLIST_COLLECTION)+",subjectpresentationaudiences{presentationId:".concat(t,"}"),permissionFilterOption:j.r.StripMetadata};return{url:C._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/").concat(w.Playlists),a),publicUrl:C._.urlBuilder("/api/subjects/classifications/".concat(e,"/").concat(w.Playlists),a),key:"classification:".concat(e,":").concat(w.Playlists,":").concat(n.join(":")),formatData:function(e){var t;if(e)return Object.assign(Object.assign({},e),{data:null===(t=e.data)||void 0===t?void 0:t.filter((function(e){var t;return null===(t=e.cover)||void 0===t?void 0:t.url}))})}}}},series:function(e,t,n){if(t){var r="limit:100";n.length&&(r+=",".concat(N(n)));var a={query:"{".concat(r,"}").concat(x.v.SERIES)+",subjectpresentationaudiences{presentationId:".concat(t,"}"),permissionFilterOption:j.r.StripMetadata};return{url:C._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/").concat(w.Series),a),publicUrl:C._.urlBuilder("/api/subjects/classifications/".concat(e,"/").concat(w.Series),a),key:"classification:".concat(e,":").concat(w.Series,":").concat(n.join(":")),formatData:function(e){var t;if(e)return Object.assign(Object.assign({},e),{data:null===(t=e.data)||void 0===t?void 0:t.filter((function(e){var t;return null===(t=e.tallPoster)||void 0===t?void 0:t.url}))})}}}},curriculumLinks:function(e,t){return{url:C._.urlBuilder("/api/subjects/presentations/".concat(t,"/objects/").concat(e,"/classifications/paths"),{type:a.Curriculum.toLowerCase()}),publicUrl:C._.urlBuilder("/api/subjects/presentations/".concat(t,"/objects/").concat(e,"/classifications/paths"),{type:a.Curriculum.toLowerCase()}),key:"curriculum:links:".concat(e,":").concat(t),normalize:!1}},subjectLinks:function(e,t){var n=C._.urlBuilder("/api/subjects/presentations/".concat(t,"/objects/").concat(e,"/classifications/paths"),{type:a.Subject.toLowerCase()});return{url:n,publicUrl:n,key:"subject:links:".concat(e,":").concat(t),normalize:!1}},getMappedCurriculums:function(e,t){var n={type:a.Curriculum.toLowerCase()};return{url:C._.urlBuilder("/api/domain/v1/subjects/objects/".concat(e,"/presentations"),n),publicUrl:C._.urlBuilder("/api/subjects/".concat(e,"/presentations"),Object.assign(Object.assign({},n),{pid:t})),key:"mapped:curriculums:".concat(e,":").concat(t.join(",")),normalize:!1}},regionAlternatives:function(e,t,n,r){return{url:"/api/subjects/classifications/".concat(e,"/region-alternatives"),publicUrl:"/api/subjects/classifications/".concat(e,"/region-alternatives"),key:"classification:regionAlternatives:".concat(e),normalize:!1,success:t,error:n,always:r}}},T=n(1666),R=n(99940),L={submitFeedback:function(e,t){return{url:"{gateway}/v1/feedback",key:"submit:feedback",type:R.k.POST,data:Object.assign(Object.assign({},e),t)}}},A=n(70145),U=n(31949),F=n(69883);function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var _=n(35286),V=n(81886),B=n(16714),q=n(47663);function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,D(r.key),r)}}function D(e){var t=function(e){if("object"!=G(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=G(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==G(t)?t:t+""}function z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(z=function(){return!!e})()}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}var Q=u.T.encloseNamespace("shared.studentRestrictedDialogError"),Z=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=H(t),function(e,t){if(t&&("object"==G(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,z()?Reflect.construct(t,n||[],H(e).constructor):t.apply(e,n))}(this,t,["Learner accessing feature that is for staff only"])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"StudentRestrictedDialogError"}},{key:"dialogOptions",get:function(){return{title:Q("heading"),text:Q("description"),buttons:[{text:Q("close"),className:"btn btn-link",close:!0}]}}}])&&M(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(q.S),K=n(22902),X=n(57881),Y=n(19808),$=n(86613);function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ee,te={getUserInfo:function(e,t){return{id:e.id,username:e.username,email:e.email,userType:e.role===$.i.Admin?"Admin":"Staff",customerId:e.customerId,cvcId:t.crmId,customerName:t.name,instanceRegion:e.instanceRegion,contentRegion:e.contentRegion,firstName:e.givenName,lastName:e.familyName}},mapInstanceRegionToTag:function(e){switch(e){case Y.b.AU:return"au";case Y.b.NZ:return"nz";case Y.b.UK:return"uk";case Y.b.US:return"us"}},getTags:function(e,t,n,r){var a,o=[t].concat(function(e){if(Array.isArray(e))return J(e)}(a=r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return J(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());o.push(n?"student":"staff"),e.role===$.i.Admin&&o.push("administrator");var i=te.mapInstanceRegionToTag(e.instanceRegion);return i&&o.push(i),o},categorizeFiles:function(e){return e.reduce((function(e,t){var n=t.get("fileInfo");return l().isValidFile(t.get("file"),h.l.VIDEO)?e.videoUrls.push(null==n?void 0:n.url):e.imageUrls.push(null==n?void 0:n.url),e}),{imageUrls:[],videoUrls:[]})}},ne=n(11607),re=n(49439);!function(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"}(ee||(ee={}));var ae=u.T.encloseNamespace("shared.feedbackFormTitles"),oe=function(e){switch(e){case ee.SUGGEST_IMPROVEMENT:case ee.REPORT_BUG:case ee.REQUEST_VIDEO:case ee.REQUEST_LIVESTREAM:case ee.GIVE_PRAISE:case ee.RAISE_ISSUE:case ee.OTHER:return ae(e)}};function ie(e){return ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ie(e)}function ce(e,t,n){return(t=function(e){var t=function(e){if("object"!=ie(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ie(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var le=ce(ce(ce(ce(ce(ce(ce({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"},ee.REQUEST_VIDEO,{default:"https://img.clickviewapp.com/v2/images/G1YGdn",hover:"https://img.clickviewapp.com/v2/images/K6yPxz"}),ee.REQUEST_LIVESTREAM,{default:"https://img.clickviewapp.com/v2/images/G1YGdn",hover:"https://img.clickviewapp.com/v2/images/K6yPxz"}),ee.SUGGEST_IMPROVEMENT,{default:"https://img.clickviewapp.com/v2/images/g7aR1l",hover:"https://img.clickviewapp.com/v2/images/zMR0Dk"}),ee.RAISE_ISSUE,{default:"https://img.clickviewapp.com/v2/images/5boW78",hover:"https://img.clickviewapp.com/v2/images/m6yRKr"}),ee.GIVE_PRAISE,{default:"https://img.clickviewapp.com/v2/images/nE1mdz",hover:"https://img.clickviewapp.com/v2/images/JjEnmR"}),ee.REPORT_BUG,{default:"https://img.clickviewapp.com/v2/images/AOdYpo",hover:"https://img.clickviewapp.com/v2/images/yro9NM"}),ee.OTHER,{default:"https://img.clickviewapp.com/v2/images/Eoaykj",hover:"https://img.clickviewapp.com/v2/images/wN59Zg"});const se={image:"_2jo0"};function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function me(e){var t,n,r=(t=(0,re.X)(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return ue(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ue(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],i=r[1],c=le[e.option];return o.createElement(ne.L,{ref:a,className:"col-lg-4 col-sm-6 col-12",onClick:function(){return e.onSelectOption(e.option)}},o.createElement("div",{className:"d-flex flex-column align-items-center h-100 rounded border py-3 gap-2"},o.createElement("img",{className:se.image,src:i?c.hover:c.default,alt:oe(e.option)}),o.createElement("p",{className:"fw-semibold text-center mb-0"},oe(e.option))))}function de(e){return o.createElement("div",{className:"row g-2"},e.options.map((function(t){return o.createElement(me,{key:t,option:t,onSelectOption:e.onSelectOption})})))}var pe=n(92802),fe=n(82644),ve=n(13876),ge=u.T.encloseNamespace("shared.feedbackButtons");function he(e){var t=(0,fe.b)();return o.createElement(ve.u,null,"form"===e.formStage&&o.createElement(o.Fragment,null,!e.hideCancelButton&&o.createElement(ve.u.Cancel,{onClick:function(){return e.setSelectedOption(null)},text:ge("cancel")}),o.createElement(ve.u.Submit,{variant:"dark",text:e.submitText||ge("submit"),disabled:!t.isValid})),"success"===e.formStage&&o.createElement(ve.u.Cancel,{variant:"dark",text:ge("close"),onClick:e.closePopup}))}const be={successImage:"yp7vQ"};var ye=u.T.encloseNamespace("shared.feedbackFormState");function Ee(e){return"form"===e.formStage||"error"===e.formStage?o.createElement(o.Fragment,null):o.createElement("div",{className:"text-center"},o.createElement("div",{className:"mb-3"},o.createElement("img",{className:be.successImage,src:e.successImageUrl||le.mailSent})),o.createElement("h4",{className:"mb-3"},e.successHeading||ye("successHeading")),o.createElement("p",{className:"mb-3"},e.successDescription||ye("successDescription")))}var Se=n(5173),we=n(11904),Oe=u.T.encloseNamespace("shared.feedbackForm"),Ce=5e3,Ie=function(e){switch(e){case"requiredError":return Oe(e);case"minCharactersError":return Oe(e,{limit:10});case"maxCharactersError":return Oe("maxCharactersError",{limit:Ce})}},xe=function(){return Se.Z_().min(10,Ie("minCharactersError")).max(Ce,Ie("maxCharactersError"))},je=u.T.encloseNamespace("shared.feedbackGivePraise"),Ne={praise:""},ke=Se.Ry().shape({praise:xe().required(Ie("requiredError"))}).noUnknown();function Te(){var e=(0,fe.b)();return o.createElement(o.Fragment,null,o.createElement(we.W,{as:"textarea",placeholder:je("givePraisePlaceholder"),label:je("givePraiseLabel"),name:"praise",rows:5,value:e.values.praise,showRequiredStar:!0}))}function Re(e){return o.createElement(hr,Object.assign({},e,{initialValues:Object.assign(Object.assign({},Ne),e.initialValues),validationSchema:ke,successImageUrl:le.heartHands,successHeading:je("successHeading"),successDescription:je("successDescription")}),o.createElement(Te,null))}var Le=u.T.encloseNamespace("shared.feedbackOther"),Ae={feedback:""},Ue=Se.Ry().shape({feedback:xe().required(Ie("requiredError"))}).noUnknown();function Fe(){var e=(0,fe.b)();return o.createElement(o.Fragment,null,o.createElement(we.W,{as:"textarea",placeholder:Le("otherPlaceholder"),label:Le("otherLabel"),name:"feedback",rows:5,value:e.values.feedback,showRequiredStar:!0}))}function Pe(e){return o.createElement(hr,Object.assign({},e,{initialValues:Object.assign(Object.assign({},Ae),e.initialValues),validationSchema:Ue}),o.createElement(Fe,null))}var _e=u.T.encloseNamespace("shared.feedbackRaiseIssue"),Ve={issue:""},Be=Se.Ry().shape({issue:xe().required(Ie("requiredError"))}).noUnknown();function qe(){var e=(0,fe.b)();return o.createElement(o.Fragment,null,o.createElement(we.W,{as:"textarea",placeholder:_e("raiseIssuePlaceholder"),label:_e("raiseIssueLabel"),name:"issue",rows:5,value:e.values.issue,showRequiredStar:!0}))}function Ge(e){return o.createElement(hr,Object.assign({},e,{initialValues:Object.assign(Object.assign({},Ve),e.initialValues),validationSchema:Be}),o.createElement(qe,null))}var Me=n(83914);function De(e){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(e)}function ze(e,t,n){return(t=function(e){var t=function(e){if("object"!=De(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=De(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==De(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var He,We=ze(ze(ze(ze({},Y.b.AU,{phone:"02 9509 2600",email:"support@clickview.com.au",website:"https://www.clickviewsupport.com/hc"}),Y.b.UK,{phone:"+44 (0)333 207 6595",email:"info@clickview.co.uk",website:"https://www.clickviewsupport.com/hc"}),Y.b.NZ,{phone:"09 916 1156",email:"support@clickview.co.nz",website:"https://www.clickviewsupport.com/hc"}),Y.b.US,{phone:"+1 312-292-9322",email:"info@clickvieweducation.com",website:"https://www.clickviewsupport.com/hc"}),Qe=n(35223),Ze=n(58591),Ke=n(66122);!function(e){e.FileSelect="file-select",e.DragDrop="drag-drop"}(He||(He={}));const Xe={fileDrop:"vdCUc",resourcePreview:"tZQbH"};function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var $e="shared.feedbackFileUpload";function Je(e){var t=(0,Ze.uI)({onDrop:function(t){return e.onFilesAdded(t,He.DragDrop)},noClick:!0,noKeyboard:!0,multiple:!!e.acceptMultiple,noDragEventsBubbling:!0}),n=t.getRootProps,r=t.getInputProps,a=t.isDragActive,i=o.useRef(null),c=o.useCallback((function(e){e&&(i.current=e)}),[]),l="".concat(Xe.fileDrop," text-center p-2 rounded-1");return e.uploadError&&(l+=" border-red"),a&&(l+=" border-blue bg-light-blue"),o.createElement(o.Fragment,null,o.createElement("div",Object.assign({},n({className:l})),o.createElement("img",{className:Xe.resourcePreview,src:e.imageUrl,draggable:!1}),o.createElement("div",{className:"position-relative"},a&&o.createElement("p",{className:"position-absolute font-size-md translate-middle top-50 start-50 mb-0"},o.createElement(y.x,{namespace:$e,phrase:"dropUpload"})),o.createElement("div",{className:a?"opacity-0":""},o.createElement("p",{className:"mb-0"},o.createElement(y.x,{namespace:$e,phrase:"dragDrop"})),o.createElement("button",{type:"button",className:"btn btn-link text-underline p-0",onClick:function(){i.current.value=null,i.current.click()}},o.createElement(y.x,{namespace:$e,phrase:"upload"})))),o.createElement("input",{type:"file",name:"fileUpload",className:"file-select d-none",multiple:!!e.acceptMultiple,accept:e.mimeType,ref:c,onChange:function(t){return e.onFilesAdded(function(e){if(Array.isArray(e))return Ye(e)}(n=t.target.files)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Ye(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ye(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),He.FileSelect);var n},"aria-errormessage":"fileUploadError"}),o.createElement("input",Object.assign({},r()))),e.uploadError&&o.createElement(Ke.A,{name:"fileUpload"},e.uploadError))}const et={progress:"PeDF6"};function tt(e){var t=100===e.upload.progress;return o.createElement(o.Fragment,null,o.createElement("div",null,o.createElement(Me.x,{svgName:Qe.vn.Folder,className:"svg-container me-2"}),o.createElement("span",{className:"align-middle"},e.upload.name),t&&o.createElement(Me.x,{svgName:Qe.vn.Check,className:"svg-container float-end text-success"}),!t&&o.createElement("div",{role:"button","aria-label":"close",onClick:function(){return e.cancelUpload(e.upload.id)},className:"float-end description"},o.createElement(Me.x,{svgName:Qe.vn.Close}))),o.createElement("div",{className:"".concat(et.progress," progress my-2")},o.createElement("div",{className:"progress-bar bg-blue",role:"progressbar",style:{width:"".concat(e.upload.progress,"%")},"aria-valuenow":e.upload.progress,"aria-valuemin":0,"aria-valuemax":100})))}function nt(e){var t;return(null===(t=e.uploads)||void 0===t?void 0:t.length)?o.createElement(o.Fragment,null,e.uploads.map((function(t,n){return o.createElement(tt,{key:n,upload:t,cancelUpload:e.cancelUpload})}))):o.createElement(o.Fragment,null)}function rt(e){return o.createElement("div",{className:"bg-gray-100 rounded p-2"},o.createElement(Me.x,{className:"d-inline-block align-middle svg-container icon-purple me-2",svgName:Qe.vn.FileImg}),o.createElement("span",{className:"align-middle"},e.file.get("name")),o.createElement("button",{className:"btn p-0 border-0 float-end",onClick:function(){return e.deleteFile(e.file.get("id"))}},o.createElement(Me.x,{svgName:Qe.vn.Delete})))}function at(e){return o.createElement("div",{className:"d-flex flex-column gap-2"},e.uploadedFiles.map((function(t){return o.createElement(rt,{key:t.id,file:t,deleteFile:e.deleteFile})})))}var ot=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},it="shared.feedbackReportBug",ct=u.T.encloseNamespace(it),lt={issue:"",stepsToReproduce:""},st=Se.Ry().shape({issue:xe().required(Ie("requiredError")),stepsToReproduce:xe()}).noUnknown();function ut(e){var t=(0,fe.b)();return o.createElement(o.Fragment,null,o.createElement("div",{className:"form-group"},o.createElement("label",{className:"form-label mb-1"},o.createElement(y.x,{namespace:it,phrase:"mixedMediaLabel"})),o.createElement("p",{className:"text-secondary font-size-sm"},o.createElement(y.x,{namespace:it,phrase:"mixedMediaDescription"})),o.createElement("div",{className:"mb-3"},o.createElement(Je,{mimeType:h.l.MIXED_MEDIA,onFilesAdded:e.onFilesAdded,imageUrl:e.previewImageUrl,uploadError:e.uploadError,acceptMultiple:!0})),o.createElement(nt,{uploads:e.uploadingFiles,cancelUpload:e.cancelUpload}),o.createElement(at,{uploadedFiles:e.uploadedFiles,deleteFile:e.deleteFile})),o.createElement(we.W,{as:"textarea",placeholder:ct("issuePlaceholder"),label:ct("issueLabel"),name:"issue",value:t.values.issue,showRequiredStar:!0}),o.createElement(we.W,{as:"textarea",placeholder:ct("stepsPlaceholder"),label:ct("stepsLabel"),name:"stepsToReproduce",value:t.values.stepsToReproduce}),o.createElement("div",{className:"rounded bg-light-yellow p-2 mb-3"},o.createElement("p",{className:"fw-semibold mb-2"},o.createElement(y.x,{namespace:it,phrase:"help"})),o.createElement("div",{className:"d-flex gap-1 mb-2"},o.createElement(Me.x,{svgName:Qe.vn.Link}),o.createElement("a",{href:We[e.instanceRegion].website,target:"_blank",className:"text-underline"},o.createElement(y.x,{namespace:it,phrase:"visitHelpCentre"}))),o.createElement("p",{className:"mb-2"},o.createElement(y.x,{namespace:it,phrase:"supportTeam"})),o.createElement("div",{className:"d-flex gap-1 mb-2"},o.createElement(Me.x,{svgName:Qe.vn.Phone}),o.createElement("span",null,We[e.instanceRegion].phone)),o.createElement("div",{className:"d-flex gap-1 mb-2"},o.createElement(Me.x,{svgName:Qe.vn.Email}),o.createElement("span",null,We[e.instanceRegion].email))))}function mt(e){var t=e.onFilesAdded,n=e.cancelUpload,r=e.uploadingFiles,a=e.uploadedFiles,i=e.deleteFile,c=ot(e,["onFilesAdded","cancelUpload","uploadingFiles","uploadedFiles","deleteFile"]);return o.createElement(hr,Object.assign({},c,{initialValues:Object.assign(Object.assign({},lt),e.initialValues),validationSchema:st,submitText:ct("submit")}),o.createElement(ut,{onFilesAdded:t,previewImageUrl:le.mediaPreview,cancelUpload:n,uploadingFiles:r,uploadedFiles:a,deleteFile:i,uploadError:e.uploadError,instanceRegion:e.instanceRegion}))}var dt=n(75896),pt=n(79014),ft=n(4594),vt=n(76881),gt=n(37751);function ht(e){switch(e){case gt.R.Pink:return"pink";case gt.R.Orange:return"orange";case gt.R.Green:return"green";case gt.R.Blue:return"blue";case gt.R.Purple:return"purple";case gt.R.Indigo:return"indigo";default:return"pink"}}var bt=n(45778),yt=n(64818),Et=n(80247);const St={avatar:"srrS3"};function wt(e){var t=e.imageUrl,n=e.initials,r={};return t&&(r.backgroundImage="url('".concat(t,"')")),o.createElement("div",{className:St.avatar,style:r},t?o.createElement(o.Fragment,null," "):n)}var Ot=n(26354);const Ct={svgContainer:"laVU4",selection:"vEOCt",expander:"d1NHd",iconContainer:"rFH4W",icon:"BarYz",bubble:"HF0E8",spinnerContainer:"iKeXW",remove:"pyzCM",removeBubble:"mgt6Y"};var It=u.T.encloseNamespace("shared.inputSelection");function xt(e){var t,n="".concat(Ct.svgContainer," ").concat(Ct.icon);return e.typeId===ft.E.Classroom?n+=" text-teal":n+=" text-".concat(ht(null===(t=e.metadata)||void 0===t?void 0:t.colour)),n}function jt(e){var t,n=function(e){var t;switch(e.typeId){case ft.E.Classroom:return"text-teal-hover";case ft.E.ClassroomGroup:return"text-".concat(ht(null===(t=e.metadata)||void 0===t?void 0:t.colour),"-hover")}}(e.selection),r=e.selection.typeId===ft.E.Classroom;if(!e.canExpand){if(!e.selection.typeId||e.selection.typeId===ft.E.User){var a=e.selection;return o.createElement("div",{className:Ct.svgContainer},o.createElement(wt,{imageUrl:null===(t=a.avatar)||void 0===t?void 0:t.url,initials:yt.l.getInitials(e.selection.name,e.selection.surname)}))}return o.createElement(Ot.u,{title:It(r?"emptyClassroom":"emptyGroup")},o.createElement("div",{className:"align-items-center border border-white bg-white ".concat(Ct.iconContainer)},o.createElement(Me.x,{className:xt(e.selection),svgName:r?Qe.vn.Classrooms:Qe.vn.Group})))}return e.hasExpanded?o.createElement("div",{className:"d-flex align-items-center text-white ".concat(Ct.spinnerContainer," ").concat(Ct.svgContainer)},o.createElement(Et.Z,{as:"div",size:"sm",animation:"border",role:"status"})):o.createElement(o.Fragment,null,o.createElement(ne.L,{className:"align-items-center cursor-pointer text-white border border-white rounded-circle ".concat(Ct.expander," ").concat(n),onClick:e.onClickExpand},o.createElement(Me.x,{svgName:Qe.vn.Plus,className:"d-flex align-items-center ".concat(Ct.svgContainer)})),o.createElement("div",{className:"align-items-center border border-white bg-white ".concat(Ct.iconContainer)},o.createElement(Me.x,{className:xt(e.selection),svgName:r?Qe.vn.Classrooms:Qe.vn.Group})))}function Nt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return kt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Tt(e){var t;if(!e.typeId)return"ultramarine";switch(e.typeId){case ft.E.User:return"number"==typeof e.userType?2===e.userType?"ultramarine":"indigo":e.userType===vt.Y.Learner?"ultramarine":"indigo";case ft.E.Classroom:return"teal";case ft.E.ClassroomGroup:return ht(null===(t=e.metadata)||void 0===t?void 0:t.colour)}}function Rt(e){var t,n,r,a=bt.G.isType(e.selection,ft.E.Classroom),i=bt.G.isType(e.selection,ft.E.ClassroomGroup),c=e.onClickExpand&&(a||i),l=!!(null===(t=e.selection.users||e.selection.enrolments)||void 0===t?void 0:t.count),s=!!(null===(r=null===(n=e.selection.users)||void 0===n?void 0:n.data)||void 0===r?void 0:r.length),u=Nt(o.useState(!1),2),m=u[0],d=u[1],p=Nt(o.useState(c&&l),2),f=p[0],v=p[1];if(o.useEffect((function(){v(c&&l)}),[c,l]),s){var g=e.selection,h=Tt(e.selection);return o.createElement("div",{className:"d-flex align-items-center flex-wrap me-1 mt-1 pb-1 ps-1 pe-4 position-relative border-".concat(h," text-").concat(h," ").concat(Ct.bubble)},g.users.data.map((function(t){return o.createElement(Lt,{key:"".concat(t.id,":").concat(e.selection.id),selection:t,colourVariant:h,hasStudentExperience:e.hasStudentExperience})})),o.createElement(ne.L,{className:"cursor-pointer position-absolute text-".concat(h," ").concat(Ct.removeBubble),onClick:function(){return e.onClickRemove(e.selection)}},o.createElement(Me.x,{svgName:Qe.vn.Close,className:"d-flex align-items-center ".concat(Ct.svgContainer)})))}return o.createElement(Lt,{selection:e.selection,canExpand:f,hasExpanded:m,onClickExpand:function(){d(!0),e.onClickExpand(e.selection.id)},onClickRemove:e.onClickRemove,colourVariant:Tt(e.selection),hasStudentExperience:e.hasStudentExperience})}function Lt(e){var t=e.colourVariant||Tt(e.selection),n=e.selection.name;return e.selection.typeId===ft.E.User&&(n=e.hasStudentExperience?yt.l.getDisplayName(e.selection):yt.l.getFullName(e.selection)),o.createElement("div",{className:"".concat(Ct.selection," bg-").concat(t," rounded-pill text-").concat(t," d-flex align-items-center me-1 mt-1 overflow-hidden")},!e.hideExpander&&o.createElement(jt,{canExpand:e.canExpand,hasExpanded:e.hasExpanded,onClickExpand:e.onClickExpand,selection:e.selection}),o.createElement("span",{className:"mx-1 text-white text-truncate"},n),pt.q.isFunction(e.onClickRemove)&&o.createElement(ne.L,{className:"d-flex align-items-center cursor-pointer align-self-stretch text-white ".concat(Ct.remove),onClick:function(){return e.onClickRemove(e.selection)}},o.createElement(Me.x,{svgName:Qe.vn.Close,className:"d-flex align-items-center ".concat(Ct.svgContainer)})))}var At=n(75289);const Ut={removeRecipient:"mCbMC",recipientItem:"kdcb0",showSpinner:"xH6Mu",avatarContainer:"Zcpg3",recipientDetails:"v5EmV",recipientDetailsWithRemoveButton:"_V928"};var Ft="shared.classroomGroupRecipientItemMetadata";function Pt(e){var t;return o.createElement(o.Fragment,null,o.createElement("div",{className:"".concat(Ut.avatarContainer," d-inline-block")},o.createElement(At.f,{svgName:Qe.vn.Group,variant:ht(null===(t=e.classroomGroup.metadata)||void 0===t?void 0:t.colour)})),o.createElement("div",{className:e.detailsClassName},o.createElement("h4",{className:"font-size-normal fw-normal m-0"},e.classroomGroup.name),o.createElement("p",{className:"text-secondary m-0"},function(e){var t,n,r,a=null!==(n=null===(t=e.users)||void 0===t?void 0:t.count)&&void 0!==n?n:0,o=null===(r=e.classroom)||void 0===r?void 0:r.name;return o?u.T.getPhrase(Ft,"subheading",{classroomName:o,smartCount:a}):""}(e.classroomGroup))))}var _t="shared.classroomRecipientItemMetadata";function Vt(e){return o.createElement(o.Fragment,null,o.createElement("div",{className:"".concat(Ut.avatarContainer," d-inline-block")},o.createElement(At.f,{svgName:Qe.vn.Classrooms,variant:"teal"})),o.createElement("div",{className:e.detailsClassName},o.createElement("h4",{className:"font-size-normal fw-normal m-0"},e.classroom.name),o.createElement("p",{className:"text-secondary m-0"},(i=null!==(r=null===(n=(t=e.classroom).users)||void 0===n?void 0:n.count)&&void 0!==r?r:null===(a=t.enrolments)||void 0===a?void 0:a.count,Number.isInteger(i)?u.T.getPhrase(_t,"subheading",{smartCount:i}):""))));var t,n,r,a,i}var Bt=n(31453),qt=n(76198),Gt=u.T.encloseNamespace("shared.analyticsUtils");function Mt(e,t){return e?t?(0,qt._8)((n=e.id,r=e.sessionId,a=+"".concat(n||function(e){if(!e)return 0;for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)}(r)).concat(Math.floor((new Date).getMinutes()/5)),{dictionaries:[qt.O9,qt.yd],separator:" ",length:2,style:"capital",seed:a})):yt.l.getFullName(e)||Gt("anonUser"):Gt("anonUser");var n,r,a}var Dt=n(29427),zt=u.T.encloseNamespace("shared.userRecipientItemMetadata");function Ht(e){var t=function(e){var t,n=e.user,r=e.anonymiseUsers,a=e.showDisplayName;if(n.sessionId){var o=Mt(n,r),i=o.split(" ").filter((function(e){return!!e}));return{name:o,surname:i.slice(1).join(" "),avatarUrl:null}}return{name:r?Mt(n,!0):a?yt.l.getDisplayName(n):yt.l.getFullName(n),surname:n.surname,avatarUrl:null===(t=n.avatar)||void 0===t?void 0:t.url}}(e),n=t.name,r=t.surname,a=t.avatarUrl;return o.createElement(o.Fragment,null,o.createElement("div",{className:"".concat(Ut.avatarContainer," ").concat(e.avatarClassName," d-inline-block flex-shrink-0")},o.createElement(Dt.q,{imageUrl:a,imageCdnUrl:e.imageCdnUrl,initials:yt.l.getInitials(n,r),showAnonymousUser:!e.anonymiseUsers&&!!e.user.sessionId,anonymiseUsers:e.anonymiseUsers,anonymousSvgSize:Me.S.Small})),o.createElement("div",{className:e.detailsClassName},o.createElement("h4",{className:(0,Bt.A)("font-size-normal fw-normal m-0",e.nameClassName)},n),e.showSubText&&"id"in e.user&&o.createElement("p",{className:"text-secondary m-0"},e.getSubText?e.getSubText(e.user):function(e){var t=yt.l.getUserType(e),n=yt.l.getUserRole(e);if(t===vt.Y.Staff)return n===$.i.Admin?zt("admin"):zt("staff");var r=yt.l.getYearGroup(e);return(null==r?void 0:r.name)&&"Learners"!==r.name?r.name:zt("student")}(e.user))))}function Wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}Ht.defaults={showSubText:!0};var Qt=u.T.encloseNamespace("share.recipientItem");function Zt(e){switch(e){case ft.E.User:return Qt("removeUser");case ft.E.Classroom:return Qt("removeClassroom");case ft.E.ClassroomGroup:return Qt("removeGroup")}return null}function Kt(e){var t,n,r=(t=o.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Wt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wt(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],i=r[1],c="".concat(Ut.recipientItem," d-flex");a&&(c+=" ".concat(Ut.showSpinner));var l="".concat(e.removeRecipient?Ut.recipientDetailsWithRemoveButton:Ut.recipientDetails," d-inline-block ms-2");return o.createElement("div",{className:c},bt.G.isType(e.entity,ft.E.User)?o.createElement(Ht,{user:e.entity,imageCdnUrl:e.imageCdnUrl,detailsClassName:l,showDisplayName:e.showDisplayName,getSubText:e.getSubText,showSubText:!0}):bt.G.isType(e.entity,ft.E.Classroom)?o.createElement(Vt,{classroom:e.entity,detailsClassName:l}):bt.G.isType(e.entity,ft.E.ClassroomGroup)?o.createElement(Pt,{classroomGroup:e.entity,detailsClassName:l}):void 0,pt.q.isFunction(e.removeRecipient)&&o.createElement("div",{className:"".concat(Ut.removeRecipient," d-inline-flex justify-content-center align-items-center")},a?o.createElement(Et.Z,{as:"div",size:"sm",animation:"border",role:"status"}):o.createElement(Ot.u,{title:Zt(e.entity.typeId),spanHack:!0},o.createElement("div",{className:"btn-close cursor-pointer",role:"button","aria-label":"Close",onClick:function(){i(!0),e.removeRecipient(e.entity.id,(function(){return i(!1)}))}}))))}var Xt=n(8952),Yt=n(42648),$t=n(1048);const Jt={inputWithoutHighlight:"cKcry",suggestionsContainerOpen:"avM9L",sectionContainer:"u35Wz",suggestionHighlighted:"gFitp",clearButton:"TAoT9",inputWithLeftIcon:"Rt24D",inputWithRightIcon:"pxKzq",inputWithTwoRightIcons:"Oerjh",iconContainer:"h8OBl",leftIconContainer:"L5mrV",rightIconContainer:"V23aG"};var en=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function tn(e,t,n,r,a){var o="form-control text-truncate";return n||(o+=" ".concat(Jt.inputWithoutHighlight)),"left"===e&&(o+=" ".concat(Jt.inputWithLeftIcon)),("right"===e&&!t||"left"===e&&t||t)&&(o+=" ".concat(Jt.inputWithRightIcon)),"right"===e&&t&&(o+=" ".concat(Jt.inputWithTwoRightIcons)),"lg"===a&&(o+=" form-control-lg"),"sm"===a&&(o+=" form-control-sm"),r&&(o+=" ".concat(r)),o}function nn(e){var t="d-inline-block svg-container";return pt.q.isFunction(e)?t+" cursor-pointer":t}function rn(e){var t=e.onClickSearchIcon,n=e.searchIconPlacement,r=e.showClearInputIcon,a=e.onClickClearInput,i=e.highlightOnFocus,c=e.className,l=e.formSize,s=en(e,["onClickSearchIcon","searchIconPlacement","showClearInputIcon","onClickClearInput","highlightOnFocus","className","formSize"]),u=function(){return o.createElement("div",{className:"d-inline-block"},o.createElement(Me.x,{svgName:Qe.vn.Search,size:Me.S.Standard,onClick:t,className:nn(t)}))};return o.createElement("div",{className:"position-relative ".concat(Jt.inputContainer)},"left"===n&&o.createElement("div",{className:"".concat(Jt.iconContainer," ").concat(Jt.leftIconContainer)},o.createElement(u,null)),o.createElement("input",Object.assign({className:tn(n,r,i,c,l)},s)),("right"===n||!!r)&&o.createElement("div",{className:"".concat(Jt.iconContainer," ").concat(Jt.rightIconContainer)},!!r&&o.createElement((function(){return o.createElement("button",{className:"d-inline-block text-secondary ".concat(Jt.clearButton),onMouseUp:a},o.createElement(Me.x,{svgName:Qe.vn.Close,size:Me.S.Standard,className:nn(a)}))}),null),"right"===n&&o.createElement(u,null)))}var an,on=n(86764),cn=n(3747),ln=n(2948),sn=n(66090);function un(e){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(e)}function mn(e){return function(e){if(Array.isArray(e))return pn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||dn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dn(e,t){if(e){if("string"==typeof e)return pn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pn(e,t):void 0}}function pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fn(e,t,n){return(t=function(e){var t=function(e){if("object"!=un(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=un(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==un(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vn(e,t){return fn(fn(fn(fn({},an.Recent,t),an.Local,e),an.Remote,[]),an.Generic,[])}function gn(e,t){return $t.t.isObject(e)&&e.hasOwnProperty(t)&&sn.O.isString(e[t])}function hn(e,t,n,r){var a=e.trim().toLowerCase();return a.length<r?[]:t.filter((function(e){return!(!gn(e,n)||!sn.O.isString(e[n]))&&e[n].trim().toLowerCase().includes(a)}))}function bn(e,t){e(Object.assign(Object.assign({},vn([],[])),fn({},an.Generic,[{type:t,generic:!0}])))}function yn(e,t,n){var r=pt.q.isFunction(t.formatRemoteSuggestions)?t.formatRemoteSuggestions(e):e;r.length||!t.getEmptyStateComponent?n((function(e){return Object.assign(Object.assign({},e),fn(fn({},an.Remote,r),an.Generic,[]))})):bn(n,"empty")}function En(e,t,n){return function(r){var a,o,i=r.value,c=r.reason;if((null===(o=null===(a=e.allowableSuggestionFetchRequestedReasons)||void 0===a?void 0:a.includes(c))||void 0===o||o)&&(i.length||n(),!(i.length<e.activationLength))){if(e.local){var l=pt.q.isFunction(e.getLocalSuggestions)?e.getLocalSuggestions(i,e.local):hn(i,e.local,e.valueKey,e.activationLength);if(!l.length&&e.getEmptyStateComponent)return void bn(t,"empty");t((function(e){return Object.assign(Object.assign({},e),fn(fn({},an.Local,l),an.Generic,[]))}))}if("function"==typeof e.handleFetchSuggestions)return e.replacePreviousRemoteSuggestions?t((function(e){return Object.assign(Object.assign({},vn([],[])),fn({},an.Remote,e.remote))})):bn(t,"loading"),void e.handleFetchSuggestions(i,(function(n){return yn(n,e,t)}),(function(){return bn(t,"errored")}));var s,u,m,d,f,v,g;e.getRemoteUrl&&(e.replacePreviousRemoteSuggestions?t((function(e){return Object.assign(Object.assign({},vn([],[])),fn({},an.Remote,e.remote))})):bn(t,"loading"),s=e.getRemoteUrl,u=i,m=function(n){return yn(n,e,t)},d=function(){bn(t,"errored")},f=e.requestHeaders,v=e.getRemotePostBody,(g=pt.q.isFunction(s)&&s(u))&&(v?p.a.ajaxRequest({resource:g,type:R.k.POST,success:m,error:d,headers:f,data:v(u)}):p.a.ajaxRequest({resource:g,type:R.k.GET,success:m,error:d,headers:f})))}}}function Sn(e,t){return gn(t,e)?o.createElement(o.Fragment,null,t[e]):o.createElement(o.Fragment,null)}function wn(e,t){return"number"==typeof t||"boolean"==typeof t?t:t[e]||!1}function On(e,t){return"boolean"==typeof t||e.length<=t?e:e.slice(0,t)}function Cn(e){return e.data}function In(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||xn(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xn(e,t){if(e){if("string"==typeof e)return jn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jn(e,t):void 0}}function jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e.Local="local",e.Recent="recent",e.Remote="remote",e.Generic="generic"}(an||(an={}));var Nn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},kn="shared.searchBar",Tn=pt.q.isFunction;function Rn(e){return e.renderAsForm?o.createElement("form",{onSubmit:e.onSubmit},e.children):o.createElement("div",{className:"w-100"},e.children)}function Ln(e){var t=vn(e.initialLocalSuggestions,e.recentSearches),n=In(o.useState(e.initialQuery||""),2),r=n[0],a=n[1],i=In(o.useState(t),2),c=i[0],l=i[1],s=o.useMemo((function(){return function(e,t,n,r,a,o){var i=function(t){var n=e[t];return n?n.map((function(e){return Object.assign(Object.assign({},e),{suggestionType:t})})):[]},c=i(an.Recent),l=i(an.Local),s=i(an.Remote),u=i(an.Generic);if(u.length)return[{data:u,suggestionType:an.Generic}];if(pt.q.isFunction(r))return r([].concat(mn(l),mn(s),mn(c)));var m=[];return(null==l?void 0:l.length)&&m.push({title:t,data:On(l,wn(an.Local,a)),suggestionType:an.Local}),(null==s?void 0:s.length)&&m.push({title:t,data:On(s,wn(an.Remote,a)),suggestionType:an.Remote}),(null==c?void 0:c.length)&&m.push({title:n,data:On(c,wn(an.Recent,a)),suggestionType:an.Recent}),"function"==typeof o?o(m):m}(c,e.suggestionsHeading,e.recentSearchHeading||u.T.getPhrase(kn,"recentSearchesHeading"),e.getSections,e.suggestionLimit,e.transformSections)}),[c]);o.useEffect((function(){$t.t.isEqual(t,c)||r&&r.length>=(null==e?void 0:e.activationLength)||l(t)}),[t]),o.useEffect((function(){"function"==typeof e.onSuggestionUpdated&&e.onSuggestionUpdated(s)}),[s]);var m=o.useRef(null),d=o.useRef(!1);!function(e){var t,n,r=(t=(0,ln.D)("lite:search:bar:focus",{focus:!1}),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||dn(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],i=r[1];o.useEffect((function(){a.focus&&(null==e?void 0:e.current)&&(e.current.focus(),i({focus:!1}))}),[a.focus]),a.focus}(m);var p=In(o.useState(e.initialQuery||""),2),f=p[0],v=p[1],g=In(o.useState("none"),2),h=g[0],b=g[1],y=(0,cn.a)(on.r.XS);o.useEffect((function(){e.resetSuggestionsOnNoActivation&&r&&(r.length>=e.activationLength||E())}),[r]),o.useEffect((function(){if(!r.length){var t=vn(e.initialLocalSuggestions,e.recentSearches);l(t)}}),[e.initialLocalSuggestions,e.recentSearches]),o.useEffect((function(){var t=e.initialQuery||"";r!==t&&(a(t),v(t))}),[e.initialQuery]),o.useEffect((function(){m.current&&e.autoFocusInput&&m.current.focus()}),[e.autoFocusInput]);var E=function(){var t=vn(e.initialLocalSuggestions,e.recentSearches);l(t)},S=function(){a(""),v("")};!function(e,t,n,r,a){o.useEffect((function(){e&&!e.current&&(e.current={resetQuery:t,setQuery:n,focusInput:r,blurInput:a})}),[null==e?void 0:e.current])}(e.controlsRef,S,a,(function(){var e;null===(e=m.current)||void 0===e||e.focus()}),(function(){var e;null===(e=m.current)||void 0===e||e.blur()}));var w,O,C,I,x,j=function(){b("none")},N=function(t){t.preventDefault(),Tn(e.onSubmit)&&e.onSubmit(r,m.current),e.clearQueryOnSelect&&S()},k=o.useMemo((function(){return e.debounceTime?pt.q.debounce(En(e,l,E),e.debounceTime):En(e,l,E)}),[e.debounceTime].concat(function(e){if(Array.isArray(e))return jn(e)}(w=e.onSuggestionDependencies)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(w)||xn(w)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));function T(){return"boolean"==typeof e.alwaysRenderSuggestions?e.alwaysRenderSuggestions:!!(e.alwaysRenderSuggestionsWhenFocused&&r.length>=e.activationLength)&&document.activeElement===m.current}return o.createElement(Rn,{onSubmit:N,renderAsForm:!!e.renderAsForm},o.createElement(Xt,Object.assign({ref:function(e){null===e||m.current||(m.current=e.input)},suggestions:s,onSuggestionsFetchRequested:k,onSuggestionHighlighted:function(t){var n=t.suggestion;("none"!==h||n)&&(d.current&&e.onArrowKeyUpOrDown&&(d.current=!1,e.onArrowKeyUpOrDown()),b(n?"suggestion":"custom"))},onSuggestionsClearRequested:function(){T()||E()},onSuggestionSelected:function(t,n){var r=n.suggestion;r.generic||(e.clearQueryOnSelect&&S(),e.onSuggestionSelected(r,m.current,t))},getSuggestionValue:function(t){return function(t){return Tn(e.shouldUpdateQueryOnSelection)?e.shouldUpdateQueryOnSelection(t):e.shouldUpdateQueryOnSelection}(t)?function(e,t){return gn(t,e)?t[e]:""}(e.valueKey,t):r},renderSuggestion:function(t,n){if(t.generic){if("empty"===t.type)return r.length>=e.activationLength&&Tn(e.getEmptyStateComponent)?e.getEmptyStateComponent(r):o.createElement(o.Fragment,null);if("errored"===t.type&&Tn(e.getErrorStateComponent)){var a=En(e,l,E);return e.getErrorStateComponent((function(){return a({value:r,reason:"input-changed"})}))}if("loading"===t.type)return i=e.loadingComponentClassName,o.createElement("div",{className:"d-flex justify-content-center cursor-default ".concat(null!=i?i:""),onClick:function(e){e.stopPropagation()}},o.createElement(Et.Z,{as:"span",animation:"border",role:"status"}))}var i;return Tn(e.getSuggestionComponent)?e.getSuggestionComponent(t,n):Sn(e.valueKey,t)},renderSuggestionsContainer:function(t){var n=t.containerProps,a=n.ref,i=Nn(n,["ref"]);if(!e.customScrollbarProps){var l={suggestions:c,query:r,isDropdownOpen:!!t.children};return o.createElement("div",Object.assign({ref:a},i,{onMouseOut:j}),t.children,e.getCreateComponent&&e.getCreateComponent(Object.assign({userInput:f,isActive:"custom"===h,resetQuery:S,resetSuggestions:E},l)),e.getFooterComponent&&e.getFooterComponent(l))}return o.createElement(Yt.ZP,Object.assign({ref:a},e.customScrollbarProps,i),t.children)},alwaysRenderSuggestions:T(),focusInputOnSuggestionClick:!y&&e.focusInputOnSuggestionClick,inputProps:{id:e.id,name:e.id,"aria-errormessage":"".concat(e.id,"Error"),"aria-label":e.label,placeholder:e.placeholder||u.T.getPhrase(kn,"placeholder"),value:r,onChange:function(t,n){var r=n.newValue,o=n.method;"type"===o&&v(r),("escape"!==o||(b("none"),null==e?void 0:e.resetQueryOnEscape))&&(["up","down"].includes(o)||(a(r),Tn(e.onQueryChange)&&e.onQueryChange(r)))},onKeyDown:function(t){"Backspace"!==t.key||!e.onBackspace||r?"ArrowUp"!==t.key&&"ArrowDown"!==t.key||(d.current=!0):e.onBackspace()},autoFocus:!!e.autoFocusInput,highlightOnFocus:e.highlightInputOnFocus,onClickSearchIcon:!!e.submitOnClickSearchIcon&&N,searchIconPlacement:e.searchIconPlacement,showClearInputIcon:!!e.showClearInputIcon&&!!r.length,onClickClearInput:function(){S(),e.resetSuggestionsOnClear&&E(),Tn(e.onClickClearInput)&&e.onClickClearInput()},formSize:e.size,onBlur:function(){e.onBlur&&e.onBlur(r)},onFocus:function(){e.onFocus&&e.onFocus(r)},disabled:e.disabled},renderInputComponent:rn,theme:(O=e.theme,C=!!c.generic.length,I="function"==typeof O?O(C):O,x=function(e){return{container:"position-relative",suggestionsContainerOpen:"bg-white py-1 border rounded ".concat(Jt.suggestionsContainerOpen),suggestionsList:"list-unstyled m-0",suggestion:"".concat(e?"":"cursor-pointer"," py-1 px-2"),suggestionHighlighted:e?"":Jt.suggestionHighlighted,sectionContainer:"border-bottom py-1 ".concat(Jt.sectionContainer)}}(C),Object.assign(x,I)),multiSection:!0,renderSectionTitle:function(t){return Tn(e.renderSectionTitle)?e.renderSectionTitle(t,e.sectionTitleClassName):function(e,t){if(e.title)return o.createElement("div",{className:"pb-1 ".concat(null!=t?t:"")},o.createElement("strong",null,e.title))}(t,e.sectionTitleClassName)},getSectionSuggestions:Cn},e.renderSuggestionsOnInputFocus?{shouldRenderSuggestions:function(){return Tn(e.renderSuggestionsOnInputFocus)?e.renderSuggestionsOnInputFocus(r):e.renderSuggestionsOnInputFocus}}:{})))}function An(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}Ln.defaultProps={valueKey:"name",activationLength:3,suggestionLimit:5,recentSearches:[],initialLocalSuggestions:[],searchIconPlacement:"right",renderAsForm:!0,onSuggestionDependencies:[],shouldUpdateQueryOnSelection:!0,focusInputOnSuggestionClick:!0,resetQueryOnEscape:!0};var Un=function(e,t){var n,r,a=(n=o.useState(e),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(n,r)||function(e,t){if(e){if("string"==typeof e)return An(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?An(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=a[0],c=a[1];return o.useEffect((function(){var n=setTimeout((function(){return c(e)}),t);return function(){return clearTimeout(n)}}),[e,t]),i};const Fn={emptyState:"bKTf0"};var Pn="shared.typeaheadEmptyState";function _n(e){var t=e.query,n=void 0===t?"":t,r=e.imageUrl,a=Un(n,300);return o.createElement("div",{className:"d-flex flex-column align-items-center text-center",onClick:function(e){e.stopPropagation()}},o.createElement("img",{alt:"",role:"presentation",src:r,className:"pb-2 ".concat(Fn.emptyState)}),o.createElement("h2",{role:"status",className:"h6"},o.createElement(y.x,{namespace:Pn,phrase:"noResults",options:{query:a,smartCount:a.length}})))}const Vn={emptyState:"k5mEG"};var Bn="shared.typeaheadErrorState";function qn(e){return o.createElement("div",{className:"d-flex flex-column align-items-center text-center",onClick:function(e){e.stopPropagation()}},o.createElement("img",{alt:"",role:"presentation",src:e.imageUrl,className:"pb-2 ".concat(Vn.emptyState)}),o.createElement("h2",{className:"h6",role:"alert"},o.createElement(y.x,{namespace:Bn,phrase:"error"})),o.createElement(ne.L,{onClick:function(t){t.stopPropagation(),e.onClickTryAgain()},className:"btn btn-link info-link p-0"},o.createElement(y.x,{namespace:Bn,phrase:"tryAgain"})))}const Gn={container:"Dc3kX",suggestionsContainerOpen:"c5t3e",selectionContainer:"kFjoN",sectionContainer:"mLrE3"};var Mn="shared.tokenizedTypeahead";function Dn(e){var t;return o.createElement("div",{className:"form-control h-auto d-flex align-items-top position-relative ".concat(e.hideIcon?"":"py-1 px-0"," ").concat(e.className)},!e.hideIcon&&o.createElement(Me.x,{className:"svg-container m-1",svgName:Qe.vn.Search}),o.createElement("div",{className:"".concat(Gn.selectionContainer," d-flex flex-wrap align-items-center mt-n1")},e.selections.map((function(t){return e.getInputTokenComponent?e.getInputTokenComponent(t):o.createElement(Rt,{key:t.id,selection:t,onClickRemove:e.removeSelection,onClickExpand:e.fetchSelectionMembers,hasStudentExperience:e.hasStudentExperience})})),o.createElement(Ln,Object.assign({},e,{onBackspace:function(){e.selections.length&&e.removeSelection(dt.m.last(e.selections))},recentSearchHeading:e.recentSearchHeading||u.T.getPhrase(Mn,"recentSearchHeading"),placeholder:(null===(t=e.selections)||void 0===t?void 0:t.length)?" ":e.placeholder,searchIconPlacement:!1,clearQueryOnSelect:!0,getSuggestionComponent:function(t){return e.getSuggestionComponent?e.getSuggestionComponent(t):o.createElement(Kt,{entity:t,imageCdnUrl:e.imageCdnUrl,showDisplayName:e.hasStudentExperience})},getEmptyStateComponent:function(t){if(e.getEmptyStateComponent)return e.getEmptyStateComponent(t);e.emptyStateImageUrl&&o.createElement(_n,{query:t,imageUrl:e.emptyStateImageUrl})},getErrorStateComponent:function(t){return o.createElement(qn,{imageUrl:e.errorStateImageUrl,onClickTryAgain:t})},theme:{container:Gn.container,suggestionsContainerOpen:"bg-white py-1 rounded border mt-1 ".concat(Gn.suggestionsContainerOpen),sectionContainer:"border-bottom py-1 ".concat(Gn.sectionContainer)},sectionTitleClassName:"ps-2",renderSuggestionsOnInputFocus:e.renderSuggestionsOnInputFocus,onSuggestionDependencies:[e.selections]}))),!!e.sharePermissionsDescription&&o.createElement("span",{className:"px-2 text-secondary text-nowrap"},e.sharePermissionsDescription))}Dn.defaultProps={renderSuggestionsOnInputFocus:!0};var zn="shared.feedbackRequestLivestream",Hn=u.T.encloseNamespace(zn),Wn={topic:"",studentLevel:[],producerCompany:"",additionalInfo:""},Qn=Se.Z_().max(Ce,Ie("maxCharactersError")),Zn=Se.Ry().shape({producerCompany:Qn.required((function(){return Hn("companyError")})),topic:Qn,studentLevel:Se.IX(Se.Z_()),additionalInfo:xe()}).noUnknown();function Kn(e){var t=(0,fe.b)(),n=t.values.studentLevel.map((function(t){return e.audiences.find((function(e){return e.name===t}))}))||[];function r(e){t.setFieldValue("studentLevel",dt.m.addOrRemoveImmutable(t.values.studentLevel,e.name)),requestAnimationFrame((function(){return t.setFieldTouched("studentLevel")}))}return o.createElement(o.Fragment,null,o.createElement(we.W,{placeholder:Hn("companyPlaceholder"),label:Hn("companyLabel"),name:"producerCompany",value:t.values.producerCompany,showRequiredStar:!0}),o.createElement(we.W,{placeholder:Hn("topicPlaceholder"),label:Hn("topicLabel"),name:"topic",value:t.values.topic}),o.createElement("div",{className:"form-group"},o.createElement("label",{className:"form-label"},o.createElement(y.x,{namespace:zn,phrase:"audiencesLabel"})),o.createElement(Dn,{id:"audiences",placeholder:Hn("audiencesPlaceholder"),local:e.audiences,valueKey:"name",selections:n,onSuggestionSelected:r,removeSelection:function(e){return r(e)},errorStateImageUrl:null,emptyStateImageUrl:null,activationLength:0,suggestionLimit:!1,getInputTokenComponent:function(e){return o.createElement(Lt,{key:e.name,selection:{name:e.name,masterId:e.masterId},colourVariant:"teal",onClickRemove:function(e){return r(e)},hideExpander:!0})},getSuggestionComponent:function(e){return Sn("name",e)},onSuggestionDependencies:[e.audiences,t.values.studentLevel,n],getLocalSuggestions:function(e,t){var r=t.find((function(t){return t.name===e}));return hn(r?"":e,t,"name",0).filter((function(e){return!n.find((function(t){return t.name===e.name}))&&e.name!==(null==r?void 0:r.name)}))},focusInputOnSuggestionClick:!1,renderAsForm:!1,hideIcon:!0,onBlur:function(){return t.setFieldTouched("studentLevel")},className:"p-2 ".concat(t.touched.studentLevel&&t.errors.studentLevel?"is-invalid":"")}),t.touched.studentLevel&&t.errors.studentLevel&&o.createElement(Ke.A,{name:"audiences"},t.errors.studentLevel)),o.createElement(we.W,{as:"textarea",placeholder:Hn("otherPlaceholder"),label:Hn("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo}))}function Xn(e){return o.createElement(hr,Object.assign({},e,{initialValues:Object.assign(Object.assign({},Wn),e.initialValues),validationSchema:Zn}),o.createElement(Kn,{audiences:e.audiences}))}const Yn={image:"SdHLR"};function $n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Jn="shared.feedbackBeforeRequesting",er=u.T.encloseNamespace(Jn);function tr(e){var t,n,r=(t=o.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return $n(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$n(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],i=r[1];return o.createElement(o.Fragment,null,o.createElement("div",{className:"d-flex flex-column align-items-center my-4"},o.createElement("img",{className:"".concat(Yn.image," mb-3"),src:le.videoAlert}),o.createElement("h4",{className:"mb-3"},o.createElement(y.x,{namespace:Jn,phrase:"beforeRequesting"})),o.createElement("p",null,o.createElement(y.x,{namespace:Jn,phrase:"haveYouSearched",options:{exchangeUrl:"".concat(e.exchangeTvUrl,"/exchange")}}))),o.createElement(ve.u,null,o.createElement(ve.u.Checkbox,{id:"confirmExchange",checked:a,onToggle:function(){return i(!a)},label:er("exchangeCheck")}),o.createElement(ve.u.Cancel,{onClick:function(){return e.setSelectedOption(null)},text:er("back")}),o.createElement(ve.u.Submit,{variant:"dark",text:er("continue"),disabled:!a,onClick:function(){return e.setConfirmed(!0)}})))}function nr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var rr,ar="shared.feedbackRequestVideo",or=u.T.encloseNamespace(ar);!function(e){e.VideosTopic="videosTopic",e.VideoOrSeries="videoOrSeries"}(rr||(rr={}));var ir={videoRequestType:"",topic:"",studentLevel:[],videoTitle:"",seriesName:"",producerCompany:"",websiteOrTrailer:"",additionalInfo:""},cr=function(){return Se.Z_().max(Ce,Ie("maxCharactersError"))},lr=Se.Ry().shape({videoRequestType:Se.Z_().required(or("videoRequestTypeRequiredError")),topic:cr().when("videoRequestType",{is:function(e){return e===rr.VideosTopic},then:cr().required(or("topicRequiredError")),otherwise:cr().notRequired()}),studentLevel:Se.IX(Se.Z_()),videoTitle:cr().when(["videoRequestType","seriesName"],{is:function(e,t){return e===rr.VideoOrSeries&&!t},then:cr().required(or("videoRequiredError")),otherwise:cr().notRequired()}),seriesName:cr(),producerCompany:cr(),websiteOrTrailer:cr(),additionalInfo:xe()}).noUnknown();function sr(e){var t=(0,fe.b)(),n=t.values.studentLevel.map((function(t){var n;return null===(n=e.audiences)||void 0===n?void 0:n.find((function(e){return e.name===t}))}))||[];function r(e){t.setFieldValue("studentLevel",dt.m.addOrRemoveImmutable(t.values.studentLevel,e.name)),requestAnimationFrame((function(){return t.setFieldTouched("studentLevel")}))}return o.createElement(o.Fragment,null,o.createElement(we.W,{as:"select",label:or("videoRequestTypeLabel"),name:"videoRequestType",value:t.values.videoRequestType},o.createElement("option",{value:"",disabled:!0,hidden:!0},or("videoRequestTypePlaceholder")),o.createElement("option",{value:rr.VideosTopic},or("videosTopicType")),o.createElement("option",{value:rr.VideoOrSeries},or("videoOrSeriesType"))),t.values.videoRequestType===rr.VideosTopic&&o.createElement(o.Fragment,null,o.createElement(we.W,{placeholder:or("videoTopicPlaceholder"),label:or("videoTopicLabel"),name:"topic",value:t.values.topic,showRequiredStar:!0}),o.createElement("div",{className:"form-group"},o.createElement("label",{className:"form-label"},o.createElement(y.x,{namespace:ar,phrase:"audiencesLabel"})),o.createElement(Dn,{id:"audiences",placeholder:or("audiencesPlaceholder"),local:e.audiences,valueKey:"name",selections:n,onSuggestionSelected:r,removeSelection:function(e){return r(e)},errorStateImageUrl:null,emptyStateImageUrl:null,activationLength:0,suggestionLimit:!1,getInputTokenComponent:function(e){return o.createElement(Lt,{key:e.name,selection:{name:e.name,masterId:e.masterId},colourVariant:"teal",onClickRemove:function(e){return r(e)},hideExpander:!0})},getSuggestionComponent:function(e){return Sn("name",e)},onSuggestionDependencies:[e.audiences,t.values.studentLevel,n],getLocalSuggestions:function(e,t){var r=t.find((function(t){return t.name===e}));return hn(r?"":e,t,"name",0).filter((function(e){return!n.find((function(t){return t.name===e.name}))&&e.name!==(null==r?void 0:r.name)}))},focusInputOnSuggestionClick:!1,renderAsForm:!1,hideIcon:!0,onBlur:function(){return t.setFieldTouched("studentLevel")},className:"p-2 ".concat(t.touched.studentLevel&&t.errors.studentLevel?"is-invalid":"")}),t.touched.studentLevel&&t.errors.studentLevel&&o.createElement(Ke.A,{name:"audiences"},t.errors.studentLevel)),o.createElement(we.W,{as:"textarea",placeholder:or("otherPlaceholder"),label:or("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})),t.values.videoRequestType===rr.VideoOrSeries&&o.createElement(o.Fragment,null,o.createElement(we.W,{placeholder:or("videoTitlePlaceholder"),label:or("videoTitleLabel"),name:"videoTitle",value:t.values.videoTitle}),o.createElement(we.W,{placeholder:or("seriesPlaceholder"),label:or("seriesLabel"),name:"seriesName",value:t.values.seriesName}),o.createElement(we.W,{placeholder:or("companyPlaceholder"),label:or("companyLabel"),name:"producerCompany",value:t.values.producerCompany}),o.createElement(we.W,{placeholder:or("videoTopicPlaceholder"),label:or("topicLabel"),name:"topic",value:t.values.topic}),o.createElement(we.W,{placeholder:or("websiteOrTrailerPlaceholder"),label:or("websiteOrTrailerLabel"),name:"websiteOrTrailer",value:t.values.websiteOrTrailer}),o.createElement(we.W,{as:"textarea",placeholder:or("otherPlaceholder"),label:or("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})))}function ur(e){var t,n,r=(t=o.useState(!!e.skipBeforeRequesting),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return nr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nr(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],i=r[1],c=e.hasExchangeTvProduct&&!a;return o.createElement(hr,Object.assign({},e,{initialValues:Object.assign(Object.assign({},ir),e.initialValues),validationSchema:lr,hideButtons:e.hasExchangeTvProduct&&!a,hideCancelButton:e.skipBeforeRequesting}),c&&o.createElement(tr,{setConfirmed:i,setSelectedOption:e.setSelectedOption,exchangeTvUrl:e.exchangeTvUrl}),!c&&o.createElement(sr,{audiences:e.audiences}))}var mr="shared.feedbackSuggestImprovement",dr=u.T.encloseNamespace(mr),pr={suggestion:"",importance:""},fr=Se.Ry().shape({suggestion:xe().required(Ie("requiredError")),importance:xe()}).noUnknown();function vr(e){var t=(0,fe.b)();return o.createElement(o.Fragment,null,o.createElement(we.W,{as:"textarea",placeholder:dr("suggestionPlaceholder"),label:dr("suggestionLabel"),name:"suggestion",value:t.values.suggestion,showRequiredStar:!0}),o.createElement(we.W,{as:"textarea",placeholder:dr("whySuggestionPlaceholder"),label:dr("whySuggestionLabel"),name:"importance",rows:5,value:t.values.importance}),o.createElement("p",null,o.createElement(y.x,{namespace:mr,phrase:"contactSupport"})," ",o.createElement("button",{className:"btn btn-link text-underline p-0",onClick:function(){return e.setSelectedOption(ee.RAISE_ISSUE)}},o.createElement(y.x,{namespace:mr,phrase:"raiseIssue"}))))}function gr(e){return o.createElement(hr,Object.assign({},e,{initialValues:Object.assign(Object.assign({},pr),e.initialValues),validationSchema:fr,successImageUrl:le.lightBulb,successHeading:dr("successHeading"),successDescription:dr("successDescription")}),o.createElement(vr,{setSelectedOption:e.setSelectedOption}))}function hr(e){var t=o.useRef(null);return o.createElement(fe.n,{onSubmit:e.onSubmit,initialValues:e.initialValues,validationSchema:e.validationSchema,validateOnMount:!0,innerRef:t},o.createElement(pe.l0,null,"form"===e.formStage&&e.children,o.createElement(Ee,{formStage:e.formStage,successImageUrl:e.successImageUrl,successHeading:e.successHeading,successDescription:e.successDescription}),!e.hideButtons&&o.createElement(he,{setSelectedOption:function(n){e.setFormState((function(e){var n;return Object.assign(Object.assign({},e),null===(n=t.current)||void 0===n?void 0:n.values)})),e.setSelectedOption(n)},submitText:e.submitText,formStage:e.formStage,closePopup:e.closePopup,hideCancelButton:e.hideCancelButton})))}function br(e){var t={formStage:e.formStage,initialValues:e.initialValues,setFormState:e.setFormState,onSubmit:e.onSubmit,setSelectedOption:e.setSelectedOption,closePopup:e.closePopup};switch(e.selectedOption){case ee.SUGGEST_IMPROVEMENT:return o.createElement(gr,Object.assign({},t));case ee.REPORT_BUG:return o.createElement(mt,Object.assign({},t,{onFilesAdded:e.onFilesAdded,cancelUpload:e.cancelUpload,uploadingFiles:e.uploadingFiles,uploadedFiles:e.uploadedFiles,deleteFile:e.deleteFile,uploadError:e.uploadError,instanceRegion:e.instanceRegion}));case ee.REQUEST_VIDEO:return o.createElement(ur,Object.assign({},t,{audiences:e.audiences,hasExchangeTvProduct:e.hasExchangeTvProduct,exchangeTvUrl:e.exchangeTvUrl,skipBeforeRequesting:e.skipBeforeRequesting,hideCancelButton:e.hideCancelButton}));case ee.REQUEST_LIVESTREAM:return o.createElement(Xn,Object.assign({},t,{audiences:e.audiences}));case ee.RAISE_ISSUE:return o.createElement(Ge,Object.assign({},t));case ee.GIVE_PRAISE:return o.createElement(Re,Object.assign({},t));case ee.OTHER:return o.createElement(Pe,Object.assign({},t))}}function yr(e){return yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yr(e)}function Er(){Er=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof h?t:h,i=Object.create(o.prototype),c=new T(r||[]);return a(i,"_invoke",{value:x(e,n,c)}),i}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",p="suspendedYield",f="executing",v="completed",g={};function h(){}function b(){}function y(){}var E={};s(E,i,(function(){return this}));var S=Object.getPrototypeOf,w=S&&S(S(R([])));w&&w!==n&&r.call(w,i)&&(E=w);var O=y.prototype=h.prototype=Object.create(E);function C(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function I(e,t){function n(a,o,i,c){var l=m(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==yr(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function x(t,n,r){var a=d;return function(o,i){if(a===f)throw Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=f;var s=m(t,n,r);if("normal"===s.type){if(a=r.done?v:p,s.arg===g)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=v,r.method="throw",r.arg=s.arg)}}}function j(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,j(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=m(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(yr(t)+" is not iterable")}return b.prototype=y,a(O,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,l,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},C(I.prototype),s(I.prototype,c,(function(){return this})),t.AsyncIterator=I,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new I(u(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},C(O),s(O,l,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=R,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(k),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;k(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function Sr(e){return function(e){if(Array.isArray(e))return Cr(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Or(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||Or(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Or(e,t){if(e){if("string"==typeof e)return Cr(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cr(e,t):void 0}}function Cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ir=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))},xr="shared.giveFeedback",jr=u.T.encloseNamespace(xr),Nr=5,kr=60,Tr=1e6;function Rr(e){var t,n,c,u,w,C=(0,F.Z)(),x=(0,m.useGetFetchAsync)(),j=p.a.useBasicFetch(U.N.currentUser()),N=p.a.useBasicFetch(j.data&&T.h.customer(j.data.customerId)),R=p.a.useBasicFetch(j.data&&U.N.user(j.data.id)),q=wr(o.useState(e.selectedOption),2),G=q[0],M=q[1],D=wr(o.useState("form"),2),z=D[0],H=D[1],W=wr(o.useState(null),2),Q=W[0],Y=W[1],$=(0,d.G)(S.D.MixedMediaUpload),J=function(e,t){var n,r,a,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],c=(r=o.useState(!1),a=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(r,a)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(e,t):void 0}}(r,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];return o.useEffect((function(){var n=e();if(n)return n.off("add remove change"),n.on("add remove change",(function(){c((function(e){return!e}))})),t&&n.on("remove",t),function(){n.off("add remove change")}}),i),null===(n=e())||void 0===n?void 0:n.toJSON()}((function(){return $.getCollection()}),null),ne=o.useRef(null),re=o.useRef(0),ae=o.useRef([]),ie=wr(o.useState([]),2),ce=ie[0],le=ie[1],se=wr(o.useState(""),2),ue=se[0],me=se[1],pe=e.product===O.x.StreamableLearning?a.StreamableLearning:a.Subject,fe=p.a.useBasicFetch(k.presentation(pe)),ve=p.a.useBasicFetch(I.presentationAudiences(null,pe)),ge=null===(t=p.a.useBasicFetch(A.h.userProducts()).data)||void 0===t?void 0:t.find((function(e){return e.id===O.x.Exchange}));function he(e){M(e),e&&f.k.logUserAction({type:e},{actionType:v.Vw.Click,entity:v.py.Feedback,location:v.LZ.GiveFeedbackPopup,workflowPhase:v.eu.Start})}function be(e){switch(e){case ee.SUGGEST_IMPROVEMENT:return r.SuggestImprovement;case ee.REPORT_BUG:return r.ReportBug;case ee.REQUEST_VIDEO:return r.RequestVideo;case ee.REQUEST_LIVESTREAM:return r.RequestLivestream;case ee.GIVE_PRAISE:return r.GivePraise;case ee.RAISE_ISSUE:return r.RaiseIssue;case ee.OTHER:return r.Other}}return(0,_.L)(i.Radio.channel(E.Q4.MIXED_MEDIA_UPLOAD),g.S.UPLOAD_COMPLETE,(function(e){var t=e.toJSON();if(ae.current.push(t),re.current--,!(re.current>0)){var n=ae.current.length;ae.current.forEach((function(e){setTimeout((function(){n--;var t=$.getCollection().filter((function(t){var n;return(null===(n=t.get("fileInfo"))||void 0===n?void 0:n.id)===e.fileInfo.id}));$.getCollection().remove(t),le((function(e){return[].concat(Sr(e),Sr(t))})),n>0||(f.k.logUserAction({fileInfo:e.fileInfo},{location:v.LZ.GiveFeedbackPopup,actionType:v.Vw.Upload,entity:v.py.MixedMedia,descriptor:f.k.mapInteractionType(ne.current)}),C.success(jr("mixedMediaUploadSuccess")))}))})),ae.current=[]}})),c=(0,K.T)(),u=c.hasPermissions,w=c.isLoaded,o.useEffect((function(){if(w&&u(B.C.StudentExperience)){var e=new Z;X.Y.logError(e),V.Q.Ry.throw(e)}}),[w]),o.createElement(b.G,{size:"lg",title:G?oe(G):jr("title"),closePopup:e.closePopup,backdrop:"static"},!G&&o.createElement("p",null,o.createElement(y.x,{namespace:xr,phrase:"description"})),!G&&o.createElement(de,{onSelectOption:he,options:[ee.SUGGEST_IMPROVEMENT,ee.REPORT_BUG,e.product===O.x.StreamableLearning?ee.REQUEST_LIVESTREAM:ee.REQUEST_VIDEO,ee.GIVE_PRAISE,ee.RAISE_ISSUE,ee.OTHER]}),G&&o.createElement(br,{selectedOption:G,formStage:z,onSubmit:function(t,n){var r,a,o,i,c,l;return Ir(this,void 0,void 0,Er().mark((function u(){var m,d;return Er().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return m={type:be(G),user:te.getUserInfo(j.data,N.data),tags:te.getTags(j.data,e.product,!1,["give feedback",oe(G).toLowerCase(),null===(a=null===(r=fe.data)||void 0===r?void 0:r.description)||void 0===a?void 0:a.toLowerCase().trim(),null===(l=null===(c=null===(i=null===(o=R.data)||void 0===o?void 0:o.userProfile)||void 0===i?void 0:i.metadata)||void 0===c?void 0:c.jobTitle)||void 0===l?void 0:l.toLowerCase()].filter(Boolean))},d=Object.assign(Object.assign({},t),{currentPageUrl:s.Ab.GetCurrentUrl()}),G===ee.REPORT_BUG&&ce.length&&(d=Object.assign(Object.assign({},d),te.categorizeFiles(ce))),u.prev=3,u.next=6,x(L.submitFeedback(m,d));case 6:f.k.logUserAction(Object.assign(Object.assign({},m),d),{actionType:v.Vw.Submit,entity:v.py.Feedback,location:v.LZ.GiveFeedbackPopup,workflowPhase:v.eu.Complete}),H("success"),u.next=13;break;case 10:u.prev=10,u.t0=u.catch(3),C.error(jr("error"));case 13:return u.prev=13,n(),u.finish(13);case 16:case"end":return u.stop()}}),u,null,[[3,10,13,16]])})))},setSelectedOption:he,closePopup:e.closePopup,onFilesAdded:function(e,t){e.some((function(e){return e.size>kr*Tr}))?me(jr("maxFileSizeUploadError",{limit:kr})):e.length>Nr-J.length?me(jr("maxFilesUploadError",{limit:Nr})):e.some((function(e){return!l().isValidFile(e,h.l.MIXED_MEDIA)}))?me(jr("invalidTypeUploadError")):(me(""),re.current+=e.length,t&&(ne.current=t),$.addFiles(e))},uploadingFiles:J,uploadedFiles:ce,deleteFile:function(e){le((function(t){return t.filter((function(t){return t.id!==e}))}))},cancelUpload:function(e){return $.cancelUpload(e)},audiences:ve.data,uploadError:ue,initialValues:Q,setFormState:Y,instanceRegion:null===(n=j.data)||void 0===n?void 0:n.instanceRegion,hasExchangeTvProduct:!!ge,exchangeTvUrl:null==ge?void 0:ge.url,skipBeforeRequesting:!!e.skipBeforeRequestingVideoStep,hideCancelButton:!!e.selectedOption}))}}}]);
@@ -1 +0,0 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */