@clickview/exchange 0.20.1-rc.2 → 0.20.1-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickview/exchange",
3
- "version": "0.20.1-rc.2",
3
+ "version": "0.20.1-rc.3",
4
4
  "description": "ClickView exchange",
5
5
  "main": "dist/scripts/bundle.js",
6
6
  "scripts": {
@@ -1,2 +0,0 @@
1
- /*! For license information please see 272-bc21f51d5a-exchange.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[272],{32119:(e,t,n)=>{n.d(t,{G:()=>o});var r=n(32735),a=n(71365);function o(e){var t,n;return t=e,n=a.u.getInstance(t),r.useEffect((function(){return function(){a.u.releaseInstance(t)}})),n}},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}}},1269:(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(57408),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),f=n(83345),p={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}},g=n(35223);function v(e){var t=(0,i.u6)().values[e.fieldName];return"string"!=typeof t?r.createElement(r.Fragment,null):r.createElement("div",{className:"float-end text-secondary fw-normal"},t.length,"/",e.limit," characters")}const h={revealPassword:"jCfI0",passwordInput:"RBJnf",passwordContainer:"d78lK",passwordContainerDisabled:"asbVo",infoTooltip:"wzyOG",spinner:"CycFx"};function y(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 b=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=b(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 y(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)?y(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.")}()),f=m[0],p=m[1],v=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"])),v),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"])),v);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:f,className:"".concat(h.passwordInput," border-0 w-100 h-100 outline-none rounded")}),v),"password"===u.type&&r.createElement(d.x,{svgName:"password"===f?g.vn.VisibleOn:g.vn.VisibleOff,className:"svg-container cursor-pointer ".concat(h.revealPassword),onClick:function(){p("password"===f?"text":"password")}}))}function w(e){var t=e.label,n=e.className,a=e.showCharacterCounter,c=e.showRequiredStar,s=e.infoTooltip,u=e.infoTooltipPlacement,y=e.infoText,w=e.formSize,C=e.showOptionalLabel,O=b(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoTooltipPlacement","infoText","formSize","showOptionalLabel"]),I=(0,i.u6)(),x=I.errors,N=I.touched,T=function(){};if("checkbox"===O.type){var R=l.t.omit(e,["formSize","infoTooltipPlacement"]);return e.disabled&&(R.onChange=T),r.createElement(m,Object.assign({},R))}var k=Object.assign(Object.assign({},O),{className:p.getCustomFormControlClassName(x,N,O.name,w,n,"string"==typeof e.as?e.as:null)});return e.disabled&&(k.onChange=T),r.createElement(o.Z.Group,{className:"form-group"},!!t&&r.createElement(o.Z.Label,{htmlFor:O.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:g.vn.Info,title:s,tooltipPlacement:u,tooltipSpanHack:!0}),C&&r.createElement("span",{className:"text-secondary"}," ",r.createElement(f.x,{namespace:E,phrase:"optional"})),!!a&&!!O.maxLength&&r.createElement("div",{className:"ms-auto"},r.createElement(v,{fieldName:O.name,limit:O.maxLength}))),r.createElement(S,Object.assign({},k)),!!y&&r.createElement(o.Z.Text,{className:"text-secondary"},y),r.createElement(i.Bc,{name:O.name},(function(e){return r.createElement(o.Z.Control.Feedback,{type:"invalid"},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,f={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:f}),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}},6474:(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={}))},4594:(e,t,n)=>{var r;n.d(t,{E:()=>r}),function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience",e[e.TallPoster=60]="TallPoster",e[e.Classroom=67]="Classroom",e[e.ClassroomGroup=68]="ClassroomGroup",e[e.UserProfile=74]="UserProfile"}(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={}))},69883:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(79976),a=n(60139),o=n(32119);function i(){var e=(0,o.G)(r.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:a.NK.Warning,heading:a.R6.Warning,message:t})}}}},49439:(e,t,n)=>{n.d(t,{X:()=>g,L:()=>v});var r=n(32735),a=n(79014),o=n(1048),i=function(){var e=r.useRef(!0);return r.useEffect((function(){return function(){e.current=!1}}),[]),e};function c(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 l(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)?l(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 l(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 s=275,u=5,m={className:"",delay:0,style:null},d={screenX:0,screenY:0};function f(e,t){var n;e.current&&(t.className&&(null===(n=e.current.classList)||void 0===n||n.add(t.className)),t.style&&Object.keys(t.style).forEach((function(n){e.current.style[n]=t.style[n]})))}function p(e,t){var n;e.current&&(t.className&&(null===(n=e.current.classList)||void 0===n||n.remove(t.className)),t.style&&Object.keys(t.style).forEach((function(t){e.current.style[t]=null})))}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,t=i(),n=c(r.useState(e),2),l=n[0],s=n[1],u=c(r.useState(!1),2),d=u[0],g=u[1],v=r.useRef(null);r.useEffect((function(){o.t.isEqual(e,l)||s(e)}),[e]);var h=a.q.throttle((function(){f(v,l),t.current&&g(!0)}),l.delay,{leading:!1}),y=function(){a.q.isFunction(h.cancel)&&h.cancel(),p(v,l),t.current&&g(!1)};return r.useLayoutEffect((function(){var e=v.current;if(e)return e.addEventListener("mouseenter",h),e.addEventListener("mouseleave",y),function(){e.removeEventListener("mouseenter",h),e.removeEventListener("mouseleave",y)}}),[v.current,l]),[v,d]}function v(e){var t=c(r.useState(e),2),n=t[0],i=t[1],l=r.useRef(Object.assign({},d)),m=r.useRef(!1),g=r.useRef(0),v=r.useRef(null),h=c(r.useState(!1),2),y=h[0],b=h[1];function E(){g.current&&(window.clearTimeout(g.current),g.current=0)}function S(){m.current=!0}function w(e){if(m.current){var t,r,a=Object.assign({},l.current);l.current.screenX=e.screenX,l.current.screenY=e.screenY,function(e,t){return Math.abs(e.screenX-t.screenX)>u||Math.abs(e.screenY-t.screenY)>u}(a,e)&&E(),t=function(){f(v,n),b(!0)},r=n.delay||s,g.current||(g.current=window.setTimeout(t,r))}}function C(){E(),p(v,n),m.current=!1,b(!1)}return r.useEffect((function(){o.t.isEqual(e,n)||i(e)}),[e]),r.useLayoutEffect((function(){if(v.current){var e=a.q.throttle(w,25,{leading:!1});return v.current.addEventListener("mouseenter",S),v.current.addEventListener("mousemove",e),v.current.addEventListener("mouseleave",C),function(){v.current&&(v.current.removeEventListener("mouseenter",S),v.current.removeEventListener("mousemove",e),v.current.removeEventListener("mouseleave",C))}}}),[v.current,n]),[v,y]}},35286:(e,t,n)=>{n.d(t,{L:()=>o});var r=n(32735),a=n(43823),o=function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i="string"==typeof e?a.Radio.channel(e):e;r.useEffect((function(){if(e)return i.on(t,n),function(){e&&i.off(t,n)}}),o)}},46237:(e,t,n)=>{var r,a,o,i,c,l,s,u,m,d,f,p,g,v,h;n.d(t,{R:()=>i,OL:()=>a,Z9:()=>r}),function(e){e[e.MultipleChoice=1]="MultipleChoice",e[e.ShortAnswer=2]="ShortAnswer",e[e.TrueOrFalse=3]="TrueOrFalse",e[e.Annotation=4]="Annotation",e[e.Image=5]="Image",e[e.MissingWord=6]="MissingWord"}(r||(r={})),function(e){e.LatestReleases="latest-releases",e.ExploreAllTopics="explore-all-topics",e.ClassificationLatestReleases="classification-latest-releases"}(a||(a={})),function(e){e.Video="video",e.Series="series",e.Playlist="playlist",e.Classification="subject",e.Company="company"}(o||(o={})),function(e){e.Pink="colour:0",e.Orange="colour:1",e.Green="colour:2",e.Blue="colour:3",e.Purple="colour:4",e.Indigo="colour:5"}(i||(i={})),function(e){e.Any="Any",e.Level_1="Level_1",e.Level_2="Level_2",e.Level_3="Level_3",e.Level_4="Level_4"}(c||(c={})),function(e){e.Any="Any",e.Staff="Staff",e.Learner="Learner"}(l||(l={})),function(e){e.Draft="Draft",e.Published="Published",e.Archived="Archived"}(s||(s={})),function(e){e.Discover="discover",e.Classification="classification",e.ClassificationDirectory="classification-directory",e.MoviesAndTv="movies-and-tv",e.Company="company"}(u||(u={})),function(e){e[e.Row=0]="Row",e[e.LargeRow=1]="LargeRow",e[e.Hero=2]="Hero",e[e.ResourcesTile=3]="ResourcesTile"}(m||(m={})),function(e){e[e.None=1]="None",e[e.All=2]="All",e[e.Learner=3]="Learner",e[e.Teacher=4]="Teacher"}(d||(d={})),function(e){e[e.Holiday=0]="Holiday",e[e.SportingEvent=1]="SportingEvent",e[e.Observance=2]="Observance",e[e.NaturalDisaster=3]="NaturalDisaster",e[e.HistoricalEvent=4]="HistoricalEvent",e[e.BreakingNews=5]="BreakingNews",e[e.Informal=6]="Informal",e[e.ReligiousEvent=7]="ReligiousEvent",e[e.Livestream=8]="Livestream",e[e.Other=255]="Other"}(f||(f={})),function(e){e[e.Classification=0]="Classification",e[e.Livestream=1]="Livestream"}(p||(p={})),function(e){e[e.Regular=0]="Regular",e[e.Daily=1]="Daily",e[e.Weekly=2]="Weekly",e[e.Monthly=3]="Monthly",e[e.Yearly=4]="Yearly"}(g||(g={})),function(e){e[e.Owner=1]="Owner",e[e.Teacher=2]="Teacher",e[e.Student=3]="Student"}(v||(v={})),function(e){e[e.Audience=0]="Audience",e[e.Topic=1]="Topic",e[e.Curriculum=2]="Curriculum"}(h||(h={}))},45778:(e,t,n)=>{n.d(t,{G:()=>a});var r=n(4594),a={isType:function(e,t){return(null==e?void 0:e.typeId)===t},isResource:function(e){return a.isType(e,r.E.Resource)},isClassification:function(e){return"Subject"===e.type}}},28272:(e,t,n)=>{n.r(t),n.d(t,{GiveFeedbackView:()=>ir});var r,a=n(32735),o=n(43823),i=n(53301),c=n.n(i),l=n(23481),s=n(54150),u=n(32119),m=n(20354),d=n(49985),f=n(65858),p=n(29555),g=n(28046),v=n(33025),h=n(83345),y=n(52003),b=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"}(r||(r={}));var E,S=n(12754),w=n(97395);!function(e){e.Subject="Subject",e.Curriculum="Curriculum",e.StreamableLearning="StreamableLearning"}(E||(E={}));var C={presentationAudiences:function(e,t){var n=t||E.Subject.toLowerCase(),r={type:n,presentationId:e};return{bootstrapName:"presentationAudiences",url:w._.urlBuilder("/api/domain/v1/subjects/audiences",r),publicUrl:w._.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:w._.urlBuilder("/api/subjects/presentation/".concat(e,"/audiences"),{type:E.Subject.toLowerCase(),presentationId:e}),key:"presentation:".concat(e,":audiences"),normalize:!1}}},O=n(1666),I=n(99940),x={submitFeedback:function(e,t){return{url:"{gateway}/v1/feedback",key:"submit:feedback",type:I.k.POST,data:Object.assign(Object.assign({},e),t)}}},N=n(70145),T=n(31949),R=n(69883);function k(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=n(35286),j=n(19808),A=n(86613);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 F,U={getUserInfo:function(e,t){return{id:e.id,username:e.username,email:e.email,userType:e.role===A.i.Admin?"Admin":"Staff",customerId:e.customerId,cvcId:t.crmId,customerName:t.name,instanceRegion:e.instanceRegion,contentRegion:e.contentRegion}},mapInstanceRegionToTag:function(e){switch(e){case j.b.AU:return"au";case j.b.NZ:return"nz";case j.b.UK:return"uk";case j.b.US:return"us"}},getTags:function(e,t,n,r){var a,o=[t].concat(function(e){if(Array.isArray(e))return P(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 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}}(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===A.i.Admin&&o.push("administrator");var i=U.mapInstanceRegionToTag(e.instanceRegion);return i&&o.push(i),o},categorizeFiles:function(e){return e.reduce((function(e,t){var n=t.get("fileInfo");return c().isValidFile(t.get("file"),g.l.VIDEO)?e.videoUrls.push(null==n?void 0:n.url):e.imageUrls.push(null==n?void 0:n.url),e}),{imageUrls:[],videoUrls:[]})}},V=n(11607),G=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"}(F||(F={}));var M=l.T.encloseNamespace("shared.feedbackFormTitles"),_=function(e){switch(e){case F.SUGGEST_IMPROVEMENT:case F.REPORT_BUG:case F.REQUEST_VIDEO:case F.REQUEST_LIVESTREAM:case F.GIVE_PRAISE:case F.RAISE_ISSUE:case F.OTHER:return M(e)}};function q(e){return q="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},q(e)}function D(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=q(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=q(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==q(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var B=D(D(D(D(D(D(D({mailSent:"https://image.api.prd.cvnet.io/v2/images/2mZ7L9",mediaPreview:"https://image.api.prd.cvnet.io/v2/images/ageRM0",lightBulb:"https://image.api.prd.cvnet.io/v2/images/Oqg3JN",heartHands:"https://image.api.prd.cvnet.io/v2/images/1ML8Oj",videoAlert:"https://image.api.prd.cvnet.io/v2/images/dq2oMq"},F.REQUEST_VIDEO,{default:"https://image.api.prd.cvnet.io/v2/images/G1YGdn",hover:"https://image.api.prd.cvnet.io/v2/images/K6yPxz"}),F.REQUEST_LIVESTREAM,{default:"https://image.api.prd.cvnet.io/v2/images/G1YGdn",hover:"https://image.api.prd.cvnet.io/v2/images/K6yPxz"}),F.SUGGEST_IMPROVEMENT,{default:"https://image.api.prd.cvnet.io/v2/images/g7aR1l",hover:"https://image.api.prd.cvnet.io/v2/images/zMR0Dk"}),F.RAISE_ISSUE,{default:"https://image.api.prd.cvnet.io/v2/images/5boW78",hover:"https://image.api.prd.cvnet.io/v2/images/m6yRKr"}),F.GIVE_PRAISE,{default:"https://image.api.prd.cvnet.io/v2/images/nE1mdz",hover:"https://image.api.prd.cvnet.io/v2/images/JjEnmR"}),F.REPORT_BUG,{default:"https://image.api.prd.cvnet.io/v2/images/AOdYpo",hover:"https://image.api.prd.cvnet.io/v2/images/yro9NM"}),F.OTHER,{default:"https://image.api.prd.cvnet.io/v2/images/Eoaykj",hover:"https://image.api.prd.cvnet.io/v2/images/wN59Zg"});const H={image:"_2jo0"};function W(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 z(e){var t,n,r=(t=(0,G.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 W(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)?W(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.")}()),o=r[0],i=r[1],c=B[e.option];return a.createElement(V.L,{ref:o,className:"col-lg-4 col-sm-6 col-12",onClick:function(){return e.onSelectOption(e.option)}},a.createElement("div",{className:"d-flex flex-column align-items-center h-100 rounded border py-3 gap-2"},a.createElement("img",{className:H.image,src:i?c.hover:c.default,alt:_(e.option)}),a.createElement("p",{className:"fw-semibold text-center mb-0"},_(e.option))))}function Q(e){return a.createElement("div",{className:"row g-2"},e.options.map((function(t){return a.createElement(z,{key:t,option:t,onSelectOption:e.onSelectOption})})))}var Z=n(92802),K=n(82644),X=n(13876),Y=l.T.encloseNamespace("shared.feedbackButtons");function $(e){var t=(0,K.b)();return a.createElement(X.u,null,"form"===e.formStage&&a.createElement(a.Fragment,null,a.createElement(X.u.Cancel,{onClick:function(){return e.setSelectedOption(null)},text:Y("cancel")}),a.createElement(X.u.Submit,{variant:"dark",text:e.submitText||Y("submit"),disabled:!t.isValid})),"success"===e.formStage&&a.createElement(X.u.Cancel,{variant:"dark",text:Y("close"),onClick:e.closePopup}))}const J={successImage:"yp7vQ"};var ee=l.T.encloseNamespace("shared.feedbackFormState");function te(e){return"form"===e.formStage||"error"===e.formStage?a.createElement(a.Fragment,null):a.createElement("div",{className:"text-center"},a.createElement("div",{className:"mb-3"},a.createElement("img",{className:J.successImage,src:e.successImageUrl||B.mailSent})),a.createElement("h4",{className:"mb-3"},e.successHeading||ee("successHeading")),a.createElement("p",{className:"mb-3"},e.successDescription||ee("successDescription")))}var ne=n(5173),re=n(1269),ae=l.T.encloseNamespace("shared.feedbackForm"),oe=5e3,ie=function(e){switch(e){case"requiredError":return ae(e);case"minCharactersError":return ae(e,{limit:20});case"maxCharactersError":return ae("maxCharactersError",{limit:oe})}},ce=function(){return ne.Z_().min(20,ie("minCharactersError")).max(oe,ie("maxCharactersError"))},le=l.T.encloseNamespace("shared.feedbackGivePraise"),se={praise:""},ue=ne.Ry().shape({praise:ce().required(ie("requiredError"))}).noUnknown();function me(){var e=(0,K.b)();return a.createElement(a.Fragment,null,a.createElement(re.W,{as:"textarea",placeholder:le("givePraisePlaceholder"),label:le("givePraiseLabel"),name:"praise",rows:5,value:e.values.praise,showRequiredStar:!0}))}function de(e){return a.createElement(zn,Object.assign({},e,{initialValues:Object.assign(Object.assign({},se),e.initialValues),validationSchema:ue,successImageUrl:B.heartHands,successHeading:le("successHeading"),successDescription:le("successDescription")}),a.createElement(me,null))}var fe=l.T.encloseNamespace("shared.feedbackOther"),pe={feedback:""},ge=ne.Ry().shape({feedback:ce().required(ie("requiredError"))}).noUnknown();function ve(){var e=(0,K.b)();return a.createElement(a.Fragment,null,a.createElement(re.W,{as:"textarea",placeholder:fe("otherPlaceholder"),label:fe("otherLabel"),name:"feedback",rows:5,value:e.values.feedback,showRequiredStar:!0}))}function he(e){return a.createElement(zn,Object.assign({},e,{initialValues:Object.assign(Object.assign({},pe),e.initialValues),validationSchema:ge}),a.createElement(ve,null))}var ye=l.T.encloseNamespace("shared.feedbackRaiseIssue"),be={issue:""},Ee=ne.Ry().shape({issue:ce().required(ie("requiredError"))}).noUnknown();function Se(){var e=(0,K.b)();return a.createElement(a.Fragment,null,a.createElement(re.W,{as:"textarea",placeholder:ye("raiseIssuePlaceholder"),label:ye("raiseIssueLabel"),name:"issue",rows:5,value:e.values.issue,showRequiredStar:!0}))}function we(e){return a.createElement(zn,Object.assign({},e,{initialValues:Object.assign(Object.assign({},be),e.initialValues),validationSchema:Ee}),a.createElement(Se,null))}var Ce=n(83914);function Oe(e){return Oe="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},Oe(e)}function Ie(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Oe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Oe(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xe,Ne=Ie(Ie(Ie(Ie({},j.b.AU,{phone:"02 9509 2600",email:"support@clickview.com.au",website:"https://www.clickviewsupport.com/hc"}),j.b.UK,{phone:"+44 (0)333 207 6595",email:"info@clickview.co.uk",website:"https://www.clickviewsupport.com/hc"}),j.b.NZ,{phone:"09 916 1156",email:"support@clickview.co.nz",website:"https://www.clickviewsupport.com/hc"}),j.b.US,{phone:"+1 312-292-9322",email:"info@clickvieweducation.com",website:"https://www.clickviewsupport.com/hc"}),Te=n(35223),Re=n(24064);!function(e){e.FileSelect="file-select",e.DragDrop="drag-drop"}(xe||(xe={}));const ke={fileDrop:"vdCUc",resourcePreview:"tZQbH"};function Le(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 je="shared.feedbackFileUpload";function Ae(e){var t=(0,Re.uI)({onDrop:function(t){return e.onFilesAdded(t,xe.DragDrop)},noClick:!0,noKeyboard:!0,multiple:!!e.acceptMultiple,noDragEventsBubbling:!0}),n=t.getRootProps,r=t.getInputProps,o=t.isDragActive,i=a.useRef(null),c=a.useCallback((function(e){e&&(i.current=e)}),[]),l="".concat(ke.fileDrop," text-center p-2 rounded-1");return e.uploadError&&(l+=" border-red"),o&&(l+=" border-blue bg-light-blue"),a.createElement(a.Fragment,null,a.createElement("div",Object.assign({},n({className:l})),a.createElement("img",{className:ke.resourcePreview,src:e.imageUrl,draggable:!1}),a.createElement("div",{className:"position-relative"},o&&a.createElement("p",{className:"position-absolute font-size-md translate-middle top-50 start-50 mb-0"},a.createElement(h.x,{namespace:je,phrase:"dropUpload"})),a.createElement("div",{className:o?"opacity-0":""},a.createElement("p",{className:"mb-0"},a.createElement(h.x,{namespace:je,phrase:"dragDrop"})),a.createElement("button",{type:"button",className:"btn btn-link text-underline p-0",onClick:function(){i.current.value=null,i.current.click()}},a.createElement(h.x,{namespace:je,phrase:"upload"})))),a.createElement("input",{type:"file",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 Le(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 Le(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)?Le(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.")}(),xe.FileSelect);var n}}),a.createElement("input",Object.assign({},r()))),e.uploadError&&a.createElement("span",{className:"mt-1 d-block invalid-feedback"},e.uploadError))}const Pe={progress:"PeDF6"};function Fe(e){var t=100===e.upload.progress;return a.createElement(a.Fragment,null,a.createElement("div",null,a.createElement(Ce.x,{svgName:Te.vn.Folder,className:"svg-container me-2"}),a.createElement("span",{className:"align-middle"},e.upload.name),t&&a.createElement(Ce.x,{svgName:Te.vn.Check,className:"svg-container float-end text-success"}),!t&&a.createElement("div",{role:"button","aria-label":"close",onClick:function(){return e.cancelUpload(e.upload.id)},className:"float-end description"},a.createElement(Ce.x,{svgName:Te.vn.Close}))),a.createElement("div",{className:"".concat(Pe.progress," progress my-2")},a.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 Ue(e){var t;return(null===(t=e.uploads)||void 0===t?void 0:t.length)?a.createElement(a.Fragment,null,e.uploads.map((function(t,n){return a.createElement(Fe,{key:n,upload:t,cancelUpload:e.cancelUpload})}))):a.createElement(a.Fragment,null)}function Ve(e){return a.createElement("div",{className:"bg-gray-100 rounded p-2"},a.createElement(Ce.x,{className:"d-inline-block align-middle svg-container icon-purple me-2",svgName:Te.vn.FileImg}),a.createElement("span",{className:"align-middle"},e.file.get("name")),a.createElement("button",{className:"btn p-0 border-0 float-end",onClick:function(){return e.deleteFile(e.file.get("id"))}},a.createElement(Ce.x,{svgName:Te.vn.Delete})))}function Ge(e){return a.createElement("div",{className:"d-flex flex-column gap-2"},e.uploadedFiles.map((function(t){return a.createElement(Ve,{key:t.id,file:t,deleteFile:e.deleteFile})})))}var Me=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.feedbackReportBug",qe=l.T.encloseNamespace(_e),De={issue:"",stepsToReproduce:""},Be=ne.Ry().shape({issue:ce().required(ie("requiredError")),stepsToReproduce:ce()}).noUnknown();function He(e){var t=(0,K.b)();return a.createElement(a.Fragment,null,a.createElement("div",{className:"form-group"},a.createElement("label",{className:"form-label mb-1"},a.createElement(h.x,{namespace:_e,phrase:"mixedMediaLabel"})),a.createElement("p",{className:"text-secondary font-size-sm"},a.createElement(h.x,{namespace:_e,phrase:"mixedMediaDescription"})),a.createElement("div",{className:"mb-3"},a.createElement(Ae,{mimeType:g.l.MIXED_MEDIA,onFilesAdded:e.onFilesAdded,imageUrl:e.previewImageUrl,uploadError:e.uploadError,acceptMultiple:!0})),a.createElement(Ue,{uploads:e.uploadingFiles,cancelUpload:e.cancelUpload}),a.createElement(Ge,{uploadedFiles:e.uploadedFiles,deleteFile:e.deleteFile})),a.createElement(re.W,{as:"textarea",placeholder:qe("issuePlaceholder"),label:qe("issueLabel"),name:"issue",value:t.values.issue,showRequiredStar:!0}),a.createElement(re.W,{as:"textarea",placeholder:qe("stepsPlaceholder"),label:qe("stepsLabel"),name:"stepsToReproduce",value:t.values.stepsToReproduce}),a.createElement("div",{className:"rounded bg-light-yellow p-2 mb-3"},a.createElement("p",{className:"fw-semibold mb-2"},a.createElement(h.x,{namespace:_e,phrase:"help"})),a.createElement("div",{className:"d-flex gap-1 mb-2"},a.createElement(Ce.x,{svgName:Te.vn.Link}),a.createElement("a",{href:Ne[e.instanceRegion].website,target:"_blank",className:"text-underline"},a.createElement(h.x,{namespace:_e,phrase:"visitHelpCentre"}))),a.createElement("p",{className:"mb-2"},a.createElement(h.x,{namespace:_e,phrase:"supportTeam"})),a.createElement("div",{className:"d-flex gap-1 mb-2"},a.createElement(Ce.x,{svgName:Te.vn.Phone}),a.createElement("span",null,Ne[e.instanceRegion].phone)),a.createElement("div",{className:"d-flex gap-1 mb-2"},a.createElement(Ce.x,{svgName:Te.vn.Email}),a.createElement("span",null,Ne[e.instanceRegion].email))))}function We(e){var t=e.onFilesAdded,n=e.cancelUpload,r=e.uploadingFiles,o=e.uploadedFiles,i=e.deleteFile,c=Me(e,["onFilesAdded","cancelUpload","uploadingFiles","uploadedFiles","deleteFile"]);return a.createElement(zn,Object.assign({},c,{initialValues:Object.assign(Object.assign({},De),e.initialValues),validationSchema:Be,submitText:qe("submit")}),a.createElement(He,{onFilesAdded:t,previewImageUrl:B.mediaPreview,cancelUpload:n,uploadingFiles:r,uploadedFiles:o,deleteFile:i,uploadError:e.uploadError,instanceRegion:e.instanceRegion}))}var ze=n(75896),Qe=n(79014),Ze=n(4594),Ke=n(76881),Xe=n(46237);function Ye(e){switch(e){case Xe.R.Pink:return"pink";case Xe.R.Orange:return"orange";case Xe.R.Green:return"green";case Xe.R.Blue:return"blue";case Xe.R.Purple:return"purple";case Xe.R.Indigo:return"indigo";default:return"pink"}}var $e=n(45778),Je=n(64818),et=n(80247);const tt={avatar:"srrS3"};function nt(e){var t=e.imageUrl,n=e.initials,r={};return t&&(r.backgroundImage="url('".concat(t,"')")),a.createElement("div",{className:tt.avatar,style:r},t?a.createElement(a.Fragment,null," "):n)}var rt=n(76177);const at={svgContainer:"laVU4",selection:"vEOCt",expander:"d1NHd",iconContainer:"rFH4W",icon:"BarYz",bubble:"HF0E8",spinnerContainer:"iKeXW",remove:"pyzCM",removeBubble:"mgt6Y"};var ot=l.T.encloseNamespace("shared.inputSelection");function it(e){var t,n="".concat(at.svgContainer," ").concat(at.icon);return e.typeId===Ze.E.Classroom?n+=" text-teal":n+=" text-".concat(Ye(null===(t=e.metadata)||void 0===t?void 0:t.colour)),n}function ct(e){var t,n=function(e){var t;switch(e.typeId){case Ze.E.Classroom:return"text-teal-hover";case Ze.E.ClassroomGroup:return"text-".concat(Ye(null===(t=e.metadata)||void 0===t?void 0:t.colour),"-hover")}}(e.selection),r=e.selection.typeId===Ze.E.Classroom;if(!e.canExpand){if(!e.selection.typeId||e.selection.typeId===Ze.E.User){var o=e.selection;return a.createElement("div",{className:at.svgContainer},a.createElement(nt,{imageUrl:null===(t=o.avatar)||void 0===t?void 0:t.url,initials:Je.l.getInitials(e.selection.name,e.selection.surname)}))}return a.createElement(rt.u,{title:ot(r?"emptyClassroom":"emptyGroup")},a.createElement("div",{className:"align-items-center border border-white bg-white ".concat(at.iconContainer)},a.createElement(Ce.x,{className:it(e.selection),svgName:r?Te.vn.Classrooms:Te.vn.Group})))}return e.hasExpanded?a.createElement("div",{className:"d-flex align-items-center text-white ".concat(at.spinnerContainer," ").concat(at.svgContainer)},a.createElement(et.Z,{as:"div",size:"sm",animation:"border",role:"status"})):a.createElement(a.Fragment,null,a.createElement(V.L,{className:"align-items-center cursor-pointer text-white border border-white rounded-circle ".concat(at.expander," ").concat(n),onClick:e.onClickExpand},a.createElement(Ce.x,{svgName:Te.vn.Plus,className:"d-flex align-items-center ".concat(at.svgContainer)})),a.createElement("div",{className:"align-items-center border border-white bg-white ".concat(at.iconContainer)},a.createElement(Ce.x,{className:it(e.selection),svgName:r?Te.vn.Classrooms:Te.vn.Group})))}function lt(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 st(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)?st(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 st(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 ut(e){var t;if(!e.typeId)return"dark-blue";switch(e.typeId){case Ze.E.User:return"number"==typeof e.userType?2===e.userType?"dark-blue":"indigo":e.userType===Ke.Y.Learner?"dark-blue":"indigo";case Ze.E.Classroom:return"teal";case Ze.E.ClassroomGroup:return Ye(null===(t=e.metadata)||void 0===t?void 0:t.colour)}}function mt(e){var t,n,r,o=$e.G.isType(e.selection,Ze.E.Classroom),i=$e.G.isType(e.selection,Ze.E.ClassroomGroup),c=e.onClickExpand&&(o||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=lt(a.useState(!1),2),m=u[0],d=u[1],f=lt(a.useState(c&&l),2),p=f[0],g=f[1];if(a.useEffect((function(){g(c&&l)}),[c,l]),s){var v=e.selection,h=ut(e.selection);return a.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(at.bubble)},v.users.data.map((function(t){return a.createElement(dt,{key:"".concat(t.id,":").concat(e.selection.id),selection:t,colourVariant:h,hasStudentExperience:e.hasStudentExperience})})),a.createElement(V.L,{className:"cursor-pointer position-absolute text-".concat(h," ").concat(at.removeBubble),onClick:function(){return e.onClickRemove(e.selection)}},a.createElement(Ce.x,{svgName:Te.vn.Close,className:"d-flex align-items-center ".concat(at.svgContainer)})))}return a.createElement(dt,{selection:e.selection,canExpand:p,hasExpanded:m,onClickExpand:function(){d(!0),e.onClickExpand(e.selection.id)},onClickRemove:e.onClickRemove,colourVariant:ut(e.selection),hasStudentExperience:e.hasStudentExperience})}function dt(e){var t=e.colourVariant||ut(e.selection),n=e.selection.name;return e.selection.typeId===Ze.E.User&&(n=e.hasStudentExperience?Je.l.getDisplayName(e.selection):Je.l.getFullName(e.selection)),a.createElement("div",{className:"".concat(at.selection," bg-").concat(t," rounded-pill text-").concat(t," d-flex align-items-center me-1 mt-1 overflow-hidden")},!e.hideExpander&&a.createElement(ct,{canExpand:e.canExpand,hasExpanded:e.hasExpanded,onClickExpand:e.onClickExpand,selection:e.selection}),a.createElement("span",{className:"mx-1 text-white text-truncate"},n),Qe.q.isFunction(e.onClickRemove)&&a.createElement(V.L,{className:"d-flex align-items-center cursor-pointer align-self-stretch text-white ".concat(at.remove),onClick:function(){return e.onClickRemove(e.selection)}},a.createElement(Ce.x,{svgName:Te.vn.Close,className:"d-flex align-items-center ".concat(at.svgContainer)})))}var ft=n(6474);const pt={removeRecipient:"mCbMC",recipientItem:"kdcb0",showSpinner:"xH6Mu",avatarContainer:"Zcpg3",recipientDetails:"v5EmV",recipientDetailsWithRemoveButton:"_V928"};var gt="shared.classroomGroupRecipientItemMetadata";function vt(e){var t;return a.createElement(a.Fragment,null,a.createElement("div",{className:"".concat(pt.avatarContainer," d-inline-block")},a.createElement(ft.f,{svgName:Te.vn.Group,variant:Ye(null===(t=e.classroomGroup.metadata)||void 0===t?void 0:t.colour)})),a.createElement("div",{className:e.detailsClassName},a.createElement("h4",{className:"font-size-normal fw-normal m-0"},e.classroomGroup.name),a.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?l.T.getPhrase(gt,"subheading",{classroomName:o,smartCount:a}):""}(e.classroomGroup))))}var ht="shared.classroomRecipientItemMetadata";function yt(e){return a.createElement(a.Fragment,null,a.createElement("div",{className:"".concat(pt.avatarContainer," d-inline-block")},a.createElement(ft.f,{svgName:Te.vn.Classrooms,variant:"teal"})),a.createElement("div",{className:e.detailsClassName},a.createElement("h4",{className:"font-size-normal fw-normal m-0"},e.classroom.name),a.createElement("p",{className:"text-secondary m-0"},(o=(null===(n=(t=e.classroom).users)||void 0===n?void 0:n.count)||(null===(r=t.enrolments)||void 0===r?void 0:r.count),Number.isInteger(o)?l.T.getPhrase(ht,"subheading",{smartCount:o}):""))));var t,n,r,o}var bt=n(91374),Et=l.T.encloseNamespace("shared.userRecipientItemMetadata");function St(e){var t;return a.createElement(a.Fragment,null,a.createElement("div",{className:"".concat(pt.avatarContainer," d-inline-block")},a.createElement(bt.q,{imageUrl:null===(t=e.user.avatar)||void 0===t?void 0:t.url,imageCdnUrl:e.imageCdnUrl,initials:Je.l.getInitials(e.user.name,e.user.surname)})),a.createElement("div",{className:e.detailsClassName},a.createElement("h4",{className:"font-size-normal fw-normal m-0"},e.showDisplayName?Je.l.getDisplayName(e.user):Je.l.getFullName(e.user)),a.createElement("p",{className:"text-secondary m-0"},e.getSubText?e.getSubText(e.user):function(e){var t=Je.l.getUserType(e),n=Je.l.getUserRole(e);if(t===Ke.Y.Staff)return n===A.i.Admin?Et("admin"):Et("staff");var r=Je.l.getYearGroup(e);return(null==r?void 0:r.name)?r.name:Et("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}var Ct=l.T.encloseNamespace("share.recipientItem");function Ot(e){switch(e){case Ze.E.User:return Ct("removeUser");case Ze.E.Classroom:return Ct("removeClassroom");case Ze.E.ClassroomGroup:return Ct("removeGroup")}return null}function It(e){var t,n,r=(t=a.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.")}()),o=r[0],i=r[1],c="".concat(pt.recipientItem," d-flex");o&&(c+=" ".concat(pt.showSpinner));var l="".concat(e.removeRecipient?pt.recipientDetailsWithRemoveButton:pt.recipientDetails," d-inline-block ms-2");return a.createElement("div",{className:c},$e.G.isType(e.entity,Ze.E.User)?a.createElement(St,{user:e.entity,imageCdnUrl:e.imageCdnUrl,detailsClassName:l,showDisplayName:e.showDisplayName,getSubText:e.getSubText}):$e.G.isType(e.entity,Ze.E.Classroom)?a.createElement(yt,{classroom:e.entity,detailsClassName:l}):$e.G.isType(e.entity,Ze.E.ClassroomGroup)?a.createElement(vt,{classroomGroup:e.entity,detailsClassName:l}):void 0,Qe.q.isFunction(e.removeRecipient)&&a.createElement("div",{className:"".concat(pt.removeRecipient," d-inline-flex justify-content-center align-items-center")},o?a.createElement(et.Z,{as:"div",size:"sm",animation:"border",role:"status"}):a.createElement(rt.u,{title:Ot(e.entity.typeId),spanHack:!0},a.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),Nt=n(42648);const Tt={inputWithoutHighlight:"cKcry",suggestionsContainerOpen:"avM9L",sectionContainer:"u35Wz",suggestionHighlighted:"gFitp",inputContainer:"utnMG",clearButton:"TAoT9",inputWithLeftIcon:"Rt24D",inputWithRightIcon:"pxKzq",inputWithTwoRightIcons:"Oerjh",iconContainer:"h8OBl",leftIconContainer:"L5mrV",rightIconContainer:"V23aG"};var Rt=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 kt(e,t,n,r,a){var o="form-control";return n||(o+=" ".concat(Tt.inputWithoutHighlight)),"left"===e&&(o+=" ".concat(Tt.inputWithLeftIcon)),("right"===e&&!t||"left"===e&&t)&&(o+=" ".concat(Tt.inputWithRightIcon)),"right"===e&&t&&(o+=" ".concat(Tt.inputWithTwoRightIcons)),"lg"===a&&(o+=" form-control-lg"),"sm"===a&&(o+=" form-control-sm"),r&&(o+=" ".concat(r)),o}function Lt(e){var t="d-inline-block svg-container";return Qe.q.isFunction(e)?t+" cursor-pointer":t}function jt(e){var t=e.onClickSearchIcon,n=e.searchIconPlacement,r=e.showClearInputIcon,o=e.onClickClearInput,i=e.highlightOnFocus,c=e.className,l=e.formSize,s=Rt(e,["onClickSearchIcon","searchIconPlacement","showClearInputIcon","onClickClearInput","highlightOnFocus","className","formSize"]),u=function(){return a.createElement("div",{className:"d-inline-block"},a.createElement(Ce.x,{svgName:Te.vn.Search,size:Ce.S.Standard,onClick:t,className:Lt(t)}))};return a.createElement("div",{className:"position-relative ".concat(Tt.inputContainer)},"left"===n&&a.createElement("div",{className:"".concat(Tt.iconContainer," ").concat(Tt.leftIconContainer)},a.createElement(u,null)),a.createElement("input",Object.assign({className:kt(n,r,i,c,l)},s)),("right"===n||!!r)&&a.createElement("div",{className:"".concat(Tt.iconContainer," ").concat(Tt.rightIconContainer)},!!r&&a.createElement((function(){return a.createElement("div",{className:"d-inline-block text-secondary ".concat(Tt.clearButton)},a.createElement(Ce.x,{svgName:Te.vn.Close,size:Ce.S.Standard,onClick:o,className:Lt(o)}))}),null),"right"===n&&a.createElement(u,null)))}var At,Pt=n(86764),Ft=n(3747),Ut=n(2948),Vt=n(1048),Gt=n(66090);function Mt(e){return Mt="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},Mt(e)}function _t(e){return function(e){if(Array.isArray(e))return Dt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||qt(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 qt(e,t){if(e){if("string"==typeof e)return Dt(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)?Dt(e,t):void 0}}function Dt(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 Bt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Mt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Mt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Mt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ht(e,t){return Bt(Bt(Bt(Bt({},At.Recent,t),At.Local,e),At.Remote,[]),At.Generic,[])}function Wt(e,t){return Vt.t.isObject(e)&&e.hasOwnProperty(t)&&Gt.O.isString(e[t])}function zt(e,t,n,r){var a=e.trim().toLowerCase();return a.length<r?[]:t.filter((function(e){return!(!Wt(e,n)||!Gt.O.isString(e[n]))&&e[n].trim().toLowerCase().includes(a)}))}function Qt(e,t){e(Object.assign(Object.assign({},Ht([],[])),Bt({},At.Generic,[{type:t,generic:!0}])))}function Zt(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=Qe.q.isFunction(e.getLocalSuggestions)?e.getLocalSuggestions(i,e.local):zt(i,e.local,e.valueKey,e.activationLength);if(!l.length&&e.getEmptyStateComponent)return void Qt(t,"empty");t((function(e){return Object.assign(Object.assign({},e),Bt(Bt({},At.Local,l),At.Generic,[]))}))}var s,u,d,f,p,g,v;e.getRemoteUrl&&(Qt(t,"loading"),s=e.getRemoteUrl,u=i,d=function(n){var r=Qe.q.isFunction(e.formatRemoteSuggestions)?e.formatRemoteSuggestions(n):n;r.length||!e.getEmptyStateComponent?t((function(e){return Object.assign(Object.assign({},e),Bt(Bt({},At.Remote,r),At.Generic,[]))})):Qt(t,"empty")},f=function(){Qt(t,"errored")},p=e.requestHeaders,g=e.getRemotePostBody,(v=Qe.q.isFunction(s)&&s(u))&&(g?m.a.ajaxRequest({resource:v,type:I.k.POST,success:d,error:f,headers:p,data:g(u)}):m.a.ajaxRequest({resource:v,type:I.k.GET,success:d,error:f,headers:p})))}}}function Kt(e,t){return Wt(t,e)?a.createElement(a.Fragment,null,t[e]):a.createElement(a.Fragment,null)}function Xt(e,t,n,r,a){var o=function(t){var n=e[t];return n?n.map((function(e){return Object.assign(Object.assign({},e),{suggestionType:t})})):[]},i=o(At.Recent),c=o(At.Local),l=o(At.Remote),s=o(At.Generic);if(s.length)return[{data:s,suggestionType:At.Generic}];if(Qe.q.isFunction(r))return r([].concat(_t(c),_t(l),_t(i)));var u=[];return((null==c?void 0:c.length)||(null==l?void 0:l.length))&&u.push({title:t,data:Yt([].concat(_t(c),_t(l)),a),suggestionType:At.Local}),(null==i?void 0:i.length)&&u.push({title:n,data:Yt(i,a),suggestionType:At.Recent}),u}function Yt(e,t){return"boolean"==typeof t||e.length<=t?e:e.slice(0,t)}function $t(e){return e.data}function Jt(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)||en(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 en(e,t){if(e){if("string"==typeof e)return tn(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)?tn(e,t):void 0}}function tn(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"}(At||(At={}));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},rn="shared.searchBar",an=Qe.q.isFunction;function on(e){return e.renderAsForm?a.createElement("form",{onSubmit:e.onSubmit},e.children):a.createElement("div",{className:"w-100"},e.children)}function cn(e){var t=Ht(e.initialLocalSuggestions,e.recentSearches),n=Jt(a.useState(e.initialQuery||""),2),r=n[0],o=n[1],i=Jt(a.useState(t),2),c=i[0],s=i[1],u=a.useRef();!function(e){var t,n,r=(t=(0,Ut.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)||qt(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.")}()),o=r[0],i=r[1];a.useEffect((function(){o.focus&&(null==e?void 0:e.current)&&(e.current.focus(),i({focus:!1}))}),[o.focus]),o.focus}(u);var m=Jt(a.useState(e.initialQuery||""),2),d=m[0],f=m[1],p=Jt(a.useState("none"),2),g=p[0],v=p[1],h=(0,Ft.a)(Pt.r.XS);a.useEffect((function(){if(!r.length){var t=Ht(e.initialLocalSuggestions,e.recentSearches);s(t)}}),[e.initialLocalSuggestions,e.recentSearches]),a.useEffect((function(){var t=e.initialQuery||"";r!==t&&(o(t),f(t))}),[e.initialQuery]),a.useEffect((function(){u.current&&e.autoFocusInput&&u.current.focus()}),[e.autoFocusInput]);var y=function(){var t=Ht(e.initialLocalSuggestions,e.recentSearches);s(t)},b=function(){o(""),f("")};!function(e,t,n){a.useEffect((function(){e&&!e.current&&(e.current={resetQuery:t,setQuery:n})}),[null==e?void 0:e.current])}(e.controlsRef,b,o);var E,S,w,C,O,I=function(){v("none")},x=function(t){t.preventDefault(),an(e.onSubmit)&&e.onSubmit(r),e.clearQueryOnSelect&&b()},N=a.useMemo((function(){return e.debounceTime?Qe.q.debounce(Zt(e,s,y),e.debounceTime):Zt(e,s,y)}),[e.debounceTime].concat(function(e){if(Array.isArray(e))return tn(e)}(E=e.onSuggestionDependencies)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(E)||en(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 T(){return"boolean"==typeof e.alwaysRenderSuggestions?e.alwaysRenderSuggestions:!!(e.alwaysRenderSuggestionsWhenFocused&&r.length>=e.activationLength)&&document.activeElement===u.current}return a.createElement(on,{onSubmit:x,renderAsForm:!!e.renderAsForm},a.createElement(xt,Object.assign({ref:function(e){null===e||u.current||(u.current=e.input)},suggestions:Xt(c,e.suggestionsHeading,e.recentSearchHeading||l.T.getPhrase(rn,"recentSearchesHeading"),e.getSections,e.suggestionLimit),onSuggestionsFetchRequested:N,onSuggestionHighlighted:function(e){var t=e.suggestion;("none"!==g||t)&&v(t?"suggestion":"custom")},onSuggestionsClearRequested:function(){T()||y()},onSuggestionSelected:function(t,n){var r=n.suggestion;r.generic||(e.clearQueryOnSelect&&b(),e.onSuggestionSelected(r,u.current))},getSuggestionValue:function(t){return function(t){return an(e.shouldUpdateQueryOnSelection)?e.shouldUpdateQueryOnSelection(t):e.shouldUpdateQueryOnSelection}(t)?function(e,t){return Wt(t,e)?t[e]:""}(e.valueKey,t):r},renderSuggestion:function(t){if(t.generic){if("empty"===t.type)return r.length>=e.activationLength&&an(e.getEmptyStateComponent)?e.getEmptyStateComponent(r):a.createElement(a.Fragment,null);if("errored"===t.type&&an(e.getErrorStateComponent)){var n=Zt(e,s,y);return e.getErrorStateComponent((function(){return n({value:r,reason:"input-changed"})}))}if("loading"===t.type)return o=e.loadingComponentClassName,a.createElement("div",{className:"d-flex justify-content-center cursor-default ".concat(null!=o?o:""),onClick:function(e){e.stopPropagation()}},a.createElement(et.Z,{as:"span",animation:"border",role:"status"}))}var o;return an(e.getSuggestionComponent)?e.getSuggestionComponent(t):Kt(e.valueKey,t)},renderSuggestionsContainer:function(t){var n=t.containerProps,o=n.ref,i=nn(n,["ref"]);if(!e.customScrollbarProps){var l={suggestions:c,query:r,isDropdownOpen:!!t.children};return a.createElement("div",Object.assign({ref:o},i,{onMouseOut:I}),t.children,e.getCreateComponent&&e.getCreateComponent(Object.assign({userInput:d,isActive:"custom"===g,resetQuery:b,resetSuggestions:y},l)),e.getFooterComponent&&e.getFooterComponent(l))}return a.createElement(Nt.ZP,Object.assign({ref:o},e.customScrollbarProps,i),t.children)},alwaysRenderSuggestions:T(),focusInputOnSuggestionClick:!h&&e.focusInputOnSuggestionClick,inputProps:{placeholder:e.placeholder||l.T.getPhrase(rn,"placeholder"),value:r,onChange:function(t,n){var r=n.newValue,a=n.method;"type"===a&&f(r),"escape"===a&&v("none"),["up","down"].includes(a)||(o(r),an(e.onQueryChange)&&e.onQueryChange(r))},onKeyDown:function(t){8===t.keyCode&&e.onBackspace&&!r&&e.onBackspace()},autoFocus:!!e.autoFocusInput,highlightOnFocus:e.highlightInputOnFocus,onClickSearchIcon:!!e.submitOnClickSearchIcon&&x,searchIconPlacement:e.searchIconPlacement,showClearInputIcon:!!e.showClearInputIcon&&!!r.length,onClickClearInput:function(){b(),an(e.onClickClearInput)&&e.onClickClearInput()},formSize:e.size,onBlur:function(){e.onBlur&&e.onBlur(r)},disabled:e.disabled},renderInputComponent:jt,theme:(S=e.theme,w=!!c.generic.length,C="function"==typeof S?S(w):S,O=function(e){return{container:"position-relative",suggestionsContainerOpen:"bg-white py-1 border rounded ".concat(Tt.suggestionsContainerOpen),suggestionsList:"list-unstyled m-0",suggestion:"".concat(e?"":"cursor-pointer"," py-1 px-2"),suggestionHighlighted:e?"":Tt.suggestionHighlighted,sectionContainer:"border-bottom py-1 ".concat(Tt.sectionContainer)}}(w),Object.assign(O,C)),multiSection:!0,renderSectionTitle:function(t){return an(e.renderSectionTitle)?e.renderSectionTitle(t,e.sectionTitleClassName):function(e,t){if(e.title)return a.createElement("div",{className:"pb-1 ".concat(null!=t?t:"")},a.createElement("strong",null,e.title))}(t,e.sectionTitleClassName)},getSectionSuggestions:$t},e.renderSuggestionsOnInputFocus?{shouldRenderSuggestions:function(){return an(e.renderSuggestionsOnInputFocus)?e.renderSuggestionsOnInputFocus(r):e.renderSuggestionsOnInputFocus}}:{})))}function ln(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}cn.defaultProps={valueKey:"name",activationLength:3,suggestionLimit:5,recentSearches:[],initialLocalSuggestions:[],searchIconPlacement:"right",renderAsForm:!0,onSuggestionDependencies:[],shouldUpdateQueryOnSelection:!0,focusInputOnSuggestionClick:!0};var sn=function(e,t){var n,r,o=(n=a.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 ln(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)?ln(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=o[0],c=o[1];return a.useEffect((function(){var n=setTimeout((function(){return c(e)}),t);return function(){return clearTimeout(n)}}),[e,t]),i};const un={emptyState:"bKTf0"};var mn="shared.typeaheadEmptyState";function dn(e){var t=e.query,n=void 0===t?"":t,r=e.imageUrl,o=sn(n,300);return a.createElement("div",{className:"d-flex flex-column align-items-center text-center",onClick:function(e){e.stopPropagation()}},a.createElement("img",{alt:"",role:"presentation",src:r,className:"pb-2 ".concat(un.emptyState)}),a.createElement("h2",{className:"h6"},a.createElement(h.x,{namespace:mn,phrase:"noResults",options:{query:o,smartCount:o.length}})))}const fn={emptyState:"k5mEG"};var pn="shared.typeaheadErrorState";function gn(e){return a.createElement("div",{className:"d-flex flex-column align-items-center text-center",onClick:function(e){e.stopPropagation()}},a.createElement("img",{alt:"",role:"presentation",src:e.imageUrl,className:"pb-2 ".concat(fn.emptyState)}),a.createElement("h2",{className:"h6"},a.createElement(h.x,{namespace:pn,phrase:"error"})),a.createElement(V.L,{onClick:function(t){t.stopPropagation(),e.onClickTryAgain()},className:"btn btn-link info-link p-0"},a.createElement(h.x,{namespace:pn,phrase:"tryAgain"})))}const vn={container:"Dc3kX",suggestionsContainerOpen:"c5t3e",selectionContainer:"kFjoN",sectionContainer:"mLrE3"};var hn="shared.tokenizedTypeahead";function yn(e){var t;return a.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&&a.createElement(Ce.x,{className:"svg-container m-1",svgName:Te.vn.Search}),a.createElement("div",{className:"".concat(vn.selectionContainer," d-flex flex-wrap align-items-center mt-n1")},e.selections.map((function(t){return e.getInputTokenComponent?e.getInputTokenComponent(t):a.createElement(mt,{key:t.id,selection:t,onClickRemove:e.removeSelection,onClickExpand:e.fetchSelectionMembers,hasStudentExperience:e.hasStudentExperience})})),a.createElement(cn,Object.assign({},e,{onBackspace:function(){e.selections.length&&e.removeSelection(ze.m.last(e.selections))},recentSearchHeading:e.recentSearchHeading||l.T.getPhrase(hn,"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):a.createElement(It,{entity:t,imageCdnUrl:e.imageCdnUrl,showDisplayName:e.hasStudentExperience})},getEmptyStateComponent:function(t){return a.createElement(dn,{query:t,imageUrl:e.emptyStateImageUrl})},getErrorStateComponent:function(t){return a.createElement(gn,{imageUrl:e.errorStateImageUrl,onClickTryAgain:t})},theme:{container:vn.container,suggestionsContainerOpen:"bg-white py-1 rounded border mt-1 ".concat(vn.suggestionsContainerOpen),sectionContainer:"border-bottom py-1 ".concat(vn.sectionContainer)},sectionTitleClassName:"ps-2",renderSuggestionsOnInputFocus:e.renderSuggestionsOnInputFocus,onSuggestionDependencies:[e.selections]}))),!!e.sharePermissionsDescription&&a.createElement("span",{className:"px-2 text-secondary text-nowrap"},e.sharePermissionsDescription))}yn.defaultProps={renderSuggestionsOnInputFocus:!0};var bn="shared.feedbackRequestLivestream",En=l.T.encloseNamespace(bn),Sn={topic:"",studentLevel:[],producerCompany:"",additionalInfo:""},wn=ne.Z_().max(oe,ie("maxCharactersError")),Cn=ne.Ry().shape({producerCompany:wn.required((function(){return En("companyError")})),topic:wn,studentLevel:ne.IX(ne.Z_()),additionalInfo:ce()}).noUnknown();function On(e){var t=(0,K.b)(),n=t.values.studentLevel.map((function(t){return e.audiences.find((function(e){return e.masterId.toString()===t.toString()}))}))||[];function r(e){t.setFieldValue("studentLevel",ze.m.addOrRemoveImmutable(t.values.studentLevel,e.masterId.toString())),requestAnimationFrame((function(){return t.setFieldTouched("studentLevel")}))}return a.createElement(a.Fragment,null,a.createElement(re.W,{placeholder:En("companyPlaceholder"),label:En("companyLabel"),name:"producerCompany",value:t.values.producerCompany,showRequiredStar:!0}),a.createElement(re.W,{placeholder:En("topicPlaceholder"),label:En("topicLabel"),name:"topic",value:t.values.topic}),a.createElement("div",{className:"form-group"},a.createElement("label",{className:"form-label"},a.createElement(h.x,{namespace:bn,phrase:"audiencesLabel"})),a.createElement(yn,{placeholder:En("audiencesPlaceholder"),local:e.audiences,valueKey:"masterId",selections:n,onSuggestionSelected:r,removeSelection:function(e){return r(e)},errorStateImageUrl:null,emptyStateImageUrl:null,activationLength:0,suggestionLimit:!1,getInputTokenComponent:function(e){return a.createElement(dt,{key:e.masterId,selection:{name:e.name,masterId:e.masterId},colourVariant:"teal",onClickRemove:function(e){return r(e)},hideExpander:!0})},getSuggestionComponent:function(e){return Kt("name",e)},onSuggestionDependencies:[e.audiences,t.values.studentLevel,n],getLocalSuggestions:function(e,t){var r=t.find((function(t){return t.name===e}));return zt(r?"":e,t,"name",0).filter((function(e){return!n.find((function(t){return t.masterId===e.masterId}))&&e.masterId!==(null==r?void 0:r.masterId)}))},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&&a.createElement("span",{className:"invalid-feedback"},t.errors.studentLevel)),a.createElement(re.W,{as:"textarea",placeholder:En("otherPlaceholder"),label:En("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo}))}function In(e){return a.createElement(zn,Object.assign({},e,{initialValues:Object.assign(Object.assign({},Sn),e.initialValues),validationSchema:Cn}),a.createElement(On,{audiences:e.audiences}))}const xn={image:"SdHLR"};function Nn(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 Tn="shared.feedbackBeforeRequesting",Rn=l.T.encloseNamespace(Tn);function kn(e){var t,n,r=(t=a.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 Nn(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)?Nn(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.")}()),o=r[0],i=r[1];return a.createElement(a.Fragment,null,a.createElement("div",{className:"d-flex flex-column align-items-center my-4"},a.createElement("img",{className:"".concat(xn.image," mb-3"),src:B.videoAlert}),a.createElement("h4",{className:"mb-3"},a.createElement(h.x,{namespace:Tn,phrase:"beforeRequesting"})),a.createElement("p",null,a.createElement(h.x,{namespace:Tn,phrase:"haveYouSearched"}))),a.createElement(X.u,null,a.createElement(X.u.Checkbox,{id:"confirmExchange",checked:o,onToggle:function(){return i(!o)},label:Rn("exchangeCheck")}),a.createElement(X.u.Cancel,{onClick:function(){return e.setSelectedOption(null)},text:Rn("back")}),a.createElement(X.u.Submit,{variant:"dark",text:Rn("continue"),disabled:!o,onClick:function(){return e.setConfirmed(!0)}})))}function Ln(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,An="shared.feedbackRequestVideo",Pn=l.T.encloseNamespace(An);!function(e){e.VideosTopic="videosTopic",e.VideoOrSeries="videoOrSeries"}(jn||(jn={}));var Fn={videoRequestType:"",topic:"",studentLevel:[],videoTitle:"",seriesName:"",producerCompany:"",websiteOrTrailer:"",additionalInfo:""},Un=function(){return ne.Z_().max(oe,ie("maxCharactersError"))},Vn=ne.Ry().shape({videoRequestType:ne.Z_().required(),topic:Un().when("videoRequestType",{is:function(e){return e===jn.VideosTopic},then:Un().required(Pn("topicRequiredError")),otherwise:Un().notRequired()}),studentLevel:ne.IX(ne.Z_()),videoTitle:Un().when(["videoRequestType","seriesName"],{is:function(e,t){return e===jn.VideoOrSeries&&!t},then:Un().required(Pn("videoRequiredError")),otherwise:Un().notRequired()}),seriesName:Un(),producerCompany:Un(),websiteOrTrailer:Un(),additionalInfo:ce()}).noUnknown();function Gn(e){var t=(0,K.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.masterId==+t}))}))||[];function r(e){t.setFieldValue("studentLevel",ze.m.addOrRemoveImmutable(t.values.studentLevel,e.masterId.toString())),requestAnimationFrame((function(){return t.setFieldTouched("studentLevel")}))}return a.createElement(a.Fragment,null,a.createElement(re.W,{as:"select",label:Pn("videoRequestTypeLabel"),name:"videoRequestType",value:t.values.videoRequestType},a.createElement("option",{value:""},Pn("videoRequestTypePlaceholder")),a.createElement("option",{value:jn.VideosTopic},Pn("videosTopicType")),a.createElement("option",{value:jn.VideoOrSeries},Pn("videoOrSeriesType"))),t.values.videoRequestType===jn.VideosTopic&&a.createElement(a.Fragment,null,a.createElement(re.W,{placeholder:Pn("videoTopicPlaceholder"),label:Pn("videoTopicLabel"),name:"topic",value:t.values.topic,showRequiredStar:!0}),a.createElement("div",{className:"form-group"},a.createElement("label",{className:"form-label"},a.createElement(h.x,{namespace:An,phrase:"audiencesLabel"})),a.createElement(yn,{placeholder:Pn("audiencesPlaceholder"),local:e.audiences,valueKey:"masterId",selections:n,onSuggestionSelected:r,removeSelection:function(e){return r(e)},errorStateImageUrl:null,emptyStateImageUrl:null,activationLength:0,suggestionLimit:!1,getInputTokenComponent:function(e){return a.createElement(dt,{key:e.masterId,selection:{name:e.name,masterId:e.masterId},colourVariant:"teal",onClickRemove:function(e){return r(e)},hideExpander:!0})},getSuggestionComponent:function(e){return Kt("name",e)},onSuggestionDependencies:[e.audiences,t.values.studentLevel,n],getLocalSuggestions:function(e,t){var r=t.find((function(t){return t.name===e}));return zt(r?"":e,t,"name",0).filter((function(e){return!n.find((function(t){return t.masterId===e.masterId}))&&e.masterId!==(null==r?void 0:r.masterId)}))},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&&a.createElement("span",{className:"invalid-feedback"},t.errors.studentLevel)),a.createElement(re.W,{as:"textarea",placeholder:Pn("otherPlaceholder"),label:Pn("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})),t.values.videoRequestType===jn.VideoOrSeries&&a.createElement(a.Fragment,null,a.createElement(re.W,{placeholder:Pn("videoTitlePlaceholder"),label:Pn("videoTitleLabel"),name:"videoTitle",value:t.values.videoTitle}),a.createElement(re.W,{placeholder:Pn("seriesPlaceholder"),label:Pn("seriesLabel"),name:"seriesName",value:t.values.seriesName}),a.createElement(re.W,{placeholder:Pn("companyPlaceholder"),label:Pn("companyLabel"),name:"producerCompany",value:t.values.producerCompany}),a.createElement(re.W,{placeholder:Pn("videoTopicPlaceholder"),label:Pn("topicLabel"),name:"topic",value:t.values.topic}),a.createElement(re.W,{placeholder:Pn("websiteOrTrailerPlaceholder"),label:Pn("websiteOrTrailerLabel"),name:"websiteOrTrailer",value:t.values.websiteOrTrailer}),a.createElement(re.W,{as:"textarea",placeholder:Pn("otherPlaceholder"),label:Pn("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})))}function Mn(e){var t,n,r=(t=a.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 Ln(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)?Ln(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.")}()),o=r[0],i=r[1],c=e.hasExchangeTvProduct&&!o;return a.createElement(zn,Object.assign({},e,{initialValues:Object.assign(Object.assign({},Fn),e.initialValues),validationSchema:Vn,hideButtons:e.hasExchangeTvProduct&&!o}),c&&a.createElement(kn,{setConfirmed:i,setSelectedOption:e.setSelectedOption}),!c&&a.createElement(Gn,{audiences:e.audiences}))}var _n="shared.feedbackSuggestImprovement",qn=l.T.encloseNamespace(_n),Dn={suggestion:"",importance:""},Bn=ne.Ry().shape({suggestion:ce().required(ie("requiredError")),importance:ce()}).noUnknown();function Hn(e){var t=(0,K.b)();return a.createElement(a.Fragment,null,a.createElement(re.W,{as:"textarea",placeholder:qn("suggestionPlaceholder"),label:qn("suggestionLabel"),name:"suggestion",value:t.values.suggestion,showRequiredStar:!0}),a.createElement(re.W,{as:"textarea",placeholder:qn("whySuggestionPlaceholder"),label:qn("whySuggestionLabel"),name:"importance",rows:5,value:t.values.importance}),a.createElement("p",null,a.createElement(h.x,{namespace:_n,phrase:"contactSupport"})," ",a.createElement("button",{className:"btn btn-link text-underline p-0",onClick:function(){return e.setSelectedOption(F.RAISE_ISSUE)}},a.createElement(h.x,{namespace:_n,phrase:"raiseIssue"}))))}function Wn(e){return a.createElement(zn,Object.assign({},e,{initialValues:Object.assign(Object.assign({},Dn),e.initialValues),validationSchema:Bn,successImageUrl:B.lightBulb,successHeading:qn("successHeading"),successDescription:qn("successDescription")}),a.createElement(Hn,{setSelectedOption:e.setSelectedOption}))}function zn(e){var t=a.useRef(null);return a.createElement(K.n,{onSubmit:e.onSubmit,initialValues:e.initialValues,validationSchema:e.validationSchema,validateOnMount:!0,innerRef:t},a.createElement(Z.l0,null,"form"===e.formStage&&e.children,a.createElement(te,{formStage:e.formStage,successImageUrl:e.successImageUrl,successHeading:e.successHeading,successDescription:e.successDescription}),!e.hideButtons&&a.createElement($,{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})))}function Qn(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 F.SUGGEST_IMPROVEMENT:return a.createElement(Wn,Object.assign({},t));case F.REPORT_BUG:return a.createElement(We,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 F.REQUEST_VIDEO:return a.createElement(Mn,Object.assign({},t,{audiences:e.audiences,hasExchangeTvProduct:e.hasExchangeTvProduct}));case F.REQUEST_LIVESTREAM:return a.createElement(In,Object.assign({},t,{audiences:e.audiences}));case F.RAISE_ISSUE:return a.createElement(we,Object.assign({},t));case F.GIVE_PRAISE:return a.createElement(de,Object.assign({},t));case F.OTHER:return a.createElement(he,Object.assign({},t))}}function Zn(e){return Zn="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},Zn(e)}function Kn(){Kn=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 k(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",f="suspendedYield",p="executing",g="completed",v={};function h(){}function y(){}function b(){}var E={};s(E,i,(function(){return this}));var S=Object.getPrototypeOf,w=S&&S(S(L([])));w&&w!==n&&r.call(w,i)&&(E=w);var C=b.prototype=h.prototype=Object.create(E);function O(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"==Zn(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===p)throw Error("Generator is already running");if(a===g){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=N(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=p;var s=m(t,n,r);if("normal"===s.type){if(a=r.done?g:f,s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=g,r.method="throw",r.arg=s.arg)}}}function N(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,N(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=m(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;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,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function T(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 R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function L(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(Zn(t)+" is not iterable")}return y.prototype=b,a(C,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:y,configurable:!0}),y.displayName=s(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,l,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},O(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()}))},O(C),s(C,l,"Generator"),s(C,i,(function(){return this})),s(C,"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=L,k.prototype={constructor:k,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(R),!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,v):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),v},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),R(n),v}},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;R(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Xn(e){return function(e){if(Array.isArray(e))return Jn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$n(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 Yn(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)||$n(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 $n(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}var er=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())}))},tr="shared.giveFeedback",nr=l.T.encloseNamespace(tr),rr=5,ar=60,or=1e6;function ir(e){var t,n,i=(0,R.Z)(),l=(0,s.useGetFetchAsync)(),E=m.a.useBasicFetch(T.N.currentUser()),w=m.a.useBasicFetch(E.data&&O.h.customer(E.data.customerId)),I=Yn(a.useState(null),2),j=I[0],A=I[1],P=Yn(a.useState("form"),2),V=P[0],G=P[1],M=Yn(a.useState(null),2),q=M[0],D=M[1],B=(0,u.G)(b.D.MixedMediaUpload),H=function(e,t){var n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],c=(r=a.useState(!1),o=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,o)||function(e,t){if(e){if("string"==typeof e)return k(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)?k(e,t):void 0}}(r,o)||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 a.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 B.getCollection()}),null),W=a.useRef(),z=a.useRef(0),Z=a.useRef([]),K=Yn(a.useState([]),2),X=K[0],Y=K[1],$=Yn(a.useState(""),2),J=$[0],ee=$[1],te=m.a.useBasicFetch(C.presentationAudiences()),ne=null===(t=m.a.useBasicFetch(N.h.userProducts()).data)||void 0===t?void 0:t.find((function(e){return e.id===S.x.Exchange}));function re(e){A(e),e&&d.k.logUserAction({type:e},{actionType:f.Vw.Click,entity:f.py.Feedback,location:f.LZ.GiveFeedbackPopup,workflowPhase:f.eu.Start})}function ae(e){switch(e){case F.SUGGEST_IMPROVEMENT:return r.SuggestImprovement;case F.REPORT_BUG:return r.ReportBug;case F.REQUEST_VIDEO:case F.REQUEST_LIVESTREAM:return r.RequestVideo;case F.GIVE_PRAISE:return r.GivePraise;case F.RAISE_ISSUE:return r.RaiseIssue;case F.OTHER:return r.Other}}return(0,L.L)(o.Radio.channel(y.Q4.MIXED_MEDIA_UPLOAD),p.S.UPLOAD_COMPLETE,(function(e){var t=e.toJSON();if(Z.current.push(t),z.current--,!(z.current>0)){var n=Z.current.length;Z.current.forEach((function(e){setTimeout((function(){n--;var t=B.getCollection().filter((function(t){var n;return(null===(n=t.get("fileInfo"))||void 0===n?void 0:n.id)===e.fileInfo.id}));B.getCollection().remove(t),Y((function(e){return[].concat(Xn(e),Xn(t))})),n>0||(d.k.logUserAction({fileInfo:e.fileInfo},{location:f.LZ.GiveFeedbackPopup,actionType:f.Vw.Upload,entity:f.py.MixedMedia,descriptor:d.k.mapInteractionType(W.current)}),i.success(nr("mixedMediaUploadSuccess")))}))})),Z.current=[]}})),a.createElement(v.G,{size:"lg",title:j?_(j):nr("title"),closePopup:e.closePopup,backdrop:"static"},!j&&a.createElement("p",null,a.createElement(h.x,{namespace:tr,phrase:"description"})),!j&&a.createElement(Q,{onSelectOption:re,options:[F.SUGGEST_IMPROVEMENT,F.REPORT_BUG,e.product===S.x.StreamableLearning?F.REQUEST_LIVESTREAM:F.REQUEST_VIDEO,F.GIVE_PRAISE,F.RAISE_ISSUE,F.OTHER]}),j&&a.createElement(Qn,{selectedOption:j,formStage:V,onSubmit:function(t,n){return er(this,void 0,void 0,Kn().mark((function r(){var a,o;return Kn().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={type:ae(j),user:U.getUserInfo(E.data,w.data),tags:U.getTags(E.data,e.product,!1,["give feedback",_(j).toLowerCase()])},o=Object.assign({},t),j===F.REPORT_BUG&&X.length&&(o=Object.assign(Object.assign({},o),U.categorizeFiles(X))),r.prev=3,r.next=6,l(x.submitFeedback(a,o));case 6:d.k.logUserAction(Object.assign(Object.assign({},a),o),{actionType:f.Vw.Submit,entity:f.py.Feedback,location:f.LZ.GiveFeedbackPopup,workflowPhase:f.eu.Complete}),G("success"),r.next=13;break;case 10:r.prev=10,r.t0=r.catch(3),i.error(nr("error"));case 13:return r.prev=13,n(),r.finish(13);case 16:case"end":return r.stop()}}),r,null,[[3,10,13,16]])})))},setSelectedOption:re,closePopup:e.closePopup,onFilesAdded:function(e,t){e.some((function(e){return e.size>ar*or}))?ee(nr("maxFileSizeUploadError",{limit:ar})):e.length>rr-H.length?ee(nr("maxFilesUploadError",{limit:rr})):e.some((function(e){return!c().isValidFile(e,g.l.MIXED_MEDIA)}))?ee(nr("invalidTypeUploadError")):(ee(""),z.current+=e.length,t&&(W.current=t),B.addFiles(e))},uploadingFiles:H,uploadedFiles:X,deleteFile:function(e){Y((function(t){return t.filter((function(t){return t.id!==e}))}))},cancelUpload:function(e){return B.cancelUpload(e)},audiences:te.data,uploadError:J,initialValues:q,setFormState:D,instanceRegion:null===(n=E.data)||void 0===n?void 0:n.instanceRegion,hasExchangeTvProduct:!!ne}))}}}]);