@clickview/library-editor 1.47.1-rc.0 → 1.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/languages/en.json +1 -1
- package/dist/scripts/471-2029659469.chunk.js +2 -0
- package/dist/scripts/{61-1d4ee21678.chunk.js → 61-dbee7e9da6.chunk.js} +2 -2
- package/dist/scripts/7120-da47d09c39.chunk.js +1 -0
- package/dist/scripts/7789-c4bd795190.chunk.js +2 -0
- package/dist/scripts/bundle-5bf6e08e0d.min.js +2 -0
- package/package.json +1 -1
- package/dist/scripts/1260-bc0f036b09.chunk.js +0 -1
- package/dist/scripts/471-e7cf75c297.chunk.js +0 -2
- package/dist/scripts/7789-257e45b797.chunk.js +0 -2
- package/dist/scripts/bundle-4af73ec3bf.min.js +0 -2
- /package/dist/css/{1260-library-editor-826bc90b86.chunk.css → 7120-library-editor-826bc90b86.chunk.css} +0 -0
- /package/dist/scripts/{471-e7cf75c297.chunk.js.LICENSE.txt → 471-2029659469.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{61-1d4ee21678.chunk.js.LICENSE.txt → 61-dbee7e9da6.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{7789-257e45b797.chunk.js.LICENSE.txt → 7789-c4bd795190.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-4af73ec3bf.min.js.LICENSE.txt → bundle-5bf6e08e0d.min.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 7789-257e45b797.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7789],{54096:function(e,t,r){r.d(t,{G:function(){return i}});var n=r(1024),a=r(21679);function i(e){var t,r;return t=e,r=a.u.getInstance(t),n.useEffect((function(){return function(){a.u.releaseInstance(t)}})),r}},38182:function(e,t,r){r.d(t,{q:function(){return s}});var n=r(1024),a=r.n(n),i=r(68003),o=r(88483),l=r(87013),c={avatar:"Gvwzj",dot:"JJHBJ"};function s(e){var t,r,n=e.imageUrl||(t=e.imageCdnUrl,(r=e.initials)?l.j.createUrl(i._.safeUrlConcat(t,"/v1/profile-images?initials=".concat(r)),{size:o.h2.Small}):"");return a().createElement("div",{className:"position-relative h-100 w-100"},a().createElement("div",{className:"".concat(c.avatar," ").concat((null==e?void 0:e.extraClasses)||""),style:{backgroundImage:"url('".concat(n,"')")}}," "),e.showDot&&a().createElement("div",{className:"".concat(c.dot," rounded-circle bg-danger")}))}},8371:function(e,t,r){var n;r.d(t,{b:function(){return n}}),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"}(n||(n={}))},90547:function(e,t,r){var n;r.d(t,{r:function(){return n}}),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)"}(n||(n={}))},34254:function(e,t,r){var n;r.d(t,{r:function(){return n}}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(n||(n={}))},2491:function(e,t,r){r.d(t,{Z:function(){return o}});var n=r(92159),a=r(21186),i=r(54096);function o(){var e=(0,i.G)(n.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})}}}},32557:function(e,t,r){r.d(t,{X:function(){return h},L:function(){return g}});var n=r(1024),a=r.n(n),i=r(53808),o=r(85887),l=function(){var e=a().useRef(!0);return a().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 r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(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 s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var u=275,d=5,m={className:"",delay:0,style:null},p={screenX:0,screenY:0};function f(e,t){var r;e.current&&(t.className&&(null===(r=e.current.classList)||void 0===r||r.add(t.className)),t.style&&Object.keys(t.style).forEach((function(r){e.current.style[r]=t.style[r]})))}function v(e,t){var r;e.current&&(t.className&&(null===(r=e.current.classList)||void 0===r||r.remove(t.className)),t.style&&Object.keys(t.style).forEach((function(t){e.current.style[t]=null})))}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,t=l(),r=c(n.useState(e),2),a=r[0],s=r[1],u=c(n.useState(!1),2),d=u[0],p=u[1],h=n.useRef(null);n.useEffect((function(){o.t.isEqual(e,a)||s(e)}),[e]);var g=i.q.throttle((function(){f(h,a),t.current&&p(!0)}),a.delay,{leading:!1}),b=function(){i.q.isFunction(g.cancel)&&g.cancel(),v(h,a),t.current&&p(!1)};return n.useLayoutEffect((function(){var e=h.current;if(e)return e.addEventListener("mouseenter",g),e.addEventListener("mouseleave",b),function(){e.removeEventListener("mouseenter",g),e.removeEventListener("mouseleave",b)}}),[h.current,a]),[h,d]}function g(e){var t=c(n.useState(e),2),r=t[0],a=t[1],l=n.useRef(Object.assign({},p)),s=n.useRef(!1),m=n.useRef(0),h=n.useRef(null),g=c(n.useState(!1),2),b=g[0],y=g[1];function E(){m.current&&(window.clearTimeout(m.current),m.current=0)}function S(){s.current=!0}function w(e){if(s.current){var t,n,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)>d||Math.abs(e.screenY-t.screenY)>d}(a,e)&&E(),t=function(){f(h,r),y(!0)},n=r.delay||u,m.current||(m.current=window.setTimeout(t,n))}}function I(){E(),v(h,r),s.current=!1,y(!1)}return n.useEffect((function(){o.t.isEqual(e,r)||a(e)}),[e]),n.useLayoutEffect((function(){if(h.current){var e=i.q.throttle(w,25,{leading:!1});return h.current.addEventListener("mouseenter",S),h.current.addEventListener("mousemove",e),h.current.addEventListener("mouseleave",I),function(){h.current&&(h.current.removeEventListener("mouseenter",S),h.current.removeEventListener("mousemove",e),h.current.removeEventListener("mouseleave",I))}}}),[h.current,r]),[h,b]}},38e3:function(e,t,r){r.d(t,{G:function(){return a}});var n=r(74421),a={isType:function(e,t){return(null==e?void 0:e.typeId)===t},isResource:function(e){return a.isType(e,n.E.Resource)},isClassification:function(e){return"Subject"===e.type}}},25150:function(e,t,r){r.r(t),r.d(t,{GiveFeedbackView:function(){return Dt}});var n,a=r(1024),i=r.n(a),o=r(48088),l=r(53301),c=r.n(l),s=r(52765),u=r(57857),d=r(3026),m=r(54096),p=r(86120),f=r(52076),v=r(70065),h=r(81937),g=r(18222),b=r(71575),y=r(66703),E=r(69184),S=r(11543);!function(e){e[e.Other=0]="Other",e[e.SuggestImprovement=1]="SuggestImprovement",e[e.ReportBug=2]="ReportBug",e[e.RequestVideo=3]="RequestVideo",e[e.RaiseIssue=4]="RaiseIssue",e[e.GivePraise=5]="GivePraise",e[e.Footer=6]="Footer",e[e.RequestLivestream=7]="RequestLivestream"}(n||(n={}));var w=r(48050),I=r(84868),O=r(68003),R={presentationAudiences:function(e,t){var r=t||w.R.Subject.toLowerCase(),n={type:r,presentationId:e};return{bootstrapName:"presentationAudiences",url:O._.urlBuilder("/api/domain/v1/subjects/audiences",n),publicUrl:O._.urlBuilder("/api/subjects/presentation/".concat(e,"/audiences"),n),key:"presentation:audiences:".concat(e,":").concat(r),normalize:!1}},audiencesByPresentationId:function(e){return{url:"/api/domain/v1/subjects/presentations/".concat(e,"/audiences"),publicUrl:O._.urlBuilder("/api/subjects/presentation/".concat(e,"/audiences"),{type:w.R.Subject.toLowerCase(),presentationId:e}),key:"presentation:".concat(e,":audiences"),normalize:!1}}},T=r(57867),x=r(62709),L=r(2248),U={submitFeedback:function(e,t){return{url:"{gateway}/v1/feedback",key:"submit:feedback",type:L.k.POST,data:Object.assign(Object.assign({},e),t)}}},k=r(95644),N={userProducts:function(e,t){return{url:"{gateway}/v1/users/me/products",key:"user:products",normalizeOptions:{namespace:"product"},success:e,error:t,bootstrapName:k.h.PRODUCTS}}},A=r(15408),j=r(2491);function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var P=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i="string"==typeof e?o.Radio.channel(e):e;a.useEffect((function(){if(e)return i.on(t,r),function(){e&&i.off(t,r)}}),n)},_=r(8371),C=r(46237);function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var q,G={getUserInfo:function(e,t){return{id:e.id,username:e.username,email:e.email,userType:e.role===C.i.Admin?"Admin":"Staff",customerId:e.customerId,cvcId:t.crmId,customerName:t.name,instanceRegion:e.instanceRegion,contentRegion:e.contentRegion,firstName:e.givenName,lastName:e.familyName}},mapInstanceRegionToTag:function(e){switch(e){case _.b.AU:return"au";case _.b.NZ:return"nz";case _.b.UK:return"uk";case _.b.US:return"us"}},getTags:function(e,t,r,n){var a,i=[t].concat(function(e){if(Array.isArray(e))return V(e)}(a=n)||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 V(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?V(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.")}());i.push(r?"student":"staff"),e.role===C.i.Admin&&i.push("administrator");var o=G.mapInstanceRegionToTag(e.instanceRegion);return o&&i.push(o),i},categorizeFiles:function(e){return e.reduce((function(e,t){var r=t.get("fileInfo");return c().isValidFile(t.get("file"),g.l.VIDEO)?e.videoUrls.push(null==r?void 0:r.url):e.imageUrls.push(null==r?void 0:r.url),e}),{imageUrls:[],videoUrls:[]})}},M=r(58424),D=r(32557);!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"}(q||(q={}));var B=u.T.encloseNamespace("shared.feedbackFormTitles"),W=function(e){switch(e){case q.SUGGEST_IMPROVEMENT:case q.REPORT_BUG:case q.REQUEST_VIDEO:case q.REQUEST_LIVESTREAM:case q.GIVE_PRAISE:case q.RAISE_ISSUE:case q.OTHER:return B(e)}};function H(e){return H="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},H(e)}function Z(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=H(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=H(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==H(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var z=Z(Z(Z(Z(Z(Z(Z({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"},q.REQUEST_VIDEO,{default:"https://image.api.prd.cvnet.io/v2/images/G1YGdn",hover:"https://image.api.prd.cvnet.io/v2/images/K6yPxz"}),q.REQUEST_LIVESTREAM,{default:"https://image.api.prd.cvnet.io/v2/images/G1YGdn",hover:"https://image.api.prd.cvnet.io/v2/images/K6yPxz"}),q.SUGGEST_IMPROVEMENT,{default:"https://image.api.prd.cvnet.io/v2/images/g7aR1l",hover:"https://image.api.prd.cvnet.io/v2/images/zMR0Dk"}),q.RAISE_ISSUE,{default:"https://image.api.prd.cvnet.io/v2/images/5boW78",hover:"https://image.api.prd.cvnet.io/v2/images/m6yRKr"}),q.GIVE_PRAISE,{default:"https://image.api.prd.cvnet.io/v2/images/nE1mdz",hover:"https://image.api.prd.cvnet.io/v2/images/JjEnmR"}),q.REPORT_BUG,{default:"https://image.api.prd.cvnet.io/v2/images/AOdYpo",hover:"https://image.api.prd.cvnet.io/v2/images/yro9NM"}),q.OTHER,{default:"https://image.api.prd.cvnet.io/v2/images/Eoaykj",hover:"https://image.api.prd.cvnet.io/v2/images/wN59Zg"}),X={image:"_2jo0"};function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Y(e){var t,r,n=(t=(0,D.X)(),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return Q(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Q(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=n[0],o=n[1],l=z[e.option];return i().createElement(M.L,{ref:a,className:"col-lg-4 col-sm-6 col-12",onClick:function(){return e.onSelectOption(e.option)}},i().createElement("div",{className:"d-flex flex-column align-items-center h-100 rounded border py-3 gap-2"},i().createElement("img",{className:X.image,src:o?l.hover:l.default,alt:W(e.option)}),i().createElement("p",{className:"fw-semibold text-center mb-0"},W(e.option))))}function K(e){return i().createElement("div",{className:"row g-2"},e.options.map((function(t){return i().createElement(Y,{key:t,option:t,onSelectOption:e.onSelectOption})})))}var $=r(92802),J=r(86347),ee=r(83996),te=u.T.encloseNamespace("shared.feedbackButtons");function re(e){var t=(0,J.b)();return i().createElement(ee.u,null,"form"===e.formStage&&i().createElement(i().Fragment,null,i().createElement(ee.u.Cancel,{onClick:function(){return e.setSelectedOption(null)},text:te("cancel")}),i().createElement(ee.u.Submit,{variant:"dark",text:e.submitText||te("submit"),disabled:!t.isValid})),"success"===e.formStage&&i().createElement(ee.u.Cancel,{variant:"dark",text:te("close"),onClick:e.closePopup}))}var ne={successImage:"yp7vQ"},ae=u.T.encloseNamespace("shared.feedbackFormState");function ie(e){return"form"===e.formStage||"error"===e.formStage?i().createElement(i().Fragment,null):i().createElement("div",{className:"text-center"},i().createElement("div",{className:"mb-3"},i().createElement("img",{className:ne.successImage,src:e.successImageUrl||z.mailSent})),i().createElement("h4",{className:"mb-3"},e.successHeading||ae("successHeading")),i().createElement("p",{className:"mb-3"},e.successDescription||ae("successDescription")))}var oe=r(5173),le=r(63038),ce=u.T.encloseNamespace("shared.feedbackForm"),se=5e3,ue=function(e){switch(e){case"requiredError":return ce(e);case"minCharactersError":return ce(e,{limit:10});case"maxCharactersError":return ce("maxCharactersError",{limit:se})}},de=function(){return oe.Z_().min(10,ue("minCharactersError")).max(se,ue("maxCharactersError"))},me=u.T.encloseNamespace("shared.feedbackGivePraise"),pe={praise:""},fe=oe.Ry().shape({praise:de().required(ue("requiredError"))}).noUnknown();function ve(){var e=(0,J.b)();return i().createElement(i().Fragment,null,i().createElement(le.W,{as:"textarea",placeholder:me("givePraisePlaceholder"),label:me("givePraiseLabel"),name:"praise",rows:5,value:e.values.praise,showRequiredStar:!0}))}function he(e){return i().createElement(Lt,Object.assign({},e,{initialValues:Object.assign(Object.assign({},pe),e.initialValues),validationSchema:fe,successImageUrl:z.heartHands,successHeading:me("successHeading"),successDescription:me("successDescription")}),i().createElement(ve,null))}var ge=u.T.encloseNamespace("shared.feedbackOther"),be={feedback:""},ye=oe.Ry().shape({feedback:de().required(ue("requiredError"))}).noUnknown();function Ee(){var e=(0,J.b)();return i().createElement(i().Fragment,null,i().createElement(le.W,{as:"textarea",placeholder:ge("otherPlaceholder"),label:ge("otherLabel"),name:"feedback",rows:5,value:e.values.feedback,showRequiredStar:!0}))}function Se(e){return i().createElement(Lt,Object.assign({},e,{initialValues:Object.assign(Object.assign({},be),e.initialValues),validationSchema:ye}),i().createElement(Ee,null))}var we=u.T.encloseNamespace("shared.feedbackRaiseIssue"),Ie={issue:""},Oe=oe.Ry().shape({issue:de().required(ue("requiredError"))}).noUnknown();function Re(){var e=(0,J.b)();return i().createElement(i().Fragment,null,i().createElement(le.W,{as:"textarea",placeholder:we("raiseIssuePlaceholder"),label:we("raiseIssueLabel"),name:"issue",rows:5,value:e.values.issue,showRequiredStar:!0}))}function Te(e){return i().createElement(Lt,Object.assign({},e,{initialValues:Object.assign(Object.assign({},Ie),e.initialValues),validationSchema:Oe}),i().createElement(Re,null))}var xe=r(39396);function Le(e){return Le="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},Le(e)}function Ue(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=Le(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=Le(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Le(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ke=Ue(Ue(Ue(Ue({},_.b.AU,{phone:"02 9509 2600",email:"support@clickview.com.au",website:"https://www.clickviewsupport.com/hc"}),_.b.UK,{phone:"+44 (0)333 207 6595",email:"info@clickview.co.uk",website:"https://www.clickviewsupport.com/hc"}),_.b.NZ,{phone:"09 916 1156",email:"support@clickview.co.nz",website:"https://www.clickviewsupport.com/hc"}),_.b.US,{phone:"+1 312-292-9322",email:"info@clickvieweducation.com",website:"https://www.clickviewsupport.com/hc"}),Ne=r(63791),Ae=r(24064);function je(e){return i().createElement("span",{id:"".concat(e.name,"Error"),className:"".concat(e.className," invalid-feedback d-block"),role:"status"},e.children)}var Fe=r(76013),Pe={fileDrop:"vdCUc",resourcePreview:"tZQbH"};function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Ce="shared.feedbackFileUpload";function Ve(e){var t=(0,Ae.uI)({onDrop:function(t){return e.onFilesAdded(t,Fe.s.DragDrop)},noClick:!0,noKeyboard:!0,multiple:!!e.acceptMultiple,noDragEventsBubbling:!0}),r=t.getRootProps,n=t.getInputProps,i=t.isDragActive,o=a.useRef(null),l=a.useCallback((function(e){e&&(o.current=e)}),[]),c="".concat(Pe.fileDrop," text-center p-2 rounded-1");return e.uploadError&&(c+=" border-red"),i&&(c+=" border-blue bg-light-blue"),a.createElement(a.Fragment,null,a.createElement("div",Object.assign({},r({className:c})),a.createElement("img",{className:Pe.resourcePreview,src:e.imageUrl,draggable:!1}),a.createElement("div",{className:"position-relative"},i&&a.createElement("p",{className:"position-absolute font-size-md translate-middle top-50 start-50 mb-0"},a.createElement(y.x,{namespace:Ce,phrase:"dropUpload"})),a.createElement("div",{className:i?"opacity-0":""},a.createElement("p",{className:"mb-0"},a.createElement(y.x,{namespace:Ce,phrase:"dragDrop"})),a.createElement("button",{type:"button",className:"btn btn-link text-underline p-0",onClick:function(){o.current.value=null,o.current.click()}},a.createElement(y.x,{namespace:Ce,phrase:"upload"})))),a.createElement("input",{type:"file",name:"fileUpload",className:"file-select d-none",multiple:!!e.acceptMultiple,accept:e.mimeType,ref:l,onChange:function(t){return e.onFilesAdded(function(e){if(Array.isArray(e))return _e(e)}(r=t.target.files)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return _e(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_e(e,t):void 0}}(r)||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.")}(),Fe.s.FileSelect);var r},"aria-errormessage":"fileUploadError"}),a.createElement("input",Object.assign({},n()))),e.uploadError&&a.createElement(je,{name:"fileUpload"},e.uploadError))}var qe={progress:"PeDF6"};function Ge(e){var t=100===e.upload.progress;return a.createElement(a.Fragment,null,a.createElement("div",null,a.createElement(xe.x,{svgName:Ne.vn.Folder,className:"svg-container me-2"}),a.createElement("span",{className:"align-middle"},e.upload.name),t&&a.createElement(xe.x,{svgName:Ne.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(xe.x,{svgName:Ne.vn.Close}))),a.createElement("div",{className:"".concat(qe.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 Me(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,r){return a.createElement(Ge,{key:r,upload:t,cancelUpload:e.cancelUpload})}))):a.createElement(a.Fragment,null)}function De(e){return i().createElement("div",{className:"bg-gray-100 rounded p-2"},i().createElement(xe.x,{className:"d-inline-block align-middle svg-container icon-purple me-2",svgName:Ne.vn.FileImg}),i().createElement("span",{className:"align-middle"},e.file.get("name")),i().createElement("button",{className:"btn p-0 border-0 float-end",onClick:function(){return e.deleteFile(e.file.get("id"))}},i().createElement(xe.x,{svgName:Ne.vn.Delete})))}function Be(e){return i().createElement("div",{className:"d-flex flex-column gap-2"},e.uploadedFiles.map((function(t){return i().createElement(De,{key:t.id,file:t,deleteFile:e.deleteFile})})))}var We=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r},He="shared.feedbackReportBug",Ze=u.T.encloseNamespace(He),ze={issue:"",stepsToReproduce:""},Xe=oe.Ry().shape({issue:de().required(ue("requiredError")),stepsToReproduce:de()}).noUnknown();function Qe(e){var t=(0,J.b)();return i().createElement(i().Fragment,null,i().createElement("div",{className:"form-group"},i().createElement("label",{className:"form-label mb-1"},i().createElement(y.x,{namespace:He,phrase:"mixedMediaLabel"})),i().createElement("p",{className:"text-secondary font-size-sm"},i().createElement(y.x,{namespace:He,phrase:"mixedMediaDescription"})),i().createElement("div",{className:"mb-3"},i().createElement(Ve,{mimeType:g.l.MIXED_MEDIA,onFilesAdded:e.onFilesAdded,imageUrl:e.previewImageUrl,uploadError:e.uploadError,acceptMultiple:!0})),i().createElement(Me,{uploads:e.uploadingFiles,cancelUpload:e.cancelUpload}),i().createElement(Be,{uploadedFiles:e.uploadedFiles,deleteFile:e.deleteFile})),i().createElement(le.W,{as:"textarea",placeholder:Ze("issuePlaceholder"),label:Ze("issueLabel"),name:"issue",value:t.values.issue,showRequiredStar:!0}),i().createElement(le.W,{as:"textarea",placeholder:Ze("stepsPlaceholder"),label:Ze("stepsLabel"),name:"stepsToReproduce",value:t.values.stepsToReproduce}),i().createElement("div",{className:"rounded bg-light-yellow p-2 mb-3"},i().createElement("p",{className:"fw-semibold mb-2"},i().createElement(y.x,{namespace:He,phrase:"help"})),i().createElement("div",{className:"d-flex gap-1 mb-2"},i().createElement(xe.x,{svgName:Ne.vn.Link}),i().createElement("a",{href:ke[e.instanceRegion].website,target:"_blank",className:"text-underline"},i().createElement(y.x,{namespace:He,phrase:"visitHelpCentre"}))),i().createElement("p",{className:"mb-2"},i().createElement(y.x,{namespace:He,phrase:"supportTeam"})),i().createElement("div",{className:"d-flex gap-1 mb-2"},i().createElement(xe.x,{svgName:Ne.vn.Phone}),i().createElement("span",null,ke[e.instanceRegion].phone)),i().createElement("div",{className:"d-flex gap-1 mb-2"},i().createElement(xe.x,{svgName:Ne.vn.Email}),i().createElement("span",null,ke[e.instanceRegion].email))))}function Ye(e){var t=e.onFilesAdded,r=e.cancelUpload,n=e.uploadingFiles,a=e.uploadedFiles,o=e.deleteFile,l=We(e,["onFilesAdded","cancelUpload","uploadingFiles","uploadedFiles","deleteFile"]);return i().createElement(Lt,Object.assign({},l,{initialValues:Object.assign(Object.assign({},ze),e.initialValues),validationSchema:Xe,submitText:Ze("submit")}),i().createElement(Qe,{onFilesAdded:t,previewImageUrl:z.mediaPreview,cancelUpload:r,uploadingFiles:n,uploadedFiles:a,deleteFile:o,uploadError:e.uploadError,instanceRegion:e.instanceRegion}))}var Ke=r(40221),$e=r(39691),Je=r(71185),et=r(78523),tt="shared.feedbackRequestLivestream",rt=u.T.encloseNamespace(tt),nt={topic:"",studentLevel:[],producerCompany:"",additionalInfo:""},at=oe.Z_().max(se,ue("maxCharactersError")),it=oe.Ry().shape({producerCompany:at.required((function(){return rt("companyError")})),topic:at,studentLevel:oe.IX(oe.Z_()),additionalInfo:de()}).noUnknown();function ot(e){var t=(0,J.b)(),r=t.values.studentLevel.map((function(t){return e.audiences.find((function(e){return e.masterId.toString()===t.toString()}))}))||[];function n(e){t.setFieldValue("studentLevel",Ke.m.addOrRemoveImmutable(t.values.studentLevel,e.masterId.toString())),requestAnimationFrame((function(){return t.setFieldTouched("studentLevel")}))}return i().createElement(i().Fragment,null,i().createElement(le.W,{placeholder:rt("companyPlaceholder"),label:rt("companyLabel"),name:"producerCompany",value:t.values.producerCompany,showRequiredStar:!0}),i().createElement(le.W,{placeholder:rt("topicPlaceholder"),label:rt("topicLabel"),name:"topic",value:t.values.topic}),i().createElement("div",{className:"form-group"},i().createElement("label",{className:"form-label"},i().createElement(y.x,{namespace:tt,phrase:"audiencesLabel"})),i().createElement(Je.R,{id:"audiences",placeholder:rt("audiencesPlaceholder"),local:e.audiences,valueKey:"masterId",selections:r,onSuggestionSelected:n,removeSelection:function(e){return n(e)},errorStateImageUrl:null,emptyStateImageUrl:null,activationLength:0,suggestionLimit:!1,getInputTokenComponent:function(e){return i().createElement($e.D,{key:e.masterId,selection:{name:e.name,masterId:e.masterId},colourVariant:"teal",onClickRemove:function(e){return n(e)},hideExpander:!0})},getSuggestionComponent:function(e){return(0,et.Go)("name",e)},onSuggestionDependencies:[e.audiences,t.values.studentLevel,r],getLocalSuggestions:function(e,t){var n=t.find((function(t){return t.name===e}));return(0,et.Zo)(n?"":e,t,"name",0).filter((function(e){return!r.find((function(t){return t.masterId===e.masterId}))&&e.masterId!==(null==n?void 0:n.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&&i().createElement(je,{name:"audiences"},t.errors.studentLevel)),i().createElement(le.W,{as:"textarea",placeholder:rt("otherPlaceholder"),label:rt("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo}))}function lt(e){return i().createElement(Lt,Object.assign({},e,{initialValues:Object.assign(Object.assign({},nt),e.initialValues),validationSchema:it}),i().createElement(ot,{audiences:e.audiences}))}var ct={image:"SdHLR"};function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var ut="shared.feedbackBeforeRequesting",dt=u.T.encloseNamespace(ut);function mt(e){var t,r,n=(t=i().useState(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return st(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?st(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=n[0],o=n[1];return i().createElement(i().Fragment,null,i().createElement("div",{className:"d-flex flex-column align-items-center my-4"},i().createElement("img",{className:"".concat(ct.image," mb-3"),src:z.videoAlert}),i().createElement("h4",{className:"mb-3"},i().createElement(y.x,{namespace:ut,phrase:"beforeRequesting"})),i().createElement("p",null,i().createElement(y.x,{namespace:ut,phrase:"haveYouSearched",options:{exchangeUrl:"".concat(e.exchangeTvUrl,"/exchange")}}))),i().createElement(ee.u,null,i().createElement(ee.u.Checkbox,{id:"confirmExchange",checked:a,onToggle:function(){return o(!a)},label:dt("exchangeCheck")}),i().createElement(ee.u.Cancel,{onClick:function(){return e.setSelectedOption(null)},text:dt("back")}),i().createElement(ee.u.Submit,{variant:"dark",text:dt("continue"),disabled:!a,onClick:function(){return e.setConfirmed(!0)}})))}function pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var ft,vt="shared.feedbackRequestVideo",ht=u.T.encloseNamespace(vt);!function(e){e.VideosTopic="videosTopic",e.VideoOrSeries="videoOrSeries"}(ft||(ft={}));var gt={videoRequestType:"",topic:"",studentLevel:[],videoTitle:"",seriesName:"",producerCompany:"",websiteOrTrailer:"",additionalInfo:""},bt=function(){return oe.Z_().max(se,ue("maxCharactersError"))},yt=oe.Ry().shape({videoRequestType:oe.Z_().required(ht("videoRequestTypeRequiredError")),topic:bt().when("videoRequestType",{is:function(e){return e===ft.VideosTopic},then:bt().required(ht("topicRequiredError")),otherwise:bt().notRequired()}),studentLevel:oe.IX(oe.Z_()),videoTitle:bt().when(["videoRequestType","seriesName"],{is:function(e,t){return e===ft.VideoOrSeries&&!t},then:bt().required(ht("videoRequiredError")),otherwise:bt().notRequired()}),seriesName:bt(),producerCompany:bt(),websiteOrTrailer:bt(),additionalInfo:de()}).noUnknown();function Et(e){var t=(0,J.b)(),r=t.values.studentLevel.map((function(t){var r;return null===(r=e.audiences)||void 0===r?void 0:r.find((function(e){return+e.masterId==+t}))}))||[];function n(e){t.setFieldValue("studentLevel",Ke.m.addOrRemoveImmutable(t.values.studentLevel,e.masterId.toString())),requestAnimationFrame((function(){return t.setFieldTouched("studentLevel")}))}return i().createElement(i().Fragment,null,i().createElement(le.W,{as:"select",label:ht("videoRequestTypeLabel"),name:"videoRequestType",value:t.values.videoRequestType},i().createElement("option",{value:"",disabled:!0,hidden:!0},ht("videoRequestTypePlaceholder")),i().createElement("option",{value:ft.VideosTopic},ht("videosTopicType")),i().createElement("option",{value:ft.VideoOrSeries},ht("videoOrSeriesType"))),t.values.videoRequestType===ft.VideosTopic&&i().createElement(i().Fragment,null,i().createElement(le.W,{placeholder:ht("videoTopicPlaceholder"),label:ht("videoTopicLabel"),name:"topic",value:t.values.topic,showRequiredStar:!0}),i().createElement("div",{className:"form-group"},i().createElement("label",{className:"form-label"},i().createElement(y.x,{namespace:vt,phrase:"audiencesLabel"})),i().createElement(Je.R,{id:"audiences",placeholder:ht("audiencesPlaceholder"),local:e.audiences,valueKey:"masterId",selections:r,onSuggestionSelected:n,removeSelection:function(e){return n(e)},errorStateImageUrl:null,emptyStateImageUrl:null,activationLength:0,suggestionLimit:!1,getInputTokenComponent:function(e){return i().createElement($e.D,{key:e.masterId,selection:{name:e.name,masterId:e.masterId},colourVariant:"teal",onClickRemove:function(e){return n(e)},hideExpander:!0})},getSuggestionComponent:function(e){return(0,et.Go)("name",e)},onSuggestionDependencies:[e.audiences,t.values.studentLevel,r],getLocalSuggestions:function(e,t){var n=t.find((function(t){return t.name===e}));return(0,et.Zo)(n?"":e,t,"name",0).filter((function(e){return!r.find((function(t){return t.masterId===e.masterId}))&&e.masterId!==(null==n?void 0:n.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&&i().createElement(je,{name:"audiences"},t.errors.studentLevel)),i().createElement(le.W,{as:"textarea",placeholder:ht("otherPlaceholder"),label:ht("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})),t.values.videoRequestType===ft.VideoOrSeries&&i().createElement(i().Fragment,null,i().createElement(le.W,{placeholder:ht("videoTitlePlaceholder"),label:ht("videoTitleLabel"),name:"videoTitle",value:t.values.videoTitle}),i().createElement(le.W,{placeholder:ht("seriesPlaceholder"),label:ht("seriesLabel"),name:"seriesName",value:t.values.seriesName}),i().createElement(le.W,{placeholder:ht("companyPlaceholder"),label:ht("companyLabel"),name:"producerCompany",value:t.values.producerCompany}),i().createElement(le.W,{placeholder:ht("videoTopicPlaceholder"),label:ht("topicLabel"),name:"topic",value:t.values.topic}),i().createElement(le.W,{placeholder:ht("websiteOrTrailerPlaceholder"),label:ht("websiteOrTrailerLabel"),name:"websiteOrTrailer",value:t.values.websiteOrTrailer}),i().createElement(le.W,{as:"textarea",placeholder:ht("otherPlaceholder"),label:ht("otherLabel"),name:"additionalInfo",value:t.values.additionalInfo})))}function St(e){var t,r,n=(t=i().useState(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return pt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pt(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=n[0],o=n[1],l=e.hasExchangeTvProduct&&!a;return i().createElement(Lt,Object.assign({},e,{initialValues:Object.assign(Object.assign({},gt),e.initialValues),validationSchema:yt,hideButtons:e.hasExchangeTvProduct&&!a}),l&&i().createElement(mt,{setConfirmed:o,setSelectedOption:e.setSelectedOption,exchangeTvUrl:e.exchangeTvUrl}),!l&&i().createElement(Et,{audiences:e.audiences}))}var wt="shared.feedbackSuggestImprovement",It=u.T.encloseNamespace(wt),Ot={suggestion:"",importance:""},Rt=oe.Ry().shape({suggestion:de().required(ue("requiredError")),importance:de()}).noUnknown();function Tt(e){var t=(0,J.b)();return i().createElement(i().Fragment,null,i().createElement(le.W,{as:"textarea",placeholder:It("suggestionPlaceholder"),label:It("suggestionLabel"),name:"suggestion",value:t.values.suggestion,showRequiredStar:!0}),i().createElement(le.W,{as:"textarea",placeholder:It("whySuggestionPlaceholder"),label:It("whySuggestionLabel"),name:"importance",rows:5,value:t.values.importance}),i().createElement("p",null,i().createElement(y.x,{namespace:wt,phrase:"contactSupport"})," ",i().createElement("button",{className:"btn btn-link text-underline p-0",onClick:function(){return e.setSelectedOption(q.RAISE_ISSUE)}},i().createElement(y.x,{namespace:wt,phrase:"raiseIssue"}))))}function xt(e){return i().createElement(Lt,Object.assign({},e,{initialValues:Object.assign(Object.assign({},Ot),e.initialValues),validationSchema:Rt,successImageUrl:z.lightBulb,successHeading:It("successHeading"),successDescription:It("successDescription")}),i().createElement(Tt,{setSelectedOption:e.setSelectedOption}))}function Lt(e){var t=i().useRef(null);return i().createElement(J.n,{onSubmit:e.onSubmit,initialValues:e.initialValues,validationSchema:e.validationSchema,validateOnMount:!0,innerRef:t},i().createElement($.l0,null,"form"===e.formStage&&e.children,i().createElement(ie,{formStage:e.formStage,successImageUrl:e.successImageUrl,successHeading:e.successHeading,successDescription:e.successDescription}),!e.hideButtons&&i().createElement(re,{setSelectedOption:function(r){e.setFormState((function(e){var r;return Object.assign(Object.assign({},e),null===(r=t.current)||void 0===r?void 0:r.values)})),e.setSelectedOption(r)},submitText:e.submitText,formStage:e.formStage,closePopup:e.closePopup})))}function Ut(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 q.SUGGEST_IMPROVEMENT:return i().createElement(xt,Object.assign({},t));case q.REPORT_BUG:return i().createElement(Ye,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 q.REQUEST_VIDEO:return i().createElement(St,Object.assign({},t,{audiences:e.audiences,hasExchangeTvProduct:e.hasExchangeTvProduct,exchangeTvUrl:e.exchangeTvUrl}));case q.REQUEST_LIVESTREAM:return i().createElement(lt,Object.assign({},t,{audiences:e.audiences}));case q.RAISE_ISSUE:return i().createElement(Te,Object.assign({},t));case q.GIVE_PRAISE:return i().createElement(he,Object.assign({},t));case q.OTHER:return i().createElement(Se,Object.assign({},t))}}function kt(e){return kt="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},kt(e)}function Nt(){Nt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),l=new k(n||[]);return a(o,"_invoke",{value:T(e,r,l)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var m="suspendedStart",p="suspendedYield",f="executing",v="completed",h={};function g(){}function b(){}function y(){}var E={};s(E,o,(function(){return this}));var S=Object.getPrototypeOf,w=S&&S(S(N([])));w&&w!==r&&n.call(w,o)&&(E=w);var I=y.prototype=g.prototype=Object.create(E);function O(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function r(a,i,o,l){var c=d(e[a],e,i);if("throw"!==c.type){var s=c.arg,u=s.value;return u&&"object"==kt(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,o,l)}),(function(e){r("throw",e,o,l)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return r("throw",e,o,l)}))}l(c.arg)}var i;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return i=i?i.then(a,a):a()}})}function T(t,r,n){var a=m;return function(i,o){if(a===f)throw Error("Generator is already running");if(a===v){if("throw"===i)throw o;return{value:e,done:!0}}for(n.method=i,n.arg=o;;){var l=n.delegate;if(l){var c=x(l,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===m)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var s=d(t,r,n);if("normal"===s.type){if(a=n.done?v:p,s.arg===h)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=v,n.method="throw",n.arg=s.arg)}}}function x(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,x(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=d(a,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,h;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,h):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,h)}function L(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 U(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function N(t){if(t||""===t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(kt(t)+" is not iterable")}return b.prototype=y,a(I,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:b,configurable:!0}),b.displayName=s(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,s(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},O(R.prototype),s(R.prototype,l,(function(){return this})),t.AsyncIterator=R,t.async=function(e,r,n,a,i){void 0===i&&(i=Promise);var o=new R(u(e,r,n,a),i);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},O(I),s(I,c,"Generator"),s(I,o,(function(){return this})),s(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=N,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(U),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return l.type="throw",l.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(c&&s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),U(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;U(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),h}},t}function At(e){return function(e){if(Array.isArray(e))return Pt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ft(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 jt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(e,t)||Ft(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 Ft(e,t){if(e){if("string"==typeof e)return Pt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pt(e,t):void 0}}function Pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var _t=function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{c(n.next(e))}catch(e){i(e)}}function l(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,l)}c((n=n.apply(e,t||[])).next())}))},Ct="shared.giveFeedback",Vt=u.T.encloseNamespace(Ct),qt=5,Gt=60,Mt=1e6;function Dt(e){var t,r,a=(0,j.Z)(),l=(0,d.useGetFetchAsync)(),u=p.a.useBasicFetch(A.N.currentUser()),O=p.a.useBasicFetch(u.data&&x.h.customer(u.data.customerId)),L=p.a.useBasicFetch(u.data&&A.N.user(u.data.id)),k=jt(i().useState(null),2),_=k[0],C=k[1],V=jt(i().useState("form"),2),M=V[0],D=V[1],B=jt(i().useState(null),2),H=B[0],Z=B[1],z=(0,m.G)(S.D.MixedMediaUpload),X=function(e,t){var r,n,a,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],l=(n=i().useState(!1),a=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,l=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(n,a)||function(e,t){if(e){if("string"==typeof e)return F(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?F(e,t):void 0}}(n,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];return i().useEffect((function(){var r=e();if(r)return r.off("add remove change"),r.on("add remove change",(function(){l((function(e){return!e}))})),t&&r.on("remove",t),function(){r.off("add remove change")}}),o),null===(r=e())||void 0===r?void 0:r.toJSON()}((function(){return z.getCollection()}),null),Q=i().useRef(),Y=i().useRef(0),$=i().useRef([]),J=jt(i().useState([]),2),ee=J[0],te=J[1],re=jt(i().useState(""),2),ne=re[0],ae=re[1],ie=e.product===I.x.StreamableLearning?w.R.StreamableLearning:w.R.Subject,oe=p.a.useBasicFetch(T.x.presentation(ie)),le=p.a.useBasicFetch(R.presentationAudiences(null,ie)),ce=null===(t=p.a.useBasicFetch(N.userProducts()).data)||void 0===t?void 0:t.find((function(e){return e.id===I.x.Exchange}));function se(e){C(e),e&&f.k.logUserAction({type:e},{actionType:v.Vw.Click,entity:v.py.Feedback,location:v.LZ.GiveFeedbackPopup,workflowPhase:v.eu.Start})}function ue(e){switch(e){case q.SUGGEST_IMPROVEMENT:return n.SuggestImprovement;case q.REPORT_BUG:return n.ReportBug;case q.REQUEST_VIDEO:return n.RequestVideo;case q.REQUEST_LIVESTREAM:return n.RequestLivestream;case q.GIVE_PRAISE:return n.GivePraise;case q.RAISE_ISSUE:return n.RaiseIssue;case q.OTHER:return n.Other}}return P(o.Radio.channel(E.Q4.MIXED_MEDIA_UPLOAD),h.S.UPLOAD_COMPLETE,(function(e){var t=e.toJSON();if($.current.push(t),Y.current--,!(Y.current>0)){var r=$.current.length;$.current.forEach((function(e){setTimeout((function(){r--;var t=z.getCollection().filter((function(t){var r;return(null===(r=t.get("fileInfo"))||void 0===r?void 0:r.id)===e.fileInfo.id}));z.getCollection().remove(t),te((function(e){return[].concat(At(e),At(t))})),r>0||(f.k.logUserAction({fileInfo:e.fileInfo},{location:v.LZ.GiveFeedbackPopup,actionType:v.Vw.Upload,entity:v.py.MixedMedia,descriptor:f.k.mapInteractionType(Q.current)}),a.success(Vt("mixedMediaUploadSuccess")))}))})),$.current=[]}})),i().createElement(b.G,{size:"lg",title:_?W(_):Vt("title"),closePopup:e.closePopup,backdrop:"static"},!_&&i().createElement("p",null,i().createElement(y.x,{namespace:Ct,phrase:"description"})),!_&&i().createElement(K,{onSelectOption:se,options:[q.SUGGEST_IMPROVEMENT,q.REPORT_BUG,e.product===I.x.StreamableLearning?q.REQUEST_LIVESTREAM:q.REQUEST_VIDEO,q.GIVE_PRAISE,q.RAISE_ISSUE,q.OTHER]}),_&&i().createElement(Ut,{selectedOption:_,formStage:M,onSubmit:function(t,r){var n,i,o,c,d,m;return _t(this,void 0,void 0,Nt().mark((function p(){var h,g;return Nt().wrap((function(p){for(;;)switch(p.prev=p.next){case 0:return h={type:ue(_),user:G.getUserInfo(u.data,O.data),tags:G.getTags(u.data,e.product,!1,["give feedback",W(_).toLowerCase(),null===(i=null===(n=oe.data)||void 0===n?void 0:n.description)||void 0===i?void 0:i.toLowerCase().trim(),null===(m=null===(d=null===(c=null===(o=L.data)||void 0===o?void 0:o.userProfile)||void 0===c?void 0:c.metadata)||void 0===d?void 0:d.jobTitle)||void 0===m?void 0:m.toLowerCase()].filter(Boolean))},g=Object.assign(Object.assign({},t),{currentPageUrl:s.Ab.GetCurrentUrl()}),_===q.REPORT_BUG&&ee.length&&(g=Object.assign(Object.assign({},g),G.categorizeFiles(ee))),p.prev=3,p.next=6,l(U.submitFeedback(h,g));case 6:f.k.logUserAction(Object.assign(Object.assign({},h),g),{actionType:v.Vw.Submit,entity:v.py.Feedback,location:v.LZ.GiveFeedbackPopup,workflowPhase:v.eu.Complete}),D("success"),p.next=13;break;case 10:p.prev=10,p.t0=p.catch(3),a.error(Vt("error"));case 13:return p.prev=13,r(),p.finish(13);case 16:case"end":return p.stop()}}),p,null,[[3,10,13,16]])})))},setSelectedOption:se,closePopup:e.closePopup,onFilesAdded:function(e,t){e.some((function(e){return e.size>Gt*Mt}))?ae(Vt("maxFileSizeUploadError",{limit:Gt})):e.length>qt-X.length?ae(Vt("maxFilesUploadError",{limit:qt})):e.some((function(e){return!c().isValidFile(e,g.l.MIXED_MEDIA)}))?ae(Vt("invalidTypeUploadError")):(ae(""),Y.current+=e.length,t&&(Q.current=t),z.addFiles(e))},uploadingFiles:X,uploadedFiles:ee,deleteFile:function(e){te((function(t){return t.filter((function(t){return t.id!==e}))}))},cancelUpload:function(e){return z.cancelUpload(e)},audiences:le.data,uploadError:ne,initialValues:H,setFormState:Z,instanceRegion:null===(r=u.data)||void 0===r?void 0:r.instanceRegion,hasExchangeTvProduct:!!ce,exchangeTvUrl:null==ce?void 0:ce.url}))}}}]);
|